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

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

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

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

Loading…
Cancel
Save