This commit is contained in:
Sam Hemelryk
2013-08-15 15:16:19 +12:00
2 changed files with 9 additions and 3 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('edit', 'moodle')
array('referencesexist', 'repository'), array('select', 'repository')
));
break;
case 'core_comment':
+8 -2
View File
@@ -1062,7 +1062,13 @@ M.core_filepicker.init = function(Y, options) {
}, false);
},
select_file: function(args) {
Y.one('#fp-file_label_'+this.options.client_id).setContent(Y.Escape.html(M.str.moodle.edit+' '+args.title));
var argstitle = args.title;
// Limit the string length so it fits nicely on mobile devices
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.repository.select+' '+argstitle));
this.selectui.show();
Y.one('#'+this.selectnode.get('id')).focus();
var client_id = this.options.client_id;
@@ -1306,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.edit+'</span>',
headerContent: '<span id="' + fplabel +'">'+M.str.repository.select+'</span>',
draggable : true,
width : '450px',
bodyContent : this.selectnode,