Skip to content

Commit

Permalink
Fix show sort icons when frozen columns and singel sorting.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytomov committed May 20, 2013
1 parent 3425e26 commit 84b16c6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/grid.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 84b16c6

Please sign in to comment.