Mercurial > lada > lada-client
diff app/view/widgets/LadaForm.js @ 270:0d6552bb28ea
Add cancel Button to the editproben window and only show save button if the
form is actually writeable.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 06 Aug 2013 14:33:14 +0200 |
parents | 82118c01bc52 |
children | 1afccc0cab90 |
line wrap: on
line diff
--- a/app/view/widgets/LadaForm.js Mon Jul 29 15:53:24 2013 +0200 +++ b/app/view/widgets/LadaForm.js Tue Aug 06 14:33:14 2013 +0200 @@ -129,6 +129,14 @@ for (var i = childs.length - 1; i >= 0; i--){ childs[i].setVisible(false); } + /* Find Save-Button and hide it */ + var win = this.up('window'); + var buttons = win.query('.button'); + for (var j = buttons.length - 1; j >= 0; j--){ + if (buttons[j].text === 'Speichern') { + buttons[j].setVisible(false); + }; + }; } }, parseResponse: function(response) {