1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-14 13:25:11 -05:00
SickRage/gui/slick/js/configBackupRestore.js
JackDandy 0c765e552c Add an in progress spinner that is suitable for the dark theme.
Add dark spinner to "Add New Show" (searching indexers), "Add existing shows" (Loading Folders), Coming Eps and all config pages (when saving).
2014-10-28 00:36:02 +00:00

24 lines
958 B
JavaScript

$(document).ready(function(){
var loading = '<img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
$('#Backup').click(function() {
$("#Backup").attr("disabled", true);
$('#Backup-result').html(loading);
var backupDir = $("#backupDir").val();
$.get(sbRoot + "/config/backup", {'backupDir': backupDir})
.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();
$.get(sbRoot + "/config/restore", {'backupFile': backupFile})
.done(function (data) {
$('#Restore-result').html(data);
$("#Restore").attr("disabled", false);
});
});
});