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" . }}
|
||||
<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 id="srvmsg">
|
||||
{{ if .Name }}
|
||||
|
@ -17,19 +29,7 @@
|
|||
<p><button onclick="refreshhonks(this)">refresh</button><span></span>
|
||||
<button onclick="oldestnewest(this)">scroll down</button>
|
||||
</div>
|
||||
{{ 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>
|
||||
{{ if eq .ServerMessage "one honk maybe more" }} <script> hideelement("refreshbox")</script> {{ end }}
|
||||
{{ end }}
|
||||
<div id="honksonpage">
|
||||
<div>
|
||||
|
|
|
@ -167,6 +167,7 @@ function switchtopage(name, arg) {
|
|||
msg.remove()
|
||||
servermsgs[stash] = msg
|
||||
}
|
||||
showelement("refreshbox")
|
||||
|
||||
honksforpage[stash] = holder
|
||||
|
||||
|
|
Loading…
Reference in New Issue