diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 6dc422cf2..2a53cb501 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -537,10 +537,11 @@ var AIRTIME = (function(AIRTIME){ return; } newTab.tab.on("click", function() { + var type = newTab.pane.find(".obj_type").val(), + url = baseUrl + ((type === "playlist" || type === "block") ? 'playlist' : 'webstream') + '/edit'; if (!$(this).hasClass('active')) { AIRTIME.showbuilder.switchTab(newTab.pane, newTab.tab); - $.post(baseUrl+'playlist/edit', - {format: "json", id: newTab.pane.find(".obj_id").val(), type: newTab.pane.find(".obj_type").val()}); + $.post(url, {format: "json", id: newTab.pane.find(".obj_id").val(), type: type}); } }); AIRTIME.playlist.init(); diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index ab2f45c16..110054eeb 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -224,7 +224,7 @@ function buildScheduleDialog (json, instance_id) { } ] }); - + //set the start end times so the builder datatables knows its time range. fnServer.start = json.start; fnServer.end = json.end;