2012-06-10 21:16:22 +00:00
|
|
|
var handle = 0;
|
|
|
|
|
|
|
|
function update()
|
|
|
|
{
|
|
|
|
var file = $('#params').attr('file');
|
|
|
|
|
|
|
|
$.get('progress.jim' + '?file=' + file,
|
|
|
|
function(data) {
|
|
|
|
if (handle)
|
|
|
|
$('#progressbar').reportprogress(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
2012-06-11 18:49:56 +00:00
|
|
|
$('#analysis').load('analyse.jim?file=' + $('#params').attr('file'),
|
|
|
|
function(t) {
|
|
|
|
if ($.trim(t) == '0%')
|
|
|
|
{
|
|
|
|
$('#output').text('Recording is already stripped.');
|
|
|
|
$('#back').slideDown();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
$('#stripdiv').slideDown();
|
|
|
|
});
|
|
|
|
|
2012-06-10 21:16:22 +00:00
|
|
|
$('#progressbar').reportprogress(0);
|
|
|
|
|
|
|
|
$('#back').button().click(function() {
|
2013-02-25 22:31:54 +00:00
|
|
|
window.location = '../index.jim?dir=' + $('#params').attr('dir');
|
2012-06-10 21:16:22 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#stripit').button().click(function() {
|
|
|
|
$('#stripdiv').hide('slow');
|
|
|
|
$('#progressdiv').show('slow');
|
|
|
|
handle = setInterval("update()", 1000);
|
|
|
|
$('#output').text('Please do not interrupt...')
|
|
|
|
.load('execute.jim?file=' + $('#params').attr('file'),
|
|
|
|
function() {
|
|
|
|
clearInterval(handle);
|
|
|
|
handle = 0;
|
|
|
|
$('#back').show();
|
|
|
|
$('#progressbar').reportprogress(100);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|