diff app/controller/grid/MessungList.js @ 1082:dbd435256f77

Open status edit window and send status objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 19:04:15 +0200
parents e32c10cf5499
children 0a032c98c3a6
line wrap: on
line diff
--- a/app/controller/grid/MessungList.js	Wed Apr 13 18:41:47 2016 +0200
+++ b/app/controller/grid/MessungList.js	Wed Apr 13 19:04:15 2016 +0200
@@ -24,12 +24,37 @@
                 itemdblclick: this.editItem,
                 select: this.activateButtons,
                 deselect: this.deactivateButtons
+            },
+            'messunglistgrid toolbar button[action=setstatus]': {
+                click: this.setStatus
             }
         });
         this.callParent(arguments);
     },
 
     /**
+     * Sets the Status on Bulk
+     **/
+    setStatus: function(button) {
+        //disable Button and setLoading...
+
+        var grid = button.up('grid');
+        var selection = grid.getView().getSelectionModel().getSelection();
+        var i18n = Lada.getApplication().bundle;
+
+        var win = Ext.create('Lada.view.window.SetStatus', {
+            title: i18n.getMsg('statusSetzen.win.title'),
+            grid: grid,
+            modal: true,
+            selection: selection
+        });
+
+        win.show();
+
+    },
+
+
+    /**
      * This function is called after a Row in the
      * {@link Lada.view.grid.ProbeList}
      * was double-clicked.
@@ -257,13 +282,13 @@
     buttonToggle: function(enabled, grid) {
         if (!enabled) {
             grid.down('button[action=print]').disable();
-            grid.down('button[action=setStatus]').disable();
+            grid.down('button[action=setstatus]').disable();
         }
         else {
             grid.down('button[action=print]').enable();
             // TODO: enable button only on messungen with owner == true and
             // readonly == false
-            grid.down('button[action=setStatus]').enable();
+            grid.down('button[action=setstatus]').enable();
         }
     },
 

http://lada.wald.intevation.org