Autoscroll

This commit is contained in:
Ivanq 2017-12-30 19:22:49 +03:00
parent 581a18f83d
commit f9ac614147
4 changed files with 14 additions and 3 deletions

View file

@ -357,8 +357,14 @@ class Sidebar extends Class
# Sign and publish content.json
$(document).on "click touchend", =>
@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-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
@tag.find("#button-sign-publish").off("click touchend").on "click touchend", =>

View file

@ -124,7 +124,7 @@
.contents a { color: white }
.contents a:active { background-color: #6B6B6B }
.contents + .flex {
.sign-publish-flex {
padding-bottom: 65px;
}
#button-sign-publish {

View file

@ -178,7 +178,7 @@
.contents a { color: white }
.contents a:active { background-color: #6B6B6B }
.contents + .flex {
.sign-publish-flex {
padding-bottom: 65px;
}
#button-sign-publish {

View file

@ -608,12 +608,17 @@ window.initScrollable = function () {
})(this));
$(document).on("click touchend", (function(_this) {
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.tag.find("#button-sign-publish-arrow").off("click touchend").on("click touchend", (function(_this) {
return function() {
_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;
};
})(this));