[Lada-commits] [PATCH] Enable add-Button only if the user is authorized

Wald Commits scm-commit at wald.intevation.org
Thu Apr 7 14:02:47 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1460030571 -7200
# Node ID ca204e91012fbedda40973702b63aa63e863b81b
# Parent  e79403c3482eff602337e12d791b57971a009315
Enable add-Button only if the user is authorized.

diff -r e79403c3482e -r ca204e91012f app/controller/grid/MessprogrammKategorie.js
--- a/app/controller/grid/MessprogrammKategorie.js	Thu Apr 07 12:29:10 2016 +0200
+++ b/app/controller/grid/MessprogrammKategorie.js	Thu Apr 07 14:02:51 2016 +0200
@@ -76,8 +76,10 @@
         if (!context.record.get('id') ||
             context.record.get('id') === '') {
             editor.getCmp().store.remove(context.record);
+            this.buttonToggle();
         }
         context.grid.getSelectionModel().deselect(context.record);
+        this.buttonToggle(context.grid.getSelectionModel(), context.record);
     },
 
     /**
diff -r e79403c3482e -r ca204e91012f app/view/grid/DatensatzErzeuger.js
--- a/app/view/grid/DatensatzErzeuger.js	Thu Apr 07 12:29:10 2016 +0200
+++ b/app/view/grid/DatensatzErzeuger.js	Thu Apr 07 14:02:51 2016 +0200
@@ -151,7 +151,6 @@
         if (store) {
             this.removeDocked(Ext.getCmp('ptbar'), true);
             this.reconfigure(store);
-            this.down('button[action=add]').enable();
             this.addDocked([{
                 xtype: 'pagingtoolbar',
                 id: 'ptbar',
diff -r e79403c3482e -r ca204e91012f app/view/grid/MessprogrammKategorie.js
--- a/app/view/grid/MessprogrammKategorie.js	Thu Apr 07 12:29:10 2016 +0200
+++ b/app/view/grid/MessprogrammKategorie.js	Thu Apr 07 14:02:51 2016 +0200
@@ -125,7 +125,6 @@
                 this.removeDocked(ptbar);
             }
 
-            this.down('button[action=add]').enable();
             this.addDocked([{
                 xtype: 'pagingtoolbar',
                 dock: 'bottom',
diff -r e79403c3482e -r ca204e91012f app/view/grid/Probenehmer.js
--- a/app/view/grid/Probenehmer.js	Thu Apr 07 12:29:10 2016 +0200
+++ b/app/view/grid/Probenehmer.js	Thu Apr 07 14:02:51 2016 +0200
@@ -179,7 +179,6 @@
         if (store) {
             this.removeDocked(Ext.getCmp('ptbar'), true);
             this.reconfigure(store);
-            this.down('button[action=add]').enable();
             this.addDocked([{
                 xtype: 'pagingtoolbar',
                 id: 'ptbar',


More information about the Lada-commits mailing list