Merge branch 'MDL-59784-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+10
-6
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user