Add callback for certSelect

This commit is contained in:
shortcutme 2017-06-03 00:53:40 +02:00
parent 5e6f6c5b85
commit 0b7d1ad90d
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -695,11 +695,13 @@ class UiWebsocket(object):
<script>
$(".notification .select.cert").on("click", function() {
$(".notification .select").removeClass('active')
wrapper.ws.cmd('certSet', [this.title])
wrapper.ws.cmd('certSet', [this.title], function() {
wrapper.sendInner({"cmd": "response", "to": %s, "result": this.title})
})
return false
})
</script>
"""
""" % to
# Send the notification
self.cmd("notification", ["ask", body])
@ -723,6 +725,7 @@ class UiWebsocket(object):
def actionCertSet(self, to, domain):
self.user.setCert(self.site.address, domain)
self.site.updateWebsocket(cert_changed=domain)
self.response(to, "ok")
# List all site info
def actionSiteList(self, to):