diff --git a/cms/index.py b/cms/index.py index 5dc3236..dfc1abd 100644 --- a/cms/index.py +++ b/cms/index.py @@ -210,6 +210,7 @@ def _post (app_id,key,module,name): # global _route # _handler = _route.get() # app_id = '/'.join([app_id,key]) if key else app_id + _handler = _getHandler(app_id,key) return _delegate(_handler,module,name) diff --git a/cms/static/js/dialog.js b/cms/static/js/dialog.js index 9de1b69..c4e9ad9 100644 --- a/cms/static/js/dialog.js +++ b/cms/static/js/dialog.js @@ -1,16 +1,16 @@ var dialog = {} dialog.context = '' -dialog.show = function(_title,_internalURI,_message,_pointer){ +dialog.show = function(_args,_pointer){ var http = HttpClient.instance() // http.setData({title:_title,html:_message},'application/json') - var uri = dialog.context+'/dialog' - http.setHeader('dom',_title) - http.setHeader('uri',_internalURI) + var uri = _args.context+'/dialog' + http.setHeader('dom',_args.title) + http.setHeader('uri',_args.uri) http.get(uri,function(x){ $('.jxmodal').remove() jx.modal.show({html:x.responseText,id:'body'}) - if(jx.dom.exists('dialog-message') && _message != null){ - jx.dom.set.value('dialog-message',_message) + if(jx.dom.exists('dialog-message') && _args.message != null){ + jx.dom.set.value('dialog-message',_args.message) } // @@ -27,5 +27,11 @@ dialog.show = function(_title,_internalURI,_message,_pointer){ // } }) + }) -} \ No newline at end of file +} + +if (! qcms){ + var qcms = {} +} +qcms.dialog = dialog \ No newline at end of file diff --git a/cms/static/js/menu.js b/cms/static/js/menu.js index 2ffb331..1e7517d 100644 --- a/cms/static/js/menu.js +++ b/cms/static/js/menu.js @@ -125,9 +125,19 @@ menu.events._open = function (id,uri,_context){ id = id.replace(/ /g,'-') var pid = '#content' - - $('.content').children().slideUp() + // if ( $('#'+id).parent() == null){ + // $('.content').children().slideUp() + // }else{ + // var parent = $('#'+id).parent() + // parent.slideUp() + // if (parent[0].id == null){ + // pid = ('.' + parent[0].className) + // }else{ + // pid = ('#'+parent[0].id) + // } + + // } $('#'+id).remove() var httpclient = HttpClient.instance() @@ -286,6 +296,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ this.tabs = jx.dom.get.instance('DIV') this.tabs.className = 'tabs' this._context = _context + this._layout = _layout this._make = function (text,_item,_event){ var text = text.trim().replace(/(_|-)/ig,' ').trim() var _context = this._context; @@ -297,14 +308,24 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ _button.type= 'radio' _button.id = text+'tab' _button.name = 'menu-tabs' - _label.innerHTML = text.toLowerCase() - _label._uri = _item[0].uri - _button._uri = _label._uri - _button.value= text.toLowerCase() + + _label.data = {id:text.toLowerCase(),uri:_item[0].uri} + // _button._uri = _label._uri + + // if(this._layout.icons[text] != null) { + var _icon = jx.dom.get.instance('I') + _icon.className = this._layout.icons[text] + $(_label).append(_icon) + text = ' ' + text + + // } + $(_label).append(text) + // _button.value= text.toLowerCase() + $(_button).val(text.toLowerCase()) _label.htmlFor = _button.id $(_label).on('click',function (){ - menu.events._open(this.innerHTML,this._uri,_context) + menu.events._open(this.data.id,this.data.uri,_context) }) // $(_button).on('click',function (){ // menu.events._open(this.value,this._uri,_context) ;}) @@ -313,7 +334,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ } - this._layout = _layout + this.init = function (){ var _me = this; var _make = this._make @@ -330,6 +351,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){ this.tabs.className = 'tabs' $('.main .menu').append(this.tabs) $('.main .menu').css({'border':'1px solid transparent'}) + $('.main .menu').css({'grid-template-columns':'64px auto'}) } // // We need to load the pages here ... diff --git a/cms/templates/index.html b/cms/templates/index.html index ba78f61..9503e7f 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -53,6 +53,7 @@ Vanderbilt University Medical Center +