Make cert selection compatible with wrapper modifications

This commit is contained in:
shortcutme 2018-02-21 03:13:27 +01:00
parent 6afe2dd720
commit b57a9f5c58
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -721,7 +721,7 @@ class UiWebsocket(object):
body += "<div style='background-color: #F7F7F7; margin-right: -30px'>"
for domain in more_domains:
body += _(u"""
<a href='/{domain}' onclick='wrapper.gotoSite(this)' class='select'>
<a href='/{domain}' onclick='zeroframe.certSelectGotoSite(this)' class='select'>
<small style='float: right; margin-right: 40px; margin-top: -1px'>{_[Register]} &raquo;</small>{domain}
</a>
""")
@ -731,16 +731,14 @@ class UiWebsocket(object):
<script>
$(".notification .select.cert").on("click", function() {
$(".notification .select").removeClass('active')
wrapper.ws.cmd('certSet', [this.title], function() {
wrapper.sendInner({"cmd": "response", "to": %s, "result": this.title})
})
zeroframe.response(%s, this.title)
return false
})
</script>
""" % to
""" % self.next_message_id
# Send the notification
self.cmd("notification", ["ask", body])
self.cmd("notification", ["ask", body], lambda domain: self.actionCertSet(to, domain))
# - Admin actions -