GUACAMOLE-113: Use scope instead of rootScope.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/f358cf29 Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/f358cf29 Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/f358cf29 Branch: refs/heads/master Commit: f358cf298b1567950117211606b9851a670f29b3 Parents: 9a9b570 Author: Nick Couchman <[email protected]> Authored: Sat Jan 13 23:25:27 2018 -0500 Committer: Nick Couchman <[email protected]> Committed: Sat Jan 13 23:25:27 2018 -0500 ---------------------------------------------------------------------- .../main/webapp/app/client/controllers/clientController.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/f358cf29/guacamole/src/main/webapp/app/client/controllers/clientController.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index d26c873..bf692bc 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -31,7 +31,6 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams // Required services var $location = $injector.get('$location'); - var $rootScope = $injector.get('$rootScope'); var authenticationService = $injector.get('authenticationService'); var clipboardService = $injector.get('clipboardService'); var guacClientManager = $injector.get('guacClientManager'); @@ -79,7 +78,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams * Keysym for detecting any END key presses, for the purpose of passing through * the Ctrl-Alt-Del sequence to a remote system. */ - END_KEYS = {0xFF57 : true, 0xFFB1 : true}, + var END_KEYS = {0xFF57 : true, 0xFFB1 : true}; /** * Keysym for sending the DELETE key when the Ctrl-Alt-End hotkey @@ -555,7 +554,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams event.preventDefault(); delete keysCurrentlyPressed[keysym]; substituteKeysPressed[keysym] = DEL_KEY; - $rootScope.$broadcast('guacSyntheticKeydown', DEL_KEY); + $scope.$broadcast('guacSyntheticKeydown', DEL_KEY); } }); @@ -574,7 +573,7 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams if (substituteKeysPressed[keysym]) { event.preventDefault(); delete substituteKeysPressed[keysym]; - $rootScope.$broadcast('guacSyntheticKeyup', substituteKeysPressed[keysym]); + $scope.$broadcast('guacSyntheticKeyup', substituteKeysPressed[keysym]); } // Mark key as released
