From 7508bb13390981d894344e471444bd7be948e358 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Mon, 27 Feb 2012 20:58:37 +0200 Subject: [PATCH] Fix bugs to force new design work. Minor refactor and improvements. Refs #193 --- app/assets/stylesheets/application.scss | 6 +----- app/views/layouts/application.html.haml | 4 +--- app/views/projects/_submenu.html.haml | 2 +- app/views/wiki/_diff_data.html.haml | 3 +++ config/environments/production.rb | 3 +++ vendor/assets/javascripts/gollum/gollum.js | 9 +++------ 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index cd763fe80..509670963 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,7 +1,3 @@ -//@import "vendor"; +@import "vendor"; @import "main"; @import "custom"; - -//= require main -//= require vendor -//= require custom diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a55b2f9a1..91784d03a 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -20,9 +20,7 @@ .search .pic .field - %input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}", - :onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}", - :type => "text", :value => "#{t "layout.search"}"} + %input.gray{:onclick => "if(this.value=='#{t "layout.search"}'){this.value='';this.className='black';}", :onblur => "if(this.value==''){this.value='#{t "layout.search"}';this.className='gray';}", :type => "text", :value => "#{t "layout.search"}"} .user .avatar= image_tag 'ava.png', :alt => 'avatar', :height => "30" .profile diff --git a/app/views/projects/_submenu.html.haml b/app/views/projects/_submenu.html.haml index 3fb11e57d..ca8013f89 100644 --- a/app/views/projects/_submenu.html.haml +++ b/app/views/projects/_submenu.html.haml @@ -9,6 +9,6 @@ %li= link_to t("project_menu.commits"), commits_path(@project), {:class => (act == :index && contr == :commits) ? 'active' : ''} %li= link_to t("project_menu.builds"), project_build_lists_path(@project), {:class => (act == :index && contr == :builds) ? 'active' : ''} %li= link_to t("project_menu.tracker"), project_issues_path(@project), {:class => (act == :index && contr == :issues) ? 'active' : ''} - %li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => (act == :index && contr == :wiki) ? 'active' : ''} + %li= link_to t("project_menu.wiki"), project_wiki_index_path(@project), {:class => contr == :wiki ? 'active' : ''} %li= link_to t("project_menu.readme"), "#" #pending %li= link_to t("project_menu.settings"), edit_project_path(@project), {:class => (act == :edit && contr == :projects) ? 'active' : ''} diff --git a/app/views/wiki/_diff_data.html.haml b/app/views/wiki/_diff_data.html.haml index da8920b6a..e0a5442c5 100644 --- a/app/views/wiki/_diff_data.html.haml +++ b/app/views/wiki/_diff_data.html.haml @@ -1 +1,4 @@ +.blob_header +  .size= h(diff.deleted_file ? diff.a_path : diff.b_path) +.clear .diff_data.highlight= render_diff(diff) \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index ae3430fbf..79767a16e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -57,6 +57,9 @@ Rosa::Application.configure do # Generate digests for assets URLs config.assets.digest = true + + # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + config.assets.precompile += %w() end # require 'stub_xml_rpc' diff --git a/vendor/assets/javascripts/gollum/gollum.js b/vendor/assets/javascripts/gollum/gollum.js index e838d956e..d5ee7dfc2 100755 --- a/vendor/assets/javascripts/gollum/gollum.js +++ b/vendor/assets/javascripts/gollum/gollum.js @@ -46,12 +46,9 @@ $(document).ready(function() { } }); - // ATTENTION: santaux edited these lines - if ($('a.action-compare-revision').length) { - $('a.action-compare-revision').click(function() { - $("#version-form").submit(); - }); - } + $('a.action-compare-revision').click(function() { + $("#version-form").submit(); + }); //}