From 20d2bd13b0039e994ba9515d3d49e88079123470 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 13 Mar 2016 12:06:19 +1300 Subject: Remove default values from users table --- database/changelog-3.5.xml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'database/changelog-3.5.xml') diff --git a/database/changelog-3.5.xml b/database/changelog-3.5.xml index f1af6ef10..f754b532f 100644 --- a/database/changelog-3.5.xml +++ b/database/changelog-3.5.xml @@ -33,5 +33,10 @@ + + + + + -- cgit v1.2.3 From 984feba192d0b347b99c550009ec6fd078728ca2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 13 Mar 2016 12:18:15 +1300 Subject: Add twelve hour format preference --- database/changelog-3.5.xml | 12 ++++++++++++ debug.xml | 6 ++++-- src/org/traccar/model/Server.java | 10 ++++++++++ src/org/traccar/model/User.java | 10 ++++++++++ web/app/model/Server.js | 3 +++ web/app/model/User.js | 3 +++ web/app/view/ServerDialog.js | 5 +++++ web/app/view/UserDialog.js | 5 +++++ web/l10n/en.json | 1 + 9 files changed, 53 insertions(+), 2 deletions(-) (limited to 'database/changelog-3.5.xml') diff --git a/database/changelog-3.5.xml b/database/changelog-3.5.xml index f754b532f..3d1fa6b41 100644 --- a/database/changelog-3.5.xml +++ b/database/changelog-3.5.xml @@ -38,5 +38,17 @@ + + + + + + + + + + + + diff --git a/debug.xml b/debug.xml index 8e0b70fbf..e16f5f5be 100644 --- a/debug.xml +++ b/debug.xml @@ -67,7 +67,8 @@ speedUnit = :speedUnit, latitude = :latitude, longitude = :longitude, - zoom = :zoom + zoom = :zoom, + twelveHourFormat = :twelveHourFormat WHERE id = :id; @@ -101,7 +102,8 @@ speedUnit = :speedUnit, latitude = :latitude, longitude = :longitude, - zoom = :zoom + zoom = :zoom, + twelveHourFormat = :twelveHourFormat WHERE id = :id; diff --git a/src/org/traccar/model/Server.java b/src/org/traccar/model/Server.java index 00b1f60d0..f03a0aa60 100644 --- a/src/org/traccar/model/Server.java +++ b/src/org/traccar/model/Server.java @@ -137,4 +137,14 @@ public class Server { this.zoom = zoom; } + private boolean twelveHourFormat; + + public boolean getTwelveHourFormat() { + return twelveHourFormat; + } + + public void setTwelveHourFormat(boolean twelveHourFormat) { + this.twelveHourFormat = twelveHourFormat; + } + } diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java index 1531ba9e4..e58311834 100644 --- a/src/org/traccar/model/User.java +++ b/src/org/traccar/model/User.java @@ -140,6 +140,16 @@ public class User { this.zoom = zoom; } + private boolean twelveHourFormat; + + public boolean getTwelveHourFormat() { + return twelveHourFormat; + } + + public void setTwelveHourFormat(boolean twelveHourFormat) { + this.twelveHourFormat = twelveHourFormat; + } + private String password; public String getPassword() { diff --git a/web/app/model/Server.js b/web/app/model/Server.js index 9b4b5b2b6..796ff58d6 100644 --- a/web/app/model/Server.js +++ b/web/app/model/Server.js @@ -54,6 +54,9 @@ Ext.define('Traccar.model.Server', { }, { name: 'zoom', type: 'int' + }, { + name: 'twelveHourFormat', + type: 'boolean' }], proxy: { diff --git a/web/app/model/User.js b/web/app/model/User.js index b00918bc8..237a4d269 100644 --- a/web/app/model/User.js +++ b/web/app/model/User.js @@ -54,6 +54,9 @@ Ext.define('Traccar.model.User', { }, { name: 'zoom', type: 'int' + }, { + name: 'twelveHourFormat', + type: 'boolean' }], proxy: { diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js index 9fbbed920..67f3a7ab2 100644 --- a/web/app/view/ServerDialog.js +++ b/web/app/view/ServerDialog.js @@ -79,6 +79,11 @@ Ext.define('Traccar.view.ServerDialog', { xtype: 'numberfield', name: 'zoom', fieldLabel: Strings.serverZoom + }, { + xtype: 'checkboxfield', + name: 'twelveHourFormat', + fieldLabel: Strings.settingsTwelveHourFormat, + allowBlank: false }] } }); diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js index c1ed2fece..d0e8bda52 100644 --- a/web/app/view/UserDialog.js +++ b/web/app/view/UserDialog.js @@ -84,6 +84,11 @@ Ext.define('Traccar.view.UserDialog', { xtype: 'numberfield', name: 'zoom', fieldLabel: Strings.serverZoom + }, { + xtype: 'checkboxfield', + name: 'twelveHourFormat', + fieldLabel: Strings.settingsTwelveHourFormat, + allowBlank: false }] } }); diff --git a/web/l10n/en.json b/web/l10n/en.json index b0ea6ad26..4fb72c670 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -44,6 +44,7 @@ "settingsUsers": "Users", "settingsDistanceUnit": "Distance", "settingsSpeedUnit": "Speed", + "settingsTwelveHourFormat": "12-hour Format", "reportTitle": "Reports", "reportDevice": "Device", "reportFrom": "From", -- cgit v1.2.3