sync js with backend

This commit is contained in:
Ted Unangst 2019-10-29 19:18:16 -04:00
parent c20f7e7eff
commit a6a8609735
2 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,7 @@ in reply to: <a href="{{ .RID }}" rel=noreferrer>{{ .RID }}</a>
{{ else }} {{ else }}
<button onclick="return flogit(this, 'save', '{{ .Honk.XID }}');">save</button> <button onclick="return flogit(this, 'save', '{{ .Honk.XID }}');">save</button>
{{ end }} {{ end }}
<button onclick="return flogit(this, 'desub', '{{ .Honk.XID }}');">untag</button> <button onclick="return flogit(this, 'untag', '{{ .Honk.XID }}');">untag</button>
<button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button> <button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button>
</div> </div>
</details> </details>

View File

@ -58,6 +58,7 @@ function flogit(el, how, xid) {
var s = how var s = how
if (s[s.length-1] != "e") { s += "e" } if (s[s.length-1] != "e") { s += "e" }
s += "d" s += "d"
if (s == "untaged") s = "untagged"
el.innerHTML = s el.innerHTML = s
el.disabled = true el.disabled = true
post("/zonkit", encode({"CSRF": csrftoken, "wherefore": how, "what": xid})) post("/zonkit", encode({"CSRF": csrftoken, "wherefore": how, "what": xid}))