From ec1b537227d8ecee39697b404e99f997166d85d8 Mon Sep 17 00:00:00 2001 From: "webmaster@grandhavenchristian.org" Date: Mon, 27 Apr 2015 07:49:04 -0400 Subject: [PATCH] Use Amplify to allow plugins to handle modal.onLoad and modal.onUnload events --- js/modal.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/js/modal.js b/js/modal.js index b3b3ba0..a510def 100755 --- a/js/modal.js +++ b/js/modal.js @@ -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')