mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
commit
888cf2131e
@ -1,12 +1,12 @@
|
||||
<aside class="modal-background"></aside>
|
||||
<article class="modal{{#if options.type}}-{{options.type}}{{/if}} {{#if options.style}}modal-style-{{options.style}}{{/if}} {{options.animation}} js-modal">
|
||||
<header class="modal-header"><h1>{{content.title}}</h1>{{#if options.close}}<a class="close" href="#"><span class="hidden">Close</span></a>{{/if}}</header>
|
||||
{{#if content.title}}<header class="modal-header"><h1>{{content.title}}</h1>{{#if options.close}}<a class="close" href="#"><span class="hidden">Close</span></a>{{/if}}</header>{{/if}}
|
||||
<section class="modal-content">
|
||||
</section>
|
||||
{{#if options.confirm}}
|
||||
<footer class="modal-footer">
|
||||
<button class="button-add js-button-accept">{{options.confirm.accept.text}}</button>
|
||||
<button class="button-delete js-button-reject">{{options.confirm.reject.text}}</button>
|
||||
<button class="js-button-accept {{#if options.confirm.accept.buttonClass}}{{options.confirm.accept.buttonClass}}{{else}}button-add{{/if}}">{{options.confirm.accept.text}}</button>
|
||||
<button class="js-button-reject {{#if options.confirm.reject.buttonClass}}{{options.confirm.reject.buttonClass}}{{else}}button-delete{{/if}}">{{options.confirm.reject.text}}</button>
|
||||
</footer>
|
||||
{{/if}}
|
||||
</article>
|
@ -281,11 +281,11 @@
|
||||
} else {
|
||||
// Initiate functions for buttons here so models don't get tied up.
|
||||
this.acceptModal = function () {
|
||||
this.model.options.confirm.accept.func();
|
||||
this.model.options.confirm.accept.func.call(this);
|
||||
self.removeElement();
|
||||
};
|
||||
this.rejectModal = function () {
|
||||
this.model.options.confirm.reject.func();
|
||||
this.model.options.confirm.reject.func.call(this);
|
||||
self.removeElement();
|
||||
};
|
||||
shortcut.remove("ESC");
|
||||
@ -308,11 +308,12 @@
|
||||
if (document.body.style.webkitFilter !== undefined) { // Detect webkit filters
|
||||
$("body").addClass("blur");
|
||||
}
|
||||
|
||||
if (_.isFunction(this.model.options.afterRender)) {
|
||||
this.model.options.afterRender.call(this);
|
||||
}
|
||||
if (this.model.options.animation) {
|
||||
this.animate(this.$el.children(".js-modal"));
|
||||
}
|
||||
|
||||
var self = this;
|
||||
$(window).on('resize', self.resize);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user