From 93dee6ee8555b4d2ec306a89a7d52a804301718e Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 22 Dec 2013 20:31:29 -0800 Subject: [PATCH] CRM-13819 - Remove click-sort from tables where order matters --- css/civicrm.css | 11 ++++------- templates/CRM/common/jsortable.tpl | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index b7154fdc8c..58bc42cb18 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -3029,12 +3029,6 @@ div#crm-container form { padding-top: 3px; } -.crm-container table.display thead th { - padding: 3px 0px 3px 10px; - cursor: pointer; - * cursor: hand; -} - .crm-container div.dataTables_wrapper .ui-widget-header { font-weight: normal; } @@ -3118,7 +3112,10 @@ div#crm-container form { border-bottom: 1px solid black; font-weight: bold; cursor: pointer; - * cursor: hand; +} + +.crm-container table.display thead th.sorting_disabled { + cursor: default; } .crm-container table.display tfoot th { diff --git a/templates/CRM/common/jsortable.tpl b/templates/CRM/common/jsortable.tpl index 5678b8cf6d..08286493ab 100644 --- a/templates/CRM/common/jsortable.tpl +++ b/templates/CRM/common/jsortable.tpl @@ -28,7 +28,7 @@ cj( function( ) { // 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 sortEnabled = true; var sourceUrl = ''; var useClass = 'display'; @@ -76,6 +76,7 @@ eval('tableId =[' + tableId + ']'); sortColumn += '[' + count + ', "asc" ],'; } sortId = getRowId(tdObject, cj(this).attr('id') +' hiddenElement' ); + sortEnabled = false; columns += '{ "sType": \'' + stype + '\', "fnRender": function (oObj) { return oObj.aData[' + sortId + ']; },"bUseRendered": false},'; break; case 'nosort': @@ -160,6 +161,7 @@ eval('tableId =[' + tableId + ']'); "asStripClasses" : [ "odd-row", "even-row" ], "bAutoWidth" : false, "aoColumns" : columns, + "bSort" : sortEnabled, "oLanguage":{"sEmptyTable" : noRecordFoundMsg, "sZeroRecords" : noRecordFoundMsg } }); -- 2.25.1