Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30899 moodle-enrol-notification Adding close button title for acc…

…essibility
  • Loading branch information...
commit 49ca31880c2b5405f608a3b67723fb74abd35abb 1 parent 429a5a5
@dmonllao dmonllao authored
View
1  backup/util/ui/base_moodleform.class.php
@@ -322,6 +322,7 @@ public function display() {
$config->question = get_string('confirmcancelquestion', 'backup');
$config->yesLabel = get_string('confirmcancelyes', 'backup');
$config->noLabel = get_string('confirmcancelno', 'backup');
+ $config->closeButtonTitle = get_string('close', 'editor');
$PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_cancel_buttons', array($config));
$PAGE->requires->yui_module('moodle-backup-backupselectall', 'M.core_backup.select_all_init',
View
4 blocks/community/communitycourse.php
@@ -228,10 +228,10 @@
}
}
$PAGE->requires->yui_module('moodle-block_community-comments', 'M.blocks_community.init_comments',
- array(array('commentids' => $commentedcourseids)));
+ array(array('commentids' => $commentedcourseids, 'closeButtonTitle' => get_string('close', 'editor'))));
$PAGE->requires->yui_module('moodle-block_community-imagegallery', 'M.blocks_community.init_imagegallery',
array(array('imageids' => $courseids, 'imagenumbers' => $courseimagenumbers,
- 'huburl' => $huburl)));
+ 'huburl' => $huburl, 'closeButtonTitle' => get_string('close', 'editor'))));
echo highlight($search, $renderer->course_list($courses, $huburl, $courseid));
View
9 blocks/community/yui/comments/comments.js
@@ -24,7 +24,8 @@ YUI.add('moodle-block_community-comments', function(Y) {
bodyContent:Y.one('#commentoverlay-'+commentid).get('innerHTML'),
visible: false, //by default it is not displayed
lightbox : false,
- zIndex:100
+ zIndex:100,
+ closeButtonTitle: this.get('closeButtonTitle')
});
this.panels[commentid].get('contentBox').one('.commenttitle').remove();
@@ -78,7 +79,11 @@ YUI.add('moodle-block_community-comments', function(Y) {
}, {
NAME : COMMENTSNAME,
ATTRS : {
- commentids: {}
+ commentids: {},
+ closeButtonTitle : {
+ validator : Y.Lang.isString,
+ value : 'Close'
+ }
}
});
View
9 blocks/community/yui/imagegallery/imagegallery.js
@@ -102,7 +102,8 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
bodyContent:Y.one('#imageoverlay').get('innerHTML'),
visible: false, //by default it is not displayed
lightbox : false,
- zIndex:100
+ zIndex:100,
+ closeButtonTitle: this.get('closeButtonTitle')
});
this.panel.render();
this.panel.hide(); //show the panel
@@ -187,7 +188,11 @@ YUI.add('moodle-block_community-imagegallery', function(Y) {
ATTRS : {
imageids: {},
imagenumbers: {},
- huburl: {}
+ huburl: {},
+ closeButtonTitle : {
+ validator : Y.Lang.isString,
+ value : 'Close'
+ }
}
});
View
2  course/lib.php
@@ -4584,7 +4584,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
// Add the module chooser
$PAGE->requires->yui_module('moodle-course-modchooser',
'M.course.init_chooser',
- array(array('courseid' => $course->id))
+ array(array('courseid' => $course->id, 'closeButtonTitle' => get_string('close', 'editor')))
);
$PAGE->requires->strings_for_js(array(
'addresourceoractivity',
View
9 enrol/yui/notification/notification.js
@@ -61,6 +61,11 @@ var DIALOGUE = function(config) {
];
}
DIALOGUE.superclass.constructor.apply(this, [config]);
+
+ if (config.closeButton !== false) {
+ // The buttons constructor does not allow custom attributes
+ this.get('buttons').header[0].setAttribute('title', this.get('closeButtonTitle'));
+ }
};
Y.extend(DIALOGUE, Y.Panel, {
initializer : function(config) {
@@ -111,6 +116,10 @@ Y.extend(DIALOGUE, Y.Panel, {
validator : Y.Lang.isBoolean,
value : true
},
+ closeButtonTitle : {
+ validator : Y.Lang.isString,
+ value : 'Close'
+ },
center : {
validator : Y.Lang.isBoolean,
value : true
View
12 lib/yui/chooserdialogue/chooserdialogue.js
@@ -40,9 +40,11 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
bodyContent : this.bodycontent.get('innerHTML'),
headerContent : this.headercontent.get('innerHTML'),
draggable : true,
- visible : false, // Hide by default.
- zindex : 100, // Display in front of other items.
- lightbox : true // This dialogue should be modal.
+ visible : false, // Hide by default
+ zindex : 100, // Display in front of other items
+ lightbox : true, // This dialogue should be modal
+ shim : true,
+ closeButtonTitle : this.get('closeButtonTitle')
}
// Override with additional options
@@ -313,6 +315,10 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
},
maxheight : {
value : 660
+ },
+ closeButtonTitle : {
+ validator : Y.Lang.isString,
+ value : 'Close'
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.