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()
|
||||
|
||||
# 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 (=>
|
||||
@scrollable()
|
||||
), 300
|
||||
|
@ -262,6 +262,14 @@ class Sidebar extends Class
|
|||
@updateHtmlTag()
|
||||
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
|
||||
@tag.find("#button-dbreload").off("click touchend").on "click touchend", =>
|
||||
@wrapper.ws.cmd "dbReload", [], =>
|
||||
|
@ -327,10 +335,6 @@ class Sidebar extends Class
|
|||
@wrapper.ws.cmd "certSelect"
|
||||
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
|
||||
@tag.find("#button-settings").off("click touchend").on "click touchend", =>
|
||||
@wrapper.ws.cmd "fileGet", "content.json", (res) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue