1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

Starting sortable playlist implmentation to re-order songs.

This commit is contained in:
SUTJael 2013-11-25 14:36:12 +01:00
parent 40ef2d3de7
commit 0599214703
3 changed files with 116 additions and 77 deletions

View file

@ -19,6 +19,17 @@
//
$(document).ready(function () {
$('.default_hidden').hide();
$('#sortableplaylist').sortable({
axis: 'y',
delay: 200,
start: function (event, ui) {
$(ui.item).data("startindex", ui.item.index());
},
stop: function (event, ui) {
playlistUpdatedIndex(ui.item);
}
});
});
$(function() {
@ -40,12 +51,12 @@ $(function() {
// flipField
// Toggles the disabled property on the specifed field
function flipField(field) {
if ($(field).disabled == false) {
$(field).disabled = true;
}
else {
$(field).disabled = false;
}
if ($(field).disabled == false) {
$(field).disabled = true;
}
else {
$(field).disabled = false;
}
}
// updateText
@ -68,9 +79,7 @@ function toggleVisible(element) {
// delayRun
// This function delays the run of another function by X milliseconds
function delayRun(element, time, method, page, source) {
var function_string = method + '(\'' + page + '\',\'' + source + '\')';
var action = function () { eval(function_string); };
if (element.zid) {
@ -78,7 +87,6 @@ function delayRun(element, time, method, page, source) {
}
element.zid = setTimeout(action, time);
}
// reloadUtil