Fix Sidebar button for touch device & CHANGELOG-zh-cn & FreeBSD installation instructions (#916)
* Disallow change optional limit on public proxy * Add Chinese for Mute plugins * add FreeBSD installation instructions to README-zh-cn.md * Fix Sidebar button for touch device * Add CHANGELOG-zh-cn.md * Why merging junk left? Remove it!
This commit is contained in:
parent
e9b2c76a88
commit
e42631932b
6 changed files with 178 additions and 38 deletions
plugins/Sidebar/media
|
@ -241,7 +241,7 @@ window.initScrollable = function () {
|
|||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
_this.fixbutton.off("click touchstop touchcancel");
|
||||
_this.fixbutton.off("click touchend touchcancel");
|
||||
_this.fixbutton.off("mousemove touchmove");
|
||||
_this.dragStarted = +(new Date);
|
||||
return _this.fixbutton.one("mousemove touchmove", function(e) {
|
||||
|
@ -255,7 +255,7 @@ window.initScrollable = function () {
|
|||
});
|
||||
};
|
||||
})(this));
|
||||
this.fixbutton.parent().on("click touchstop touchcancel", (function(_this) {
|
||||
this.fixbutton.parent().on("click touchend touchcancel", (function(_this) {
|
||||
return function(e) {
|
||||
return _this.stopDrag();
|
||||
};
|
||||
|
@ -297,7 +297,7 @@ window.initScrollable = function () {
|
|||
})(this));
|
||||
this.fixbutton.parents().on("mousemove touchmove", this.animDrag);
|
||||
this.fixbutton.parents().on("mousemove touchmove", this.waitMove);
|
||||
return this.fixbutton.parents().on("mouseup touchstop touchend touchcancel", (function(_this) {
|
||||
return this.fixbutton.parents().on("mouseup touchend touchend touchcancel", (function(_this) {
|
||||
return function(e) {
|
||||
e.preventDefault();
|
||||
return _this.stopDrag();
|
||||
|
@ -473,14 +473,14 @@ window.initScrollable = function () {
|
|||
Sidebar.prototype.onOpened = function() {
|
||||
this.log("Opened");
|
||||
this.scrollable();
|
||||
this.tag.find("#checkbox-owned").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
return setTimeout((function() {
|
||||
return _this.scrollable();
|
||||
}), 300);
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-sitelimit").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-sitelimit").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.ws.cmd("siteSetLimit", $("#input-sitelimit").val(), function(res) {
|
||||
if (res === "ok") {
|
||||
|
@ -491,7 +491,7 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-dbreload").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-dbreload").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.ws.cmd("dbReload", [], function() {
|
||||
wrapper.notifications.add("done-dbreload", "done", "Database schema reloaded!", 5000);
|
||||
|
@ -500,7 +500,7 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-dbrebuild").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-dbrebuild").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.notifications.add("done-dbrebuild", "info", "Database rebuilding....");
|
||||
wrapper.ws.cmd("dbRebuild", [], function() {
|
||||
|
@ -510,7 +510,7 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-update").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-update").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
_this.tag.find("#button-update").addClass("loading");
|
||||
wrapper.ws.cmd("siteUpdate", wrapper.site_info.address, function() {
|
||||
|
@ -520,21 +520,21 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-pause").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-pause").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
_this.tag.find("#button-pause").addClass("hidden");
|
||||
wrapper.ws.cmd("sitePause", wrapper.site_info.address);
|
||||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-resume").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-resume").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
_this.tag.find("#button-resume").addClass("hidden");
|
||||
wrapper.ws.cmd("siteResume", wrapper.site_info.address);
|
||||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-delete").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-delete").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.displayConfirm("Are you sure?", "Delete this site", function() {
|
||||
_this.tag.find("#button-delete").addClass("loading");
|
||||
|
@ -545,28 +545,28 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#checkbox-owned").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
return wrapper.ws.cmd("siteSetOwned", [_this.tag.find("#checkbox-owned").is(":checked")]);
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#checkbox-autodownloadoptional").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#checkbox-autodownloadoptional").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
return wrapper.ws.cmd("siteSetAutodownloadoptional", [_this.tag.find("#checkbox-autodownloadoptional").is(":checked")]);
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-identity").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-identity").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.ws.cmd("certSelect");
|
||||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#checkbox-owned").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
return wrapper.ws.cmd("siteSetOwned", [_this.tag.find("#checkbox-owned").is(":checked")]);
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-settings").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-settings").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
wrapper.ws.cmd("fileGet", "content.json", function(res) {
|
||||
var data, json_raw;
|
||||
|
@ -586,7 +586,7 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-sign").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-sign").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
var inner_path;
|
||||
inner_path = _this.tag.find("#input-contents").val();
|
||||
|
@ -614,7 +614,7 @@ window.initScrollable = function () {
|
|||
return false;
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-publish").off("click").on("click", (function(_this) {
|
||||
this.tag.find("#button-publish").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
var inner_path;
|
||||
inner_path = _this.tag.find("#input-contents").val();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue