From 83318d9c685a08c1b1ba2a10eeacb15caab96f41 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 28 Aug 2015 22:57:57 -0700 Subject: [PATCH] GUAC-586: Ensure model is set prior to region in time zone field. --- .../app/form/controllers/timeZoneFieldController.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/app/form/controllers/timeZoneFieldController.js b/guacamole/src/main/webapp/app/form/controllers/timeZoneFieldController.js index 85483b195..0410567ee 100644 --- a/guacamole/src/main/webapp/app/form/controllers/timeZoneFieldController.js +++ b/guacamole/src/main/webapp/app/form/controllers/timeZoneFieldController.js @@ -697,15 +697,15 @@ angular.module('form').controller('timeZoneFieldController', ['$scope', '$inject */ $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 $scope.$watch('model', function setModel(model) { $scope.region = timeZoneRegions[model] || ''; selectedTimeZone[$scope.region] = model; }); + // Restore time zone selection when region changes + $scope.$watch('region', function restoreSelection(region) { + $scope.model = selectedTimeZone[region] || null; + }); + }]);