Display and change per-site bigfile autodownload with sidebar
This commit is contained in:
parent
bbb54d6a6a
commit
dd924f389f
4 changed files with 35 additions and 13 deletions
|
@ -249,7 +249,7 @@ class Sidebar extends Class
|
||||||
@scrollable()
|
@scrollable()
|
||||||
|
|
||||||
# Re-calculate height when site admin opened or closed
|
# Re-calculate height when site admin opened or closed
|
||||||
@tag.find("#checkbox-owned").off("click touchend").on "click touchend", =>
|
@tag.find("#checkbox-owned, #checkbox-autodownloadoptional").off("click touchend").on "click touchend", =>
|
||||||
setTimeout (=>
|
setTimeout (=>
|
||||||
@scrollable()
|
@scrollable()
|
||||||
), 300
|
), 300
|
||||||
|
@ -262,6 +262,14 @@ class Sidebar extends Class
|
||||||
@updateHtmlTag()
|
@updateHtmlTag()
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
# Site autodownload limit button
|
||||||
|
@tag.find("#button-autodownload_bigfile_size_limit").off("click touchend").on "click touchend", =>
|
||||||
|
@wrapper.ws.cmd "siteSetAutodownloadBigfileLimit", $("#input-autodownload_bigfile_size_limit").val(), (res) =>
|
||||||
|
if res == "ok"
|
||||||
|
@wrapper.notifications.add "done-bigfilelimit", "done", "Site bigfile auto download limit modified!", 5000
|
||||||
|
@updateHtmlTag()
|
||||||
|
return false
|
||||||
|
|
||||||
# Database reload
|
# Database reload
|
||||||
@tag.find("#button-dbreload").off("click touchend").on "click touchend", =>
|
@tag.find("#button-dbreload").off("click touchend").on "click touchend", =>
|
||||||
@wrapper.ws.cmd "dbReload", [], =>
|
@wrapper.ws.cmd "dbReload", [], =>
|
||||||
|
@ -327,10 +335,6 @@ class Sidebar extends Class
|
||||||
@wrapper.ws.cmd "certSelect"
|
@wrapper.ws.cmd "certSelect"
|
||||||
return false
|
return false
|
||||||
|
|
||||||
# Owned checkbox
|
|
||||||
@tag.find("#checkbox-owned").off("click touchend").on "click touchend", =>
|
|
||||||
@wrapper.ws.cmd "siteSetOwned", [@tag.find("#checkbox-owned").is(":checked")]
|
|
||||||
|
|
||||||
# Save settings
|
# Save settings
|
||||||
@tag.find("#button-settings").off("click touchend").on "click touchend", =>
|
@tag.find("#button-settings").off("click touchend").on "click touchend", =>
|
||||||
@wrapper.ws.cmd "fileGet", "content.json", (res) =>
|
@wrapper.ws.cmd "fileGet", "content.json", (res) =>
|
||||||
|
|
|
@ -118,6 +118,12 @@
|
||||||
#checkbox-owned ~ .settings-owned { opacity: 0; max-height: 0px; transition: all 0.3s linear; overflow: hidden }
|
#checkbox-owned ~ .settings-owned { opacity: 0; max-height: 0px; transition: all 0.3s linear; overflow: hidden }
|
||||||
#checkbox-owned:checked ~ .settings-owned { opacity: 1; max-height: 420px }
|
#checkbox-owned:checked ~ .settings-owned { opacity: 1; max-height: 420px }
|
||||||
|
|
||||||
|
/* Settings autodownload */
|
||||||
|
|
||||||
|
.settings-autodownloadoptional { clear: both; box-sizing: border-box; padding-top: 0px; }
|
||||||
|
#checkbox-autodownloadoptional ~ .settings-autodownloadoptional { opacity: 0; max-height: 0px; transition: all 0.3s ease-in-out; overflow: hidden; }
|
||||||
|
#checkbox-autodownloadoptional:checked ~ .settings-autodownloadoptional { opacity: 1; max-height: 120px; padding-top: 30px; }
|
||||||
|
|
||||||
/* Globe */
|
/* Globe */
|
||||||
.globe { width: 360px; height: 360px }
|
.globe { width: 360px; height: 360px }
|
||||||
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
||||||
|
@ -154,4 +160,4 @@
|
||||||
/* Small screen */
|
/* Small screen */
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.sidebar .close { display: block }
|
.sidebar .close { display: block }
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,12 @@
|
||||||
#checkbox-owned ~ .settings-owned { opacity: 0; max-height: 0px; -webkit-transition: all 0.3s linear; -moz-transition: all 0.3s linear; -o-transition: all 0.3s linear; -ms-transition: all 0.3s linear; transition: all 0.3s linear ; overflow: hidden }
|
#checkbox-owned ~ .settings-owned { opacity: 0; max-height: 0px; -webkit-transition: all 0.3s linear; -moz-transition: all 0.3s linear; -o-transition: all 0.3s linear; -ms-transition: all 0.3s linear; transition: all 0.3s linear ; overflow: hidden }
|
||||||
#checkbox-owned:checked ~ .settings-owned { opacity: 1; max-height: 420px }
|
#checkbox-owned:checked ~ .settings-owned { opacity: 1; max-height: 420px }
|
||||||
|
|
||||||
|
/* Settings autodownload */
|
||||||
|
|
||||||
|
.settings-autodownloadoptional { clear: both; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box ; padding-top: 0px; }
|
||||||
|
#checkbox-autodownloadoptional ~ .settings-autodownloadoptional { opacity: 0; max-height: 0px; -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; -ms-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out ; overflow: hidden; }
|
||||||
|
#checkbox-autodownloadoptional:checked ~ .settings-autodownloadoptional { opacity: 1; max-height: 120px; padding-top: 30px; }
|
||||||
|
|
||||||
/* Globe */
|
/* Globe */
|
||||||
.globe { width: 360px; height: 360px }
|
.globe { width: 360px; height: 360px }
|
||||||
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
.globe.loading { background: url(/uimedia/img/loading-circle.gif) center center no-repeat }
|
||||||
|
@ -233,4 +239,4 @@
|
||||||
/* Small screen */
|
/* Small screen */
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.sidebar .close { display: block }
|
.sidebar .close { display: block }
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,7 +555,7 @@ window.initScrollable = function () {
|
||||||
var menu;
|
var menu;
|
||||||
this.log("Opened");
|
this.log("Opened");
|
||||||
this.scrollable();
|
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 function() {
|
||||||
return setTimeout((function() {
|
return setTimeout((function() {
|
||||||
return _this.scrollable();
|
return _this.scrollable();
|
||||||
|
@ -573,6 +573,17 @@ window.initScrollable = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(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) {
|
this.tag.find("#button-dbreload").off("click touchend").on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
_this.wrapper.ws.cmd("dbReload", [], function() {
|
_this.wrapper.ws.cmd("dbReload", [], function() {
|
||||||
|
@ -653,11 +664,6 @@ window.initScrollable = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(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) {
|
this.tag.find("#button-settings").off("click touchend").on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
_this.wrapper.ws.cmd("fileGet", "content.json", function(res) {
|
_this.wrapper.ws.cmd("fileGet", "content.json", function(res) {
|
||||||
|
|
Loading…
Reference in a new issue