bug fix: handling context with dialogs

pull/10/head
Steve Nyemba 4 months ago
parent f231e453ca
commit 14b4da788f

@ -311,12 +311,14 @@ def handle_theme (
_df = pd.DataFrame({"available":themes.List()})
if _df.shape[0] > 0 :
values = themes.installed(_root)
values.sort()
values = values + np.repeat(f"""{FAILED}""", _df.shape[0] - len(values)).tolist()
values.sort()
_df['installed'] = values
else:
_df = f"""{FAILED} No themes were found in registry,\ncurl {themes.URL}/api/themes/List (QCMS_HOST_URL should be set)"""
print (_df)
if name :
if name and not show:
# we need to install the theme, i.e download it and update the configuration
#
try:

@ -52,7 +52,7 @@ menu.apply = function (uri,id,pid,_context){
}
menu.apply_link =function(_args){
menu.apply_link =function(_args,_context){
//
// type:
// redirect open new window
@ -75,7 +75,7 @@ menu.apply_link =function(_args){
http.setHeader('uri',_args.uri)
http.setHeader('dom',(_args.title)?_args.title:'dialog')
// http.setHeader('dom',_args.text)
http.get('/dialog',function(x){
http.get(_context+'/dialog',function(x){
jx.modal.show({html:x.responseText,id:'dialog'})
console.log([$('.jxmodal')])

@ -29,7 +29,7 @@
<div class="active" onclick="menu.apply('{{_item.uri}}','{{_item.text}}','{{_name}}','{{system.context}}')">
{% else %}
<!-- working on links/widgets -->
<div class="active" onclick='menu.apply_link({{_item|tojson}})'>
<div class="active" onclick="menu.apply_link({{_item|tojson}},'system.context')">
{% endif %}
<i class="fa-solid fa-chevron-right" style="margin-right:4px"></i>
{{_item.text.replace('-',' ').replace('_',' ')}}

@ -1,5 +1,5 @@
__author__ = "Steve L. Nyemba"
__version__= "2.1"
__version__= "2.1.2"
__email__ = "steve@the-phi.com"
__license__="""
Copyright 2010 - 2024, Steve L. Nyemba, Vanderbilt University Medical Center

Loading…
Cancel
Save