From 035565f3c9a779d6cc07ecab7b0e631a7be0c529 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 12 Aug 2013 21:07:53 -0700 Subject: [PATCH] Unify styles, add placeholder multiselect constructor parameter for GroupView. --- guacamole/src/main/webapp/scripts/guac-ui.js | 5 ++- guacamole/src/main/webapp/styles/login.css | 30 +-------------- guacamole/src/main/webapp/styles/ui.css | 40 ++++++++++++++++---- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/guac-ui.js b/guacamole/src/main/webapp/scripts/guac-ui.js index 1a09c79ef..827c1e364 100644 --- a/guacamole/src/main/webapp/scripts/guac-ui.js +++ b/guacamole/src/main/webapp/scripts/guac-ui.js @@ -883,8 +883,9 @@ GuacUI.ListGroup = function(caption) { * @constructor * @param {GuacamoleService.ConnectionGroup} root_group The group to display * within the view. + * @param {Boolean} multiselect Whether multiple objects are selectable. */ -GuacUI.GroupView = function(root_group) { +GuacUI.GroupView = function(root_group, multiselect) { /** * Reference to this GroupView. @@ -934,6 +935,7 @@ GuacUI.GroupView = function(root_group) { // Add connection to connection list or parent group var guacui_connection = new GuacUI.Connection(connection); + GuacUI.addClass(guacui_connection.getElement(), "list-item"); appendChild(guacui_connection.getElement()); } // end for each connection @@ -949,6 +951,7 @@ GuacUI.GroupView = function(root_group) { addGroup(child_group, list_group.addElement); // Add element to display + GuacUI.addClass(list_group.getElement(), "list-item"); appendChild(list_group.getElement()); } // end for each gorup diff --git a/guacamole/src/main/webapp/styles/login.css b/guacamole/src/main/webapp/styles/login.css index 4e93adbbc..facd52627 100644 --- a/guacamole/src/main/webapp/styles/login.css +++ b/guacamole/src/main/webapp/styles/login.css @@ -319,40 +319,14 @@ div#all-connections .connection { text-align: left; } -div#all-connections .connection .thumbnail { - display: none; +div#recent-connections .connection .thumbnail { + display: block; } div#all-connections .connection { padding: 0.1em; } -.protocol { - display: inline-block; -} - -.protocol .icon { - width: 24px; - height: 24px; - background-image: url('../images/protocol-icons/guac-plug.png'); - background-size: 16px 16px; - -moz-background-size: 16px 16px; - -webkit-background-size: 16px 16px; - -khtml-background-size: 16px 16px; - background-repeat: no-repeat; - background-position: center center; - opacity: 0.5; -} - -.protocol .icon.ssh { - background-image: url('../images/protocol-icons/guac-text.png'); -} - -.protocol .icon.vnc, -.protocol .icon.rdp { - background-image: url('../images/protocol-icons/guac-monitor.png'); -} - div#recent-connections .protocol { display: none; } diff --git a/guacamole/src/main/webapp/styles/ui.css b/guacamole/src/main/webapp/styles/ui.css index 3cda0d345..7485ec9ef 100644 --- a/guacamole/src/main/webapp/styles/ui.css +++ b/guacamole/src/main/webapp/styles/ui.css @@ -157,7 +157,6 @@ div.section { display: block; text-align: left; - padding: 0.1em; cursor: pointer; position: relative; @@ -182,6 +181,10 @@ div.section { vertical-align: middle; } +.list-item .caption { + padding: 0.1em; +} + .list-item .name { color: black; font-weight: normal; @@ -201,7 +204,7 @@ div.section { opacity: 1.0; } -.list-item:not(.selected):hover { +.list-item:not(.selected) .caption:hover { background: #CDA; } @@ -292,19 +295,40 @@ div.section { background-image: url('../images/protocol-icons/guac-plug.png'); } -.icon.connection.ssh { - background-image: url('../images/protocol-icons/guac-text.png'); -} - .icon.connection.add { background-image: url('../images/action-icons/guac-monitor-add.png'); } -.icon.connection.vnc, -.icon.connection.rdp { +.protocol { + display: inline-block; +} + +.protocol .icon { + width: 24px; + height: 24px; + background-image: url('../images/protocol-icons/guac-plug.png'); + background-size: 16px 16px; + -moz-background-size: 16px 16px; + -webkit-background-size: 16px 16px; + -khtml-background-size: 16px 16px; + background-repeat: no-repeat; + background-position: center center; + opacity: 0.5; +} + +.protocol .icon.ssh { + background-image: url('../images/protocol-icons/guac-text.png'); +} + +.protocol .icon.vnc, +.protocol .icon.rdp { background-image: url('../images/protocol-icons/guac-monitor.png'); } +.connection .thumbnail { + display: none; +} + /* * Groups */