sort : function(e,el)
{
var col = Roo.get(el)
+
+ if(!col.hasClass('sortable')){
+ return;
+ }
+
var sort = col.attr('sort');
var dir = 'ASC';
c.cls = 'sortable';
}
+ if(typeof(config.width) != 'undefined'){
+ c.style = 'width:' + config.width + 'px';
+ }
+
header.cn.push(c)
}
{
Roo.log('ds onload');
+ var _this = this;
var cm = this.cm;
Roo.each(this.el.select('thead th.sortable', true).elements, function(e){
- Roo.log(e);
+ e.removeClass(['glyphicon', 'glyphicon-arrow-up', 'glyphicon-arrow-down']);
+
+ if(e.hasClass('sortable') && e.attr('sort') == _this.store.sortInfo.field && _this.store.sortInfo.direction.toUpperCase() == 'ASC'){
+ e.addClass(['glyphicon', 'glyphicon-arrow-up']);
+ }
+
+ if(e.hasClass('sortable') && e.attr('sort') == _this.store.sortInfo.field && _this.store.sortInfo.direction.toUpperCase() == 'DESC'){
+ e.addClass(['glyphicon', 'glyphicon-arrow-down']);
+ }
});
var tbody = this.el.select('tbody', true).first();
};
if(typeof(config.width) != 'undefined'){
- td.width = config.width;
+ td.style = 'width:' + config.width + 'px';
}
row.cn.push(td);