Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B #3268: lost requeriment #3919

Merged
merged 1 commit into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions src/sunstone/public/app/sunstone.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,29 +252,29 @@ define(function(require) {
title += "<i class=\"fas fa-lg fa-fw " + tabInfo.icon + "\"></i> ";
}
title += tabInfo.title;

if (parent !== "") {
liItem = "<li id=\"li_" + tabName + "\" class=\"" + tabClass + "\">" + "<a href=\"#\">" + title + "</a>" + "</li>";
if ($("#menu ul#navigation #li_" + parent + " .menu").length > 0) {
$("#menu ul#navigation #li_" + parent + " .menu").append(liItem);
} else {
$("#menu ul#navigation #li_" + parent).append("<ul class=\"menu vertical nested\" data-submenu>" + liItem + "</ul>");
}
} else {
liItem = "<li id=\"li_" + tabName + "\" class=\"" + tabClass + "\">" + "<a href=\"#\">" + title + "</a>" + "</li>";
$("div#menu ul#navigation").append(liItem);
if(config && config.user_config){
if(tabName === "support-tab" && config.user_config.default_view === "cloud"){
_addAction(null, "official-support-tab");
$(".sunstone-header").addClass("support_place").append(title);
$("#support-tab").remove();
if(title !== "undefined"){
if (parent !== "") {
liItem = "<li id=\"li_" + tabName + "\" class=\"" + tabClass + "\">" + "<a href=\"#\">" + title + "</a>" + "</li>";
if ($("#menu ul#navigation #li_" + parent + " .menu").length > 0) {
$("#menu ul#navigation #li_" + parent + " .menu").append(liItem);
} else {
$("#menu ul#navigation #li_" + parent).append("<ul class=\"menu vertical nested\" data-submenu>" + liItem + "</ul>");
}
if(config.user_config.default_view !== "admin"){
$("#support-tab").remove();
} else {
liItem = "<li id=\"li_" + tabName + "\" class=\"" + tabClass + "\">" + "<a href=\"#\">" + title + "</a>" + "</li>";
$("div#menu ul#navigation").append(liItem);
if(config && config.user_config){
if(tabName === "support-tab" && config.user_config.default_view === "cloud"){
_addAction(null, "official-support-tab");
$(".sunstone-header").addClass("support_place").append(title);
$("#support-tab").remove();
}
if(config.user_config.default_view !== "admin"){
$("#support-tab").remove();
}
}
}
}

//if this is a submenu...
//if (parent.length) {
// var children = $('div#menu ul#navigation #li_' + parent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(function(require) {
var Sunstone = require("sunstone");
var Notifier = require("utils/notifier");
var OpenNebulaSupport = require("opennebula/support");
var SupportUtils = require("./utils/common");
var SupportUtils = require("../support-tab/utils/common");

var RESOURCE = "official-support";
var TAB_ID = require("./tabId");
Expand Down