Commit d567b23b authored by Jeremy Mack's avatar Jeremy Mack

Merge branch 'master' into bulk_repo_import

Conflicts:
	app/views/refs/_tree.html.haml
parents 3a144328 713802fd
var Loader = {
img_src: "/assets/ajax-loader.gif",
html:
function(width) {
img = $("<img>");
img.attr("width", width);
img.attr("src", this.img_src);
return img;
}
}
...@@ -581,3 +581,9 @@ h4.middle-panel { ...@@ -581,3 +581,9 @@ h4.middle-panel {
} }
} }
} }
.dashboard-loader {
float:right;
margin-right:30px;
display:none;
}
...@@ -2,12 +2,20 @@ ...@@ -2,12 +2,20 @@
= 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" = 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"
= link_to "Issues", dashboard_issues_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" = link_to "Issues", dashboard_issues_path, :remote => true, :class => "button-small dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
= 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" = 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"
%img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
:javascript :javascript
$(function(){ $(function(){
$(".dash-button").live("click", function() { $(".dash-button").live("click", function() {
$(".dash-button").removeClass("active"); $(".dash-button").removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
}) });
$(".dash-button").live("ajax:before", function() {
$(".dashboard-loader").show();
});
$(".dash-button").live("ajax:complete", function() {
$(".dashboard-loader").hide();
});
}); });
...@@ -35,11 +35,14 @@ ...@@ -35,11 +35,14 @@
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| - 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 }
- if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme\.(md|markdown)$/i }.first - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first
#tree-readme-holder #tree-readme-holder
%h3= content.name %h3= content.name
.readme .readme
= markdown(encode content.data) - if content.name =~ /\.(md|markdown)$/i
= markdown(encode content.data)
- else
= simple_format(encode content.data)
:javascript :javascript
$(function(){ $(function(){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment