mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
MDL-55972 core: add confirmation modal
This commit is contained in:
@@ -248,12 +248,14 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
||||
value.done(function(html, js) {
|
||||
body.html(html);
|
||||
|
||||
if (this.isAttached) {
|
||||
// If we're in the DOM then run the JS immediately.
|
||||
Templates.runTemplateJS(js);
|
||||
} else {
|
||||
// Otherwise cache it to be run when we're attached.
|
||||
this.bodyJS = js;
|
||||
if (js) {
|
||||
if (this.isAttached) {
|
||||
// If we're in the DOM then run the JS immediately.
|
||||
Templates.runTemplateJS(js);
|
||||
} else {
|
||||
// Otherwise cache it to be run when we're attached.
|
||||
this.bodyJS = js;
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
@@ -285,12 +287,14 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
||||
value.done(function(html, js) {
|
||||
footer.html(html);
|
||||
|
||||
if (this.isAttached) {
|
||||
// If we're in the DOM then run the JS immediately.
|
||||
Templates.runTemplateJS(js);
|
||||
} else {
|
||||
// Otherwise cache it to be run when we're attached.
|
||||
this.footerJS = js;
|
||||
if (js) {
|
||||
if (this.isAttached) {
|
||||
// If we're in the DOM then run the JS immediately.
|
||||
Templates.runTemplateJS(js);
|
||||
} else {
|
||||
// Otherwise cache it to be run when we're attached.
|
||||
this.footerJS = js;
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
|
Reference in New Issue
Block a user