2014-06-19 10:31:44 -04:00
|
|
|
$(document).ready(function(){
|
2014-10-24 09:16:46 -04:00
|
|
|
var loading = '<img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
|
2014-06-19 10:31:44 -04:00
|
|
|
|
|
|
|
$('#Backup').click(function() {
|
|
|
|
$("#Backup").attr("disabled", true);
|
|
|
|
$('#Backup-result').html(loading);
|
|
|
|
var backupDir = $("#backupDir").val();
|
2014-12-13 07:14:29 -05:00
|
|
|
$.get(sbRoot + "/config/backup/", {'backupDir': backupDir})
|
2014-06-19 10:31:44 -04:00
|
|
|
.done(function (data) {
|
|
|
|
$('#Backup-result').html(data);
|
|
|
|
$("#Backup").attr("disabled", false);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$('#Restore').click(function() {
|
|
|
|
$("#Restore").attr("disabled", true);
|
|
|
|
$('#Restore-result').html(loading);
|
|
|
|
var backupFile = $("#backupFile").val();
|
2014-12-13 07:14:29 -05:00
|
|
|
$.get(sbRoot + "/config/restore/", {'backupFile': backupFile})
|
2014-06-19 10:31:44 -04:00
|
|
|
.done(function (data) {
|
|
|
|
$('#Restore-result').html(data);
|
|
|
|
$("#Restore").attr("disabled", false);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|