Unify styles, add placeholder multiselect constructor parameter for GroupView.

This commit is contained in:
Michael Jumper
2013-08-12 21:07:53 -07:00
parent 068eda8a76
commit 035565f3c9
3 changed files with 38 additions and 37 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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
*/