Commit d567b23bf053cee78fb7218cbe6d15d615fea582
Exists in
master
and in
4 other branches
Merge branch 'master' into bulk_repo_import
Conflicts: app/views/refs/_tree.html.haml
Showing
5 changed files
with
32 additions
and
4 deletions
Show diff stats
723 Bytes
app/assets/stylesheets/projects.css.scss
app/views/dashboard/_menu.html.haml
... | ... | @@ -2,12 +2,20 @@ |
2 | 2 | = link_to "Activities", dashboard_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_path) || current_page?(root_path) }", :id => "activities_slide" |
3 | 3 | = link_to "Issues", dashboard_issues_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" |
4 | 4 | = link_to "Merge Requests", dashboard_merge_requests_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" |
5 | - | |
5 | + %img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"} | |
6 | 6 | |
7 | 7 | :javascript |
8 | 8 | $(function(){ |
9 | 9 | $(".dash-button").live("click", function() { |
10 | 10 | $(".dash-button").removeClass("active"); |
11 | 11 | $(this).addClass("active"); |
12 | - }) | |
12 | + }); | |
13 | + | |
14 | + $(".dash-button").live("ajax:before", function() { | |
15 | + $(".dashboard-loader").show(); | |
16 | + }); | |
17 | + | |
18 | + $(".dash-button").live("ajax:complete", function() { | |
19 | + $(".dashboard-loader").hide(); | |
20 | + }); | |
13 | 21 | }); | ... | ... |
app/views/refs/_tree.html.haml
... | ... | @@ -35,11 +35,14 @@ |
35 | 35 | - contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| |
36 | 36 | = render :partial => "refs/tree_item", :locals => { :content => content } |
37 | 37 | |
38 | - - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme\.(md|markdown)$/i }.first | |
38 | + - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first | |
39 | 39 | #tree-readme-holder |
40 | 40 | %h3= content.name |
41 | 41 | .readme |
42 | - = markdown(encode content.data) | |
42 | + - if content.name =~ /\.(md|markdown)$/i | |
43 | + = markdown(encode content.data) | |
44 | + - else | |
45 | + = simple_format(encode content.data) | |
43 | 46 | |
44 | 47 | :javascript |
45 | 48 | $(function(){ | ... | ... |