side playlist

This commit is contained in:
naomiaro 2010-10-06 12:10:13 -04:00
parent e4cf1a6fcf
commit 4c3d499699
4 changed files with 27 additions and 20 deletions

View File

@ -2,21 +2,16 @@
$(document).ready(function() {
$('#search_results').find('tr').not('.blue_head').draggable({
connectToSortable: 'ul#spl_sortable',
helper: 'clone'
});
$('#cc_right_panel').find('h1').click(function(){
$(this).siblings().toggle();
});
function movePLItem(event, ui) {
var ul, li, newPos, oldPos, id_prefix, tag;
tag = ui.item.get(0).tagName
if( tag === "TR")
return;
var ul, li, newPos, oldPos, id_prefix;
ul = $(this);
li = ui.item;
@ -68,12 +63,27 @@ $(document).ready(function() {
var tr, id, ul;
ul = $(this);
tr = ui.item;
tr = ui.helper;
if(tr.get(0).tagName === 'LI')
return;
id = tr.find("input").attr('name');
ul.find('tr').remove();
hpopup('ui_handler.php?act=PL.addItem&id='+id);
location.href='ui_handler.php?act=PL.addItem&id='+id;
/*
$.post('ui_handler.php',
{ 'act': 'SPL.addItem', 'id': id },
function(data){
var x;
},
"json"
);
*/
}
@ -90,8 +100,9 @@ $(document).ready(function() {
//PL side bar editor.
$("#spl_sortable").sortable();
$("#spl_sortable" ).bind( "sortstop", movePLItem);
$("#spl_sortable" ).bind( "sortreceive", addPLItem);
//$("#spl_sortable" ).bind( "sortout", test);
$("#spl_sortable").droppable();
$("#spl_sortable" ).bind( "drop", addPLItem);
function removeCueInput(){
var span = $(this).parent();

View File

@ -16,12 +16,7 @@ function collector_submit(formname, action, script, name, width, height)
}
}
if (href == '') return false;
if (action === 'PL.addItem') {
location.href='ui_handler.php?act='+ action + href;
return;
}
if (href == '') return false;
if (action == 'delete') {
{/literal}

View File

@ -315,11 +315,11 @@ switch ($_REQUEST['act']) {
case "PL.addItem":
if (isset($_REQUEST['id'])) {
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id']) !== FALSE) {
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id']) === TRUE) {
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
}
}
$uiHandler->PLAYLIST->setReload("ui_browser.php?id=&act=BROWSE");
$uiHandler->PLAYLIST->setReload();
break;
case "PL.setClipLength":

View File

@ -36,6 +36,7 @@ class uiPlaylist
$this->Base->redirUrl = $url;
else
$this->Base->redirUrl = $this->reloadUrl;
} // fn setReload