Commit 7d3e5804 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Load empty backup page when nothing selected

parent e2859ad4
......@@ -4,26 +4,24 @@
<title>Backup List</title>
<script type="text/javascript">
$(document).ready(function() {
if(typeof clouds === 'undefined') {
load_data_from_file(CLOUDS_CONF_FILE, populate_clouds);
} else {
populate_clouds("");
}
if(typeof selected_backup != 'undefined') {
$.each(backups, function(i, backup) {
if(backup.name == selected_backup) {
$("#selected-bar").html(backup.name);
$("#selected-bar").show();
load_backup(backup);
return;
}
});
} else {
$("#selected-bar").hide();
disable_actions(true);
}
});
if(typeof clouds === 'undefined') {
load_data_from_file(CLOUDS_CONF_FILE, populate_clouds);
} else {
populate_clouds("");
}
if(typeof selected_backup != 'undefined') {
$.each(backups, function(i, backup) {
if(backup.name == selected_backup) {
$("#selected-bar").html(backup.name);
$("#selected-bar").show();
load_backup(backup);
return;
}
});
} else {
$("#selected-bar").hide();
load_backup();
}
function activate_li(id) {
$("li").each(function(i, li) {
......@@ -114,8 +112,7 @@
$("#status_link").prop("disabled", disable);
$("#timeview_link").prop("disabled", disable);
if(disable) {
$("#backup_details_link").click(function(e) { e.preventDefault(); });
$("#backup_details_link").unbind("click");
$("#backup_details_link").attr("click", "");
$("#status_link").click(function(e) { e.preventDefault(); });
$("#status_link").unbind("click");
$("#timeview_link").click(function(e) { e.preventDefault(); });
......@@ -273,6 +270,11 @@
onclick="if(check_fields(false)) save_backup_set();">
<i class="fa fa-floppy-o"></i>&nbsp;Save</a>
</div>
<div class="small-6 columns">
<a id="go_to_restore_button" class="button radius left small"
onclick="">
<i class="fa fa-cloud-download"></i>&nbsp;Restore</a>
</div>
</div>
</form>
</div>
......
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