Tree ajax log. progress bar & refactoring
This commit is contained in:
parent
1a2bacfb4b
commit
f88a2617e6
8 changed files with 53 additions and 18 deletions
|
@ -29,12 +29,13 @@
|
|||
%td
|
||||
%td
|
||||
|
||||
- index = 0
|
||||
- contents.select{ |i| i.is_a?(Grit::Tree)}.each do |content|
|
||||
= render :partial => "refs/tree_item", :locals => { :content => content }
|
||||
= render :partial => "refs/tree_item", :locals => { :content => content, :index => (index += 1) }
|
||||
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content|
|
||||
= render :partial => "refs/tree_item", :locals => { :content => content }
|
||||
= render :partial => "refs/tree_item", :locals => { :content => content, :index => (index += 1) }
|
||||
- contents.select{ |i| i.is_a?(Grit::Submodule)}.each do |content|
|
||||
= render :partial => "refs/submodule_item", :locals => { :content => content }
|
||||
= render :partial => "refs/submodule_item", :locals => { :content => content, :index => (index += 1) }
|
||||
|
||||
- if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first
|
||||
.file_holder#README
|
||||
|
@ -58,8 +59,9 @@
|
|||
|
||||
});
|
||||
|
||||
// Load last commit log for each file in tree
|
||||
$(window).load(function(){
|
||||
$.ajax({type: "GET", url: '#{@logs_path}', dataType: "script"});
|
||||
ajaxGet('#{@logs_path}');
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue