From 715a760e661e589d454dadca9040729e651edc8a Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 18 Jun 2014 14:41:43 +0000 Subject: [PATCH] 2883: Use smart scrolling so keep the sorting and filtering selections on the page when scrolling the output. --- .../app/assets/javascripts/sizing.js | 5 ++-- .../app/views/jobs/_show_log.html.erb | 25 +++++++------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/apps/workbench/app/assets/javascripts/sizing.js b/apps/workbench/app/assets/javascripts/sizing.js index 3d60274439..71761db744 100644 --- a/apps/workbench/app/assets/javascripts/sizing.js +++ b/apps/workbench/app/assets/javascripts/sizing.js @@ -20,9 +20,10 @@ function smart_scroll_fixup(s) { } s.each(function(i, a) { - var h = window.innerHeight - $(a).offset().top; + a = $(a); + var h = window.innerHeight - a.offset().top - a.attr("data-smart-scroll-padding-bottom"); height = String(h) + "px"; - $(a).css('max-height', height); + a.css('max-height', height); }); } diff --git a/apps/workbench/app/views/jobs/_show_log.html.erb b/apps/workbench/app/views/jobs/_show_log.html.erb index 2c060cde35..85082873b3 100644 --- a/apps/workbench/app/views/jobs/_show_log.html.erb +++ b/apps/workbench/app/views/jobs/_show_log.html.erb @@ -101,15 +101,15 @@ $("#set-show-failed-only").on("click", function() {

Summary

- <% if @object.tasks_summary[:failed] > 0 %> - - <% end %> -
Log + <% if @object.tasks_summary[:failed] > 0 %> + + <% end %> + @@ -162,12 +162,7 @@ $("#set-show-failed-only").on("click", function() {
-
- - - -
- +
@@ -192,15 +187,13 @@ $("#set-show-failed-only").on("click", function() {
- - -
+
+
-
<% if !@object.log %> -- 2.30.2