Author: dmorozov
Date: 2007-06-28 13:37:19 -0400 (Thu, 28 Jun 2007)
New Revision: 1376
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
Fix broken sort event
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-28
17:11:59 UTC (rev 1375)
+++
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-28
17:37:19 UTC (rev 1376)
@@ -418,12 +418,14 @@
for(var i = 0, len = this.getColumns().length; i < len; i++) {
var h = this.getColumns()[i];
- if(i != index) {
- Element.setStyle(h.sortDesc, {display: 'none'});
- Element.setStyle(h.sortAsc, {display: 'none'});
- } else{
- Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' :
'none')});
- Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' :
'none')});
+ if(h.sortDesc && h.sortAsc) {
+ if(i != index) {
+ Element.setStyle(h.sortDesc, {display: 'none'});
+ Element.setStyle(h.sortAsc, {display: 'none'});
+ } else{
+ Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' :
'none')});
+ Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' :
'none')});
+ }
}
}
Show replies by date