hide reshare menu if you click somewhere it's not
This commit is contained in:
parent
8b1c8d6a1b
commit
02bb2fa19f
1 changed files with 11 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ var View = {
|
||||||
.submit(this.webFingerForm.submit);
|
.submit(this.webFingerForm.submit);
|
||||||
|
|
||||||
$(document.body)
|
$(document.body)
|
||||||
.click(this.userMenu.removeFocus);
|
.click(this.userMenu.removeFocus)
|
||||||
|
.click(this.reshareButton.removeFocus);
|
||||||
},
|
},
|
||||||
|
|
||||||
addAspectButton: {
|
addAspectButton: {
|
||||||
|
|
@ -186,6 +187,15 @@ var View = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
reshareButton: {
|
||||||
|
removeFocus: function(evt) {
|
||||||
|
var $target = $(evt.target);
|
||||||
|
if(!$target.closest(".reshare_pane").length) {
|
||||||
|
$(".reshare_button.active").removeClass("active").siblings(".reshare_box").css("display", "none");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
userMenu: {
|
userMenu: {
|
||||||
click: function() {
|
click: function() {
|
||||||
$(this).toggleClass("active");
|
$(this).toggleClass("active");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue