diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-16 12:52:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-16 12:52:01 +1300 |
commit | cb20652e72d37459f13821b3c7b3f8b8a4a09cf8 (patch) | |
tree | 75d43cd6c6baaa2195d83b30f9ce0cf285c0f379 | |
parent | f61aeccb5d925acfc862700263f91082a0419072 (diff) | |
download | trackermap-server-cb20652e72d37459f13821b3c7b3f8b8a4a09cf8.tar.gz trackermap-server-cb20652e72d37459f13821b3c7b3f8b8a4a09cf8.tar.bz2 trackermap-server-cb20652e72d37459f13821b3c7b3f8b8a4a09cf8.zip |
Add readonly flag to server settings
-rw-r--r-- | debug.xml | 6 | ||||
-rw-r--r-- | src/org/traccar/model/Server.java | 10 | ||||
-rw-r--r-- | web/app/model/Server.js | 3 | ||||
-rw-r--r-- | web/app/view/ServerDialog.js | 5 | ||||
-rw-r--r-- | web/l10n/en.json | 1 |
5 files changed, 23 insertions, 2 deletions
@@ -113,6 +113,7 @@ CREATE TABLE server ( id INT PRIMARY KEY AUTO_INCREMENT, registration BIT NOT NULL, + readonly BIT NOT NULL, map VARCHAR(128), bingKey VARCHAR(128), mapUrl VARCHAR(128), @@ -134,13 +135,14 @@ </entry> <entry key='database.insertServer'> - INSERT INTO server (registration, latitude, longitude, zoom) - VALUES (:registration, :latitude, :longitude, :zoom); + INSERT INTO server (registration, readonly, latitude, longitude, zoom) + VALUES (:registration, :readonly, :latitude, :longitude, :zoom); </entry> <entry key='database.updateServer'> UPDATE server SET registration = :registration, + readonly = :readonly, map = :map, bingKey = :bingKey, mapUrl = :mapUrl, diff --git a/src/org/traccar/model/Server.java b/src/org/traccar/model/Server.java index 880636a4c..00b1f60d0 100644 --- a/src/org/traccar/model/Server.java +++ b/src/org/traccar/model/Server.java @@ -37,6 +37,16 @@ public class Server { this.registration = registration; } + private boolean readonly; + + public boolean getReadonly() { + return readonly; + } + + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + private String map; public String getMap() { diff --git a/web/app/model/Server.js b/web/app/model/Server.js index b200a2d23..9b4b5b2b6 100644 --- a/web/app/model/Server.js +++ b/web/app/model/Server.js @@ -25,6 +25,9 @@ Ext.define('Traccar.model.Server', { name: 'registration', type: 'boolean' }, { + name: 'readonly', + type: 'boolean' + }, { name: 'map', type: 'string' }, { diff --git a/web/app/view/ServerDialog.js b/web/app/view/ServerDialog.js index da197ffe4..9fbbed920 100644 --- a/web/app/view/ServerDialog.js +++ b/web/app/view/ServerDialog.js @@ -31,6 +31,11 @@ Ext.define('Traccar.view.ServerDialog', { name: 'registration', fieldLabel: Strings.serverRegistration, allowBlank: false + },{ + xtype: 'checkboxfield', + name: 'readonly', + fieldLabel: Strings.serverReadonly, + allowBlank: false }, { xtype: 'combobox', name: 'map', diff --git a/web/l10n/en.json b/web/l10n/en.json index 8e10812f3..ec8018863 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -59,6 +59,7 @@ "serverTitle": "Server Settings", "serverZoom": "Zoom", "serverRegistration": "Registration", + "serverReadonly": "Readonly", "mapTitle": "Map", "mapLayer": "Map Layer", "mapCustom": "Custom Map", |