Implement UID method of playlist management (#182)
This commit is contained in:
parent
d9fc17e0f3
commit
0868ef647d
6 changed files with 251 additions and 189 deletions
|
|
@ -203,16 +203,18 @@ $("#userpl_save").click(function() {
|
|||
|
||||
$("#queue").sortable({
|
||||
start: function(ev, ui) {
|
||||
PL_FROM = ui.item.prevAll().length;
|
||||
PL_FROM = ui.item.data("hash");
|
||||
},
|
||||
update: function(ev, ui) {
|
||||
PL_TO = ui.item.prevAll().length;
|
||||
if(PL_TO != PL_FROM) {
|
||||
socket.emit("moveMedia", {
|
||||
from: PL_FROM,
|
||||
to: PL_TO
|
||||
});
|
||||
}
|
||||
var prev = ui.item.prevAll();
|
||||
if(prev.length == 0)
|
||||
PL_AFTER = "";
|
||||
else
|
||||
PL_AFTER = $(prev[0]).data("hash");
|
||||
socket.emit("moveMedia", {
|
||||
from: PL_FROM,
|
||||
after: PL_AFTER
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#queue").disableSelection();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue