Commit 94414f36bc1cdfcc987981a23a297e2b98fd9631
1 parent
0bd74a2a
[!] add parenthesis surrounding the if condition to clearly separate it from the…
… rest of the string composition. if didn't do that the right part of the "else" will be added with end of the string, which is not the intention.
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
web/widgets/left_menu_html.anubis
| ... | ... | @@ -30,15 +30,14 @@ define List(HTML_Off_Form) |
| 30 | 30 | with item_class = if subentry then "subitem " else "item ", |
| 31 | 31 | if _target_id is |
| 32 | 32 | { |
| 33 | - failure then p([class(item_class+_menu_id+"_icon"+if _menu_id=selected then " selected" else ""+ " "+join(" ", _classes))],actioner(same,same, link(_T(_text)),_action,_extra)), | |
| 33 | + failure then p([class(item_class+_menu_id+"_icon"+(if _menu_id=selected then " selected" else "")+ " "+join(" ", _classes))],actioner(same,same, link(_T(_text)),_action,_extra)), | |
| 34 | 34 | success(target_id) then |
| 35 | - p([class(item_class+"clickable "+_menu_id+"_icon"+if _menu_id=selected then " selected" else ""+ " "+join(" ", _classes)), | |
| 36 | -// event(onclick, "Xlib.load_content('"+target_id+"', "+format_web_action_name_to_js(_action, _extra)+")")],text(_T(_text))), | |
| 35 | + p([class(item_class+"clickable "+_menu_id+"_icon"+(if _menu_id=selected then " selected" else "")+ " "+join(" ", _classes)), | |
| 37 | 36 | event(onclick, load_content(target_id, _action, _extra))],text(_T(_text))), |
| 38 | 37 | } |
| 39 | 38 | |
| 40 | 39 | title(_title_id, subtitle, _classes, _text) then |
| 41 | - p([class(if subtitle then "menu_subtitle" else "menu_title"), class(if _title_id=selected then " selected" else ""+ " "+join(" ", _classes))], text([],_T(_text))) | |
| 40 | + p([class(if subtitle then "menu_subtitle" else "menu_title"), class((if _title_id=selected then " selected" else "")+ " "+join(" ", _classes))], text([],_T(_text))) | |
| 42 | 41 | // p([class("menu_title"), class("item "+_title_id+"_icon"+if _title_id=selected then " selected" else ""+ " "+join(" ", _classes))], text([],_T(_text))) |
| 43 | 42 | }, |
| 44 | 43 | make_left_menu(_T, t, selected, [ entry . so_far]) | ... | ... |