MDL-55972 core: add confirmation modal

This commit is contained in:
Ryan Wyllie
2016-09-16 07:03:44 +00:00
committed by Mark Nelson
parent eeee7bca80
commit 10ea82701a
6 changed files with 165 additions and 16 deletions

View File

@@ -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));