From 99d132dc78b42b6cc5833b3a7faf30d2fe56186f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 4 Oct 2015 18:23:32 +1300 Subject: Disable JavaScript strict mode --- web/app/store/Attributes.js | 18 ++++++---------- web/app/store/CommandTypes.js | 38 +++++++++++++++------------------ web/app/store/Devices.js | 44 +++++++++++++++++--------------------- web/app/store/DistanceUnits.js | 46 ++++++++++++++++++---------------------- web/app/store/Languages.js | 34 +++++++++++++---------------- web/app/store/LatestPositions.js | 12 ++++------- web/app/store/MapTypes.js | 38 +++++++++++++++------------------ web/app/store/Positions.js | 26 ++++++++++------------- web/app/store/SpeedUnits.js | 46 ++++++++++++++++++---------------------- web/app/store/TimeUnits.js | 32 ++++++++++++---------------- web/app/store/Users.js | 44 +++++++++++++++++--------------------- 11 files changed, 167 insertions(+), 211 deletions(-) (limited to 'web/app/store') diff --git a/web/app/store/Attributes.js b/web/app/store/Attributes.js index a63701fdc..2019582e5 100644 --- a/web/app/store/Attributes.js +++ b/web/app/store/Attributes.js @@ -13,16 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.Attributes', { - extend: 'Ext.data.Store', - model: 'Traccar.model.Attribute', +Ext.define('Traccar.store.Attributes', { + extend: 'Ext.data.Store', + model: 'Traccar.model.Attribute', - sorters: [{ - property: 'priority' - }] - }); - -})(); + sorters: [{ + property: 'priority' + }] +}); diff --git a/web/app/store/CommandTypes.js b/web/app/store/CommandTypes.js index 52f249931..3f5094266 100644 --- a/web/app/store/CommandTypes.js +++ b/web/app/store/CommandTypes.js @@ -13,26 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.CommandTypes', { - extend: 'Ext.data.Store', - fields: ['key', 'name'], +Ext.define('Traccar.store.CommandTypes', { + extend: 'Ext.data.Store', + fields: ['key', 'name'], - data: [{ - key: 'positionPeriodic', - name: Strings.commandPositionPeriodic - }, { - key: 'positionStop', - name: Strings.commandPositionStop - }, { - key: 'engineStop', - name: Strings.commandEngineStop - }, { - key: 'engineResume', - name: Strings.commandEngineResume - }] - }); - -})(); + data: [{ + key: 'positionPeriodic', + name: Strings.commandPositionPeriodic + }, { + key: 'positionStop', + name: Strings.commandPositionStop + }, { + key: 'engineStop', + name: Strings.commandEngineStop + }, { + key: 'engineResume', + name: Strings.commandEngineResume + }] +}); diff --git a/web/app/store/Devices.js b/web/app/store/Devices.js index 05da6a194..24777de5a 100644 --- a/web/app/store/Devices.js +++ b/web/app/store/Devices.js @@ -13,30 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.Devices', { - extend: 'Ext.data.Store', - model: 'Traccar.model.Device', +Ext.define('Traccar.store.Devices', { + extend: 'Ext.data.Store', + model: 'Traccar.model.Device', - proxy: { - type: 'ajax', - api: { - create: '/api/device/add', - read: '/api/device/get', - update: '/api/device/update', - destroy: '/api/device/remove' - }, - reader: { - type: 'json', - rootProperty: 'data' - }, - writer: { - type: 'json', - writeAllFields: true - } + proxy: { + type: 'ajax', + api: { + create: '/api/device/add', + read: '/api/device/get', + update: '/api/device/update', + destroy: '/api/device/remove' + }, + reader: { + type: 'json', + rootProperty: 'data' + }, + writer: { + type: 'json', + writeAllFields: true } - }); - -})(); + } +}); diff --git a/web/app/store/DistanceUnits.js b/web/app/store/DistanceUnits.js index 3092eecca..20d057c1f 100644 --- a/web/app/store/DistanceUnits.js +++ b/web/app/store/DistanceUnits.js @@ -13,32 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.DistanceUnits', { - extend: 'Ext.data.Store', - fields: ['key', 'name', 'factor'], +Ext.define('Traccar.store.DistanceUnits', { + extend: 'Ext.data.Store', + fields: ['key', 'name', 'factor'], - data: [{ - key: 'km', - name: Strings.sharedKm, - factor: 0.001 - }, { - key: 'mi', - name: Strings.sharedMi, - factor: 0.00621371 - }], + data: [{ + key: 'km', + name: Strings.sharedKm, + factor: 0.001 + }, { + key: 'mi', + name: Strings.sharedMi, + factor: 0.00621371 + }], - formatValue: function (value, unit) { - var model; - if (unit) { - model = this.findRecord('key', unit); - return (value * model.get('factor')).toFixed(2) + ' ' + model.get('name'); - } else { - return value; - } + formatValue: function (value, unit) { + var model; + if (unit) { + model = this.findRecord('key', unit); + return (value * model.get('factor')).toFixed(2) + ' ' + model.get('name'); + } else { + return value; } - }); - -})(); + } +}); diff --git a/web/app/store/Languages.js b/web/app/store/Languages.js index 594953480..027c96bec 100644 --- a/web/app/store/Languages.js +++ b/web/app/store/Languages.js @@ -13,25 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.Languages', { - extend: 'Ext.data.Store', - fields: ['code', 'name'], +Ext.define('Traccar.store.Languages', { + extend: 'Ext.data.Store', + fields: ['code', 'name'], - data: (function () { - var code, data = []; - for (code in Locale.languages) { - if (Locale.languages.hasOwnProperty(code)) { - data.push({ - code: code, - name: Locale.languages[code].name - }); - } + data: (function () { + var code, data = []; + for (code in Locale.languages) { + if (Locale.languages.hasOwnProperty(code)) { + data.push({ + code: code, + name: Locale.languages[code].name + }); } - return data; - })() - }); - -})(); + } + return data; + })() +}); diff --git a/web/app/store/LatestPositions.js b/web/app/store/LatestPositions.js index 3bd58bd04..c656bdcb8 100644 --- a/web/app/store/LatestPositions.js +++ b/web/app/store/LatestPositions.js @@ -13,12 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.LatestPositions', { - extend: 'Ext.data.Store', - model: 'Traccar.model.Position' - }); - -})(); +Ext.define('Traccar.store.LatestPositions', { + extend: 'Ext.data.Store', + model: 'Traccar.model.Position' +}); diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js index 3caf117ec..4c26ad451 100644 --- a/web/app/store/MapTypes.js +++ b/web/app/store/MapTypes.js @@ -13,26 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.MapTypes', { - extend: 'Ext.data.Store', - fields: ['key', 'name'], +Ext.define('Traccar.store.MapTypes', { + extend: 'Ext.data.Store', + fields: ['key', 'name'], - data: [{ - key: 'osm', - name: Strings.mapOsm - }, { - key: 'bingRoad', - name: Strings.mapBingRoad - }, { - key: 'bingAerial', - name: Strings.mapBingAerial - }, { - key: 'custom', - name: Strings.mapCustom - }] - }); - -})(); + data: [{ + key: 'osm', + name: Strings.mapOsm + }, { + key: 'bingRoad', + name: Strings.mapBingRoad + }, { + key: 'bingAerial', + name: Strings.mapBingAerial + }, { + key: 'custom', + name: Strings.mapCustom + }] +}); diff --git a/web/app/store/Positions.js b/web/app/store/Positions.js index 415e26cbe..7de54a8d2 100644 --- a/web/app/store/Positions.js +++ b/web/app/store/Positions.js @@ -13,21 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.Positions', { - extend: 'Ext.data.Store', - model: 'Traccar.model.Position', +Ext.define('Traccar.store.Positions', { + extend: 'Ext.data.Store', + model: 'Traccar.model.Position', - proxy: { - type: 'ajax', - url: '/api/position/get', - reader: { - type: 'json', - rootProperty: 'data' - } + proxy: { + type: 'ajax', + url: '/api/position/get', + reader: { + type: 'json', + rootProperty: 'data' } - }); - -})(); + } +}); diff --git a/web/app/store/SpeedUnits.js b/web/app/store/SpeedUnits.js index 2238d476a..d02892a01 100644 --- a/web/app/store/SpeedUnits.js +++ b/web/app/store/SpeedUnits.js @@ -13,32 +13,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.SpeedUnits', { - extend: 'Ext.data.Store', - fields: ['key', 'name', 'factor'], +Ext.define('Traccar.store.SpeedUnits', { + extend: 'Ext.data.Store', + fields: ['key', 'name', 'factor'], - data: [{ - key: 'kmh', - name: Strings.sharedKmh, - factor: 1.852 - }, { - key: 'mph', - name: Strings.sharedMph, - factor: 1.15078 - }], + data: [{ + key: 'kmh', + name: Strings.sharedKmh, + factor: 1.852 + }, { + key: 'mph', + name: Strings.sharedMph, + factor: 1.15078 + }], - formatValue: function (value, unit) { - var model; - if (unit) { - model = this.findRecord('key', unit); - return (value * model.get('factor')).toFixed(1) + ' ' + model.get('name'); - } else { - return value; - } + formatValue: function (value, unit) { + var model; + if (unit) { + model = this.findRecord('key', unit); + return (value * model.get('factor')).toFixed(1) + ' ' + model.get('name'); + } else { + return value; } - }); - -})(); + } +}); diff --git a/web/app/store/TimeUnits.js b/web/app/store/TimeUnits.js index 29730f2b9..e03263825 100644 --- a/web/app/store/TimeUnits.js +++ b/web/app/store/TimeUnits.js @@ -13,23 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.TimeUnits', { - extend: 'Ext.data.Store', - fields: ['name', 'factor'], +Ext.define('Traccar.store.TimeUnits', { + extend: 'Ext.data.Store', + fields: ['name', 'factor'], - data: [{ - name: Strings.sharedSecond, - factor: 1 - }, { - name: Strings.sharedMinute, - factor: 60 - }, { - name: Strings.sharedHour, - factor: 3600 - }] - }); - -})(); + data: [{ + name: Strings.sharedSecond, + factor: 1 + }, { + name: Strings.sharedMinute, + factor: 60 + }, { + name: Strings.sharedHour, + factor: 3600 + }] +}); diff --git a/web/app/store/Users.js b/web/app/store/Users.js index 908e8eaf9..004dc727e 100644 --- a/web/app/store/Users.js +++ b/web/app/store/Users.js @@ -13,30 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function () { - 'use strict'; - Ext.define('Traccar.store.Users', { - extend: 'Ext.data.Store', - model: 'Traccar.model.User', +Ext.define('Traccar.store.Users', { + extend: 'Ext.data.Store', + model: 'Traccar.model.User', - proxy: { - type: 'ajax', - api: { - create: '/api/user/add', - read: '/api/user/get', - update: '/api/user/update', - destroy: '/api/user/remove' - }, - reader: { - type: 'json', - rootProperty: 'data' - }, - writer: { - type: 'json', - writeAllFields: true - } + proxy: { + type: 'ajax', + api: { + create: '/api/user/add', + read: '/api/user/get', + update: '/api/user/update', + destroy: '/api/user/remove' + }, + reader: { + type: 'json', + rootProperty: 'data' + }, + writer: { + type: 'json', + writeAllFields: true } - }); - -})(); + } +}); -- cgit v1.2.3