Mercurial > lada > lada-client
changeset 69:cb1138f5cea7
Removed old code
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 15:43:05 +0200 |
parents | e54cb2f3566e |
children | 1a943947a7d2 |
files | app/controller/Proben.js |
diffstat | 1 files changed, 2 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controller/Proben.js Wed Jun 05 15:41:44 2013 +0200 +++ b/app/controller/Proben.js Wed Jun 05 15:43:05 2013 +0200 @@ -22,30 +22,17 @@ // CSS like selector to select element in the viewport. See // ComponentQuery documentation for more details. 'probenlist': { - // Map the "render" event to the given function. - render: this.onPanelRendered, - // Map Doubleclick on rows of the probenlist. itemdblclick: this.editProbe }, 'probenlist toolbar button[action=add]': { - // Map Doubleclick on rows of the probenlist. click: this.addProbe }, - 'probenedit button[action=save]': { - click: this.updateProbe } }); }, - onPanelRendered: function() { - console.log('The panel was rendered'); - }, addProbe: function(button) { console.log('Adding new Probe'); var view = Ext.widget('probencreate'); - var form = view.down('form'); - // Create a new Kommentar - var record = Ext.create('Lada.model.Probe'); - form.loadRecord(record); }, editProbe: function(grid, record) { console.log('Double click on ' + record.get('probeId')); @@ -66,21 +53,8 @@ // Set form data console.log("Loaded probe with ID " + record.getId()); //outputs ID }, - updateProbe: function(button) { - console.log('Click save'); - // We only have a reference to the button here but we really wnat to - // get the form and the window. So first get the window and form and - // the the record an values. - var win = button.up('window'); - var form = win.down('form'); - var record = form.getRecord(); - var values = form.getValues(); - - record.set(values); + createSuccess: function(form, record, operation) { + var win = form.up('window'); win.close(); - // synchronize the store after editing the record - // NOTE: The function 'getProbenStore' will be generated - // dynamically based on the Name of the configured Store!!! - this.getProbenStore().sync(); } });