Skip to content
Snippets Groups Projects
Commit 42d43939 authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Add option to control active tab via URL parameter

parent 63bedac2
No related branches found
No related tags found
No related merge requests found
......@@ -277,7 +277,17 @@ class page():
tab2_layout = column(self.title, self.upload_widget, self.valid_units_message, self.invalid_units_message, self.invalid_units_list)
tab2 = TabPanel(child=tab2_layout, title="XML Unit Validator")
# Handle URL parameter active tab
tabs = Tabs(tabs=[tab1, tab2])
try:
active_tab = int(curdoc().session_context.request.arguments["active_tab"][0])
except:
active_tab = 0
if active_tab >= len(tabs.tabs):
active_tab = 0
tabs.active=active_tab
curdoc().add_root(tabs)
def process_xml(self, attr, old, new):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment