Autoscroll
This commit is contained in:
parent
581a18f83d
commit
f9ac614147
4 changed files with 14 additions and 3 deletions
|
@ -357,8 +357,14 @@ class Sidebar extends Class
|
||||||
# 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")
|
||||||
|
@tag.find(".contents + .flex").removeClass("sign-publish-flex")
|
||||||
@tag.find("#button-sign-publish-arrow").off("click touchend").on "click touchend", =>
|
@tag.find("#button-sign-publish-arrow").off("click touchend").on "click touchend", =>
|
||||||
@tag.find("#button-sign-publish-menu").toggleClass("visible")
|
@tag.find("#button-sign-publish-menu").toggleClass("visible")
|
||||||
|
@tag.find(".contents + .flex").toggleClass("sign-publish-flex")
|
||||||
|
|
||||||
|
if @tag.find(".contents + .flex").hasClass("sign-publish-flex")
|
||||||
|
@tag.find(".content-wrapper").prop "scrollTop", 10000
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@tag.find("#button-sign-publish").off("click touchend").on "click touchend", =>
|
@tag.find("#button-sign-publish").off("click touchend").on "click touchend", =>
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
.contents a { color: white }
|
.contents a { color: white }
|
||||||
.contents a:active { background-color: #6B6B6B }
|
.contents a:active { background-color: #6B6B6B }
|
||||||
|
|
||||||
.contents + .flex {
|
.sign-publish-flex {
|
||||||
padding-bottom: 65px;
|
padding-bottom: 65px;
|
||||||
}
|
}
|
||||||
#button-sign-publish {
|
#button-sign-publish {
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
.contents a { color: white }
|
.contents a { color: white }
|
||||||
.contents a:active { background-color: #6B6B6B }
|
.contents a:active { background-color: #6B6B6B }
|
||||||
|
|
||||||
.contents + .flex {
|
.sign-publish-flex {
|
||||||
padding-bottom: 65px;
|
padding-bottom: 65px;
|
||||||
}
|
}
|
||||||
#button-sign-publish {
|
#button-sign-publish {
|
||||||
|
|
|
@ -608,12 +608,17 @@ window.initScrollable = function () {
|
||||||
})(this));
|
})(this));
|
||||||
$(document).on("click touchend", (function(_this) {
|
$(document).on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
return _this.tag.find("#button-sign-publish-menu").removeClass("visible");
|
_this.tag.find("#button-sign-publish-menu").removeClass("visible");
|
||||||
|
return _this.tag.find(".contents + .flex").removeClass("sign-publish-flex");
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
this.tag.find("#button-sign-publish-arrow").off("click touchend").on("click touchend", (function(_this) {
|
this.tag.find("#button-sign-publish-arrow").off("click touchend").on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
_this.tag.find("#button-sign-publish-menu").toggleClass("visible");
|
_this.tag.find("#button-sign-publish-menu").toggleClass("visible");
|
||||||
|
_this.tag.find(".contents + .flex").toggleClass("sign-publish-flex");
|
||||||
|
if (_this.tag.find(".contents + .flex").hasClass("sign-publish-flex")) {
|
||||||
|
_this.tag.find(".content-wrapper").prop("scrollTop", 10000);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
|
|
Loading…
Reference in a new issue