gross hack to hide refresh when it won't work
This commit is contained in:
parent
b949478f50
commit
6f40c81597
|
@ -1,5 +1,17 @@
|
||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
<main>
|
<main>
|
||||||
|
{{ if .HonkCSRF }}
|
||||||
|
<script>
|
||||||
|
var csrftoken = {{ .HonkCSRF }}
|
||||||
|
var honksforpage = { }
|
||||||
|
var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
|
||||||
|
var tophid = { }
|
||||||
|
tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
|
||||||
|
var servermsgs = { }
|
||||||
|
servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
|
||||||
|
</script>
|
||||||
|
<script src="/honkpage.js{{ .JSParam }}"></script>
|
||||||
|
{{ end }}
|
||||||
<div class="info" id="infobox">
|
<div class="info" id="infobox">
|
||||||
<div id="srvmsg">
|
<div id="srvmsg">
|
||||||
{{ if .Name }}
|
{{ if .Name }}
|
||||||
|
@ -17,19 +29,7 @@
|
||||||
<p><button onclick="refreshhonks(this)">refresh</button><span></span>
|
<p><button onclick="refreshhonks(this)">refresh</button><span></span>
|
||||||
<button onclick="oldestnewest(this)">scroll down</button>
|
<button onclick="oldestnewest(this)">scroll down</button>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ if eq .ServerMessage "one honk maybe more" }} <script> hideelement("refreshbox")</script> {{ end }}
|
||||||
{{ if .HonkCSRF }}
|
|
||||||
<script>
|
|
||||||
var csrftoken = {{ .HonkCSRF }}
|
|
||||||
var honksforpage = { }
|
|
||||||
var curpagestate = { name: "{{ .PageName }}", arg : "{{ .PageArg }}" }
|
|
||||||
var tophid = { }
|
|
||||||
tophid[curpagestate.name + ":" + curpagestate.arg] = "{{ .TopHID }}"
|
|
||||||
var servermsgs = { }
|
|
||||||
servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}"
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script src="/honkpage.js{{ .JSParam }}"></script>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div id="honksonpage">
|
<div id="honksonpage">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -167,6 +167,7 @@ function switchtopage(name, arg) {
|
||||||
msg.remove()
|
msg.remove()
|
||||||
servermsgs[stash] = msg
|
servermsgs[stash] = msg
|
||||||
}
|
}
|
||||||
|
showelement("refreshbox")
|
||||||
|
|
||||||
honksforpage[stash] = holder
|
honksforpage[stash] = holder
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue