From f4fac98221836fb4402d5a0815f05c2b139af640 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Fri, 2 Mar 2012 17:25:44 +0100 Subject: [PATCH] CC-3174 : showbuilder adding back polling. --- airtime_mvc/public/js/airtime/showbuilder/builder.js | 2 ++ airtime_mvc/public/js/airtime/showbuilder/main_builder.js | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index adaffeb6e..c99fc91b5 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -296,6 +296,7 @@ var AIRTIME = (function(AIRTIME){ } //if the now playing song is visible set a timeout to redraw the table at the start of the next song. + /* tr = tableDiv.find("tr.sb-now-playing"); if (tr.length > 0) { var oTable = $('#show_builder_table').dataTable(), @@ -305,6 +306,7 @@ var AIRTIME = (function(AIRTIME){ oTable.fnDraw(); }, aData.refresh * 1000); //need refresh in milliseconds } + */ }, "fnHeaderCallback": function(nHead) { diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index b32b6bf48..10fcbd89e 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -151,4 +151,9 @@ $(document).ready(function(){ AIRTIME.showbuilder.fnServerData.end = oRange.end; AIRTIME.showbuilder.builderDataTable(); + + setInterval(function(){ + var oTable = $('#show_builder_table').dataTable(); + oTable.fnDraw(); + }, 10 * 1000); //need refresh in milliseconds }); \ No newline at end of file