Rev3736, Fix sidebar content signing changer links

This commit is contained in:
shortcutme 2018-12-04 01:45:01 +01:00
parent 5b50a113d1
commit 2ceada84a6
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
4 changed files with 12 additions and 2 deletions

View file

@ -505,7 +505,7 @@ class UiWebsocketPlugin(object):
contents += site.content_manager.contents.get("content.json", {}).get("includes", {}).keys()
body.append(_(u"<div class='contents'>{_[Choose]}: "))
for content in contents:
body.append(_("<a href='#{content}' onclick='$(\"#input-contents\").val(\"{content}\"); return false'>{content}</a> "))
body.append(_("<a href='{content}' class='contents-content'>{content}</a> "))
body.append("</div>")
body.append("</li>")

View file

@ -464,6 +464,10 @@ class Sidebar extends Class
@tag?.find("#button-sign-publish-menu").removeClass("visible")
@tag?.find(".contents + .flex").removeClass("sign-publish-flex")
@tag.find(".contents-content").off("click touchend").on "click touchend", (e) =>
$("#input-contents").val(e.currentTarget.innerText);
return false;
menu = new Menu(@tag.find("#menu-sign-publish"))
menu.elem.css("margin-top", "-130px") # Open upwards
menu.addItem "Sign", =>

View file

@ -913,6 +913,12 @@ window.initScrollable = function () {
return (ref1 = _this.tag) != null ? ref1.find(".contents + .flex").removeClass("sign-publish-flex") : void 0;
};
})(this));
this.tag.find(".contents-content").off("click touchend").on("click touchend", (function(_this) {
return function(e) {
$("#input-contents").val(e.currentTarget.innerText);
return false;
};
})(this));
menu = new Menu(this.tag.find("#menu-sign-publish"));
menu.elem.css("margin-top", "-130px");
menu.addItem("Sign", (function(_this) {

View file

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.4"
self.rev = 3735
self.rev = 3736
self.argv = argv
self.action = None
self.pending_changes = {}