From e5bd299e0aa0f64be44730f002bac74ab9e396ce Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 17 Jan 2013 15:12:57 -0500 Subject: [PATCH] Style fixes. --- themes/blueprint/js/lightbox.js | 50 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/themes/blueprint/js/lightbox.js b/themes/blueprint/js/lightbox.js index a0ce8eb8d98..29df7415b09 100644 --- a/themes/blueprint/js/lightbox.js +++ b/themes/blueprint/js/lightbox.js @@ -1,3 +1,5 @@ +/*global path*/ + // keep a handle to the current opened dialog so we can access it later var __dialogHandle = {dialog: null, processFollowup:false, followupModule: null, followupAction: null, recordId: null, postParams: null}; @@ -21,7 +23,7 @@ function getLightbox(module, action, id, lookfor, message, followupModule, follo }; // create a new modal dialog - $dialog = $('<div id="modalDialog"><div class="dialogLoading"> </div></div>') + var $dialog = $('<div id="modalDialog"><div class="dialogLoading"> </div></div>') .load(path + '/AJAX/JSON?' + $.param(params), postParams) .dialog({ modal: true, @@ -62,7 +64,7 @@ function hideLightbox() { } function displayLightboxFeedback($form, message, type) { - $container = $form.parent(); + var $container = $form.parent(); $container.empty(); $container.append('<div class="' + type + '">' + message + '</div>'); } @@ -85,28 +87,6 @@ function hideLoadingGraphic($form) { $form.parent().parent().find('.dialogLoading').remove(); } -/** - * This is called by the lightbox when it - * finished loading the dialog content from the server - * to register the form in the dialog for ajax submission. - */ -function lightboxDocumentReady() { - registerAjaxLogin(); - registerAjaxCart(); - registerAjaxCartExport(); - registerAjaxSaveRecord(); - registerAjaxListEdit(); - registerAjaxEmailRecord(); - registerAjaxSMSRecord(); - registerAjaxTagRecord(); - registerAjaxEmailSearch(); - registerAjaxBulkSave(); - registerAjaxBulkEmail(); - registerAjaxBulkExport(); - registerAjaxBulkDelete(); - $('.mainFocus').focus(); -} - function registerAjaxLogin() { $('#modalDialog form[name="loginForm"]').unbind('submit').submit(function(){ if (!$(this).valid()) { return false; } @@ -588,4 +568,26 @@ function registerAjaxBulkDelete() { }); return false; }); +} + +/** + * This is called by the lightbox when it + * finished loading the dialog content from the server + * to register the form in the dialog for ajax submission. + */ +function lightboxDocumentReady() { + registerAjaxLogin(); + registerAjaxCart(); + registerAjaxCartExport(); + registerAjaxSaveRecord(); + registerAjaxListEdit(); + registerAjaxEmailRecord(); + registerAjaxSMSRecord(); + registerAjaxTagRecord(); + registerAjaxEmailSearch(); + registerAjaxBulkSave(); + registerAjaxBulkEmail(); + registerAjaxBulkExport(); + registerAjaxBulkDelete(); + $('.mainFocus').focus(); } \ No newline at end of file -- GitLab