diff --git a/htmlUI/html/js/playlist.js b/htmlUI/html/js/playlist.js index 507e3374d..6dc08fac3 100644 --- a/htmlUI/html/js/playlist.js +++ b/htmlUI/html/js/playlist.js @@ -70,8 +70,21 @@ $(document).ready(function() { id = tr.find("input").attr('name'); - hpopup('ui_handler.php?act=PL.addItem&id='+id); - + $.post("ui_handler.php", + + { 'act': 'PL.addItem', 'id': id }, + + function(data){ + + if(data.error){ + alert(data.error); + } + + location.reload(); + }, + + "json" + ); } //PL main editor. diff --git a/htmlUI/templates/library/actionhandler.tpl b/htmlUI/templates/library/actionhandler.tpl index 48be54848..a80ac5c99 100644 --- a/htmlUI/templates/library/actionhandler.tpl +++ b/htmlUI/templates/library/actionhandler.tpl @@ -1,4 +1,4 @@ -onClick="return contextmenu('{$i.id}' +onClick="return contextmenu('{$i.id}' , '{$i.type}' , 'SP.addItem' {if $i.type|lower == 'audioclip'} @@ -34,6 +34,7 @@ onClick="return contextmenu('{$i.id}' {else} , 'SCHEDULER.addPL' , 'PL.addItem' + , 'PL.activate' , 'delete' {/if} {else} diff --git a/htmlUI/templates/playlist/editor.tpl b/htmlUI/templates/playlist/editor.tpl index 974270ceb..03fb84c9a 100644 --- a/htmlUI/templates/playlist/editor.tpl +++ b/htmlUI/templates/playlist/editor.tpl @@ -57,7 +57,7 @@
diff --git a/htmlUI/templates/script/collector.js.tpl b/htmlUI/templates/script/collector.js.tpl index 7eb4b7809..0850303b4 100644 --- a/htmlUI/templates/script/collector.js.tpl +++ b/htmlUI/templates/script/collector.js.tpl @@ -24,8 +24,29 @@ function collector_submit(formname, action, script, name, width, height) return; {literal} } - if (name) popup (script + '?act=' + action + href, popup, width, height); - else hpopup(script + '?act=' + action + href); + if (name){ + popup (script + '?act=' + action + href, popup, width, height); + } + else { + //alert(action); + //hpopup(script + '?act=' + action + href); + + $.post(script + '?act=' + action + href, + + {}, + + function(data){ + + if(data.error){ + alert(data.error); + } + + location.reload(); + }, + + "json" + ); + } } function collector_switchAll(formname) diff --git a/htmlUI/templates/script/contextmenu.js.tpl b/htmlUI/templates/script/contextmenu.js.tpl index 801d65b3f..7b8be1fd0 100644 --- a/htmlUI/templates/script/contextmenu.js.tpl +++ b/htmlUI/templates/script/contextmenu.js.tpl @@ -1,6 +1,5 @@ {literal}