mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
Feature #4363: Fix left menu
This commit is contained in:
1 parent
a49575d38c
commit
19a76926c2
2 files changed
+29
-17
No files matched your search
@@ -157,26 +157,42 @@ define(function(require) {
|
||||
if (condition && !condition()) {return;}
|
||||
|
||||
if (tabInfo.no_content === true) {
|
||||
tabClass += " tab_with_no_content"
|
||||
tabClass += " tab_with_no_content is-accordion-submenu-parent"
|
||||
} else {
|
||||
tabInfo['tabName'] = tabName;
|
||||
var TabTemplate = require('hbs!sunstone/tab')
|
||||
$('div.right-content').append(TabTemplate(tabInfo));
|
||||
}
|
||||
|
||||
var liItem = '<li id="li_' + tabName + '" class="' + tabClass + ' ' + parent + '"><a href="#">' + tabInfo.title + '</a></li>';
|
||||
var liItem;
|
||||
if (parent !== '') {
|
||||
liItem = '<li id="li_' + tabName + '" class="' + tabClass + '">' +
|
||||
'<a href="#">' + tabInfo.title + '</a>' +
|
||||
'</li>';
|
||||
|
||||
$('#menu ul#navigation #li_' + parent + ' .menu').append(liItem);
|
||||
} else {
|
||||
liItem = '<li id="li_' + tabName + '" class="' + tabClass + '">' +
|
||||
'<a href="#">' + tabInfo.title + '</a>' +
|
||||
'<ul class="menu vertical nested" data-submenu>' +
|
||||
'</ul>' +
|
||||
'</li>';
|
||||
|
||||
$('div#menu ul#navigation').append(liItem);
|
||||
}
|
||||
|
||||
Foundation.reInit($('div#menu ul#navigation'));
|
||||
|
||||
$('div#menu ul#navigation').append(liItem);
|
||||
|
||||
//if this is a submenu...
|
||||
if (parent.length) {
|
||||
var children = $('div#menu ul#navigation #li_' + parent);
|
||||
//if there are other submenus, insert after last of them
|
||||
if (children.length) {
|
||||
$('div#menu li#li_' + tabName).hide();//hide by default
|
||||
$('div#menu li#li_' + parent + ' span').css("display", "inline-block");
|
||||
}
|
||||
};
|
||||
//if (parent.length) {
|
||||
// var children = $('div#menu ul#navigation #li_' + parent);
|
||||
// //if there are other submenus, insert after last of them
|
||||
// if (children.length) {
|
||||
// $('div#menu li#li_' + tabName).hide();//hide by default
|
||||
// $('div#menu li#li_' + parent + ' span').css("display", "inline-block");
|
||||
// }
|
||||
//};
|
||||
|
||||
if (tabInfo.forms) {
|
||||
$.each(tabInfo.forms, function(key, value) {
|
||||
@@ -666,8 +682,8 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
$('[href=' + activaTabHref + ']', context).trigger("click");
|
||||
context.foundation();
|
||||
$('[href="' + activaTabHref + '"]', context).trigger("click");
|
||||
|
||||
if (hooks) {
|
||||
$.each(hooks, function(i, hook){
|
||||
|
||||
@@ -68,11 +68,7 @@
|
||||
<div class="row">
|
||||
<div id="menu-wrapper" class="small-8 medium-4 large-2 columns left-content">
|
||||
<div id="menu" class="row left-body">
|
||||
<ul class="side-nav" id="navigation">
|
||||
<div class="row left-header">
|
||||
<div class="large-12 columns">
|
||||
</div>
|
||||
</div>
|
||||
<ul class="vertical menu" id="navigation" data-accordion-menu>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user