diff --git a/cms/disk.py b/cms/disk.py index e1197ac..4437a61 100644 --- a/cms/disk.py +++ b/cms/disk.py @@ -85,7 +85,6 @@ def read (**_args): """ request = _args['request'] _layout = _args['config']['layout'] - _uri = request.args['uri'] # if 'location' in _layout : # _uri = os.sep.join([_layout['location'],_uri]) _uri = _realpath(_uri, _args['config']) diff --git a/cms/static/js/bootup.js b/cms/static/js/bootup.js index fd8afb4..aeb4029 100644 --- a/cms/static/js/bootup.js +++ b/cms/static/js/bootup.js @@ -28,7 +28,7 @@ bootup.CMSObserver = function(_sysId,_domId,_fileURI){ // _domElement.className = 'busy-loading' // jx.dom.append(_domId, _domElement) http.post(uri,function(x){ - if (x.status == 200){ + if (x.status == 200 && x.readyState == 4){ setTimeout(function(){ _content = $(x.responseText) diff --git a/cms/static/js/menu.js b/cms/static/js/menu.js index f040821..7dc0972 100644 --- a/cms/static/js/menu.js +++ b/cms/static/js/menu.js @@ -134,6 +134,7 @@ menu.events._open = function (id,uri,_context){ httpclient.setHeader('uri',uri) httpclient.setHeader('dom',id) httpclient.post(_context+'/page',function(x){ + if(x.readyState == 4 && x.status == 200){ var _html = x.responseText var _dom = $(_html) @@ -143,13 +144,10 @@ menu.events._open = function (id,uri,_context){ } $(pid).append(_dom) - - // jx.dom.append(pid,_dom) - // $('#'+id).show('fast',function(){ - // $('#'+pid).slideUp() - // }) var ref = pid + ' #'+id + menu.events.finalize (ref) $(pid).children().slideUp('fast', function(){ + $(ref ).slideDown('fast',function(){ $(pid).slideDown('fast',function(){ @@ -163,7 +161,8 @@ menu.events._open = function (id,uri,_context){ }) - menu.events.finalize (ref) + + } // $('.content').append(_dom) @@ -177,9 +176,10 @@ menu.utils.format = function(text){ } menu.events.finalize = function (ref) { var scripts = $(ref+' script') + jx.utils.patterns.visitor(scripts,function(_item){ if(_item.text.trim().length > 0){ - + var _code = eval(_item.text) var id = ref if (_item.parentNode != null){ @@ -280,12 +280,16 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ _button.name = 'menu-tabs' _label.innerHTML = text.toLowerCase() _label._uri = _item[0].uri + _button._uri = _label._uri + _button.value= text.toLowerCase() _label.htmlFor = _button.id $(_label).on('click',function (){ menu.events._open(this.innerHTML,this._uri,_context) }) - // $(this.tabs).append( [_button,_label]) + // $(_button).on('click',function (){ + // menu.events._open(this.value,this._uri,_context) ;}) + return [_button,_label] } @@ -316,7 +320,8 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ } -menu.tabs = { } +menu.delegate = { } + // menu.tabs.make = function(text,_clickEvent){ // var _id = text.trim() // if (text.match(/\//)){ @@ -331,7 +336,7 @@ menu.tabs = { } // $(_label).on('click',_clickEvent) // return [_button,_label] // } -menu.tabs.init =function (_layout,_context){ +menu.init =function (_layout,_context){ // // Let us determine what kind of menu is suited for this // @TODO: Make menus configurable i.e on other areas of the site @@ -361,10 +366,9 @@ menu.tabs.init =function (_layout,_context){ }else{ var _menuObject = new QCMSBasic (_layout,_context) } - // console.log(_layout) -// var _tabs = new QCMSTabs (_layout) - console.log(_menuObject) + _menuObject.init() } + diff --git a/cms/templates/index.html b/cms/templates/index.html index bfc6b84..ba78f61 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -57,7 +57,7 @@ Vanderbilt University Medical Center diff --git a/cms/templates/menu.html b/cms/templates/menu.html index 208f67b..9285419 100644 --- a/cms/templates/menu.html +++ b/cms/templates/menu.html @@ -1,3 +1,4 @@ + {%if system.portal %}
@@ -10,8 +11,4 @@
-{% endif %} - - \ No newline at end of file +{% endif %} \ No newline at end of file