Roo/bootstrap/Table.js
authorEdward <edward@roojs.com>
Thu, 10 Jul 2014 05:22:43 +0000 (13:22 +0800)
committerEdward <edward@roojs.com>
Thu, 10 Jul 2014 05:22:43 +0000 (13:22 +0800)
Roo/bootstrap/Table.js

index f0f1d9f..fa5f3dd 100644 (file)
@@ -209,12 +209,15 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     {
         var col = Roo.get(el)
         var sort = col.attr('sort');
-        var dir = 'DESC';
+        var dir = 'ASC';
         
+        if(col.hasClass('glyphicon-arrow-up')){
+            dir = 'DESC';
+        }
         
         
         
-        this.store.sortInfo = {field:sort,direction:'ASC'};
+        this.store.sortInfo = {field : sort, direction : dir};
         
         this.store.load();
     },