From e486c32477fb0249c3d9df07cb346e3f6ff60f0c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 23 Apr 2015 16:18:17 -0700 Subject: [PATCH] GUAC-1161: Remove completely-unused notification area and associated functions. --- .../app/client/styles/notification-area.css | 49 ------------ .../notification/services/guacNotification.js | 79 ------------------- guacamole/src/main/webapp/index.html | 7 -- 3 files changed, 135 deletions(-) delete mode 100644 guacamole/src/main/webapp/app/client/styles/notification-area.css diff --git a/guacamole/src/main/webapp/app/client/styles/notification-area.css b/guacamole/src/main/webapp/app/client/styles/notification-area.css deleted file mode 100644 index a7c0a6f0e..000000000 --- a/guacamole/src/main/webapp/app/client/styles/notification-area.css +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2013 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#notificationArea { - position: fixed; - right: 0.5em; - bottom: 0.5em; - max-width: 25%; - width: 2in; -} - -#notificationArea .notification { - font-size: 0.7em; - text-align: center; - width: 100%; - overflow: hidden; -} - -#notificationArea .notification .text { - width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -#notificationArea .notification.error .text { - white-space: normal; - text-overflow: clip; - text-align: left; -} diff --git a/guacamole/src/main/webapp/app/notification/services/guacNotification.js b/guacamole/src/main/webapp/app/notification/services/guacNotification.js index eb9b15c62..9c660148f 100644 --- a/guacamole/src/main/webapp/app/notification/services/guacNotification.js +++ b/guacamole/src/main/webapp/app/notification/services/guacNotification.js @@ -40,22 +40,6 @@ angular.module('notification').factory('guacNotification', ['$injector', */ var storedStatus = sessionStorageFactory.create(false); - /** - * Getter/setter which retrieves or sets an array of all currently-visible - * notifications. - * - * @type Function - */ - var storedNotifications = sessionStorageFactory.create([]); - - /** - * Getter/setter which retrieves or sets the ID of the most recently shown - * notification, or 0 if no notifications have yet been shown. - * - * @type Function - */ - var storedNotificationUniqueID = sessionStorageFactory.create(0); - /** * Retrieves the current status notification, which may simply be false if * no status is currently shown. @@ -96,69 +80,6 @@ angular.module('notification').factory('guacNotification', ['$injector', storedStatus(status); }; - /** - * Returns an array of all currently-visible notifications. - * - * @returns {Notification[]} - * An array of all currently-visible notifications. - */ - service.getNotifications = function getNotifications() { - return storedNotifications(); - }; - - /** - * Adds a notification to the the list of notifications shown. - * - * @param {Notification|Object} notification - * The notification to add. - * - * @returns {Number} - * A unique ID for the notification that's just been added. - * - * @example - * - * var id = guacNotification.addNotification({ - * 'title' : 'Download', - * 'text' : 'You have a file ready for download!', - * 'actions' : { - * 'name' : 'download', - * 'callback' : function () { - * // download the file and remove the notification here - * } - * } - * }); - */ - service.addNotification = function addNotification(notification) { - var id = storedNotificationUniqueID(storedNotificationUniqueID() + 1); - - storedNotifications().push({ - notification : notification, - id : id - }); - - return id; - }; - - /** - * Remove a notification by unique ID. - * - * @param {Number} id - * The unique ID of the notification to remove. This ID is retrieved - * from the initial call to addNotification. - */ - service.removeNotification = function removeNotification(id) { - - var notifications = storedNotifications(); - - for (var i = 0; i < notifications.length; i++) { - if (notifications[i].id === id) { - notifications.splice(i, 1); - return; - } - } - - }; - // Hide status upon navigation $rootScope.$on('$routeChangeSuccess', function() { service.showStatus(false); diff --git a/guacamole/src/main/webapp/index.html b/guacamole/src/main/webapp/index.html index 41fec33d2..95e1589d8 100644 --- a/guacamole/src/main/webapp/index.html +++ b/guacamole/src/main/webapp/index.html @@ -47,13 +47,6 @@ THE SOFTWARE.
- -
-
- -
-
-