From 4f41890e2b8cdacd324de0a06c5ab92057189e2c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 15 Jun 2019 18:05:03 -0700 Subject: [PATCH 1/5] GUACAMOLE-723: Separate connection selection menu to own CSS class. --- .../client/styles/connection-select-menu.css | 37 +++++++++++++++++++ .../webapp/app/client/styles/guac-menu.css | 19 ---------- .../webapp/app/client/templates/client.html | 2 +- 3 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 guacamole/src/main/webapp/app/client/styles/connection-select-menu.css diff --git a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css new file mode 100644 index 000000000..fb2703a8d --- /dev/null +++ b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +.connection-select-menu .menu-dropdown { + border: none; +} + +.connection-select-menu .menu-contents { + font-weight: normal; + font-size: 0.8em; +} + +.connection-select-menu .filter input { + border-bottom: 1px solid rgba(0,0,0,0.125); + border-left: none; +} + +.connection-select-menu .filter { + margin-bottom: 0.5em; + padding: 0; +} diff --git a/guacamole/src/main/webapp/app/client/styles/guac-menu.css b/guacamole/src/main/webapp/app/client/styles/guac-menu.css index 48fb3b372..a2ca83e95 100644 --- a/guacamole/src/main/webapp/app/client/styles/guac-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/guac-menu.css @@ -69,25 +69,6 @@ padding: 0; } -#guac-menu .header h2 .menu-dropdown { - border: none; -} - -#guac-menu .header h2 .menu-contents { - font-weight: normal; - font-size: 0.8em; -} - -#guac-menu .header .filter input { - border-bottom: 1px solid rgba(0,0,0,0.125); - border-left: none; -} - -#guac-menu .header .filter { - margin-bottom: 0.5em; - padding: 0; -} - #guac-menu #mouse-settings .choice { text-align: center; } diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html index 9d06549f9..446d68566 100644 --- a/guacamole/src/main/webapp/app/client/templates/client.html +++ b/guacamole/src/main/webapp/app/client/templates/client.html @@ -53,7 +53,7 @@

{{client.name}}

-

+

Date: Sat, 15 Jun 2019 18:08:40 -0700 Subject: [PATCH 2/5] GUACAMOLE-723: Apply ellipsis to portion of connection name that overflows connection selection menu title. --- .../client/styles/connection-select-menu.css | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css index fb2703a8d..f8865dbe3 100644 --- a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css @@ -17,21 +17,34 @@ * under the License. */ +.connection-select-menu { + min-width: 0; +} + .connection-select-menu .menu-dropdown { border: none; } -.connection-select-menu .menu-contents { - font-weight: normal; - font-size: 0.8em; +.connection-select-menu .menu-dropdown .menu-title { + white-space: nowrap; + overflow: hidden; + width: 100%; + text-overflow: ellipsis; } -.connection-select-menu .filter input { +.connection-select-menu .menu-dropdown .menu-contents { + font-weight: normal; + font-size: 0.8em; + right: auto; + left: 0; +} + +.connection-select-menu .menu-dropdown .menu-contents .filter input { border-bottom: 1px solid rgba(0,0,0,0.125); border-left: none; } -.connection-select-menu .filter { +.connection-select-menu .menu-dropdown .menu-contents .filter { margin-bottom: 0.5em; padding: 0; } From a084ad41de44af07c6f5c1442ab6cc09ed3633b9 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 15 Jun 2019 18:11:17 -0700 Subject: [PATCH 3/5] GUACAMOLE-723: Padding adjustment should be made only to the connection select menu. --- .../main/webapp/app/client/styles/connection-select-menu.css | 1 + guacamole/src/main/webapp/app/client/styles/guac-menu.css | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css index f8865dbe3..c7d5c1aa0 100644 --- a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css @@ -18,6 +18,7 @@ */ .connection-select-menu { + padding: 0; min-width: 0; } diff --git a/guacamole/src/main/webapp/app/client/styles/guac-menu.css b/guacamole/src/main/webapp/app/client/styles/guac-menu.css index a2ca83e95..9e0fb7ca7 100644 --- a/guacamole/src/main/webapp/app/client/styles/guac-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/guac-menu.css @@ -65,10 +65,6 @@ margin-top: 1em; } -#guac-menu .header h2 { - padding: 0; -} - #guac-menu #mouse-settings .choice { text-align: center; } From e351b355a50eae39e799c7d4ceca52eb8c901889 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 15 Jun 2019 18:21:23 -0700 Subject: [PATCH 4/5] GUACAMOLE-723: Apply ellipsis when connection name overflows available space, regardless of whether the connection selection menu is used. --- .../webapp/app/client/styles/connection-select-menu.css | 4 ++++ guacamole/src/main/webapp/app/client/styles/guac-menu.css | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css index c7d5c1aa0..18267722a 100644 --- a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css @@ -17,6 +17,10 @@ * under the License. */ +#guac-menu .header h2.connection-select-menu { + overflow: visible; +} + .connection-select-menu { padding: 0; min-width: 0; diff --git a/guacamole/src/main/webapp/app/client/styles/guac-menu.css b/guacamole/src/main/webapp/app/client/styles/guac-menu.css index 9e0fb7ca7..aa80e093d 100644 --- a/guacamole/src/main/webapp/app/client/styles/guac-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/guac-menu.css @@ -65,6 +65,13 @@ margin-top: 1em; } +#guac-menu .header h2 { + white-space: nowrap; + overflow: hidden; + width: 100%; + text-overflow: ellipsis; +} + #guac-menu #mouse-settings .choice { text-align: center; } From e412742b5997b4945f06fa0da75884b3724e2881 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 15 Jun 2019 18:49:32 -0700 Subject: [PATCH 5/5] GUACAMOLE-723: Apply ellipsis to all overflowing menu titles by default. --- .../webapp/app/client/styles/connection-select-menu.css | 7 ------- guacamole/src/main/webapp/app/navigation/styles/menu.css | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css index 18267722a..50445634b 100644 --- a/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/connection-select-menu.css @@ -30,13 +30,6 @@ border: none; } -.connection-select-menu .menu-dropdown .menu-title { - white-space: nowrap; - overflow: hidden; - width: 100%; - text-overflow: ellipsis; -} - .connection-select-menu .menu-dropdown .menu-contents { font-weight: normal; font-size: 0.8em; diff --git a/guacamole/src/main/webapp/app/navigation/styles/menu.css b/guacamole/src/main/webapp/app/navigation/styles/menu.css index 1e4e75e4f..65e010bf6 100644 --- a/guacamole/src/main/webapp/app/navigation/styles/menu.css +++ b/guacamole/src/main/webapp/app/navigation/styles/menu.css @@ -68,6 +68,11 @@ padding: 0.5em; padding-right: 2em; + white-space: nowrap; + overflow: hidden; + width: 100%; + text-overflow: ellipsis; + -ms-flex: 0 0 auto; -moz-box-flex: 0; -webkit-box-flex: 0;