From d51b900010d556ab7dbf5ae10e2710ef99d4fb3a Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 16 Mar 2013 15:01:56 -0500 Subject: [PATCH] Fix vimeo synchronization, slight playlist tweak Clicking the delete button on a playlist entry now removes the button strip before playing the removal animation, to prevent multiclicking --- www/assets/js/functions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/assets/js/functions.js b/www/assets/js/functions.js index db2cea30..8e9a34cc 100644 --- a/www/assets/js/functions.js +++ b/www/assets/js/functions.js @@ -16,7 +16,8 @@ function addUser(name, rank, leader) { div.appendChild(flair); div.appendChild(span); fmtUserlistItem(div, rank, leader); - addUserDropdown(div, name); + if(RANK >= Rank.Moderator) + addUserDropdown(div, name); $('#userlist')[0].appendChild(div); } @@ -155,6 +156,7 @@ function addQueueButtons(li) { // Callback time $(btnRemove).click(function() { + btnstrip.remove(); var idx = $('#queue').children().index(li); socket.emit('unqueue', { pos: idx }); }); @@ -325,7 +327,7 @@ function initVI(data) { var div = currentEmbed.parent(); currentEmbed.remove(); // Ugly but it's the only way I managed to get the API calls to work - div[0].innerHTML = ''; + div[0].innerHTML = ''; // $f() is defined by froogaloop, Vimeo's API wrapper PLAYER = $f($('iframe')[0]); // So we can retrieve the ID synchronously instead of waiting for