From 8bf542260ca52cde39839b22410af8df5eb6ebbb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 2 Oct 2014 14:42:22 -0400 Subject: [PATCH] jsortable.tpl - minor cleanup --- templates/CRM/common/jsortable.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/CRM/common/jsortable.tpl b/templates/CRM/common/jsortable.tpl index ecb5d1b310..0e69dbf1a4 100644 --- a/templates/CRM/common/jsortable.tpl +++ b/templates/CRM/common/jsortable.tpl @@ -43,11 +43,12 @@ } // for date sorting see http://wiki.civicrm.org/confluence/display/CRMDOC/Sorting+Date+Fields+in+dataTables+Widget - var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal}; - var sourceUrl = ''; - var useClass = 'display'; + var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal}, + sourceUrl = '', + useClass = 'display', + tcount = 1, + tableId = []; - var tcount = 1, tableId = []; if ( useAjax ) { {/literal}{if isset($sourceUrl)}sourceUrl = "{$sourceUrl}";{/if}{literal} useClass = 'pagerDisplay'; @@ -56,8 +57,7 @@ CRM.dataTableCount = CRM.dataTableCount || 1; - //rename id of table with sequence - //and create the object for navigation + // FIXME: Rewriting DOM ids is probably a bad idea, and could be avoided $('table.' + useClass).not('.dataTable').each(function() { $(this).attr('id','option' + tcount + CRM.dataTableCount); tableId.push(CRM.dataTableCount); -- 2.25.1