Use Amplify to allow plugins to handle modal.onLoad and modal.onUnload events

This commit is contained in:
webmaster@grandhavenchristian.org
2015-04-27 07:49:04 -04:00
parent e294660e62
commit ec1b537227

View File

@@ -30,9 +30,7 @@
.focus();
});
// If a plugin has provided a custom load animation
if(typeof codiad.modal.onLoadAnimation == "function") {
codiad.modal.onLoadAnimation();
} else {
if(amplify.publish('modal.onLoad')) {
$('#modal, #modal-overlay')
.fadeIn(200);
}
@@ -51,9 +49,7 @@
// If a plugin has provided a custom unload animation (note
// that the custom animation function is responsible for removing
// the HTML from the modal)
if(typeof codiad.modal.onUnloadAnimation == "function") {
codiad.modal.onUnloadAnimation();
} else {
if(amplify.publish('modal.onUnload')) {
$('#modal, #modal-overlay')
.fadeOut(200);
$('#modal-content')