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 %} - -