Merge branch 'MDL-59784-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE

This commit is contained in:
Jun Pataleta
2017-08-23 10:48:00 +08:00
2 changed files with 11 additions and 7 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+10 -6
View File
@@ -224,13 +224,17 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
Modal.prototype.setTitle = function(value) {
var title = this.getTitle();
if (typeof value === 'string') {
title.html(value);
} else {
value.then(function(content) {
return title.html(content);
});
var p = value;
if (typeof value !== 'object' || !value.hasOwnProperty('then')) {
p = $.Deferred();
p.resolve(value);
}
p.then(function(content) {
title.html(content);
return;
});
};
/**