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,12 +2,20 @@ | ||
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" | 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 | = link_to "Issues", dashboard_issues_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" | 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 | = 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" | 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 | :javascript | 7 | :javascript |
8 | $(function(){ | 8 | $(function(){ |
9 | $(".dash-button").live("click", function() { | 9 | $(".dash-button").live("click", function() { |
10 | $(".dash-button").removeClass("active"); | 10 | $(".dash-button").removeClass("active"); |
11 | $(this).addClass("active"); | 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,11 +35,14 @@ | ||
35 | - contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| | 35 | - contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| |
36 | = render :partial => "refs/tree_item", :locals => { :content => content } | 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 | #tree-readme-holder | 39 | #tree-readme-holder |
40 | %h3= content.name | 40 | %h3= content.name |
41 | .readme | 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 | :javascript | 47 | :javascript |
45 | $(function(){ | 48 | $(function(){ |