Revert to old skool asset management

This commit is contained in:
Erik Michaels-Ober 2011-06-21 18:07:41 -07:00
parent c240df04ae
commit b74ff06722
17 changed files with 13 additions and 26 deletions

View File

@ -1,12 +1,10 @@
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc4'
gem 'coffee-script'
gem 'devise'
gem 'geokit'
gem 'haml'
gem 'therubyracer', '0.9.0', :platforms => :ruby
gem 'uglifier'
platforms :jruby do
gem 'jruby-openssl'

View File

@ -39,18 +39,12 @@ GEM
bcrypt-ruby (2.1.4-java)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.1)
crack (0.1.8)
devise (1.3.4)
bcrypt-ruby (~> 2.1.2)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
erubis (2.7.0)
execjs (1.2.0)
multi_json (~> 1.0)
geokit (1.6.0)
haml (3.1.2)
hike (1.1.0)
@ -112,9 +106,6 @@ GEM
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.28)
uglifier (1.0.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (3.7.0)
kgio (~> 2.3)
rack
@ -130,7 +121,6 @@ PLATFORMS
DEPENDENCIES
ZenTest
coffee-script
devise
geokit
haml
@ -142,6 +132,5 @@ DEPENDENCIES
therubyracer (= 0.9.0)
therubyrhino
turn
uglifier
unicorn
webmock

View File

@ -3,13 +3,13 @@
%head
%title
Adopt a Hydrant
= stylesheet_link_tag "application"
= stylesheet_link_tag "/stylesheets/application.css"
= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false"
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"
= javascript_include_tag "https://github.com/scottschiller/Snowstorm/raw/master/snowstorm-min.js"
= javascript_include_tag "application"
= javascript_include_tag "analytics"
= javascript_include_tag "/javascripts/application.js"
= javascript_include_tag "/javascripts/analytics.js"
= csrf_meta_tag
%meta{:name => "viewport", :content => "initial-scale=1.0, user-scalable=no"}
%body

View File

@ -1,4 +1,4 @@
#loader{:style => "display: none;"}
= image_tag "ajax-loader.gif"
= image_tag "/images/ajax-loader.gif"
#info_window
= yield

View File

@ -11,7 +11,7 @@
= hidden_field_tag "limit", params[:limit] || 50
= submit_tag "Find fire hydrants", :tabindex => 12
#logos
= image_tag "logos/cfa.png", :alt => "Code for America", :title => "Code for America"
= image_tag "logos/boston.png", :alt => "City of Boston", :title => "City of Boston"
= image_tag "hydrant-in-snow.jpg", :id => "hydrant-in-snow"
= image_tag "/images/logos/cfa.png", :alt => "Code for America", :title => "Code for America"
= image_tag "/images/logos/boston.png", :alt => "City of Boston", :title => "City of Boston"
= image_tag "/images/hydrant-in-snow.jpg", :id => "hydrant-in-snow"
#map_canvas

View File

@ -12,7 +12,7 @@ AdoptAHydrant::Application.configure do
config.serve_static_assets = true
# Compress both stylesheets and JavaScripts
config.assets.js_compressor = :uglifier
# config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :scss
# Specifies the header that your server uses for sending files

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -20,7 +20,7 @@ $(function() {
new google.maps.Point(0, 0),
new google.maps.Point(13.0, 18.0)
);
var shadow = new google.maps.MarkerImage('/assets/markers/shadow.png',
var shadow = new google.maps.MarkerImage('/images/markers/shadow.png',
new google.maps.Size(46.0, 37.0),
new google.maps.Point(0, 0),
new google.maps.Point(13.0, 18.0)
@ -93,7 +93,7 @@ $(function() {
}
setTimeout(function() {
point = new google.maps.LatLng(hydrant.lat, hydrant.lng);
color = '/assets/markers/' + (hydrant.user_id ? 'green' : 'red') + '.png';
color = '/images/markers/' + (hydrant.user_id ? 'green' : 'red') + '.png';
addMarker(hydrant.id, point, color);
}, i * 100);
});
@ -403,7 +403,7 @@ $(function() {
success: function(data) {
activeInfoWindow.setContent(data);
activeInfoWindow.setContent(data);
image = new google.maps.MarkerImage('/assets/markers/green.png',
image = new google.maps.MarkerImage('/images/markers/green.png',
new google.maps.Size(27.0, 37.0),
new google.maps.Point(0, 0),
new google.maps.Point(13.0, 18.0)
@ -453,7 +453,7 @@ $(function() {
},
success: function(data) {
activeInfoWindow.setContent(data);
image = new google.maps.MarkerImage('/assets/markers/red.png',
image = new google.maps.MarkerImage('/images/markers/red.png',
new google.maps.Size(27.0, 37.0),
new google.maps.Point(0, 0),
new google.maps.Point(13.0, 18.0)
@ -504,7 +504,7 @@ $(function() {
},
success: function(data) {
activeInfoWindow.setContent(data);
image = new google.maps.MarkerImage('/assets/markers/red.png',
image = new google.maps.MarkerImage('/images/markers/red.png',
new google.maps.Size(27.0, 37.0),
new google.maps.Point(0, 0),
new google.maps.Point(13.0, 18.0)