mirror of
https://github.com/moodle/moodle.git
synced 2025-05-04 15:27:34 +02:00
Merge branch 'MDL-41033' of git://github.com/rwijaya/moodle
This commit is contained in:
commit
23b7f1dfcf
@ -663,7 +663,7 @@ class page_requirements_manager {
|
|||||||
array('nofilesavailable', 'repository'), array('norepositoriesavailable', 'repository'),
|
array('nofilesavailable', 'repository'), array('norepositoriesavailable', 'repository'),
|
||||||
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
|
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
|
||||||
array('fileexistsdialog_filemanager', 'repository'), array('renameto', 'repository'),
|
array('fileexistsdialog_filemanager', 'repository'), array('renameto', 'repository'),
|
||||||
array('referencesexist', 'repository')
|
array('referencesexist', 'repository'), array('edit', 'moodle')
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case 'core_comment':
|
case 'core_comment':
|
||||||
|
@ -1065,7 +1065,9 @@ M.core_filepicker.init = function(Y, options) {
|
|||||||
}, false);
|
}, false);
|
||||||
},
|
},
|
||||||
select_file: function(args) {
|
select_file: function(args) {
|
||||||
|
Y.one('#fp-file_label_'+this.options.client_id).setContent(Y.Escape.html(M.str.moodle.edit+' '+args.title));
|
||||||
this.selectui.show();
|
this.selectui.show();
|
||||||
|
Y.one('#'+this.selectnode.get('id')).focus();
|
||||||
var client_id = this.options.client_id;
|
var client_id = this.options.client_id;
|
||||||
var selectnode = this.selectnode;
|
var selectnode = this.selectnode;
|
||||||
var return_types = this.options.repositories[this.active_repo.id].return_types;
|
var return_types = this.options.repositories[this.active_repo.id].return_types;
|
||||||
@ -1306,8 +1308,13 @@ M.core_filepicker.init = function(Y, options) {
|
|||||||
}
|
}
|
||||||
// create panel for selecting a file (initially hidden)
|
// create panel for selecting a file (initially hidden)
|
||||||
this.selectnode = Y.Node.createWithFilesSkin(M.core_filepicker.templates.selectlayout).
|
this.selectnode = Y.Node.createWithFilesSkin(M.core_filepicker.templates.selectlayout).
|
||||||
set('id', 'filepicker-select-'+client_id);
|
set('id', 'filepicker-select-'+client_id).
|
||||||
|
set('aria-live', 'assertive').
|
||||||
|
set('role', 'dialog');
|
||||||
|
|
||||||
|
var fplabel = 'fp-file_label_'+ client_id;
|
||||||
this.selectui = new Y.Panel({
|
this.selectui = new Y.Panel({
|
||||||
|
headerContent: '<span id="' + fplabel +'">'+M.str.moodle.edit+'</span>',
|
||||||
srcNode : this.selectnode,
|
srcNode : this.selectnode,
|
||||||
zIndex : 7600,
|
zIndex : 7600,
|
||||||
centered : true,
|
centered : true,
|
||||||
@ -1317,6 +1324,7 @@ M.core_filepicker.init = function(Y, options) {
|
|||||||
});
|
});
|
||||||
// allow to move the panel dragging it by it's header:
|
// allow to move the panel dragging it by it's header:
|
||||||
this.selectui.plug(Y.Plugin.Drag,{handles:['#filepicker-select-'+client_id+' .yui3-widget-hd']});
|
this.selectui.plug(Y.Plugin.Drag,{handles:['#filepicker-select-'+client_id+' .yui3-widget-hd']});
|
||||||
|
Y.one('#'+this.selectnode.get('id')).setAttribute('aria-labelledby', fplabel);
|
||||||
this.selectui.hide();
|
this.selectui.hide();
|
||||||
// event handler for lazy loading of thumbnails and next page
|
// event handler for lazy loading of thumbnails and next page
|
||||||
this.fpnode.one('.fp-content').on(['scroll','resize'], this.content_scrolled, this);
|
this.fpnode.one('.fp-content').on(['scroll','resize'], this.content_scrolled, this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user