Commit 0230ee1f authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Disable buttons and show loader if running backup

parent d63e50dc
......@@ -4,6 +4,15 @@
<title>Backup List</title>
<script type="text/javascript">
function disable_buttons(disable) {
$("#backup_button").attr("disabled", disable);
if(disable) {
$("#backup_button").attr("onclick", "");
} else {
$("#backup_button").attr("onclick", "if(check_fields()) backup(false);");
}
}
if(typeof clouds === 'undefined') {
load_data_from_file(CLOUDS_CONF_FILE, populate_clouds);
} else {
......@@ -13,6 +22,11 @@
$("#selected-bar").html(selected_backup);
$("#selected-bar").show();
load_backup(backups[selected_backup]);
if(typeof backups[selected_backup].last_status != 'undefined' &&
backups[selected_backup].last_status == "Running") {
disable_buttons(true);
$("#loader").show();
}
} else {
$("#selected-bar").hide();
load_backup();
......@@ -121,15 +135,6 @@
}
}
function disable_buttons(disable) {
$("#backup_button").attr("disabled", disable);
if(disable) {
$("#backup_button").attr("onclick", "");
} else {
$("#backup_button").attr("onclick", "if(check_fields()) backup(false);");
}
}
function check_fields() {
return(check_directory("directory")
&& check_cloud()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment