webif/var/mongoose/html/browse/crop/crop.js
hummypkg 22320536ee browse relocation, system class improvements, safe_delete improvements, auto expire, utf-8, ...
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1420 2a923420-c742-0410-a762-8d5b09965624
2013-02-25 22:31:54 +00:00

39 lines
830 B
JavaScript
Executable File

var handle = 0;
function update()
{
var perc = $('#params').attr('perc');
var file = $('#params').attr('file');
$.get('progress.jim' + '?perc=' + perc + '&file=' + file,
function(data) {
if (handle)
$('#progressbar').reportprogress(data);
});
}
$(document).ready(function() {
$('#progressbar').reportprogress(0);
$('#back').button().click(function() {
window.location = '../index.jim?dir=' + $('#params').attr('dir');
});
$('#cropit').button().click(function() {
$('#cropdiv').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);
});
});
});