diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-12 13:01:54 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-12 13:01:54 +0400 |
commit | fcb0b76c32b3512ead419a4451e9cc632270fc89 (patch) | |
tree | bc96754197fbf17a940e0e85a5f53703f6b67ef6 /app/views/projects/refs | |
parent | 9fd6c3d591fb56e50a9cdbbaac557383e3ef86a7 (diff) |
Load last commit for files per 10 items.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/refs')
-rw-r--r-- | app/views/projects/refs/logs_tree.js.haml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/projects/refs/logs_tree.js.haml b/app/views/projects/refs/logs_tree.js.haml index e7343e0997f..948a21aa816 100644 --- a/app/views/projects/refs/logs_tree.js.haml +++ b/app/views/projects/refs/logs_tree.js.haml @@ -7,3 +7,13 @@ var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}"); row.find("td.tree_time_ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}'); row.find("td.tree_commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}'); + +- if @logs.present? + :plain + var current_url = location.href.replace(/\/?$/, '/'); + var log_url = '#{project_tree_url(@project, tree_join(@ref, @path || '/'))}'.replace(/\/?$/, '/'); + if(current_url == log_url) { + // Load 10 more commit log for each file in tree + // if we still on the same page + ajaxGet('#{logs_file_project_ref_path(@project, @ref, @path || '/', offset: (@offset + @limit))}'); + } |