MDL-41200 Filepicker: Reduce the string length to fit the dialog size nicely.

This commit is contained in:
Rossiani Wijaya
2013-08-15 10:38:58 +08:00
parent 0a5c86ddef
commit d8817b4a7f
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -658,7 +658,7 @@ class page_requirements_manager {
array('nofilesavailable', 'repository'), array('norepositoriesavailable', 'repository'),
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
array('fileexistsdialog_filemanager', 'repository'), array('renameto', 'repository'),
array('referencesexist', 'repository'), array('select', 'moodle')
array('referencesexist', 'repository'), array('select', 'repository')
));
break;
case 'core_comment':
+3 -3
View File
@@ -1064,11 +1064,11 @@ M.core_filepicker.init = function(Y, options) {
select_file: function(args) {
var argstitle = args.title;
// Limit the string length so it fits nicely on mobile devices
var titlelength = 50;
var titlelength = 30;
if (argstitle.length > titlelength) {
argstitle = argstitle.substring(0, titlelength) + '...';
}
Y.one('#fp-file_label_'+this.options.client_id).setContent(Y.Escape.html(M.str.moodle.select+' '+argstitle));
Y.one('#fp-file_label_'+this.options.client_id).setContent(Y.Escape.html(M.str.repository.select+' '+argstitle));
this.selectui.show();
Y.one('#'+this.selectnode.get('id')).focus();
var client_id = this.options.client_id;
@@ -1312,7 +1312,7 @@ M.core_filepicker.init = function(Y, options) {
var fplabel = 'fp-file_label_'+ client_id;
this.selectui = new M.core.dialogue({
headerContent: '<span id="' + fplabel +'">'+M.str.moodle.select+'</span>',
headerContent: '<span id="' + fplabel +'">'+M.str.repository.select+'</span>',
draggable : true,
bodyContent : this.selectnode,
centered : true,