Commit 5205a500 authored by Efthymia Bika's avatar Efthymia Bika

Fix scrolling to activity log

parent 6e3b2677
...@@ -582,14 +582,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -582,14 +582,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="small-3 columns"> <div class="small-3 columns">
<a onclick="toggle_settings('msg', 'more_log_icon', <a onclick="toggle_settings('msg', 'more_log_icon',
'Show activity log', 'Hide activity log'); 'Show activity log', 'Hide activity log');
$('html,body').animate({scrolltop: '500px'}, 'slow');"> $('html,body').animate({scrollTop:
$('#msg_div').offset().top}, 1000);">
<i class="fa fa-plus-square-o" <i class="fa fa-plus-square-o"
id="more_log_icon">&nbsp;Show activity log</i> id="more_log_icon">&nbsp;Show activity log</i>
<a/> <a/>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" id="msg_div">
<div class="small-1 columns"></div> <div class="small-1 columns"></div>
<pre id="msg" class="small-11 columns hide"></pre> <pre id="msg" class="small-11 columns hide"></pre>
</div> </div>
......
...@@ -35,13 +35,10 @@ function toggle_msgs(data, msgDiv, append) { ...@@ -35,13 +35,10 @@ function toggle_msgs(data, msgDiv, append) {
if(msgDiv == "msg") { if(msgDiv == "msg") {
$("#show_log").removeClass("hide"); $("#show_log").removeClass("hide");
} }
$("#" + msgDiv).animate({scrollTop: "+=300px"}, "slow");
} else { } else {
$("#" + msgDiv).html(data); $("#" + msgDiv).html(data);
} }
$("#" + msgDiv).addClass("panel"); $("#" + msgDiv).addClass("panel");
// $("html,body").animate({scrollTop:
// $(document).height()}, "slow");
} else { } else {
$("#" + msgDiv).html(""); $("#" + msgDiv).html("");
$("#" + msgDiv).removeClass("panel"); $("#" + msgDiv).removeClass("panel");
......
...@@ -178,6 +178,8 @@ function call_duplicity(mode, backup_set, force) { ...@@ -178,6 +178,8 @@ function call_duplicity(mode, backup_set, force) {
build_extra_args(backup_set.include, "include", args); build_extra_args(backup_set.include, "include", args);
build_extra_args(backup_set.exclude, "exclude", args); build_extra_args(backup_set.exclude, "exclude", args);
args.push("-v8"); args.push("-v8");
$('html,body').animate({
scrollTop: $("#msg_div").offset().top}, 1000);
break; break;
case "restore": case "restore":
...@@ -244,9 +246,6 @@ function call_duplicity(mode, backup_set, force) { ...@@ -244,9 +246,6 @@ function call_duplicity(mode, backup_set, force) {
wProcess = spawn(DUPLICITY_PATH, args); wProcess = spawn(DUPLICITY_PATH, args);
} }
$("html,body").animate(
{scrollTop: $("#msg").offset().top}, "slow");
var output_str = ""; var output_str = "";
function dup_call_out(data) { function dup_call_out(data) {
if(mode == "status") { if(mode == "status") {
......
...@@ -244,14 +244,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -244,14 +244,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div class="small-3 columns"> <div class="small-3 columns">
<a onclick="toggle_settings('msg', 'more_log_icon', <a onclick="toggle_settings('msg', 'more_log_icon',
'Show activity log', 'Hide activity log'); 'Show activity log', 'Hide activity log');
$('html,body').animate({scrolltop: '500px'}, 'slow');"> $('html,body').animate({scrollTop:
$('#msg_div').offset().top}, 1000);">
<i class="fa fa-plus-square-o" <i class="fa fa-plus-square-o"
id="more_log_icon">&nbsp;Show activity log</i> id="more_log_icon">&nbsp;Show activity log</i>
<a/> <a/>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" id="msg_div">
<div class="small-1 columns"></div> <div class="small-1 columns"></div>
<pre id="msg" class="small-11 columns hide"></pre> <pre id="msg" class="small-11 columns hide"></pre>
</div> </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