From 81d85311e711adf0fa4a97239a24c09b253d12d9 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 25 Jun 2013 10:38:19 -0400 Subject: [PATCH] Minor fix --- www/assets/js/util.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/www/assets/js/util.js b/www/assets/js/util.js index 353e56cb..b4f95863 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -300,6 +300,7 @@ function addQueueButtons(li) { menu.find(".qbtn-delete").addClass("btn-danger"); } else if(menu.find(".btn").length != 0) { + li.unbind("contextmenu"); li.contextmenu(function(ev) { ev.preventDefault(); if(menu.css("display") == "none") @@ -322,12 +323,14 @@ function rebuildPlaylist() { var i = 0; qli.each(function() { var li = $(this); - setTimeout(function() { - addQueueButtons(li); - if(i == qli.length - 1) { - REBUILDING = false; - } - }, 10*i); + (function(i) { + setTimeout(function() { + addQueueButtons(li); + if(i == qli.length - 1) { + REBUILDING = false; + } + }, 10*i); + })(i); i++; }); }