From 11bdd11749dcfd9d794e78b8e59fdd7a7fe199e6 Mon Sep 17 00:00:00 2001 From: boyska Date: Tue, 3 Dec 2013 01:56:54 +0100 Subject: [PATCH] Polling until download is ready --- server/static/js/new.js | 45 +++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/server/static/js/new.js b/server/static/js/new.js index 3cade69..df0ccb7 100644 --- a/server/static/js/new.js +++ b/server/static/js/new.js @@ -1,7 +1,7 @@ /*global $*/ //TODO: move to a separate file(?) var config = { - //TODO: create a dedicate widget for pretty date/clock + polling_interval: 500, datetimeformat: function(d) { if(Math.abs(new Date() - d) > (3*60*60*1000)) { return d.toLocaleString(); @@ -38,6 +38,7 @@ $.widget("ror.ongoingrec", { options: { rec: null, state: 0, + filename: null, /*0 = ongoing, 1 = encoding, 2 = ready to download*/ }, _create: function() { @@ -52,7 +53,7 @@ $.widget("ror.ongoingrec", { $('').attr('placeholder', 'Nome trasmissione') ) ).append( $('').countclock()).append( - $('').append($('