Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #27 from alphagov/clean_up_assets
Browse files Browse the repository at this point in the history
Clean up assets
  • Loading branch information
jystewart committed Oct 14, 2012
2 parents 603a672 + 91c9548 commit daa2bfb
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 15 deletions.
17 changes: 17 additions & 0 deletions app/assets/javascripts/application.js
@@ -0,0 +1,17 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery.min
//= require bootstrap.min
//= require chosen.jquery.min
//= require jquery.tablesorter.min
//= require_tree .
18 changes: 15 additions & 3 deletions app/assets/stylesheets/application.css
@@ -1,7 +1,19 @@
/*
# app/assets/stylesheets/application.css
*= require formtastic-bootstrap
*/
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*= require bootstrap.min
*= require chosen
*= require formtastic-bootstrap
*/

body {
padding-top: 40px;
Expand Down
2 changes: 0 additions & 2 deletions app/views/artefacts/_form.html.erb
Expand Up @@ -88,12 +88,10 @@
<% end %>
<%= content_for :extra_javascript do %>
<%= javascript_include_tag('chosen.jquery.min.js', 'artefacts') %>
<script type="text/javascript">
$(".chzn-select").chosen();
if ($('.artefact-section').size() == 1) {
$('.remove-section').hide();
}
</script>
<% end %>
<% content_for :extra_headers, stylesheet_link_tag('chosen') %>
1 change: 0 additions & 1 deletion app/views/artefacts/index.html.erb
Expand Up @@ -57,7 +57,6 @@
</div><!-- ./row-fluid-->

<%= content_for :extra_javascript do %>
<%= javascript_include_tag 'jquery.tablesorter.min.js' %>
<script type="text/javascript">
$(function () {
$('#artefact-list').tablesorter();
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Expand Up @@ -3,12 +3,13 @@
<head>
<title><%= yield :page_title %> | GOV.UK Panopticon</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'bootstrap.min.css', 'application.css' %>
<%= stylesheet_link_tag 'application.css' %>
<%= yield :extra_headers %>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<%= javascript_include_tag "html5" %>
<![endif]-->
<%= javascript_include_tag "application" %>
</head>

<body>
Expand Down Expand Up @@ -58,7 +59,6 @@
</footer>
</section>

<%= javascript_include_tag('jquery.min.js', 'bootstrap.min.js') %>
<%= yield :extra_javascript %>

</body>
Expand Down
8 changes: 1 addition & 7 deletions config/application.rb
Expand Up @@ -25,13 +25,7 @@ class Application < Rails::Application
config.assets.version = '1.0'
config.assets.prefix = '/assets'

config.assets.precompile += %W(application.css bootstrap.min.css bootstrap-responsive.min.css chosen.css
artefacts.js bootstrap.min.js chosen.jquery.min.js jquery.tablesorter.min.js jquery.min.js
asc.gif bg.gif desc.gif
chosen-sprite.png
glyphicons-halflings-white.png glyphicons-halflings.png
header-crown.png icon-answer.png icon-custom-application.png icon-guide.png icon-local_transaction.png
icon-place.png icon-programme.png icon-service.png icon-transaction.png icon-transaction.png icon-completed_transaction.png icon-smart-answer.png html5.js)
config.assets.precompile += %W(html5.js)

# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/app/repositories)
Expand Down
File renamed without changes.

0 comments on commit daa2bfb

Please sign in to comment.