From e476228532b04e611d1a62fb05ac9106e3c414d6 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 4 Oct 2014 18:29:36 -0400 Subject: [PATCH] Common.js minor cleanup --- js/Common.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/js/Common.js b/js/Common.js index 4480978a87..13150ef23f 100644 --- a/js/Common.js +++ b/js/Common.js @@ -907,6 +907,9 @@ CRM.strings = CRM.strings || {}; }); } + /** + * Improve blockUI when used with jQuery dialog + */ var originalBlock = $.fn.block, originalUnblock = $.fn.unblock; @@ -916,17 +919,16 @@ CRM.strings = CRM.strings || {}; return $(this); } return originalBlock.call(this, opts); - } - + }; $.fn.unblock = function(opts) { if ($(this).is('.ui-dialog-content')) { originalUnblock.call($(this).parents('.ui-dialog'), opts); return $(this); } return originalUnblock.call(this, opts); - } + }; - // Preprocess all cj ajax calls to display messages + // Preprocess all CRM ajax calls to display messages $(document).ajaxSuccess(function(event, xhr, settings) { try { if ((!settings.dataType || settings.dataType == 'json') && xhr.responseText) { @@ -968,7 +970,7 @@ CRM.strings = CRM.strings || {}; CRM.confirm({ title: ts('Preview'), resizable: true, - message: '
', + message: '
', options: null }); e.preventDefault(); @@ -1031,10 +1033,9 @@ CRM.strings = CRM.strings || {}; /** * Clientside currency formatting - * @param value - * @param format - currency representation of the number 1234.56 + * @param number value + * @param [optional] string format - currency representation of the number 1234.56 * @return string - * @see CRM_Core_Resources::addCoreResources */ var currencyTemplate; CRM.formatMoney = function(value, format) { @@ -1067,5 +1068,5 @@ CRM.strings = CRM.strings || {}; return console[method](title, msg); } } - } + }; })(jQuery, _); -- 2.25.1