comparison app/controller/Ort.js @ 1050:e0b5e64928c9 stammdatengrids

Use rowediting plugin for orte grid.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 01 Mar 2016 13:16:10 +0100
parents 1bd4c0709bd6
children 981339d774b8
comparison
equal deleted inserted replaced
1049:1bd4c0709bd6 1050:e0b5e64928c9
101 101
102 /** 102 /**
103 * Enables/Disables a set of buttons 103 * Enables/Disables a set of buttons
104 **/ 104 **/
105 buttonToggle: function(enabled, panel) { 105 buttonToggle: function(enabled, panel) {
106 if (!enabled) { 106 if (!enabled &&
107 panel.down('button[action=delete]')) {
107 panel.down('button[action=delete]').disable(); 108 panel.down('button[action=delete]').disable();
108 } 109 }
109 else { 110 else {
110 if (!panel.down('ortstammdatengrid').getPlugin('rowedit').editing) { 111 if (panel.down('ortstammdatengrid').getPlugin('rowedit') &&
112 !panel.down('ortstammdatengrid').getPlugin('rowedit').editing &&
113 panel.down('button[action=delete]')) {
111 //only enable buttons, when grid is not beeing edited 114 //only enable buttons, when grid is not beeing edited
112 panel.down('button[action=delete]').enable(); 115 panel.down('button[action=delete]').enable();
113 } 116 }
114 //else turn them off again! 117 //else turn them off again!
115 else { 118 else {
116 this.buttonToggle(false, panel); 119 panel.down('button[action=delete]').disable();
117 } 120 }
118 } 121 }
119 } 122 }
120 }); 123 });

http://lada.wald.intevation.org