Display and change per-site bigfile autodownload with sidebar

This commit is contained in:
shortcutme 2018-03-10 02:01:49 +01:00
parent bbb54d6a6a
commit dd924f389f
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
4 changed files with 35 additions and 13 deletions

View file

@ -555,7 +555,7 @@ window.initScrollable = function () {
var menu;
this.log("Opened");
this.scrollable();
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
this.tag.find("#checkbox-owned, #checkbox-autodownloadoptional").off("click touchend").on("click touchend", (function(_this) {
return function() {
return setTimeout((function() {
return _this.scrollable();
@ -573,6 +573,17 @@ window.initScrollable = function () {
return false;
};
})(this));
this.tag.find("#button-autodownload_bigfile_size_limit").off("click touchend").on("click touchend", (function(_this) {
return function() {
_this.wrapper.ws.cmd("siteSetAutodownloadBigfileLimit", $("#input-autodownload_bigfile_size_limit").val(), function(res) {
if (res === "ok") {
_this.wrapper.notifications.add("done-bigfilelimit", "done", "Site bigfile auto download limit modified!", 5000);
}
return _this.updateHtmlTag();
});
return false;
};
})(this));
this.tag.find("#button-dbreload").off("click touchend").on("click touchend", (function(_this) {
return function() {
_this.wrapper.ws.cmd("dbReload", [], function() {
@ -653,11 +664,6 @@ window.initScrollable = function () {
return false;
};
})(this));
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
return function() {
return _this.wrapper.ws.cmd("siteSetOwned", [_this.tag.find("#checkbox-owned").is(":checked")]);
};
})(this));
this.tag.find("#button-settings").off("click touchend").on("click touchend", (function(_this) {
return function() {
_this.wrapper.ws.cmd("fileGet", "content.json", function(res) {