Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'MDL-35925-master' of git://github.com/phalacee/moodle
Browse files Browse the repository at this point in the history
Conflicts:
	lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js
  • Loading branch information
danpoltawski committed Sep 2, 2013
2 parents c932a4d + 2eaaae0 commit 6b25e62
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 8 deletions.
10 changes: 5 additions & 5 deletions files/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ private function fm_print_generallayout($fm) {
<div class="fp-navbar">
<div class="filemanager-toolbar">
<div class="fp-toolbar">
<div class="{!}fp-btn-add"><a href="#"><img src="'.$this->pix_url('a/add_file').'" /> '.$straddfile.'</a></div>
<div class="{!}fp-btn-mkdir"><a href="#"><img src="'.$this->pix_url('a/create_folder').'" /> '.$strmakedir.'</a></div>
<div class="{!}fp-btn-download"><a href="#"><img src="'.$this->pix_url('a/download_all').'" /> '.$strdownload.'</a></div>
<div class="{!}fp-btn-add"><a role="button" href="#"><img src="'.$this->pix_url('a/add_file').'" /> '.$straddfile.'</a></div>
<div class="{!}fp-btn-mkdir"><a role="button" href="#"><img src="'.$this->pix_url('a/create_folder').'" /> '.$strmakedir.'</a></div>
<div class="{!}fp-btn-download"><a role="button" href="#"><img src="'.$this->pix_url('a/download_all').'" /> '.$strdownload.'</a></div>
</div>
<div class="{!}fp-viewbar">
<a title="'. get_string('displayicons', 'repository') .'" class="{!}fp-vb-icons" href="#"></a>
Expand Down Expand Up @@ -521,10 +521,10 @@ private function fm_print_restrictions($fm) {
*/
private function fp_js_template_generallayout() {
$rv = '
<div class="file-picker fp-generallayout">
<div tabindex="0" class="file-picker fp-generallayout" role="dialog" aria-live="assertive">
<div class="fp-repo-area">
<ul class="fp-list">
<li class="{!}fp-repo"><a href="#"><img class="{!}fp-repo-icon" alt="'. get_string('repositoryicon', 'repository') .'" width="16" height="16" />&nbsp;<span class="{!}fp-repo-name"></span></a></li>
<li class="{!}fp-repo"><a href="#"><img class="{!}fp-repo-icon" alt=" " width="16" height="16" />&nbsp;<span class="{!}fp-repo-name"></span></a></li>
</ul>
</div>
<div class="fp-repo-items" tabindex="0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,26 @@ Y.extend(DIALOGUE, Y.Panel, {
shouldResizeFullscreen : function() {
return (window === window.parent) && this.get('responsive') &&
Math.floor(Y.one(document.body).get('winWidth')) < this.get('responsiveWidth');
},

/**
* Override the show method to set keyboard focus on the dialogue.
*
* @method show
* @return void
*/
show : function() {
var result = null,
header = this.headerNode,
content = this.bodyNode;

result = DIALOGUE.superclass.show.call(this);
if (header && header !== '') {
header.focus();
} else if (content && content !== '') {
content.focus();
}
return result;
}
}, {
NAME : DIALOGUE_NAME,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,26 @@ Y.extend(DIALOGUE, Y.Panel, {
shouldResizeFullscreen : function() {
return (window === window.parent) && this.get('responsive') &&
Math.floor(Y.one(document.body).get('winWidth')) < this.get('responsiveWidth');
},

/**
* Override the show method to set keyboard focus on the dialogue.
*
* @method show
* @return void
*/
show : function() {
var result = null,
header = this.headerNode,
content = this.bodyNode;

result = DIALOGUE.superclass.show.call(this);
if (header && header !== '') {
header.focus();
} else if (content && content !== '') {
content.focus();
}
return result;
}
}, {
NAME : DIALOGUE_NAME,
Expand Down
20 changes: 20 additions & 0 deletions lib/yui/src/notification/js/dialogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,26 @@ Y.extend(DIALOGUE, Y.Panel, {
shouldResizeFullscreen : function() {
return (window === window.parent) && this.get('responsive') &&
Math.floor(Y.one(document.body).get('winWidth')) < this.get('responsiveWidth');
},

/**
* Override the show method to set keyboard focus on the dialogue.
*
* @method show
* @return void
*/
show : function() {
var result = null,
header = this.headerNode,
content = this.bodyNode;

result = DIALOGUE.superclass.show.call(this);
if (header && header !== '') {
header.focus();
} else if (content && content !== '') {
content.focus();
}
return result;
}
}, {
NAME : DIALOGUE_NAME,
Expand Down
6 changes: 4 additions & 2 deletions repository/filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,13 +1296,15 @@ M.core_filepicker.init = function(Y, options) {
},
render: function() {
var client_id = this.options.client_id;
var fpid = "filepicker-"+ client_id;
var labelid = 'fp-dialog-label_'+ client_id;
this.fpnode = Y.Node.createWithFilesSkin(M.core_filepicker.templates.generallayout).
set('id', 'filepicker-'+client_id);
set('id', 'filepicker-'+client_id).set('aria-labelledby', labelid);
this.mainui = new M.core.dialogue({
extraClasses : ['filepicker'],
draggable : true,
bodyContent : this.fpnode,
headerContent: M.str.repository.filepicker,
headerContent: '<span id="'+ labelid +'">'+ M.str.repository.filepicker +'</span>',
centered : true,
modal : true,
visible : false,
Expand Down

0 comments on commit 6b25e62

Please sign in to comment.