diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 18:23:32 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-04 18:23:32 +1300 |
commit | 99d132dc78b42b6cc5833b3a7faf30d2fe56186f (patch) | |
tree | 045052b15478c32c44f36a07c70885a756ea19b3 /web/app/view/BaseEditDialogController.js | |
parent | dcfe1d48998c3fb3baa704fafed43d996f329a07 (diff) | |
download | trackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.tar.gz trackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.tar.bz2 trackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.zip |
Disable JavaScript strict mode
Diffstat (limited to 'web/app/view/BaseEditDialogController.js')
-rw-r--r-- | web/app/view/BaseEditDialogController.js | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/web/app/view/BaseEditDialogController.js b/web/app/view/BaseEditDialogController.js index 1820d9c9a..3b43cacf3 100644 --- a/web/app/view/BaseEditDialogController.js +++ b/web/app/view/BaseEditDialogController.js @@ -13,37 +13,33 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.view.BaseEditDialogController', { - extend: 'Ext.app.ViewController', - alias: 'controller.baseEditDialog', +Ext.define('Traccar.view.BaseEditDialogController', { + extend: 'Ext.app.ViewController', + alias: 'controller.baseEditDialog', - onSaveClick: function (button) { - var dialog, store, record; - dialog = button.up('window').down('form'); - dialog.updateRecord(); - record = dialog.getRecord(); - store = record.store; - if (store) { - if (record.phantom) { - store.add(record); - } - store.sync({ - success: function () { - store.reload(); // workaround for selection problem - }, - failure: function (batch) { - store.rejectChanges(); - Traccar.ErrorManager.check(true, batch.exceptions[0].getResponse()); - } - }); - } else { - record.save(); + onSaveClick: function (button) { + var dialog, store, record; + dialog = button.up('window').down('form'); + dialog.updateRecord(); + record = dialog.getRecord(); + store = record.store; + if (store) { + if (record.phantom) { + store.add(record); } - button.up('window').close(); + store.sync({ + success: function () { + store.reload(); // workaround for selection problem + }, + failure: function (batch) { + store.rejectChanges(); + Traccar.ErrorManager.check(true, batch.exceptions[0].getResponse()); + } + }); + } else { + record.save(); } - }); - -})(); + button.up('window').close(); + } +}); |