Add 'Open site directory' button
This commit is contained in:
parent
4c7013644f
commit
a88f56bec3
3 changed files with 13 additions and 0 deletions
|
@ -408,6 +408,10 @@ class UiWebsocketPlugin(object):
|
||||||
<li>
|
<li>
|
||||||
<a href='#Save' class='button' id='button-settings'>{_[Save site settings]}</a>
|
<a href='#Save' class='button' id='button-settings'>{_[Save site settings]}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#Directory' class='button' id='button-directory'>{_[Open site directory]}</a>
|
||||||
|
</li>
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
def sidebarRenderContents(self, body, site):
|
def sidebarRenderContents(self, body, site):
|
||||||
|
|
|
@ -348,6 +348,10 @@ class Sidebar extends Class
|
||||||
@updateHtmlTag()
|
@updateHtmlTag()
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
# Open site directory
|
||||||
|
@tag.find("#button-directory").off("click touchend").on "click touchend", =>
|
||||||
|
@wrapper.ws.cmd "serverShowdirectory", ["site", @wrapper.site_info.address]
|
||||||
|
|
||||||
# Sign and publish content.json
|
# Sign and publish content.json
|
||||||
$(document).on "click touchend", =>
|
$(document).on "click touchend", =>
|
||||||
@tag.find("#button-sign-publish-menu").removeClass("visible")
|
@tag.find("#button-sign-publish-menu").removeClass("visible")
|
||||||
|
|
|
@ -685,6 +685,11 @@ window.initScrollable = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
|
this.tag.find("#button-directory").off("click touchend").on("click touchend", (function(_this) {
|
||||||
|
return function() {
|
||||||
|
return _this.wrapper.ws.cmd("serverShowdirectory", ["site", _this.wrapper.site_info.address]);
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
$(document).on("click touchend", (function(_this) {
|
$(document).on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
_this.tag.find("#button-sign-publish-menu").removeClass("visible");
|
_this.tag.find("#button-sign-publish-menu").removeClass("visible");
|
||||||
|
|
Loading…
Reference in a new issue