aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/ReportController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 18:23:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 18:23:32 +1300
commit99d132dc78b42b6cc5833b3a7faf30d2fe56186f (patch)
tree045052b15478c32c44f36a07c70885a756ea19b3 /web/app/view/ReportController.js
parentdcfe1d48998c3fb3baa704fafed43d996f329a07 (diff)
downloadtrackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.tar.gz
trackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.tar.bz2
trackermap-server-99d132dc78b42b6cc5833b3a7faf30d2fe56186f.zip
Disable JavaScript strict mode
Diffstat (limited to 'web/app/view/ReportController.js')
-rw-r--r--web/app/view/ReportController.js104
1 files changed, 50 insertions, 54 deletions
diff --git a/web/app/view/ReportController.js b/web/app/view/ReportController.js
index 1b226fd55..2badfea63 100644
--- a/web/app/view/ReportController.js
+++ b/web/app/view/ReportController.js
@@ -13,72 +13,68 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-(function () {
- 'use strict';
- Ext.define('Traccar.view.ReportController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.report',
+Ext.define('Traccar.view.ReportController', {
+ extend: 'Ext.app.ViewController',
+ alias: 'controller.report',
- config: {
- listen: {
- controller: {
- '*': {
- selectDevice: 'selectDevice'
- }
+ config: {
+ listen: {
+ controller: {
+ '*': {
+ selectDevice: 'selectDevice'
}
}
- },
-
- onShowClick: function () {
- var deviceId, fromDate, fromTime, from, toDate, toTime, to, store;
-
- deviceId = this.lookupReference('deviceField').getValue();
+ }
+ },
- fromDate = this.lookupReference('fromDateField').getValue();
- fromTime = this.lookupReference('fromTimeField').getValue();
+ onShowClick: function () {
+ var deviceId, fromDate, fromTime, from, toDate, toTime, to, store;
- from = new Date(
- fromDate.getFullYear(), fromDate.getMonth(), fromDate.getDate(),
- fromTime.getHours(), fromTime.getMinutes(), fromTime.getSeconds(), fromTime.getMilliseconds());
+ deviceId = this.lookupReference('deviceField').getValue();
- toDate = this.lookupReference('toDateField').getValue();
- toTime = this.lookupReference('toTimeField').getValue();
+ fromDate = this.lookupReference('fromDateField').getValue();
+ fromTime = this.lookupReference('fromTimeField').getValue();
- to = new Date(
- toDate.getFullYear(), toDate.getMonth(), toDate.getDate(),
- toTime.getHours(), toTime.getMinutes(), toTime.getSeconds(), toTime.getMilliseconds());
+ from = new Date(
+ fromDate.getFullYear(), fromDate.getMonth(), fromDate.getDate(),
+ fromTime.getHours(), fromTime.getMinutes(), fromTime.getSeconds(), fromTime.getMilliseconds());
- store = Ext.getStore('Positions');
- store.load({
- params: {
- deviceId: deviceId,
- from: from.toISOString(),
- to: to.toISOString()
- },
- scope: this,
- callback: function () {
- this.fireEvent('reportShow');
- }
- });
- },
+ toDate = this.lookupReference('toDateField').getValue();
+ toTime = this.lookupReference('toTimeField').getValue();
- onClearClick: function () {
- Ext.getStore('Positions').removeAll();
- this.fireEvent('reportClear');
- },
+ to = new Date(
+ toDate.getFullYear(), toDate.getMonth(), toDate.getDate(),
+ toTime.getHours(), toTime.getMinutes(), toTime.getSeconds(), toTime.getMilliseconds());
- onSelectionChange: function (selected) {
- if (selected.getCount() > 0) {
- this.fireEvent('selectReport', selected.getLastSelected());
+ store = Ext.getStore('Positions');
+ store.load({
+ params: {
+ deviceId: deviceId,
+ from: from.toISOString(),
+ to: to.toISOString()
+ },
+ scope: this,
+ callback: function () {
+ this.fireEvent('reportShow');
}
- },
+ });
+ },
- selectDevice: function (device) {
- if (device !== undefined) {
- this.getView().getSelectionModel().deselectAll();
- }
+ onClearClick: function () {
+ Ext.getStore('Positions').removeAll();
+ this.fireEvent('reportClear');
+ },
+
+ onSelectionChange: function (selected) {
+ if (selected.getCount() > 0) {
+ this.fireEvent('selectReport', selected.getLastSelected());
}
- });
+ },
-})();
+ selectDevice: function (device) {
+ if (device !== undefined) {
+ this.getView().getSelectionModel().deselectAll();
+ }
+ }
+});