X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2FCommon.js;h=e5d14fef7f37005db8ebaf423dc1a317059f2d91;hb=a5db8e6f23a5fe5a90dfade39766c5bf0f7f8d27;hp=8770917b036466d8502b10a72772dee06021924f;hpb=7f1204e6b3141d5e4f3ebbc0dd03d264b7a66f49;p=civicrm-core.git diff --git a/js/Common.js b/js/Common.js index 8770917b03..e5d14fef7f 100644 --- a/js/Common.js +++ b/js/Common.js @@ -396,13 +396,8 @@ function unselectRadio(fieldName, form) { * @return null */ var submitcount = 0; -/** - * @deprecated - * Changes button label on submit, and disables button after submit for newer browsers. - * Puts up alert for older browsers. - * @todo CRM-13397 replaces this with an alternate (jquery) mechanism - to use the jquery mechanism add - * parent::buildQuickForm to make buttons 'protected' - * */ +/* Changes button label on submit, and disables button after submit for newer browsers. + Puts up alert for older browsers. */ function submitOnce(obj, formId, procText) { // if named button clicked, change text if (obj.value != null) { @@ -889,8 +884,9 @@ CRM.validate = CRM.validate || { /** * Clientside currency formatting * @param value - * @param format + * @param format - currency representation of the number 1234.56 * @return string + * @see CRM_Core_Resources::addCoreResources */ var currencyTemplate; CRM.formatMoney = function(value, format) { @@ -909,7 +905,6 @@ CRM.validate = CRM.validate || { sign = (value < 0) ? '-' : ''; //extracting the absolute value of the integer part of the number and converting to string i = parseInt(value = Math.abs(value).toFixed(2)) + ''; - j = ((j = i.length) > 3) ? j % 3 : 0; result = sign + (j ? i.substr(0, j) + separator : '') + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + separator) + (2 ? decimal + Math.abs(value - i).toFixed(2).slice(2) : ''); return format.replace(/1.*234.*56/, result);