From 31765243fa2337d0b390916f03bbcdfcd7de72a7 Mon Sep 17 00:00:00 2001 From: Ako0 Date: Fri, 23 Aug 2013 17:06:51 -0700 Subject: [PATCH] directive to markup log in resources --- ui/js/controllers/logviewer.js | 7 +++++-- ui/logviewer.html | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/js/controllers/logviewer.js b/ui/js/controllers/logviewer.js index f83ba590f..f503ba583 100644 --- a/ui/js/controllers/logviewer.js +++ b/ui/js/controllers/logviewer.js @@ -13,8 +13,6 @@ treeherder.controller('LogviewerCtrl', } - $scope.displayedStep; - $scope.scrollTo = function(step, linenumber) { $location.hash('lv-line-'+linenumber); $anchorScroll(); @@ -43,6 +41,11 @@ treeherder.controller('LogviewerCtrl', // @@@ we should display some kind of "loading" indicator in the // logs area in case the log is really large $scope.log_text = $scope.full_log[step.order]; + + //so that all displayed steps are auto scrolled to top + $timeout(function() { + document.getElementById("lv-log-container").scrollTop = 0; + }); }; $scope.init = function() { diff --git a/ui/logviewer.html b/ui/logviewer.html index cd6db9bdd..9c127baf0 100644 --- a/ui/logviewer.html +++ b/ui/logviewer.html @@ -59,7 +59,11 @@ +<<<<<<< HEAD +======= + +>>>>>>> directive to markup log in resources