Skip to content
Snippets Groups Projects
Commit e5bd299e authored by Demian Katz's avatar Demian Katz
Browse files

Style fixes.

parent 42ef6d68
No related merge requests found
/*global path*/
// keep a handle to the current opened dialog so we can access it later // 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}; 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 ...@@ -21,7 +23,7 @@ function getLightbox(module, action, id, lookfor, message, followupModule, follo
}; };
// create a new modal dialog // create a new modal dialog
$dialog = $('<div id="modalDialog"><div class="dialogLoading">&nbsp;</div></div>') var $dialog = $('<div id="modalDialog"><div class="dialogLoading">&nbsp;</div></div>')
.load(path + '/AJAX/JSON?' + $.param(params), postParams) .load(path + '/AJAX/JSON?' + $.param(params), postParams)
.dialog({ .dialog({
modal: true, modal: true,
...@@ -62,7 +64,7 @@ function hideLightbox() { ...@@ -62,7 +64,7 @@ function hideLightbox() {
} }
function displayLightboxFeedback($form, message, type) { function displayLightboxFeedback($form, message, type) {
$container = $form.parent(); var $container = $form.parent();
$container.empty(); $container.empty();
$container.append('<div class="' + type + '">' + message + '</div>'); $container.append('<div class="' + type + '">' + message + '</div>');
} }
...@@ -85,28 +87,6 @@ function hideLoadingGraphic($form) { ...@@ -85,28 +87,6 @@ function hideLoadingGraphic($form) {
$form.parent().parent().find('.dialogLoading').remove(); $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() { function registerAjaxLogin() {
$('#modalDialog form[name="loginForm"]').unbind('submit').submit(function(){ $('#modalDialog form[name="loginForm"]').unbind('submit').submit(function(){
if (!$(this).valid()) { return false; } if (!$(this).valid()) { return false; }
...@@ -588,4 +568,26 @@ function registerAjaxBulkDelete() { ...@@ -588,4 +568,26 @@ function registerAjaxBulkDelete() {
}); });
return false; 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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment