changeset 249:81aca4dd5f0c

Simpliefied function to reconfigure the table.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 24 Jul 2013 14:52:51 +0200
parents d40a552382a3
children 125e2d43cd0f
files app/view/proben/List.js
diffstat 1 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/proben/List.js	Wed Jul 24 14:52:10 2013 +0200
+++ b/app/view/proben/List.js	Wed Jul 24 14:52:51 2013 +0200
@@ -39,17 +39,11 @@
         this.columns = [];
         this.callParent(arguments);
     },
-    setupColumns: function(colnames) {
-        var cols = []
-        for (var i=0; i < colnames.length; i++) {
-            col = colnames[i];
-            for (var j = this.availableColumns.length - 1; j >= 0; j--){
-                defaultCol = this.availableColumns[j];
-                if (defaultCol.dataIndex === col) {
-                    cols.push(this.availableColumns[j])
-                };
-            };
+    setupColumns: function(cols) {
+        var rcols = []
+        for (var i = cols.length - 1; i >= 0; i--){
+            rcols.push(cols[i]);
         };
-        this.reconfigure(this.store, cols);
+        this.reconfigure(this.store, rcols);
     }
 });

http://lada.wald.intevation.org