Commit e7d22219 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Re-arrange tabs

Remove redundant Contents tab
Move Status tab after Timeview
Rename Backup button to Backup Now
parent b9022892
......@@ -154,20 +154,16 @@
function disable_actions(disable) {
$("#restore_details_link").prop("disabled", disable);
$("#contents_link").prop("disabled", disable);
$("#status_link").prop("disabled", disable);
$("#timeview_link").prop("disabled", disable);
if(disable) {
$("#restore_details_link").click(function(e) { e.preventDefault(); });
$("#contents_link").click(function(e) { e.preventDefault(); });
$("#contents_link").unbind("click");
$("#status_link").click(function(e) { e.preventDefault(); });
$("#status_link").unbind("click");
$("#timeview_link").click(function(e) { e.preventDefault(); });
$("#timeview_link").unbind("click");
} else {
$("#restore_details_link").click(function(e) { return true; });
$("#contents_link").click(function(e) { load_contents(); });
$("#status_link").click(function(e) { load_status(); });
$("#timeview_link").click(function(e) { load_timeview(); });
}
......@@ -212,14 +208,11 @@
<a href="#restore_details" id="restore_details_link">Restore</a>
</li>
<li class="tab-title radius">
<a href="#contents" id="contents_link">Contents</a>
<a href="#timeview" id="timeview_link">Timeview</a>
</li>
<li class="tab-title radius">
<a href="#status" id="status_link">Status</a>
</li>
<li class="tab-title radius">
<a href="#timeview" id="timeview_link">Timeview</a>
</li>
</ul>
<div class="tabs-content">
<div class="content" id="backup_details">
......@@ -308,7 +301,7 @@
<div class="small-6 columns">
<a id="backup_button" class="button radius left small"
onclick="if(check_fields(false)) backup(false);">
<i class="fa fa-cloud-upload"></i>&nbsp;Backup</a>
<i class="fa fa-cloud-upload"></i>&nbsp;Backup Now</a>
</div>
<div class="small-6 columns">
<a id="save_button" class="button radius right small success"
......@@ -383,7 +376,6 @@
</div>
</div>
</div>
<div class="content" id="contents"></div>
<div class="content" id="status"></div>
<div class="content" id="timeview">
<div class="clearfix">
......
......@@ -170,29 +170,3 @@ function load_status() {
exec(dup_cmd, {maxBuffer: 1000*1024} , puts);
}
}
function load_contents() {
$("#loader").show();
$("#contents").html("");
function puts(error, stdout, stderr) {
if(error) {
$("#msg").html(error);
$("#msg").addClass("panel");
} else {
$("#msg").html("");
$("#msg").removeClass("panel");
$("#contents").html(stdout.replace(/(?:\r\n|\r|\n)/g, '<br />'));
}
$("#loader").hide();
}
var dup_cmd = "duplicity list-current-files swift://" + container;
if(process.platform == 'win32') {
var cmd = build_win_commands();
exec(CYGWIN_BASH + " -c '" + cmd + dup_cmd + "'", puts);
} else {
set_envs();
exec(dup_cmd , puts);
}
}
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