forked from hummypkg/webif
4861459aec
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@236 2a923420-c742-0410-a762-8d5b09965624
58 lines
1.5 KiB
JavaScript
Executable File
58 lines
1.5 KiB
JavaScript
Executable File
|
|
function refresh_files()
|
|
{
|
|
$('#backup_files').load('/cgi-bin/backup/files.jim', function() {
|
|
$('input.restore').change(function() {
|
|
$('#restore_button').removeAttr('disabled')
|
|
.button('option', 'disabled', false);
|
|
$('#delete_button').removeAttr('disabled')
|
|
.button('option', 'disabled', false);
|
|
});
|
|
});
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$('button').button();
|
|
|
|
refresh_files();
|
|
|
|
$('#backup_button').click(function() {
|
|
$('#backup_working').slideDown();
|
|
$('#results').load('/cgi-bin/backup/backup.jim?' +
|
|
$('#backup_name').serialize(), function() {
|
|
$('#results').slideDown(function() {
|
|
$('#backup_working').slideUp();
|
|
refresh_files();
|
|
});
|
|
});
|
|
});
|
|
$('#delete_button').click(function() {
|
|
var backup = $('input.restore').val();
|
|
if (confirm('Confirm deletion of ' + backup))
|
|
{
|
|
$('#results').load('/cgi-bin/backup/delete.jim?' +
|
|
$('input.restore').serialize(), function() {
|
|
$('#results').slideDown(function() {
|
|
refresh_files();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
$('#restore_button').click(function() {
|
|
$('#restore_working').slideDown();
|
|
var backup = $('input.restore').val();
|
|
if (confirm('Are you sure you wish to erase all scheduled ' +
|
|
'recordings and restore ' + backup + '?'))
|
|
{
|
|
$('#results').load('/cgi-bin/backup/restore.jim?' +
|
|
$('input.restore').serialize(), function() {
|
|
$('#results').slideDown(function() {
|
|
$('#restore_working').slideUp();
|
|
refresh_files();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|