From d5a6dbb713c7422a6e5cc9562c98b013c87455c7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 3 Sep 2024 17:04:22 -0500 Subject: [PATCH] bug fixes ... menu --- cms/disk.py | 2 ++ cms/static/js/menu.js | 3 ++- cms/templates/menu.html | 30 ------------------------------ meta/__init__.py | 2 +- 4 files changed, 5 insertions(+), 32 deletions(-) diff --git a/cms/disk.py b/cms/disk.py index da2be29..e1197ac 100644 --- a/cms/disk.py +++ b/cms/disk.py @@ -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) diff --git a/cms/static/js/menu.js b/cms/static/js/menu.js index 6304365..5a90b67 100644 --- a/cms/static/js/menu.js +++ b/cms/static/js/menu.js @@ -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() } diff --git a/cms/templates/menu.html b/cms/templates/menu.html index b47f6b3..74ef8e0 100644 --- a/cms/templates/menu.html +++ b/cms/templates/menu.html @@ -11,37 +11,7 @@ {% endif %} - -
- {% endif %} - - {{_item.text.replace('-',' ').replace('_',' ')}} - -
- {%endfor%} - - {%endif%} - -{%endfor%} ---> \ No newline at end of file diff --git a/meta/__init__.py b/meta/__init__.py index 61074d7..5a70ba9 100644 --- a/meta/__init__.py +++ b/meta/__init__.py @@ -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