bug fixes ... menu

pull/10/head
Steve Nyemba 5 months ago
parent 5590fec6c6
commit d5a6dbb713

@ -48,6 +48,7 @@ def build (_config, keep=[]): #(_path,_content):
_path = _realpath(_path,_config)
# print (_path)
_items = folders(_path,_config)
_subItems = [ content (os.sep.join([_path,_name]),_config)for _name in _items ]
_r = {}
@ -60,6 +61,7 @@ def build (_config, keep=[]): #(_path,_content):
_r[_name] = []
_r[_name] += _subItems[_index]
# _r = [_r[_key] for _key in _r if len(_r[_key]) > 0]
return _r
# return dict.fromkeys(_items,_subItems)

@ -334,6 +334,7 @@ menu.tabs.init =function (_layout){
_items += _layout.menu[_name].length
_count += 1
})
if (_count == _items){
var _menuObject = new QCMSTabs (_layout)
}else{
@ -341,7 +342,7 @@ menu.tabs.init =function (_layout){
}
// console.log(_layout)
// var _tabs = new QCMSTabs (_layout)
console.log(_menuObject)
_menuObject.init()
}

@ -11,37 +11,7 @@
<i class="fa-solid fa-home"></i>
</div>
{% endif %}
<!--{% for _name in layout.menu %}
<div class="item">
<div>
<i class="{{layout.icons[_name]}}"></i>
{{_name.replace('-', ' ').replace('_',' ')}}
</div>
{%if layout.menu[_name] %}
<div class="sub-menu border-round border">
{% for _item in layout.menu[_name] %}
{%if _item.type == 'open' %}
<div class="active" onclick="window.open('{{_item.uri}}','_self')">
{%elif _item.uri and _item.type not in ['dialog','embed'] %}
<div class="active" onclick="menu.apply('{{_item.uri}}','{{_item.text}}','{{_name}}','{{system.context}}')">
{% else %}
<!-- working on links/widgets -->
<div class="active" onclick='menu.apply_link({{_item|tojson}},"{{system.context}}")'>
{% endif %}
<i class="fa-solid fa-chevron-right" style="margin-right:4px"></i>
{{_item.text.replace('-',' ').replace('_',' ')}}
</div>
{%endfor%}
</div>
{%endif%}
</div>
{%endfor%}
-->
<script>
menu.tabs.init({{layout|tojson}})
</script>

@ -1,5 +1,5 @@
__author__ = "Steve L. Nyemba"
__version__= "2.1.4"
__version__= "2.1.6"
__email__ = "steve@the-phi.com"
__license__="""
Copyright 2010 - 2024, Steve L. Nyemba, Vanderbilt University Medical Center

Loading…
Cancel
Save