Commit ea517501 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

css class selectors for tab links in left panel

parent 208b6e22
......@@ -917,6 +917,7 @@ GuiUtils.prototype.createLogoutLink = function () {
*
* @param {string} params.name
* @param {string} params.id
* @param {string} [params.className]
* @param {HTMLElement} params.navigationBar
*
* @returns {HTMLLIElement}
......@@ -930,11 +931,13 @@ GuiUtils.prototype.createTabMenuObject = function (params) {
if (navigationBar.children.length === 0) {
navClass = "active";
}
var navLi = document.createElement("li");
navLi.className = navClass;
var navLink = document.createElement("a");
if (params.className !== undefined) {
navLink.className = params.className;
}
navLink.href = "#" + id;
if (name !== undefined) {
navLink.innerHTML = name;
......@@ -943,9 +946,6 @@ GuiUtils.prototype.createTabMenuObject = function (params) {
$(this).tab('show');
};
navLi.appendChild(navLink);
if (name !== undefined) {
navLink.innerHTML = name;
}
return navLi;
};
......@@ -1051,6 +1051,7 @@ GuiUtils.prototype.initTabContent = function (abstractGuiElement) {
* @param {AbstractGuiElement} abstractGuiElement
* @param {Object} params
* @param {string} params.name
* @param {string} [params.linkClassName]
* @param {HTMLElement} [params.content]
* @param {boolean} [params.disabled = false]
* @param {function} [params.panelClass]
......@@ -1066,6 +1067,7 @@ GuiUtils.prototype.addTab = function (abstractGuiElement, params) {
var navLi = this.createTabMenuObject({
id: tabId,
name: params.name,
className: params.linkClassName,
navigationBar: navElement
});
navElement.appendChild(navLi);
......
......@@ -104,18 +104,22 @@ LeftPanel.prototype.getPanelsDefinition = function () {
return [{
name: "<div class='maintabdiv'><i class='fa fa-search maintab'></i><br>SEARCH</div>",
panelClass: SearchPanel,
linkClassName: "minerva-search-tab-link",
options: {parent: this}
}, {
name: "<div class='maintabdiv'><i class='fa fa-th-list maintab'></i><br>OVERLAYS</div>",
panelClass: OverlayPanel,
linkClassName: "minerva-overlay-tab-link",
options: {parent: this}
}, {
name: "<div class='maintabdiv'><i class='fa fa-sitemap maintab'></i><br>SUBMAPS</div>",
panelClass: SubmapPanel,
linkClassName: "minerva-submap-tab-link",
options: {parent: this}
}, {
name: "<div class='maintabdiv'><i class='fa fa-info maintab'></i><br>INFO</div>",
panelClass: ProjectInfoPanel,
linkClassName: "minerva-info-tab-link",
options: {parent: this}
}];
};
......
......@@ -57,17 +57,21 @@ SearchPanel.prototype.getPanelsDefinition = function () {
return [{
name: "GENERIC",
panelClass: GenericSearchPanel,
linkClassName: "minerva-generic-search-tab-link",
options: {parent: this}
}, {
name: "DRUG",
panelClass: DrugPanel,
linkClassName: "minerva-drug-search-tab-link",
options: {parent: this}
}, {
name: "CHEMICAL",
panelClass: ChemicalPanel,
linkClassName: "minerva-chemical-search-tab-link",
options: {parent: this}
}, {
name: "MiRNA",
linkClassName: "minerva-mirna-search-tab-link",
panelClass: MiRnaPanel,
options: {parent: this}
}];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment