Show UTC time offset and use better dropdown with search
This commit is contained in:
@@ -264,18 +264,23 @@
|
||||
|
||||
<div class="card" style="margin-bottom: 15px;">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
The current timezone setting is <b>{{ timeZone.currentTimeZone }}</b>. This setting is used
|
||||
The current timezone setting is <b>{{ timeZone.currentTimeZone.display }}</b>. This setting is used
|
||||
for scheduling backup and update tasks.
|
||||
</p>
|
||||
<p class="text-danger" ng-show="timeZone.error"><br/>{{ timeZone.error }}</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<select class="form-control" ng-model="timeZone.timeZone" ng-disabled="timeZone.busy" ng-options="zone for zone in timeZone.availableTimeZones"></select>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<multiselect class="pull-right" ng-model="timeZone.timeZone" ng-disabled="timeZone.busy" options="tz.display for tz in timeZone.availableTimeZones" data-multiple="false" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span class="text-success text-bold" ng-show="timeZone.success && timeZone.timeZone === timeZone.currentTimeZone">Saved</span>
|
||||
|
||||
@@ -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