mirror of
https://github.com/moodle/moodle.git
synced 2025-05-03 23:07:27 +02:00
MDL-41200 filepicker: change header string to select.
Add length limitation for header, so it fits nicely in mobile devices
This commit is contained in:
parent
702d1f853e
commit
0a5c86ddef
@ -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', 'moodle')
|
||||
));
|
||||
break;
|
||||
case 'core_comment':
|
||||
|
@ -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 = 50;
|
||||
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));
|
||||
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.moodle.select+'</span>',
|
||||
draggable : true,
|
||||
bodyContent : this.selectnode,
|
||||
centered : true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user