From c70ac9aca10f8b30ad860151248463d7a0aa2ac0 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 3 Mar 2016 14:53:39 +1300 Subject: Update existing web localization --- web/l10n/es.json | 14 +++++++------- web/l10n/lt.json | 6 +++--- web/l10n/no.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'web/l10n') diff --git a/web/l10n/es.json b/web/l10n/es.json index 2ace91caf..7cca1c8f2 100644 --- a/web/l10n/es.json +++ b/web/l10n/es.json @@ -1,6 +1,6 @@ { "sharedLoading": "Cargando...", - "sharedSave": "Grabar", + "sharedSave": "Guardar", "sharedCancel": "Cancelar", "sharedAdd": "Agregar", "sharedEdit": "Editar", @@ -12,14 +12,14 @@ "sharedMph": "MPH", "sharedHour": "Hora", "sharedMinute": "Minuto", - "sharedSecond": "Segundos", + "sharedSecond": "Segundo", "errorTitle": "Error", "errorUnknown": "Error Desconocido", "errorConnection": "Error de Conexión", "userName": "Nombre", "userEmail": "Email", "userPassword": "Contraseña", - "userAdmin": "Admin", + "userAdmin": "Administrador", "loginTitle": "Ingresar", "loginLanguage": "Idioma", "loginRegister": "Registrar", @@ -27,14 +27,14 @@ "loginFailed": "Dirección de Correo o Contraseña Incorrecta", "loginCreated": "Nuevo Usuario ha sido registrado", "loginLogout": "Salir", - "devicesAndState": "Devices and State", + "devicesAndState": "Dispositivos y Estado", "deviceDialog": "Dispositivo", "deviceTitle": "Dispositivos", "deviceName": "Nombre", "deviceIdentifier": "Identificador", - "deviceLastUpdate": "Last Update", + "deviceLastUpdate": "Última Actualización", "deviceCommand": "Comando", - "deviceFollow": "Follow", + "deviceFollow": "Seguir", "settingsTitle": "Preferencias", "settingsUser": "Cuenta", "settingsServer": "Servidor", @@ -59,7 +59,7 @@ "serverTitle": "Preferencias Servidor", "serverZoom": "Zoom", "serverRegistration": "Registrar", - "serverReadonly": "Readonly", + "serverReadonly": "Sólo Lectura", "mapTitle": "Mapa", "mapLayer": "Capa de Mapa", "mapCustom": "Mapa Personalizado", diff --git a/web/l10n/lt.json b/web/l10n/lt.json index 3b32a9c3d..77e7b95a5 100644 --- a/web/l10n/lt.json +++ b/web/l10n/lt.json @@ -27,14 +27,14 @@ "loginFailed": "Neteisingas el.paštas ir/ar slaptažodis", "loginCreated": "Registracija sėmkinga", "loginLogout": "Atsijungti", - "devicesAndState": "Devices and State", + "devicesAndState": "Prietaisai ir Statusas", "deviceDialog": "Prietaisas", "deviceTitle": "Prietaisai", "deviceName": "Pavadinimas", "deviceIdentifier": "Identifikacinis kodas", "deviceLastUpdate": "Naujausias atnaujinimas", "deviceCommand": "Komanda", - "deviceFollow": "Follow", + "deviceFollow": "Sekti", "settingsTitle": "Nustatymai", "settingsUser": "Paskyra", "settingsServer": "Serveris", @@ -59,7 +59,7 @@ "serverTitle": "Serverio nustatymai", "serverZoom": "Priartinimas", "serverRegistration": "Registracija", - "serverReadonly": "Readonly", + "serverReadonly": "Tik skaityti", "mapTitle": "Žemėlapis", "mapLayer": "Žemėlapio sluoksnis", "mapCustom": "Pasirinktinis Žemėlapis", diff --git a/web/l10n/no.json b/web/l10n/no.json index dcfef54ce..d3dbb003e 100644 --- a/web/l10n/no.json +++ b/web/l10n/no.json @@ -67,7 +67,7 @@ "mapBingKey": "Bing Maps Nøkkel", "mapBingRoad": "Bing Maps Vei", "mapBingAerial": "Bing Maps Fly", - "stateTitle": "Stat", + "stateTitle": "Status", "stateName": "Egenskap", "stateValue": "Verdi", "commandTitle": "Kommando", -- cgit v1.2.3 From 1e71780b0115c63c6c09b6ad8aef03727bf00d89 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 3 Mar 2016 15:11:56 +1300 Subject: Add support for new languages --- web/l10n/fa.json | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/l10n/fi.json | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/l10n/ml.json | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/l10n/ms.json | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/l10n/tr.json | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ web/locale.js | 5 ++++ 6 files changed, 420 insertions(+) create mode 100644 web/l10n/fa.json create mode 100644 web/l10n/fi.json create mode 100644 web/l10n/ml.json create mode 100644 web/l10n/ms.json create mode 100644 web/l10n/tr.json (limited to 'web/l10n') diff --git a/web/l10n/fa.json b/web/l10n/fa.json new file mode 100644 index 000000000..3497dff23 --- /dev/null +++ b/web/l10n/fa.json @@ -0,0 +1,83 @@ +{ + "sharedLoading": "در حال بارگزارى ...", + "sharedSave": "ذخيره", + "sharedCancel": "Cancel", + "sharedAdd": "اضافه كردن", + "sharedEdit": "Edit", + "sharedRemove": "Remove", + "sharedRemoveConfirm": "Remove item?", + "sharedKm": "km", + "sharedMi": "mi", + "sharedKmh": "km/h", + "sharedMph": "mph", + "sharedHour": "Hour", + "sharedMinute": "دقيقه", + "sharedSecond": "ثانيه", + "errorTitle": "Error", + "errorUnknown": "Unknown error", + "errorConnection": "Connection error", + "userName": "نام", + "userEmail": "نام كاربرى ( ايميل )", + "userPassword": "گذرواژه", + "userAdmin": "Admin", + "loginTitle": "ورود", + "loginLanguage": "انتخاب زبان", + "loginRegister": "ثبت نام", + "loginLogin": "ورود", + "loginFailed": "نام كاربرى ( ايميل ) يا گذرواژه اشتباه است", + "loginCreated": "ثبت نام با موفقيت انجام شد", + "loginLogout": "خروج", + "devicesAndState": "Devices and State", + "deviceDialog": "دستگاه", + "deviceTitle": "دستگاه ها", + "deviceName": "نام خودرو", + "deviceIdentifier": "سريال دستگاه", + "deviceLastUpdate": "آخرين بروزرسانى", + "deviceCommand": "Command", + "deviceFollow": "Follow", + "settingsTitle": "تنظيمات", + "settingsUser": "حساب كاربرى", + "settingsServer": "Server", + "settingsUsers": "Users", + "settingsDistanceUnit": "Distance", + "settingsSpeedUnit": "سرعت", + "reportTitle": "گزارشات ", + "reportDevice": "دستگاه", + "reportFrom": "از", + "reportTo": "To", + "reportShow": "Show", + "reportClear": "Clear", + "positionFixTime": "Time", + "positionValid": "Valid", + "positionLatitude": "عرض جغرافيايى", + "positionLongitude": "طول جغرافيايى", + "positionAltitude": "Altitude", + "positionSpeed": "سرعت", + "positionCourse": "Course", + "positionAddress": "Address", + "positionProtocol": "Protocol", + "serverTitle": "Server Settings", + "serverZoom": "Zoom", + "serverRegistration": "Registration", + "serverReadonly": "Readonly", + "mapTitle": "Map", + "mapLayer": "Map Layer", + "mapCustom": "Custom Map", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps Key", + "mapBingRoad": "Bing Maps Road", + "mapBingAerial": "Bing Maps Aerial", + "stateTitle": "State", + "stateName": "Attribute", + "stateValue": "Value", + "commandTitle": "Command", + "commandSend": "ارسال", + "commandType": "Type", + "commandSent": "Command has been sent", + "commandPositionPeriodic": "Periodic Reporting", + "commandPositionStop": "Stop Reporting", + "commandEngineStop": "Engine Stop", + "commandEngineResume": "Engine Resume", + "commandFrequency": "Frequency", + "commandUnit": "Unit" +} \ No newline at end of file diff --git a/web/l10n/fi.json b/web/l10n/fi.json new file mode 100644 index 000000000..dc44cb03a --- /dev/null +++ b/web/l10n/fi.json @@ -0,0 +1,83 @@ +{ + "sharedLoading": "Ladataan...", + "sharedSave": "Tallenna", + "sharedCancel": "Peruuta", + "sharedAdd": "Lisää", + "sharedEdit": "Muokkaa", + "sharedRemove": "Poista", + "sharedRemoveConfirm": "Poista kohde?", + "sharedKm": "km", + "sharedMi": "mi", + "sharedKmh": "km/h", + "sharedMph": "mph", + "sharedHour": "Tunti", + "sharedMinute": "Minuutti", + "sharedSecond": "Sekunti", + "errorTitle": "Virhe", + "errorUnknown": "Tuntematon virhe", + "errorConnection": "Yhteysvirhe", + "userName": "Nimi", + "userEmail": "Email", + "userPassword": "Salasana", + "userAdmin": "Ylläpito", + "loginTitle": "Kirjaudu", + "loginLanguage": "Kieli", + "loginRegister": "Rekisteröidy", + "loginLogin": "Kirjaudu", + "loginFailed": "Virheellinen email tai salasana", + "loginCreated": "Uusi käyttäjä on rekisteröitynyt", + "loginLogout": "Kirjaudu ulos", + "devicesAndState": "Laitteet ja Tilat", + "deviceDialog": "Laite", + "deviceTitle": "Laitteet", + "deviceName": "Nimi", + "deviceIdentifier": "Tunniste", + "deviceLastUpdate": "Viimeisin päivitys", + "deviceCommand": "Komento", + "deviceFollow": "Seuraa", + "settingsTitle": "Asetukset", + "settingsUser": "Tili", + "settingsServer": "Palvelin", + "settingsUsers": "Käyttäjät", + "settingsDistanceUnit": "Etäisyys", + "settingsSpeedUnit": "Nopeus", + "reportTitle": "Raportit", + "reportDevice": "Laite", + "reportFrom": "Mistä", + "reportTo": "Mihin", + "reportShow": "Näytä", + "reportClear": "Tyhjennä", + "positionFixTime": "Aika", + "positionValid": "Kelvollinen", + "positionLatitude": "Latitude", + "positionLongitude": "Longitude", + "positionAltitude": "Korkeus", + "positionSpeed": "Nopeus", + "positionCourse": "Suunta", + "positionAddress": "Osoite", + "positionProtocol": "Protokolla", + "serverTitle": "Palvelinasetukset", + "serverZoom": "Lähennä", + "serverRegistration": "Rekisteröinti", + "serverReadonly": "Vain luku", + "mapTitle": "Kartta", + "mapLayer": "Karttataso", + "mapCustom": "Oma kartta", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps avain", + "mapBingRoad": "Bign Maps tiet", + "mapBingAerial": "Bing Maps ilmakuva", + "stateTitle": "Tila", + "stateName": "Ominaisuus", + "stateValue": "Arvo", + "commandTitle": "Komento", + "commandSend": "Lähetä", + "commandType": "Tyyppi", + "commandSent": "Komento on lähetetty", + "commandPositionPeriodic": "Määräaikaisraportointi", + "commandPositionStop": "Lopeta raportointi", + "commandEngineStop": "Sammuta moottori", + "commandEngineResume": "Palauta moottori", + "commandFrequency": "Taajuus", + "commandUnit": "Yksikkö" +} \ No newline at end of file diff --git a/web/l10n/ml.json b/web/l10n/ml.json new file mode 100644 index 000000000..02bd39b00 --- /dev/null +++ b/web/l10n/ml.json @@ -0,0 +1,83 @@ +{ + "sharedLoading": "ലോഡുചെയ്യുന്നു ..", + "sharedSave": "Save", + "sharedCancel": "റദ്ദാക്കുക", + "sharedAdd": "ചേര്‍ക്കുക", + "sharedEdit": "തിരുത്തുക", + "sharedRemove": "നീക്കം ചെയ്യുക", + "sharedRemoveConfirm": "വിഷയം നീക്കം ചെയ്യുക", + "sharedKm": "കിലോമീറ്റർ", + "sharedMi": "mi", + "sharedKmh": "കിലോമീറ്റർ / മണിക്കൂർ", + "sharedMph": "mph", + "sharedHour": "മണിക്കൂര്", + "sharedMinute": "മിനിറ്റ്", + "sharedSecond": "സെക്കന്റ്", + "errorTitle": "പിശക്‌", + "errorUnknown": "അജ്ഞാത പിശക്", + "errorConnection": "കണക്ഷൻ പിശക്", + "userName": "പേര്", + "userEmail": "ഇമെയിൽ", + "userPassword": "രഹസ്യ കോഡ്‌", + "userAdmin": "Admin", + "loginTitle": "അകത്തു പ്രവേശിക്കുക", + "loginLanguage": "ഭാഷ", + "loginRegister": "Register", + "loginLogin": "അകത്തു പ്രവേശിക്കുക", + "loginFailed": "തെറ്റായ ഇമെയിൽ വിലാസവും പാസ്വേഡും", + "loginCreated": "പുതിയ ഉപയോക്താവ് രജിസ്റ്റർ ചെയ്തു", + "loginLogout": "പുറത്തുകടക്കുക", + "devicesAndState": "Devices and State", + "deviceDialog": "ഉപകരണം", + "deviceTitle": "Devices", + "deviceName": "പേര്", + "deviceIdentifier": "Identifier", + "deviceLastUpdate": "Last Update", + "deviceCommand": "Command", + "deviceFollow": "Follow", + "settingsTitle": "Settings", + "settingsUser": "Account", + "settingsServer": "Server", + "settingsUsers": "Users", + "settingsDistanceUnit": "Distance", + "settingsSpeedUnit": "വേഗം", + "reportTitle": "Reports", + "reportDevice": "ഉപകരണം", + "reportFrom": "From", + "reportTo": "To", + "reportShow": "Show", + "reportClear": "Clear", + "positionFixTime": "സമയം", + "positionValid": "Valid", + "positionLatitude": "അക്ഷാംശം", + "positionLongitude": "രേഖാംശം", + "positionAltitude": "Altitude", + "positionSpeed": "വേഗം", + "positionCourse": "Course", + "positionAddress": "Address", + "positionProtocol": "Protocol", + "serverTitle": "Server Settings", + "serverZoom": "വലുതാക്കിയോ ചെറുതാക്കിയോ കാണിക്കുക", + "serverRegistration": "രജിസ്ട്രേഷൻ", + "serverReadonly": "Readonly", + "mapTitle": "ഭൂപടം", + "mapLayer": "Map Layer", + "mapCustom": "Custom Map", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps Key", + "mapBingRoad": "Bing Maps Road", + "mapBingAerial": "Bing Maps Aerial", + "stateTitle": "State", + "stateName": "Attribute", + "stateValue": "Value", + "commandTitle": "Command", + "commandSend": "Send", + "commandType": "Type", + "commandSent": "Command has been sent", + "commandPositionPeriodic": "Periodic Reporting", + "commandPositionStop": "Stop Reporting", + "commandEngineStop": "Engine Stop", + "commandEngineResume": "Engine Resume", + "commandFrequency": "Frequency", + "commandUnit": "Unit" +} \ No newline at end of file diff --git a/web/l10n/ms.json b/web/l10n/ms.json new file mode 100644 index 000000000..ff5f02f01 --- /dev/null +++ b/web/l10n/ms.json @@ -0,0 +1,83 @@ +{ + "sharedLoading": "Memuatkan...", + "sharedSave": "Simpan", + "sharedCancel": "Batal", + "sharedAdd": "Tambah", + "sharedEdit": "Ubah", + "sharedRemove": "Hapus", + "sharedRemoveConfirm": "Hapuskan item?", + "sharedKm": "km", + "sharedMi": "mi", + "sharedKmh": "km/h", + "sharedMph": "mph", + "sharedHour": "Jam", + "sharedMinute": "Minit", + "sharedSecond": "Saat", + "errorTitle": "Ralat", + "errorUnknown": "Ralat tidak diketahui", + "errorConnection": "Ralat penyambungan", + "userName": "Nama", + "userEmail": "Emel", + "userPassword": "Katalaluan", + "userAdmin": "Admin", + "loginTitle": "Log masuk", + "loginLanguage": "Bahasa", + "loginRegister": "Daftar", + "loginLogin": "Log masuk", + "loginFailed": "Kesalahan emel atau katalaluan", + "loginCreated": "Pengguna baru telah didaftarkan", + "loginLogout": "Keluar", + "devicesAndState": "Peranti dan State", + "deviceDialog": "Peranti", + "deviceTitle": "Peranti", + "deviceName": "Nama", + "deviceIdentifier": "IMEI/ID", + "deviceLastUpdate": "Kemaskini Terakhir", + "deviceCommand": "Arahan", + "deviceFollow": "Ikut", + "settingsTitle": "Tetapan", + "settingsUser": "Akaun", + "settingsServer": "Server", + "settingsUsers": "Pengguna", + "settingsDistanceUnit": "Jarak", + "settingsSpeedUnit": "Kelajuan", + "reportTitle": "Laporan", + "reportDevice": "Peranti", + "reportFrom": "Daripada", + "reportTo": "Ke", + "reportShow": "Papar", + "reportClear": "Kosongkan", + "positionFixTime": "Masa", + "positionValid": "Sah", + "positionLatitude": "Latitud", + "positionLongitude": "Longitud", + "positionAltitude": "Altitud", + "positionSpeed": "Kelajuan", + "positionCourse": "Course", + "positionAddress": "Alamat", + "positionProtocol": "Protokol", + "serverTitle": "Tetapan Server", + "serverZoom": "Besarkan", + "serverRegistration": "Pendaftaran", + "serverReadonly": "Baca Sahaja", + "mapTitle": "Peta", + "mapLayer": "Map Layer", + "mapCustom": "Peta Lain", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps Key", + "mapBingRoad": "Bing Maps Road", + "mapBingAerial": "Bing Maps Aerial", + "stateTitle": "Negeri", + "stateName": "Atribut", + "stateValue": "Nilai", + "commandTitle": "Arahan", + "commandSend": "Hantar", + "commandType": "Jenis", + "commandSent": "Arahan telah dihantar", + "commandPositionPeriodic": "Laporan Berkala", + "commandPositionStop": "Hentikan Laporan", + "commandEngineStop": "Matikan Enjin", + "commandEngineResume": "Hidupkan Enjin", + "commandFrequency": "Frekuensi", + "commandUnit": "Unit" +} \ No newline at end of file diff --git a/web/l10n/tr.json b/web/l10n/tr.json new file mode 100644 index 000000000..6eacb12d0 --- /dev/null +++ b/web/l10n/tr.json @@ -0,0 +1,83 @@ +{ + "sharedLoading": "Yükleniyor...", + "sharedSave": "Kaydet", + "sharedCancel": "İptal", + "sharedAdd": "Ekle", + "sharedEdit": "Düzenle", + "sharedRemove": "Kaldır", + "sharedRemoveConfirm": "Öğeyi kaldır", + "sharedKm": "km", + "sharedMi": "mil", + "sharedKmh": "km/s", + "sharedMph": "mil/s", + "sharedHour": "Saat", + "sharedMinute": "Dakika", + "sharedSecond": "Saniye", + "errorTitle": "Hata", + "errorUnknown": "Bilinmeyen hata ", + "errorConnection": "Bağlantı Hatası", + "userName": "Ad", + "userEmail": "Eposta", + "userPassword": "Şifre", + "userAdmin": "Yönetici", + "loginTitle": "Oturum aç", + "loginLanguage": "Lisan", + "loginRegister": "Kayıt", + "loginLogin": "Oturumu aç", + "loginFailed": "Geçersiz eposta veya şifre", + "loginCreated": "Yeni kullanıcı kaydedildi", + "loginLogout": "Oturumu sonlandır", + "devicesAndState": "Cihazlar ve Bölge", + "deviceDialog": "Cihaz", + "deviceTitle": "Cihazlar", + "deviceName": "İsim", + "deviceIdentifier": "Kimlik", + "deviceLastUpdate": "Son Güncelleme", + "deviceCommand": "Komut", + "deviceFollow": "Takip", + "settingsTitle": "Ayarlar", + "settingsUser": "Hesap", + "settingsServer": "Sunucu", + "settingsUsers": "Kullanıcı", + "settingsDistanceUnit": "Mesafe", + "settingsSpeedUnit": "Hız", + "reportTitle": "Raporlar", + "reportDevice": "Aygıt", + "reportFrom": "Başlangıç", + "reportTo": "Varış", + "reportShow": "Göster", + "reportClear": "Temizle", + "positionFixTime": "Süre", + "positionValid": "Geçerli", + "positionLatitude": "Enlem", + "positionLongitude": "Boylam", + "positionAltitude": "Rakım", + "positionSpeed": "Sürat", + "positionCourse": "Yön", + "positionAddress": "Adres", + "positionProtocol": "Protokol", + "serverTitle": "Sunucu Ayarları", + "serverZoom": "Yakınlaştırma", + "serverRegistration": "Kayıt", + "serverReadonly": "Saltokunur", + "mapTitle": "Harita", + "mapLayer": "Harita Katmanı", + "mapCustom": "Özelleştirilmiş Harita", + "mapOsm": "Open Street Map", + "mapBingKey": "Bing Maps Key", + "mapBingRoad": "Bing Maps Road", + "mapBingAerial": "Bing Maps Aerial", + "stateTitle": "Bölge", + "stateName": "Özellik", + "stateValue": "Değer", + "commandTitle": "Komut", + "commandSend": "Gönder", + "commandType": "Tip", + "commandSent": "Komut gönderildi", + "commandPositionPeriodic": "Periyodik Rapor", + "commandPositionStop": "Raporlamayı Durdur", + "commandEngineStop": "Motoru Durdur", + "commandEngineResume": "Motoru Çalıştır", + "commandFrequency": "Frekans", + "commandUnit": "Ünite" +} \ No newline at end of file diff --git a/web/locale.js b/web/locale.js index 30749f0f7..c0b3af90b 100644 --- a/web/locale.js +++ b/web/locale.js @@ -25,12 +25,16 @@ Locale.languages = { 'el': { name: 'Ελληνικά', code: 'el' }, 'en': { name: 'English', code: 'en' }, 'es': { name: 'Español', code: 'es' }, + 'fa': { name: 'فارسی', code: 'fa' }, + 'fi': { name: 'Suomi', code: 'fi' }, 'fr': { name: 'Français', code: 'fr' }, 'hu': { name: 'Magyar', code: 'hu' }, 'id': { name: 'Bahasa Indonesia', code: 'id' }, 'it': { name: 'Italiano', code: 'it' }, 'ka': { name: 'ქართული', code: 'en' }, 'lt': { name: 'Lietuvių', code: 'lt' }, + 'ml': { name: 'മലയാളം', code: 'en' }, + 'ms': { name: 'بهاس ملايو', code: 'en' }, 'nl': { name: 'Nederlands', code: 'nl' }, 'no': { name: 'Norsk', code: 'no_NB' }, 'pl': { name: 'Polski', code: 'pl' }, @@ -44,6 +48,7 @@ Locale.languages = { 'sr': { name: 'Srpski', code: 'sr' }, 'ta': { name: 'தமிழ்', code: 'en' }, 'th': { name: 'ไทย', code: 'th' }, + 'tr': { name: 'Türkçe', code: 'tr' }, 'uk': { name: 'Українська', code: 'ukr' }, 'vi': { name: 'Tiếng Việt', code: 'en' }, 'zh': { name: '中文', code: 'zh_CN' } -- cgit v1.2.3 From 1750a8b5353a69f3b1805757f3b31150260d45f8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 9 Mar 2016 20:34:11 +1300 Subject: Add groups list window component --- src/org/traccar/web/WebServer.java | 5 ++- web/app/view/DeviceDialog.js | 2 +- web/app/view/Devices.js | 2 +- web/app/view/Groups.js | 44 ++++++++++++++++++++++ web/app/view/GroupsController.js | 67 ++++++++++++++++++++++++++++++++++ web/app/view/Register.js | 2 +- web/app/view/SettingsMenu.js | 3 ++ web/app/view/SettingsMenuController.js | 11 ++++++ web/app/view/UserDevices.js | 2 +- web/app/view/UserDialog.js | 2 +- web/app/view/Users.js | 2 +- web/l10n/en.json | 4 +- 12 files changed, 137 insertions(+), 9 deletions(-) create mode 100644 web/app/view/Groups.js create mode 100644 web/app/view/GroupsController.js (limited to 'web/l10n') diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index ed006f8cb..4e764d5d6 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -43,6 +43,8 @@ import org.traccar.api.SecurityRequestFilter; import org.traccar.api.resource.CommandResource; import org.traccar.api.resource.DeviceResource; import org.traccar.api.resource.DevicePermissionResource; +import org.traccar.api.resource.GroupPermissionResource; +import org.traccar.api.resource.GroupResource; import org.traccar.api.resource.PositionResource; import org.traccar.api.resource.ServerResource; import org.traccar.api.resource.SessionResource; @@ -140,7 +142,8 @@ public class WebServer { resourceConfig.register(SecurityRequestFilter.class); resourceConfig.register(CorsResponseFilter.class); resourceConfig.registerClasses(ServerResource.class, SessionResource.class, CommandResource.class, - DevicePermissionResource.class, DeviceResource.class, UserResource.class, PositionResource.class); + GroupPermissionResource.class, DevicePermissionResource.class, UserResource.class, + GroupResource.class, DeviceResource.class, PositionResource.class); servletHandler.addServlet(new ServletHolder(new ServletContainer(resourceConfig)), "/*"); handlers.addHandler(servletHandler); diff --git a/web/app/view/DeviceDialog.js b/web/app/view/DeviceDialog.js index c42af95d0..318ac4ffe 100644 --- a/web/app/view/DeviceDialog.js +++ b/web/app/view/DeviceDialog.js @@ -29,7 +29,7 @@ Ext.define('Traccar.view.DeviceDialog', { items: [{ xtype: 'textfield', name: 'name', - fieldLabel: Strings.deviceName, + fieldLabel: Strings.sharedName, allowBlank: false }, { xtype: 'textfield', diff --git a/web/app/view/Devices.js b/web/app/view/Devices.js index 66c4e813b..5712feb81 100644 --- a/web/app/view/Devices.js +++ b/web/app/view/Devices.js @@ -57,7 +57,7 @@ Ext.define('Traccar.view.Devices', { }, columns: [{ - text: Strings.deviceName, + text: Strings.sharedName, dataIndex: 'name', flex: 1 }, { diff --git a/web/app/view/Groups.js b/web/app/view/Groups.js new file mode 100644 index 000000000..8404c59a9 --- /dev/null +++ b/web/app/view/Groups.js @@ -0,0 +1,44 @@ +/* + * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Ext.define('Traccar.view.Groups', { + extend: 'Ext.grid.Panel', + xtype: 'groupsView', + + requires: [ + 'Traccar.view.GroupsController', + 'Traccar.view.EditToolbar' + ], + + controller: 'groups', + store: 'Groups', + + selType: 'rowmodel', + + tbar: { + xtype: 'editToolbar' + }, + + listeners: { + selectionchange: 'onSelectionChange' + }, + + columns: [{ + text: Strings.sharedName, + dataIndex: 'name', + flex: 1 + }] +}); diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js new file mode 100644 index 000000000..619e0c50e --- /dev/null +++ b/web/app/view/GroupsController.js @@ -0,0 +1,67 @@ +/* + * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Ext.define('Traccar.view.GroupsController', { + extend: 'Ext.app.ViewController', + alias: 'controller.groups', + + init: function () { + Ext.getStore('Groups').load(); + }, + + onAddClick: function () { + /*var user, dialog; + user = Ext.create('Traccar.model.User'); + dialog = Ext.create('Traccar.view.UserDialog'); + dialog.down('form').loadRecord(user); + dialog.show();*/ + }, + + onEditClick: function () { + /*var user, dialog; + user = this.getView().getSelectionModel().getSelection()[0]; + dialog = Ext.create('Traccar.view.UserDialog'); + dialog.down('form').loadRecord(user); + dialog.show();*/ + }, + + onRemoveClick: function () { + /*var user = this.getView().getSelectionModel().getSelection()[0]; + Ext.Msg.show({ + title: Strings.settingsUser, + message: Strings.sharedRemoveConfirm, + buttons: Ext.Msg.YESNO, + buttonText: { + yes: Strings.sharedRemove, + no: Strings.sharedCancel + }, + fn: function (btn) { + var store = Ext.getStore('Users'); + if (btn === 'yes') { + store.remove(user); + store.sync(); + } + } + });*/ + }, + + onSelectionChange: function (selected) { + var disabled = selected.length > 0; + this.lookupReference('toolbarEditButton').setDisabled(disabled); + this.lookupReference('toolbarRemoveButton').setDisabled(disabled); + this.lookupReference('userDevicesButton').setDisabled(disabled); + } +}); diff --git a/web/app/view/Register.js b/web/app/view/Register.js index 7c2881d62..198e10b8f 100644 --- a/web/app/view/Register.js +++ b/web/app/view/Register.js @@ -33,7 +33,7 @@ Ext.define('Traccar.view.Register', { items: [{ xtype: 'textfield', name: 'name', - fieldLabel: Strings.userName, + fieldLabel: Strings.sharedName, allowBlank: false }, { xtype: 'textfield', diff --git a/web/app/view/SettingsMenu.js b/web/app/view/SettingsMenu.js index c828b37af..1ada94359 100644 --- a/web/app/view/SettingsMenu.js +++ b/web/app/view/SettingsMenu.js @@ -31,6 +31,9 @@ Ext.define('Traccar.view.SettingsMenu', { items: [{ text: Strings.settingsUser, handler: 'onUserClick' + }, { + text: Strings.settingsGroups, + handler: 'onGroupsClick' }, { text: Strings.settingsServer, hidden: true, diff --git a/web/app/view/SettingsMenuController.js b/web/app/view/SettingsMenuController.js index c52f0a75e..6d767e3a9 100644 --- a/web/app/view/SettingsMenuController.js +++ b/web/app/view/SettingsMenuController.js @@ -23,6 +23,7 @@ Ext.define('Traccar.view.SettingsMenuController', { 'Traccar.view.UserDialog', 'Traccar.view.ServerDialog', 'Traccar.view.Users', + 'Traccar.view.Groups', 'Traccar.view.BaseWindow' ], @@ -39,6 +40,16 @@ Ext.define('Traccar.view.SettingsMenuController', { dialog.show(); }, + onGroupsClick: function () { + Ext.create('Traccar.view.BaseWindow', { + title: Strings.settingsGroups, + modal: false, + items: { + xtype: 'groupsView' + } + }).show(); + }, + onServerClick: function () { var dialog = Ext.create('Traccar.view.ServerDialog'); dialog.down('form').loadRecord(Traccar.app.getServer()); diff --git a/web/app/view/UserDevices.js b/web/app/view/UserDevices.js index f9ab48266..f42f7c1bb 100644 --- a/web/app/view/UserDevices.js +++ b/web/app/view/UserDevices.js @@ -37,7 +37,7 @@ Ext.define('Traccar.view.UserDevices', { }, columns: [{ - text: Strings.deviceName, + text: Strings.sharedName, dataIndex: 'name', flex: 1 }, { text: Strings.deviceIdentifier, diff --git a/web/app/view/UserDialog.js b/web/app/view/UserDialog.js index 783ddd159..c1ed2fece 100644 --- a/web/app/view/UserDialog.js +++ b/web/app/view/UserDialog.js @@ -30,7 +30,7 @@ Ext.define('Traccar.view.UserDialog', { items: [{ xtype: 'textfield', name: 'name', - fieldLabel: Strings.userName + fieldLabel: Strings.sharedName }, { xtype: 'textfield', name: 'email', diff --git a/web/app/view/Users.js b/web/app/view/Users.js index f4ef332b4..684931559 100644 --- a/web/app/view/Users.js +++ b/web/app/view/Users.js @@ -43,7 +43,7 @@ Ext.define('Traccar.view.Users', { }, columns: [{ - text: Strings.userName, + text: Strings.sharedName, dataIndex: 'name', flex: 1 }, { diff --git a/web/l10n/en.json b/web/l10n/en.json index ec8018863..259d54b1a 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -13,10 +13,10 @@ "sharedHour": "Hour", "sharedMinute": "Minute", "sharedSecond": "Second", + "sharedName": "Name", "errorTitle": "Error", "errorUnknown": "Unknown error", "errorConnection": "Connection error", - "userName": "Name", "userEmail": "Email", "userPassword": "Password", "userAdmin": "Admin", @@ -30,13 +30,13 @@ "devicesAndState": "Devices and State", "deviceDialog": "Device", "deviceTitle": "Devices", - "deviceName": "Name", "deviceIdentifier": "Identifier", "deviceLastUpdate": "Last Update", "deviceCommand": "Command", "deviceFollow": "Follow", "settingsTitle": "Settings", "settingsUser": "Account", + "settingsGroups": "Groups", "settingsServer": "Server", "settingsUsers": "Users", "settingsDistanceUnit": "Distance", -- cgit v1.2.3 From c22cc6982a18eb3601fdc8fb8447b5a2ba73690a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 9 Mar 2016 21:48:59 +1300 Subject: Implement group editing dialog --- debug.xml | 2 +- src/org/traccar/database/PermissionsManager.java | 1 + web/app/view/GroupDialog.js | 36 ++++++++++++++++++++++++ web/app/view/GroupsController.js | 32 ++++++++++----------- web/l10n/en.json | 1 + 5 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 web/app/view/GroupDialog.js (limited to 'web/l10n') diff --git a/debug.xml b/debug.xml index 2266a1eea..ce7c3190a 100644 --- a/debug.xml +++ b/debug.xml @@ -14,7 +14,7 @@ web true true - 10000 + 30000 true nominatim diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java index 5d6430764..022691b1b 100644 --- a/src/org/traccar/database/PermissionsManager.java +++ b/src/org/traccar/database/PermissionsManager.java @@ -59,6 +59,7 @@ public class PermissionsManager { public final void refresh() { users.clear(); + groupPermissions.clear(); devicePermissions.clear(); try { server = dataManager.getServer(); diff --git a/web/app/view/GroupDialog.js b/web/app/view/GroupDialog.js new file mode 100644 index 000000000..a34e33aa0 --- /dev/null +++ b/web/app/view/GroupDialog.js @@ -0,0 +1,36 @@ +/* + * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Ext.define('Traccar.view.GroupDialog', { + extend: 'Traccar.view.BaseEditDialog', + + requires: [ + 'Traccar.view.BaseEditDialogController' + ], + + controller: 'baseEditDialog', + title: Strings.groupDialog, + + items: { + xtype: 'form', + items: [{ + xtype: 'textfield', + name: 'name', + fieldLabel: Strings.sharedName, + allowBlank: false + }] + } +}); diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index 619e0c50e..34b259658 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -23,25 +23,26 @@ Ext.define('Traccar.view.GroupsController', { }, onAddClick: function () { - /*var user, dialog; - user = Ext.create('Traccar.model.User'); - dialog = Ext.create('Traccar.view.UserDialog'); - dialog.down('form').loadRecord(user); - dialog.show();*/ + var group, dialog; + group = Ext.create('Traccar.model.Group'); + group.store = this.getView().getStore(); + dialog = Ext.create('Traccar.view.GroupDialog'); + dialog.down('form').loadRecord(group); + dialog.show(); }, onEditClick: function () { - /*var user, dialog; - user = this.getView().getSelectionModel().getSelection()[0]; - dialog = Ext.create('Traccar.view.UserDialog'); - dialog.down('form').loadRecord(user); - dialog.show();*/ + var group, dialog; + group = this.getView().getSelectionModel().getSelection()[0]; + dialog = Ext.create('Traccar.view.GroupDialog'); + dialog.down('form').loadRecord(group); + dialog.show(); }, onRemoveClick: function () { - /*var user = this.getView().getSelectionModel().getSelection()[0]; + var group = this.getView().getSelectionModel().getSelection()[0]; Ext.Msg.show({ - title: Strings.settingsUser, + title: Strings.groupDialog, message: Strings.sharedRemoveConfirm, buttons: Ext.Msg.YESNO, buttonText: { @@ -49,19 +50,18 @@ Ext.define('Traccar.view.GroupsController', { no: Strings.sharedCancel }, fn: function (btn) { - var store = Ext.getStore('Users'); + var store = Ext.getStore('Groups'); if (btn === 'yes') { - store.remove(user); + store.remove(group); store.sync(); } } - });*/ + }); }, onSelectionChange: function (selected) { var disabled = selected.length > 0; this.lookupReference('toolbarEditButton').setDisabled(disabled); this.lookupReference('toolbarRemoveButton').setDisabled(disabled); - this.lookupReference('userDevicesButton').setDisabled(disabled); } }); diff --git a/web/l10n/en.json b/web/l10n/en.json index 259d54b1a..715dce3a7 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -34,6 +34,7 @@ "deviceLastUpdate": "Last Update", "deviceCommand": "Command", "deviceFollow": "Follow", + "groupDialog": "Group", "settingsTitle": "Settings", "settingsUser": "Account", "settingsGroups": "Groups", -- cgit v1.2.3 From 5634860cbe5c43007df354acba79d5051c1eb987 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 9 Mar 2016 23:13:06 +1300 Subject: Add parent field for device and group --- debug.xml | 4 ++-- src/org/traccar/model/Group.java | 2 -- web/app/controller/Root.js | 1 + web/app/model/Device.js | 3 +++ web/app/model/Group.js | 3 +++ web/app/view/DeviceDialog.js | 7 +++++++ web/app/view/GroupDialog.js | 7 +++++++ web/app/view/GroupsController.js | 4 ---- web/l10n/en.json | 1 + 9 files changed, 24 insertions(+), 8 deletions(-) (limited to 'web/l10n') diff --git a/debug.xml b/debug.xml index ce7c3190a..45c475a91 100644 --- a/debug.xml +++ b/debug.xml @@ -130,7 +130,7 @@ - UPDATE devices SET name = :name, uniqueId = :uniqueId WHERE id = :id; + UPDATE devices SET name = :name, uniqueId = :uniqueId, groupId = :groupId WHERE id = :id; @@ -158,7 +158,7 @@ - UPDATE groups SET name = :name WHERE id = :id; + UPDATE groups SET name = :name, groupId = :groupId WHERE id = :id; diff --git a/src/org/traccar/model/Group.java b/src/org/traccar/model/Group.java index 24f7973c8..00f2b2cfc 100644 --- a/src/org/traccar/model/Group.java +++ b/src/org/traccar/model/Group.java @@ -15,8 +15,6 @@ */ package org.traccar.model; -import java.util.Date; - public class Group { private long id; diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index a1026d3c5..5bd567619 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -73,6 +73,7 @@ Ext.define('Traccar.controller.Root', { }, loadApp: function () { + Ext.getStore('Groups').load(); Ext.getStore('Devices').load(); Ext.get('attribution').remove(); if (this.isPhone) { diff --git a/web/app/model/Device.js b/web/app/model/Device.js index 709d51953..588d53c1f 100644 --- a/web/app/model/Device.js +++ b/web/app/model/Device.js @@ -34,5 +34,8 @@ Ext.define('Traccar.model.Device', { name: 'lastUpdate', type: 'date', dateFormat: 'c' + }, { + name: 'groupId', + type: 'int' }] }); diff --git a/web/app/model/Group.js b/web/app/model/Group.js index 22e160315..a28897feb 100644 --- a/web/app/model/Group.js +++ b/web/app/model/Group.js @@ -24,5 +24,8 @@ Ext.define('Traccar.model.Group', { }, { name: 'name', type: 'string' + }, { + name: 'groupId', + type: 'int' }] }); diff --git a/web/app/view/DeviceDialog.js b/web/app/view/DeviceDialog.js index 318ac4ffe..4a22ca008 100644 --- a/web/app/view/DeviceDialog.js +++ b/web/app/view/DeviceDialog.js @@ -36,6 +36,13 @@ Ext.define('Traccar.view.DeviceDialog', { name: 'uniqueId', fieldLabel: Strings.deviceIdentifier, allowBlank: false + }, { + xtype: 'combobox', + name: 'groupId', + fieldLabel: Strings.groupParent, + store: 'Groups', + displayField: 'name', + valueField: 'id' }] } }); diff --git a/web/app/view/GroupDialog.js b/web/app/view/GroupDialog.js index a34e33aa0..2cca61ef5 100644 --- a/web/app/view/GroupDialog.js +++ b/web/app/view/GroupDialog.js @@ -31,6 +31,13 @@ Ext.define('Traccar.view.GroupDialog', { name: 'name', fieldLabel: Strings.sharedName, allowBlank: false + }, { + xtype: 'combobox', + name: 'groupId', + fieldLabel: Strings.groupParent, + store: 'Groups', + displayField: 'name', + valueField: 'id' }] } }); diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index 34b259658..6cc568ea2 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -18,10 +18,6 @@ Ext.define('Traccar.view.GroupsController', { extend: 'Ext.app.ViewController', alias: 'controller.groups', - init: function () { - Ext.getStore('Groups').load(); - }, - onAddClick: function () { var group, dialog; group = Ext.create('Traccar.model.Group'); diff --git a/web/l10n/en.json b/web/l10n/en.json index 715dce3a7..cabd76362 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -35,6 +35,7 @@ "deviceCommand": "Command", "deviceFollow": "Follow", "groupDialog": "Group", + "groupParent": "Group", "settingsTitle": "Settings", "settingsUser": "Account", "settingsGroups": "Groups", -- cgit v1.2.3