mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUAC-586: Ensure model is set prior to region in time zone field.
This commit is contained in:
@@ -697,15 +697,15 @@ angular.module('form').controller('timeZoneFieldController', ['$scope', '$inject
|
|||||||
*/
|
*/
|
||||||
$scope.region = '';
|
$scope.region = '';
|
||||||
|
|
||||||
// Restore time zone selection when region changes
|
|
||||||
$scope.$watch('region', function restoreSelection(region) {
|
|
||||||
$scope.model = selectedTimeZone[region] || null;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Ensure corresponding region is selected
|
// Ensure corresponding region is selected
|
||||||
$scope.$watch('model', function setModel(model) {
|
$scope.$watch('model', function setModel(model) {
|
||||||
$scope.region = timeZoneRegions[model] || '';
|
$scope.region = timeZoneRegions[model] || '';
|
||||||
selectedTimeZone[$scope.region] = model;
|
selectedTimeZone[$scope.region] = model;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Restore time zone selection when region changes
|
||||||
|
$scope.$watch('region', function restoreSelection(region) {
|
||||||
|
$scope.model = selectedTimeZone[region] || null;
|
||||||
|
});
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
Reference in New Issue
Block a user