1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added trailing selector for pulse view

This commit is contained in:
Krateng 2019-04-02 11:55:11 +02:00
parent 563744c2b9
commit aa56e11d85

View File

@ -343,7 +343,7 @@ def module_filterselection(keys,time=True,delimit=False):
if delimit: if delimit:
retainkeys = {k:keys[k] for k in keys if k not in ["step","stepn","trail"]} retainkeys = {k:keys[k] for k in keys if k not in ["step","stepn"]}
keystr = "?" + urllib.parse.urlencode(retainkeys) keystr = "?" + urllib.parse.urlencode(retainkeys)
html += "<div>" html += "<div>"
@ -363,8 +363,31 @@ def module_filterselection(keys,time=True,delimit=False):
html += "<span class='stat_selector' style='opacity:0.5;'>Yearly</span>" html += "<span class='stat_selector' style='opacity:0.5;'>Yearly</span>"
else: else:
html += "<a href='" + keystr + "&step=year'><span class='stat_selector'>Yearly</span></a>" html += "<a href='" + keystr + "&step=year'><span class='stat_selector'>Yearly</span></a>"
html += "</div>"
retainkeys = {k:keys[k] for k in keys if k not in ["trail"]}
keystr = "?" + urllib.parse.urlencode(retainkeys)
html += "<div>"
if keys.get("trail") == "1" or keys.get("trail") is None:
html += "<span class='stat_selector' style='opacity:0.5;'>Standard</span>"
else:
html += "<a href='" + keystr + "'><span class='stat_selector'>Standard</span></a>"
html += " | " html += " | "
if keys.get("trail") == "2":
html += "<span class='stat_selector' style='opacity:0.5;'>Trailing</span>"
else:
html += "<a href='" + keystr + "&trail=2'><span class='stat_selector'>Trailing</span></a>"
html += " | "
if keys.get("trail") == "3":
html += "<span class='stat_selector' style='opacity:0.5;'>Long Trailing</span>"
else:
html += "<a href='" + keystr + "&trail=3'><span class='stat_selector'>Long Trailing</span></a>"
html += "</div>" html += "</div>"
return html return html