Skip to content

Commit

Permalink
Merge branch 'MDL-53988-master' of https://github.com/xow/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 19, 2016
2 parents a1643e6 + 811d9ff commit 367c85d
Show file tree
Hide file tree
Showing 30 changed files with 841 additions and 213 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/notification.min.js

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

12 changes: 9 additions & 3 deletions lib/amd/src/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function(Y, $, log) {
});
},

confirm: function(title, question, yesLabel, noLabel, callback) {
confirm: function(title, question, yesLabel, noLabel, yesCallback, noCallback) {
// Here we are wrapping YUI. This allows us to start transitioning, but
// wait for a good alternative without having inconsistent dialogues.
Y.use('moodle-core-notification-confirm', function () {
Expand All @@ -149,8 +149,13 @@ function(Y, $, log) {
});

modal.on('complete-yes', function() {
callback();
yesCallback();
});
if (noCallback) {
modal.on('complete-no', function() {
noCallback();
});
}
modal.show();
});
},
Expand Down Expand Up @@ -225,7 +230,8 @@ function(Y, $, log) {
* @param {string} question
* @param {string} yesLabel
* @param {string} noLabel
* @param {function} callback
* @param {function} yesCallback
* @param {function} noCallback Optional parameter to be called if the user presses cancel.
*/
confirm: notificationModule.confirm,

Expand Down
2 changes: 1 addition & 1 deletion mod/lti/amd/build/external_registration.min.js

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

Loading

0 comments on commit 367c85d

Please sign in to comment.