Permalink
Browse files

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

…MOODLE_25_STABLE
  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Aug 12, 2013
2 parents 19f92cf + c50d563 commit 6ae19630c5a0db8d1235323cea7c04cf8a8a8f03
Showing with 10 additions and 2 deletions.
  1. +1 −1 lib/outputrequirementslib.php
  2. +9 −1 repository/filepicker.js
@@ -654,7 +654,7 @@ protected function find_module($component) {
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
@@ -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);

0 comments on commit 6ae1963

Please sign in to comment.