aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/DeviceDistanceDialog.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-24 11:28:33 +1300
committerGitHub <noreply@github.com>2016-10-24 11:28:33 +1300
commitf6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e (patch)
tree5885919549e09fd1433ab283cb03bc339b73c8a1 /web/app/view/DeviceDistanceDialog.js
parentae31f81fc81ed306411b07a5ebbf3d47e12c3243 (diff)
parent7f35b89560276d2ae23fb1164a429283fb64ff45 (diff)
downloadetbsa-traccar-web-f6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e.tar.gz
etbsa-traccar-web-f6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e.tar.bz2
etbsa-traccar-web-f6915ca3bf4e8c2d9df5eb4cd5283614d4dd747e.zip
Merge pull request #305 from Abyss777/reset_distance
Implement reset device distance dialog
Diffstat (limited to 'web/app/view/DeviceDistanceDialog.js')
-rw-r--r--web/app/view/DeviceDistanceDialog.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/web/app/view/DeviceDistanceDialog.js b/web/app/view/DeviceDistanceDialog.js
new file mode 100644
index 0000000..2b643c0
--- /dev/null
+++ b/web/app/view/DeviceDistanceDialog.js
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Andrey Kunitsyn (abyss@fox5.ru)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+Ext.define('Traccar.view.DeviceDistanceDialog', {
+ extend: 'Traccar.view.BaseDialog',
+
+ requires: [
+ 'Traccar.view.DeviceDistanceController'
+ ],
+
+ controller: 'deviceDistanceDialog',
+ title: Strings.sharedDeviceDistance,
+
+ items: [{
+ xtype: 'combobox',
+ reference: 'deviceId',
+ fieldLabel: Strings.sharedDevice,
+ store: 'AllDevices',
+ displayField: 'name',
+ valueField: 'id',
+ listeners: {
+ change: 'onDeviceChange'
+ }
+ }, {
+ xtype: 'numberfield',
+ reference: 'totalDistance',
+ fieldLabel: Strings.deviceTotalDistance,
+ value: 0
+ }],
+
+ buttons: [{
+ text: Strings.sharedSet,
+ disabled: true,
+ reference: 'setButton',
+ handler: 'onSetClick'
+ }, {
+ text: Strings.sharedCancel,
+ handler: 'closeView'
+ }]
+});