aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-13 12:18:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-13 12:18:15 +1300
commit984feba192d0b347b99c550009ec6fd078728ca2 (patch)
tree6021b9a4b56866951a024b739732846d83235d2c
parent20d2bd13b0039e994ba9515d3d49e88079123470 (diff)
downloadtraccar-server-984feba192d0b347b99c550009ec6fd078728ca2.tar.gz
traccar-server-984feba192d0b347b99c550009ec6fd078728ca2.tar.bz2
traccar-server-984feba192d0b347b99c550009ec6fd078728ca2.zip
Add twelve hour format preference
-rw-r--r--database/changelog-3.5.xml12
-rw-r--r--debug.xml6
-rw-r--r--src/org/traccar/model/Server.java10
-rw-r--r--src/org/traccar/model/User.java10
-rw-r--r--web/app/model/Server.js3
-rw-r--r--web/app/model/User.js3
-rw-r--r--web/app/view/ServerDialog.js5
-rw-r--r--web/app/view/UserDialog.js5
-rw-r--r--web/l10n/en.json1
9 files changed, 53 insertions, 2 deletions
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 @@
<dropDefaultValue tableName="users" columnName="distanceunit" />
<dropDefaultValue tableName="users" columnName="speedunit" />
+ <addColumn tableName="users">
+ <column name="twelvehourformat" type="BOOLEAN" defaultValueBoolean="false">
+ <constraints nullable="false" />
+ </column>
+ </addColumn>
+
+ <addColumn tableName="server">
+ <column name="twelvehourformat" type="BOOLEAN" defaultValueBoolean="false">
+ <constraints nullable="false" />
+ </column>
+ </addColumn>
+
</changeSet>
</databaseChangeLog>
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;
</entry>
@@ -101,7 +102,8 @@
speedUnit = :speedUnit,
latitude = :latitude,
longitude = :longitude,
- zoom = :zoom
+ zoom = :zoom,
+ twelveHourFormat = :twelveHourFormat
WHERE id = :id;
</entry>
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",