Show UTC time offset and use better dropdown with search
This commit is contained in:
@@ -264,7 +264,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
error: '',
|
||||
timeZone: '',
|
||||
currentTimeZone: '',
|
||||
availableTimeZones: moment.tz.names(),
|
||||
availableTimeZones: window.timezones,
|
||||
|
||||
submit: function () {
|
||||
if ($scope.timeZone.timeZone === $scope.timeZone.currentTimeZone) return;
|
||||
@@ -273,7 +273,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.timeZone.busy = true;
|
||||
$scope.timeZone.success = false;
|
||||
|
||||
Client.setTimeZone($scope.timeZone.timeZone, function (error) {
|
||||
Client.setTimeZone($scope.timeZone.timeZone.id, function (error) {
|
||||
if (error) $scope.timeZone.error = error.message;
|
||||
else $scope.timeZone.currentTimeZone = $scope.timeZone.timeZone;
|
||||
|
||||
@@ -321,8 +321,8 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
Client.getTimeZone(function (error, timeZone) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.timeZone.currentTimeZone = timeZone;
|
||||
$scope.timeZone.timeZone = timeZone;
|
||||
$scope.timeZone.currentTimeZone = window.timezones.find(function (t) { return t.id === timeZone; });
|
||||
$scope.timeZone.timeZone = $scope.timeZone.currentTimeZone;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user