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

@ -210,6 +210,7 @@ def _post (app_id,key,module,name):
# global _route # global _route
# _handler = _route.get() # _handler = _route.get()
# app_id = '/'.join([app_id,key]) if key else app_id # app_id = '/'.join([app_id,key]) if key else app_id
_handler = _getHandler(app_id,key) _handler = _getHandler(app_id,key)
return _delegate(_handler,module,name) return _delegate(_handler,module,name)

@ -1,16 +1,16 @@
var dialog = {} var dialog = {}
dialog.context = '' dialog.context = ''
dialog.show = function(_title,_internalURI,_message,_pointer){ dialog.show = function(_args,_pointer){
var http = HttpClient.instance() var http = HttpClient.instance()
// http.setData({title:_title,html:_message},'application/json') // http.setData({title:_title,html:_message},'application/json')
var uri = dialog.context+'/dialog' var uri = _args.context+'/dialog'
http.setHeader('dom',_title) http.setHeader('dom',_args.title)
http.setHeader('uri',_internalURI) http.setHeader('uri',_args.uri)
http.get(uri,function(x){ http.get(uri,function(x){
$('.jxmodal').remove() $('.jxmodal').remove()
jx.modal.show({html:x.responseText,id:'body'}) jx.modal.show({html:x.responseText,id:'body'})
if(jx.dom.exists('dialog-message') && _message != null){ if(jx.dom.exists('dialog-message') && _args.message != null){
jx.dom.set.value('dialog-message',_message) 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,'-') id = id.replace(/ /g,'-')
var pid = '#content' var pid = '#content'
$('.content').children().slideUp() $('.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() $('#'+id).remove()
var httpclient = HttpClient.instance() var httpclient = HttpClient.instance()
@ -286,6 +296,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
this.tabs = jx.dom.get.instance('DIV') this.tabs = jx.dom.get.instance('DIV')
this.tabs.className = 'tabs' this.tabs.className = 'tabs'
this._context = _context this._context = _context
this._layout = _layout
this._make = function (text,_item,_event){ this._make = function (text,_item,_event){
var text = text.trim().replace(/(_|-)/ig,' ').trim() var text = text.trim().replace(/(_|-)/ig,' ').trim()
var _context = this._context; var _context = this._context;
@ -297,14 +308,24 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
_button.type= 'radio' _button.type= 'radio'
_button.id = text+'tab' _button.id = text+'tab'
_button.name = 'menu-tabs' _button.name = 'menu-tabs'
_label.innerHTML = text.toLowerCase()
_label._uri = _item[0].uri _label.data = {id:text.toLowerCase(),uri:_item[0].uri}
_button._uri = _label._uri // _button._uri = _label._uri
_button.value= text.toLowerCase()
// 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.htmlFor = _button.id
$(_label).on('click',function (){ $(_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 (){ // $(_button).on('click',function (){
// menu.events._open(this.value,this._uri,_context) ;}) // menu.events._open(this.value,this._uri,_context) ;})
@ -313,7 +334,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
} }
this._layout = _layout
this.init = function (){ this.init = function (){
var _me = this; var _me = this;
var _make = this._make var _make = this._make
@ -330,6 +351,7 @@ var QCMSTabs = function(_layout,_context,_clickEvent){
this.tabs.className = 'tabs' this.tabs.className = 'tabs'
$('.main .menu').append(this.tabs) $('.main .menu').append(this.tabs)
$('.main .menu').css({'border':'1px solid transparent'}) $('.main .menu').css({'border':'1px solid transparent'})
$('.main .menu').css({'grid-template-columns':'64px auto'})
} }
// //
// We need to load the pages here ... // 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/menu.js"></script>
<script src="{{system.parentContext}}/static/js/search.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/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/apexcharts/apexcharts.min.js"></script>
<script src="{{system.parentContext}}/static/js/fontawesome/js/all.js"></script> <script src="{{system.parentContext}}/static/js/fontawesome/js/all.js"></script>
</head> </head>

Loading…
Cancel
Save