Use injectScript in certSelect
This commit is contained in:
parent
cbefc5b81e
commit
316cd7710f
1 changed files with 3 additions and 5 deletions
|
@ -804,24 +804,22 @@ 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='zeroframe.certSelectGotoSite(this)' class='select'>
|
<a href='/{domain}' target='_top' class='select'>
|
||||||
<small style='float: right; margin-right: 40px; margin-top: -1px'>{_[Register]} »</small>{domain}
|
<small style='float: right; margin-right: 40px; margin-top: -1px'>{_[Register]} »</small>{domain}
|
||||||
</a>
|
</a>
|
||||||
""")
|
""")
|
||||||
body += "</div>"
|
body += "</div>"
|
||||||
|
|
||||||
body += """
|
script = """
|
||||||
<script>
|
|
||||||
$(".notification .select.cert").on("click", function() {
|
$(".notification .select.cert").on("click", function() {
|
||||||
$(".notification .select").removeClass('active')
|
$(".notification .select").removeClass('active')
|
||||||
zeroframe.response(%s, this.title)
|
zeroframe.response(%s, this.title)
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
</script>
|
|
||||||
""" % self.next_message_id
|
""" % self.next_message_id
|
||||||
|
|
||||||
# Send the notification
|
|
||||||
self.cmd("notification", ["ask", body], lambda domain: self.actionCertSet(to, domain))
|
self.cmd("notification", ["ask", body], lambda domain: self.actionCertSet(to, domain))
|
||||||
|
self.cmd("injectScript", script)
|
||||||
|
|
||||||
# - Admin actions -
|
# - Admin actions -
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue