1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #5998: Long labels in sunstone (#2310)

This commit is contained in:
Jorge Miguel Lobo Escalona 2022-10-18 17:53:24 +02:00 committed by GitHub
parent cc6d44d773
commit f4326ea714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -638,6 +638,19 @@ define(function(require) {
var topTabs = $(".sunstone-menu-content ul li.topTab");
var subTabs = $(".sunstone-menu-content ul li.subTab > a");
$(".sunstone-menu-content").resize(function(){
var menuWidth = $(this).outerWidth();
var maxWidth = $(this).parent().innerWidth();
if(maxWidth >= 1200){
if(menuWidth >= maxWidth){
$(this).outerWidth(maxWidth);
$(this).siblings(".sunstone-content").outerWidth(maxWidth);
}else{
$(this).siblings(".sunstone-content").outerWidth(Math.floor(maxWidth-menuWidth)-1);
}
}
});
subTabs.on("click", function() {
if ($(this).closest("li").hasClass("topTab")) {
return false;

View File

@ -445,17 +445,17 @@ define(function (require) {
var fullName = parentName + folderName;
if (persis) {
var htmlStr =
"<span class=\"secondary one-label\" persis=\"true\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
"<span class=\"secondary one-label\" persis=\"true\" alt=\"" + fullName + "\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
folderName +
"</span>";
} else if (yaml) {
var htmlStr =
"<span class=\"secondary one-label\" yaml=\"true\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
"<span class=\"secondary one-label\" yaml=\"true\" alt=\"" + fullName + "\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
folderName +
"</span>";
} else {
var htmlStr =
"<span class=\"secondary one-label\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
"<span class=\"secondary one-label\" alt=\"" + fullName + "\" title=\"" + fullName + "\" one-label-full-name=\"" + fullName + "\">" +
folderName +
"</span>";
}

View File

@ -328,6 +328,11 @@ ul.dropdown-menu-css {
}
}
.sunstone-menu-content{
resize: horizontal;
overflow: auto;
}
@media screen and (min-width: 64em){
.medium-hide {
display: none !important;