v2.1
Steve Nyemba 3 months ago
parent 4382bb2ec7
commit ab6567176e

@ -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)

@ -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){
//
}
})
})
}
if (! qcms){
var qcms = {}
}
qcms.dialog = dialog

@ -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 ...

@ -53,6 +53,7 @@ Vanderbilt University Medical Center
<script src="{{system.parentContext}}/static/js/menu.js"></script>
<script src="{{system.parentContext}}/static/js/search.js"></script>
<script src="{{system.parentContext}}/static/js/bootup.js"></script>
<script src="{{system.parentContext}}/static/js/dialog.js"></script>
<script src="{{system.parentContext}}/static/js/apexcharts/apexcharts.min.js"></script>
<script src="{{system.parentContext}}/static/js/fontawesome/js/all.js"></script>
</head>

Loading…
Cancel
Save