From 80377f66637a39221656ee5729fe77412a19f4b9 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 16 Nov 2014 23:10:49 -0800 Subject: [PATCH] GUAC-605: Use status dialog from index, not status modal. --- .../client/controllers/clientController.js | 17 ++-- .../main/webapp/app/home/templates/home.html | 4 +- .../app/index/controllers/indexController.js | 42 +++++++++- .../app/index/controllers/statusController.js | 50 ------------ .../webapp/app/index/services/statusModal.js | 78 ------------------- .../main/webapp/app/index/styles/status.css | 59 +++++++------- .../webapp/app/index/templates/status.html | 42 ---------- guacamole/src/main/webapp/index.html | 22 +++++- 8 files changed, 108 insertions(+), 206 deletions(-) delete mode 100644 guacamole/src/main/webapp/app/index/controllers/statusController.js delete mode 100644 guacamole/src/main/webapp/app/index/services/statusModal.js delete mode 100644 guacamole/src/main/webapp/app/index/templates/status.html diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index cba2cc910..62707b902 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -72,7 +72,6 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', var connectionGroupDAO = $injector.get('connectionGroupDAO'); var connectionDAO = $injector.get('connectionDAO'); var ClientProperties = $injector.get('clientProperties'); - var statusModal = $injector.get('statusModal'); // Client settings and state $scope.clientProperties = new ClientProperties(); @@ -180,7 +179,7 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Show new status if not yet connected if (status !== "connected") { - statusModal.showStatus({ + $scope.showStatus({ title: "client.status.connectingStatusTitle", text: "client.status.clientStates." + status }); @@ -188,7 +187,7 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Hide status upon connecting else - statusModal.showStatus(false); + $scope.showStatus(false); }); @@ -201,8 +200,11 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Determine translation name of error var errorName = (status in CLIENT_ERRORS) ? status.toString(16) : "DEFAULT"; + // Override any existing status + $scope.showStatus(false); + // Show error status - statusModal.showStatus({ + $scope.showStatus({ className: "error", title: "client.error.connectionErrorTitle", text: "client.error.clientErrors." + errorName, @@ -216,7 +218,7 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Show new status only if disconnected if (status === "closed") { - statusModal.showStatus({ + $scope.showStatus({ title: "client.status.closedStatusTitle", text: "client.status.tunnelStates." + status }); @@ -233,8 +235,11 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Determine translation name of error var errorName = (status in TUNNEL_ERRORS) ? status.toString(16) : "DEFAULT"; + // Override any existing status + $scope.showStatus(false); + // Show error status - statusModal.showStatus({ + $scope.showStatus({ className: "error", title: "client.error.connectionErrorTitle", text: "client.error.tunnelErrors." + errorName, diff --git a/guacamole/src/main/webapp/app/home/templates/home.html b/guacamole/src/main/webapp/app/home/templates/home.html index 5b0789d66..e46a7327c 100644 --- a/guacamole/src/main/webapp/app/home/templates/home.html +++ b/guacamole/src/main/webapp/app/home/templates/home.html @@ -22,7 +22,7 @@