Skip to content

Commit

Permalink
Make cert selection compatible with wrapper modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Feb 21, 2018
1 parent 6afe2dd commit b57a9f5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Ui/UiWebsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def actionCertSelect(self, to, accepted_domains=[], accept_any=False):
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>
""")
Expand All @@ -731,16 +731,14 @@ def actionCertSelect(self, to, accepted_domains=[], accept_any=False):
<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 -

Expand Down

0 comments on commit b57a9f5

Please sign in to comment.