Mercurial > lada > lada-client
diff app/view/grid/Ort.js @ 684:69cb367c0a63
When a Probeform is dirty, all child-grids are made readonly (Row Editing is not disbled correctly). When a Probe is read-only all Child-grid buttons are disabled. When a Probe is ReadOnly probeform is also readonly.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 15:04:45 +0100 |
parents | 339741bc6ebf |
children | 5ed0e6273888 |
line wrap: on
line diff
--- a/app/view/grid/Ort.js Wed Mar 25 09:07:20 2015 +0100 +++ b/app/view/grid/Ort.js Wed Mar 25 15:04:45 2015 +0100 @@ -118,10 +118,21 @@ }); }, - - setReadOnly: function() { - this.getPlugin('rowedit').disable(); - this.down('button[action=add]').disable(); - this.down('button[action=delete]').disable(); + setReadOnly: function(b) { + if (b == true){ + //Readonly + if (this.getPlugin('rowedit')){ + this.getPlugin('rowedit').disable(); + } + this.down('button[action=delete]').disable(); + this.down('button[action=add]').disable(); + }else{ + //Writable + if (this.getPlugin('rowedit')){ + this.getPlugin('rowedit').enable(); + } + this.down('button[action=delete]').enable(); + this.down('button[action=add]').enable(); + } } });