The function (unpacked from main.js) below limits the title to 30
characters.  Can we instead,

a) Make the limit larger by default, and possibly,
b) let the CSS/JS dynamically limit the size on the page horizontally
by either displaying ellipsis or by wrapping the text within the div
element, or
c) make the default value of 30 an adjustable variable in a
configuration file? (Perhaps there is an existing mechanism I'm not
aware of already.)

function rename_worksheet()
        {
        var callback=function (new_worksheet_name)
                {
                var title=$('#worksheet_title'),set_name;
                if (new_worksheet_name.length>=30)
                        {
                        set_name=new_worksheet_name.slice(0,30)+' ...';
                }
                 else
                        {
                        set_name=new_worksheet_name;
                }
                title.html(set_name);
                worksheet_name=new_worksheet_name;
                original_title=worksheet_name+' (Sage)';
                document.title=original_title;
                async_request(worksheet_command('rename'),null,
                        {
                        name:new_worksheet_name
                }
                );
        };
        modal_prompt(
                {
                success:function (form,prompt)
                        {
                        callback($(':text',form).attr('value'));
                }
        }
        ,
                {
                title:'Rename worksheet',message:'Please enter a name for this
worksheet.','default':worksheet_name,submit:'Rename'
        }
        );
}

Thanks,
Donald

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to