Mercurial > lada > lada-client
diff app/controller/Base.js @ 497:7c0653e8d9f7
Fixed some js related issues (unused vars, arrays, etc.) and code style.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 06 Nov 2014 10:38:17 +0100 |
parents | 850ccfe5f3c4 |
children | 8b4ec61c5752 |
line wrap: on
line diff
--- a/app/controller/Base.js Thu Nov 06 10:35:35 2014 +0100 +++ b/app/controller/Base.js Thu Nov 06 10:38:17 2014 +0100 @@ -3,7 +3,7 @@ * * This file is Free Software under the GNU GPL (v>=3) * and comes with ABSOLUTELY NO WARRANTY! Check out - * the documentation coming with IMIS-Labordaten-Application for details. + * the documentation coming with IMIS-Labordaten-Application for details. */ /** @@ -31,9 +31,10 @@ this.addListeners(); }, /** - * Function to add listeners for various events in UI items. The UI Items are selected - * with a CSS like selector.See ComponentQuery documentation for more - * details. The function is called while initializing the controller. + * Function to add listeners for various events in UI items. The UI Items + * are selected with a CSS like selector.See ComponentQuery documentation + * for more details. + * The function is called while initializing the controller. * * The function should be overwritten by a specfic implementation. */ @@ -54,13 +55,17 @@ * The method is called when the user clicks on the "Add" button in the * grid toolbar. */ - addItem: function(button) {}, + addItem: function() { + return; + }, /** * Method to open a window to edit the values for an existing kommentar. * The method is called when the user doubleclicks on the item in the * grid. */ - editItem: function(grid, record) {}, + editItem: function() { + return; + }, /** * Method to delete a kommentar. This will trigger the display of a * Confirmation dialog. After the deletion the related store will be @@ -78,12 +83,13 @@ Ext.Ajax.request({ url: deleteUrl, method: 'DELETE', - success: function(response, opts) { + success: function() { store.reload(); } }); console.log('Deleting ' + selection); - } else { + } + else { console.log('Cancel Deleting ' + selection); } }); @@ -92,12 +98,14 @@ * Method to trigger the action after successfull save (create). * In this case the related store is refreshed and the window is closed. */ - createSuccess: function(form, record, operation) {}, + createSuccess: function() { + return; + }, /** * Method to trigger the action after save (create) fails. * In this case a Message Boss with a general error is shown. */ - createFailure: function(form, record, operation) { + createFailure: function(form) { Ext.MessageBox.show({ title: 'Fehler beim Speichern', msg: form.message, @@ -109,12 +117,14 @@ * Method to trigger the action after successfull save (edit). * In this case the related store is refreshed and the window is closed. */ - editSuccess: function(form, record, operation) {}, + editSuccess: function() { + return; + }, /** * Method to trigger the action after save ( edit) fails. * In this case a Message Boss with a general error is shown. */ - editFailure: function(form, record, operation) { + editFailure: function(form) { Ext.MessageBox.show({ title: 'Fehler beim Speichern', msg: form.message,