Show name of who added something (Issue #50)

Hovering over a queue item will now show the name of the person who added it.
If it was added by a guest, or if it was added while the server was running a previous version, it will show up as "unknown".
This commit is contained in:
calzoneman 2013-04-24 13:10:08 -05:00
parent 19d778e8ba
commit 57475d5d3d
5 changed files with 29 additions and 11 deletions

View file

@ -246,6 +246,9 @@ function initCallbacks() {
var li = makeQueueEntry(data.pl[i]);
if(RANK >= Rank.Moderator || OPENQUEUE || LEADER)
addQueueButtons(li);
$(li).attr("title", data.pl[i].queueby
? ("Added by: " + data.pl[i].queueby)
: "Added by: Unknown");
$(li).appendTo(ul);
}
});
@ -257,6 +260,9 @@ function initCallbacks() {
$(li).css("display", "none");
var idx = data.pos;
var ul = $("#queue")[0];
$(li).attr("title", data.media.queueby
? ("Added by: " + data.media.queueby)
: "Added by: Unknown");
$(li).appendTo(ul);
if(idx < ul.children.length - 1)
moveVideo(ul.children.length - 1, idx);