aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/dialog')
-rw-r--r--web/app/view/dialog/CalendarController.js4
-rw-r--r--web/app/view/dialog/CommandController.js2
-rw-r--r--web/app/view/dialog/Geofence.js1
-rw-r--r--web/app/view/dialog/GeofenceController.js5
-rw-r--r--web/app/view/dialog/LoginController.js10
-rw-r--r--web/app/view/dialog/MapPickerController.js2
6 files changed, 15 insertions, 9 deletions
diff --git a/web/app/view/dialog/CalendarController.js b/web/app/view/dialog/CalendarController.js
index 14d8294a..fb8cbff6 100644
--- a/web/app/view/dialog/CalendarController.js
+++ b/web/app/view/dialog/CalendarController.js
@@ -26,12 +26,12 @@ Ext.define('Traccar.view.dialog.CalendarController', {
reader = new FileReader();
reader.onload = function (event) {
fileField.up('window').lookupReference('dataField').setValue(
- btoa(String.fromCharCode.apply(null, new Uint8Array(event.target.result))));
+ event.target.result.substr(event.target.result.indexOf(',') + 1));
};
reader.onerror = function (event) {
Traccar.app.showError(event.target.error);
};
- reader.readAsArrayBuffer(fileField.fileInputEl.dom.files[0]);
+ reader.readAsDataURL(fileField.fileInputEl.dom.files[0]);
}
}
});
diff --git a/web/app/view/dialog/CommandController.js b/web/app/view/dialog/CommandController.js
index 485d994d..3fdc7b0c 100644
--- a/web/app/view/dialog/CommandController.js
+++ b/web/app/view/dialog/CommandController.js
@@ -97,6 +97,8 @@ Ext.define('Traccar.view.dialog.CommandController', {
data: value
});
break;
+ default:
+ break;
}
Ext.Ajax.request({
diff --git a/web/app/view/dialog/Geofence.js b/web/app/view/dialog/Geofence.js
index 93f17de5..bed20d38 100644
--- a/web/app/view/dialog/Geofence.js
+++ b/web/app/view/dialog/Geofence.js
@@ -46,6 +46,7 @@ Ext.define('Traccar.view.dialog.Geofence', {
fieldLabel: Strings.sharedDescription
}, {
xtype: 'combobox',
+ reference: 'calendarCombo',
name: 'calendarId',
store: 'Calendars',
queryMode: 'local',
diff --git a/web/app/view/dialog/GeofenceController.js b/web/app/view/dialog/GeofenceController.js
index 9fdad61b..e4ac5a2e 100644
--- a/web/app/view/dialog/GeofenceController.js
+++ b/web/app/view/dialog/GeofenceController.js
@@ -34,6 +34,11 @@ Ext.define('Traccar.view.dialog.GeofenceController', {
}
},
+ init: function () {
+ this.lookupReference('calendarCombo').setHidden(
+ Traccar.app.getBooleanAttributePreference('ui.disableCalendars'));
+ },
+
saveArea: function (value) {
this.lookupReference('areaField').setValue(value);
},
diff --git a/web/app/view/dialog/LoginController.js b/web/app/view/dialog/LoginController.js
index 1b5cd072..c25d9a83 100644
--- a/web/app/view/dialog/LoginController.js
+++ b/web/app/view/dialog/LoginController.js
@@ -86,14 +86,12 @@ Ext.define('Traccar.view.dialog.LoginController', {
prefix = url.substring(0, url.indexOf(paramName));
suffix = url.substring(url.indexOf(paramName));
suffix = suffix.substring(suffix.indexOf('=') + 1);
- suffix = (suffix.indexOf('&') >= 0) ? suffix.substring(suffix.indexOf('&')) : '';
+ suffix = suffix.indexOf('&') >= 0 ? suffix.substring(suffix.indexOf('&')) : '';
url = prefix + paramName + '=' + paramValue + suffix;
+ } else if (url.indexOf('?') < 0) {
+ url += '?' + paramName + '=' + paramValue;
} else {
- if (url.indexOf('?') < 0) {
- url += '?' + paramName + '=' + paramValue;
- } else {
- url += '&' + paramName + '=' + paramValue;
- }
+ url += '&' + paramName + '=' + paramValue;
}
window.location.href = url;
},
diff --git a/web/app/view/dialog/MapPickerController.js b/web/app/view/dialog/MapPickerController.js
index 23f60ece..8641e377 100644
--- a/web/app/view/dialog/MapPickerController.js
+++ b/web/app/view/dialog/MapPickerController.js
@@ -30,7 +30,7 @@ Ext.define('Traccar.view.dialog.MapPickerController', {
}
},
- getMapState: function (button) {
+ getMapState: function () {
this.fireEvent('mapstaterequest');
},