Commit 78abf670eb2daa49ffa188552cc5e1c517902d5f
1 parent
5023ed01
add the function to store and get the current left menu and the left menu select…
…ed entry into the web_session
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
web/widgets/left_menu.anubis
| @@ -360,3 +360,4 @@ public define Left_Menu_Entry | @@ -360,3 +360,4 @@ public define Left_Menu_Entry | ||
| 360 | String text //text to show | 360 | String text //text to show |
| 361 | )= | 361 | )= |
| 362 | left_menu_entry_js(entry_id, true, classes, js_call, text). | 362 | left_menu_entry_js(entry_id, true, classes, js_call, text). |
| 363 | + |
web/widgets/left_menu_html.anubis
| @@ -62,3 +62,12 @@ public define HTML_Partial_Content | @@ -62,3 +62,12 @@ public define HTML_Partial_Content | ||
| 62 | sequence(make_left_menu(_T, entries, selected, []))) | 62 | sequence(make_left_menu(_T, entries, selected, []))) |
| 63 | }. | 63 | }. |
| 64 | 64 | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +public define One set_current_left_menu(WEB_Session s, String v) = replace_String(s.fields, "AWS_CURRENT_LEFT_MENU", v). | ||
| 68 | +public define One set_current_left_menu(Var(List(Session_Field)) fields, String v) = replace_String(fields, "AWS_CURRENT_LEFT_MENU", v). | ||
| 69 | +public define String get_current_left_menu(WEB_Session s) = get_String (s.fields, "AWS_CURRENT_LEFT_MENU", ""). | ||
| 70 | + | ||
| 71 | +public define One set_selected_left_menu_entry(WEB_Session s, String v) = replace_String(s.fields, "AWS_SELECTED_LEFT_MENU_ENTRY", v). | ||
| 72 | +public define One set_selected_left_menu_entry(Var(List(Session_Field)) fields, String v) = replace_String(fields, "AWS_SELECTED_LEFT_MENU_ENTRY", v). | ||
| 73 | +public define String get_selected_left_menu_entry(WEB_Session s) = get_String (s.fields, "AWS_SELECTED_LEFT_MENU_ENTRY", ""). |