Sha256: e7ade9a07c72e1050cd5f5c9be64f9b35cbebfa44788b3a6bf557423ca1904a0

Contents?: true

Size: 458 Bytes

Versions: 5

Compression:

Stored size: 458 Bytes

Contents

var scrolledToBottom = ($(window).scrollTop() + $(window).height() == $(document).height());

var lines = '<%=j render :partial => 'output_line_set', :collection => @line_sets %>';
var target = $("div.terminal div.printable");

<% if @since %>
  target.append(lines);
<% else %>
  target.html(lines);
<% end %>

<%= render partial: 'refresh', formats: :js %>

if (scrolledToBottom) {
  $("html, body").animate({ scrollTop: $(document).height() }, "slow");
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_remote_execution-15.0.1 app/views/template_invocations/show.js.erb
foreman_remote_execution-15.0.0 app/views/template_invocations/show.js.erb
foreman_remote_execution-14.1.4 app/views/template_invocations/show.js.erb
foreman_remote_execution-14.1.3 app/views/template_invocations/show.js.erb
foreman_remote_execution-14.1.2 app/views/template_invocations/show.js.erb