From 1a9edd002757f9c263cd807ef35f78c35155a6be Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Wed, 3 Apr 2024 16:47:48 -0400 Subject: [PATCH] GUACAMOLE-1916: Jump to top of page after clone. --- .../src/app/manage/controllers/manageConnectionController.js | 1 + .../app/manage/controllers/manageConnectionGroupController.js | 1 + .../src/app/manage/controllers/manageSharingProfileController.js | 1 + .../frontend/src/app/manage/controllers/manageUserController.js | 1 + .../src/app/manage/controllers/manageUserGroupController.js | 1 + 5 files changed, 5 insertions(+) diff --git a/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionController.js b/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionController.js index 06cbeae1ca..8ce1877f86 100644 --- a/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionController.js +++ b/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionController.js @@ -318,6 +318,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i */ $scope.cloneConnection = function cloneConnection() { $location.path('/manage/' + encodeURIComponent($scope.selectedDataSource) + '/connections').search('clone', identifier); + $window.scrollTo(0,0); }; /** diff --git a/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionGroupController.js b/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionGroupController.js index b05827098a..18d30f9b07 100644 --- a/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionGroupController.js +++ b/guacamole/src/main/frontend/src/app/manage/controllers/manageConnectionGroupController.js @@ -262,6 +262,7 @@ angular.module('manage').controller('manageConnectionGroupController', ['$scope' */ $scope.cloneConnectionGroup = function cloneConnectionGRoup() { $location.path('/manage/' + encodeURIComponent($scope.selectedDataSource) + '/connectionGroups').search('clone', identifier); + $window.scrollTo(0,0); }; /** diff --git a/guacamole/src/main/frontend/src/app/manage/controllers/manageSharingProfileController.js b/guacamole/src/main/frontend/src/app/manage/controllers/manageSharingProfileController.js index e3c9ca17d3..a98c580db6 100644 --- a/guacamole/src/main/frontend/src/app/manage/controllers/manageSharingProfileController.js +++ b/guacamole/src/main/frontend/src/app/manage/controllers/manageSharingProfileController.js @@ -299,6 +299,7 @@ angular.module('manage').controller('manageSharingProfileController', ['$scope', */ $scope.cloneSharingProfile = function cloneSharingProfile() { $location.path('/manage/' + encodeURIComponent($scope.selectedDataSource) + '/sharingProfiles').search('clone', identifier); + $window.scrollTo(0,0); }; /** diff --git a/guacamole/src/main/frontend/src/app/manage/controllers/manageUserController.js b/guacamole/src/main/frontend/src/app/manage/controllers/manageUserController.js index f7ead136ae..ea7a7cab17 100644 --- a/guacamole/src/main/frontend/src/app/manage/controllers/manageUserController.js +++ b/guacamole/src/main/frontend/src/app/manage/controllers/manageUserController.js @@ -431,6 +431,7 @@ angular.module('manage').controller('manageUserController', ['$scope', '$injecto */ $scope.cloneUser = function cloneUser() { $location.path('/manage/' + encodeURIComponent($scope.dataSource) + '/users').search('clone', username); + $window.scrollTo(0,0); }; /** diff --git a/guacamole/src/main/frontend/src/app/manage/controllers/manageUserGroupController.js b/guacamole/src/main/frontend/src/app/manage/controllers/manageUserGroupController.js index b1b04d35fb..12a32197c9 100644 --- a/guacamole/src/main/frontend/src/app/manage/controllers/manageUserGroupController.js +++ b/guacamole/src/main/frontend/src/app/manage/controllers/manageUserGroupController.js @@ -505,6 +505,7 @@ angular.module('manage').controller('manageUserGroupController', ['$scope', '$in */ $scope.cloneUserGroup = function cloneUserGroup() { $location.path('/manage/' + encodeURIComponent($scope.dataSource) + '/userGroups').search('clone', identifier); + $window.scrollTo(0,0); }; /**