mirror of https://github.com/calzoneman/sync.git
Slight tweak to userlist dropdown hiding
This commit is contained in:
parent
033fbbf08a
commit
f8fcc0d2d7
|
@ -1,3 +1,8 @@
|
|||
Wed Oct 16 23:09 2013 CDT
|
||||
* www/assets/js/util.js: Add a special handler so that clicking
|
||||
anywhere on the page clears a userlist dropdown, not just right
|
||||
clicking the same name.
|
||||
|
||||
Wed Oct 16 21:48 2013 CDT
|
||||
* www/assets/js/player.js: Add a stupid timeout hack to address
|
||||
a race condition in YouTube's HTML5 player. Seriously?
|
||||
|
|
|
@ -257,6 +257,14 @@ function addUserDropdown(entry, data) {
|
|||
entry.contextmenu(function(ev) {
|
||||
ev.preventDefault();
|
||||
if(menu.css("display") == "none") {
|
||||
$(".user-dropdown").hide();
|
||||
$(document).bind("mouseup.userlist-ddown", function (e) {
|
||||
if (menu.has(e.target).length === 0 &&
|
||||
entry.parent().has(e.target).length === 0) {
|
||||
menu.hide();
|
||||
$(document).unbind("mouseup.userlist-ddown");
|
||||
}
|
||||
});
|
||||
menu.show();
|
||||
} else {
|
||||
menu.hide();
|
||||
|
|
Loading…
Reference in New Issue