Handle clicking ':'
This commit is contained in:
parent
b89eb4f1e8
commit
0f5658e65e
4 changed files with 37 additions and 10 deletions
|
@ -358,15 +358,24 @@ class Sidebar extends Class
|
|||
$(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")
|
||||
menu = new Menu(@tag.find("#wrapper-sign-publish"))
|
||||
menu.addItem "Sign"
|
||||
menu.addItem "Publush"
|
||||
|
||||
@tag.find("#menu-sign-publish").off("click touchend").on "click touchend", =>
|
||||
if window.visible_menu == menu
|
||||
@tag.find(".contents + .flex").removeClass "active"
|
||||
menu.hide()
|
||||
else
|
||||
@tag.find(".contents + .flex").addClass "active"
|
||||
@tag.find(".content-wrapper").prop "scrollTop", 10000
|
||||
|
||||
menu.show()
|
||||
return false
|
||||
|
||||
$("body").on "click", =>
|
||||
@tag.find(".contents + .flex").removeClass "active"
|
||||
|
||||
@tag.find("#button-sign-publish").off("click touchend").on "click touchend", =>
|
||||
inner_path = @tag.find("#input-contents").val()
|
||||
|
||||
|
|
|
@ -124,6 +124,9 @@
|
|||
.contents a { color: white }
|
||||
.contents a:active { background-color: #6B6B6B }
|
||||
|
||||
.contents + .flex.active {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
#wrapper-sign-publish {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -202,6 +202,9 @@
|
|||
.contents a { color: white }
|
||||
.contents a:active { background-color: #6B6B6B }
|
||||
|
||||
.contents + .flex.active {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
#wrapper-sign-publish {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,6 @@
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- plugins/Sidebar/media/RateLimit.coffee ---- */
|
||||
|
||||
|
||||
|
@ -554,6 +553,7 @@ window.initScrollable = function () {
|
|||
};
|
||||
|
||||
Sidebar.prototype.onOpened = function() {
|
||||
var menu;
|
||||
this.log("Opened");
|
||||
this.scrollable();
|
||||
this.tag.find("#checkbox-owned").off("click touchend").on("click touchend", (function(_this) {
|
||||
|
@ -692,16 +692,27 @@ window.initScrollable = function () {
|
|||
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) {
|
||||
menu = new Menu(this.tag.find("#wrapper-sign-publish"));
|
||||
menu.addItem("Sign");
|
||||
menu.addItem("Publush");
|
||||
this.tag.find("#menu-sign-publish").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")) {
|
||||
if (window.visible_menu === menu) {
|
||||
_this.tag.find(".contents + .flex").removeClass("active");
|
||||
menu.hide();
|
||||
} else {
|
||||
_this.tag.find(".contents + .flex").addClass("active");
|
||||
_this.tag.find(".content-wrapper").prop("scrollTop", 10000);
|
||||
menu.show();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
})(this));
|
||||
$("body").on("click", (function(_this) {
|
||||
return function() {
|
||||
return _this.tag.find(".contents + .flex").removeClass("active");
|
||||
};
|
||||
})(this));
|
||||
this.tag.find("#button-sign-publish").off("click touchend").on("click touchend", (function(_this) {
|
||||
return function() {
|
||||
var inner_path;
|
||||
|
@ -889,6 +900,7 @@ window.initScrollable = function () {
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- plugins/Sidebar/media/morphdom.js ---- */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue