From 84b16c60f1746c529efc0a2fd886d4a4d30c7e36 Mon Sep 17 00:00:00 2001 From: Tony Tomov Date: Mon, 20 May 2013 12:38:59 +0300 Subject: [PATCH] Fix show sort icons when frozen columns and singel sorting. --- js/grid.base.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/grid.base.js b/js/grid.base.js index 33398732a..7b574ee3f 100644 --- a/js/grid.base.js +++ b/js/grid.base.js @@ -2208,14 +2208,21 @@ $.fn.jqGrid = function( pin ) { if(ts.p.lastsort === idxcol && ts.p.sortorder === sor && !reload) { return; } ts.p.sortorder = sor; } - var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.grid.headers[idxcol].el; + var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.p.frozenColumns ? obj : ts.grid.headers[idxcol].el; $("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled'); $(previousSelectedTh).attr("aria-selected","false"); + if(ts.p.frozenColumns) { + ts.grid.fhDiv.find("span.ui-grid-ico-sort").addClass('ui-state-disabled'); + ts.grid.fhDiv.find("th").attr("aria-selected","false"); + } $("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass('ui-state-disabled'); $(newSelectedTh).attr("aria-selected","true"); if(!ts.p.viewsortcols[0]) { if(ts.p.lastsort !== idxcol) { + if(ts.p.frozenColumns){ + ts.grid.fhDiv.find("span.s-ico").hide(); + } $("span.s-ico",previousSelectedTh).hide(); $("span.s-ico",newSelectedTh).show(); }