Merge branch 'MDL-41033' of git://github.com/rwijaya/moodle

This commit is contained in:
Sam Hemelryk 2013-08-13 09:24:12 +12:00
commit 23b7f1dfcf
2 changed files with 10 additions and 2 deletions

View File

@ -663,7 +663,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('referencesexist', 'repository'), array('edit', 'moodle')
));
break;
case 'core_comment':

View File

@ -1065,7 +1065,9 @@ 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));
this.selectui.show();
Y.one('#'+this.selectnode.get('id')).focus();
var client_id = this.options.client_id;
var selectnode = this.selectnode;
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)
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({
headerContent: '<span id="' + fplabel +'">'+M.str.moodle.edit+'</span>',
srcNode : this.selectnode,
zIndex : 7600,
centered : true,
@ -1317,6 +1324,7 @@ M.core_filepicker.init = function(Y, options) {
});
// 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']});
Y.one('#'+this.selectnode.get('id')).setAttribute('aria-labelledby', fplabel);
this.selectui.hide();
// event handler for lazy loading of thumbnails and next page
this.fpnode.one('.fp-content').on(['scroll','resize'], this.content_scrolled, this);