From 5b626f26350235fe17fc7b94be874c10bcf31b54 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 24 Apr 2013 16:00:48 -0700 Subject: [PATCH] code cleanup --- templates/CRM/common/customData.tpl | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/templates/CRM/common/customData.tpl b/templates/CRM/common/customData.tpl index 6c45f8d5cf..ef0317bdf7 100644 --- a/templates/CRM/common/customData.tpl +++ b/templates/CRM/common/customData.tpl @@ -41,11 +41,12 @@ CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMult if ( subName ) { dataUrl = dataUrl + '&subName=' + subName; cj('#customData' + subName ).show(); - } else { + } + else { cj('#customData').show(); } if ( groupID ) { - dataUrl = dataUrl + '&groupID=' + groupID; + dataUrl = dataUrl + '&groupID=' + groupID; } {/literal} @@ -66,7 +67,8 @@ CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMult if ( !cgCount ) { cgCount = 1; var prevCount = 1; - } else if ( cgCount >= 1 ) { + } + else if ( cgCount >= 1 ) { var prevCount = cgCount; cgCount++; } @@ -75,16 +77,19 @@ CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMult if ( isMultiple ) { - var fname = '#custom_group_' + groupID + '_' + prevCount; + var fname = '#custom_group_' + groupID + '_' + prevCount; if (cj(".add-more-link-" + groupID + "-" + prevCount ).length) { cj(".add-more-link-" + groupID + "-" + prevCount).hide(); - } else { - cj("#add-more-link-"+prevCount).hide(); } - } else { + else { + cj("#add-more-link-"+prevCount).hide(); + } + } + else { if ( subName && subName != 'null' ) { var fname = '#customData' + subName ; - } else { + } + else { var fname = '#customData'; } } @@ -117,7 +122,6 @@ CRM.buildCustomData = function( type, subType, subName, cgCount, groupID, isMult storage = null; } }); - }; -- 2.25.1