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