Change to Bootstrap, not foundation.

This commit is contained in:
Tyrel Souza 2014-04-09 16:45:17 -04:00
parent 1afaa9eb4c
commit defa655392
10 changed files with 84 additions and 1281 deletions

View File

@ -14,11 +14,11 @@ gem 'rack-timeout'
gem 'rails', '>= 4.0.3' gem 'rails', '>= 4.0.3'
gem 'recipient_interceptor' gem 'recipient_interceptor'
gem 'sass-rails', '~> 4.0.2' gem 'sass-rails', '~> 4.0.2'
gem 'simple_form' gem 'simple_form', git: 'git@github.com:plataformatec/simple_form.git', branch: 'bootstrap-3'
gem 'title' gem 'title'
gem 'uglifier' gem 'uglifier'
gem 'unicorn' gem 'unicorn'
gem 'foundation-rails' gem 'bootstrap-sass', '<3.1'
gem 'devise' gem 'devise'
gem 'jbuilder' gem 'jbuilder'

View File

@ -1,3 +1,12 @@
GIT
remote: git@github.com:plataformatec/simple_form.git
revision: 6b685618cb011389e7a4b0430f59a88fa1e14027
branch: bootstrap-3
specs:
simple_form (3.0.1)
actionpack (~> 4.0)
activemodel (~> 4.0)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
@ -37,6 +46,8 @@ GEM
erubis (>= 2.6.6) erubis (>= 2.6.6)
binding_of_caller (0.7.2) binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
bootstrap-sass (3.0.3.0)
sass (~> 3.2)
builder (3.1.4) builder (3.1.4)
capybara (2.1.0) capybara (2.1.0)
mime-types (>= 1.16) mime-types (>= 1.16)
@ -88,9 +99,6 @@ GEM
foreman (0.63.0) foreman (0.63.0)
dotenv (>= 0.7) dotenv (>= 0.7)
thor (>= 0.13.6) thor (>= 0.13.6)
foundation-rails (5.2.2.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
high_voltage (2.1.0) high_voltage (2.1.0)
hike (1.2.3) hike (1.2.3)
i18n (0.6.9) i18n (0.6.9)
@ -166,9 +174,6 @@ GEM
sprockets-rails (~> 2.0.0) sprockets-rails (~> 2.0.0)
shoulda-matchers (2.5.0) shoulda-matchers (2.5.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
simple_form (3.0.1)
actionpack (>= 4.0.0, < 4.1)
activemodel (>= 4.0.0, < 4.1)
simplecov (0.8.2) simplecov (0.8.2)
docile (~> 1.1.0) docile (~> 1.1.0)
multi_json multi_json
@ -221,6 +226,7 @@ DEPENDENCIES
awesome_print awesome_print
better_errors better_errors
binding_of_caller binding_of_caller
bootstrap-sass (< 3.1)
capybara-webkit (>= 1.0.0) capybara-webkit (>= 1.0.0)
coffee-rails coffee-rails
database_cleaner database_cleaner
@ -231,7 +237,6 @@ DEPENDENCIES
factory_girl_rails factory_girl_rails
flutie flutie
foreman foreman
foundation-rails
high_voltage high_voltage
jbuilder jbuilder
jquery-rails jquery-rails
@ -245,7 +250,7 @@ DEPENDENCIES
rspec-rails (>= 2.14) rspec-rails (>= 2.14)
sass-rails (~> 4.0.2) sass-rails (~> 4.0.2)
shoulda-matchers shoulda-matchers
simple_form simple_form!
simplecov simplecov
spring spring
spring-commands-rspec spring-commands-rspec

View File

@ -2,6 +2,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@import 'foundation_and_overrides'; @import 'bootstrap';
@import 'campaign';
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,22 @@
$medgray: #666;
.videolisting {
label {
color: #fff;
float: left;
}
input {border: 2px inset;}
.odd {
background-color: $medgray;
padding: 10px;
}
.even {
background-color: lighten($medgray, 50);
padding: 10px;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
<%= simple_form_for(@campaign) do |frm| %> <%= simple_form_for(@campaign, html: {class: 'form-horizontal'}) do |frm| %>
<% if @campaign.errors.any? %> <% if @campaign.errors.any? %>
<div id="error_explanation"> <div id="error_explanation">
<h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2> <h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2>
<ul> <ul>
<% @campaign.errors.full_messages.each do |msg| %> <% @campaign.errors.full_messages.each do |msg| %>
<li><%= msg %></li> <li><%= msg %></li>
@ -12,44 +11,41 @@
<% end %> <% end %>
<div class="row"> <%= frm.input :clientid, label: 'Client ID' %>
<div class="small-6 medium-6 large-6 columns"> <%= frm.input :listingcode, label: 'Listing Code' %>
<%= frm.input :clientid %> <%= frm.input :websiteurl, label: 'Website URL'%>
<%= frm.input :listingcode %> <%= frm.input :advertisername, label: 'Advertiser Name' %>
<%= frm.input :billingcode %> <%= frm.input :billingcode, label: 'Billing Code' %>
<%= frm.input :advertisername %> <%= frm.input :emailaddress, label: 'Email Address' %>
<%= frm.input :address1 %> <%= frm.input :salesrep, label: 'Sales Rep' %>
<%= frm.input :address2 %> <%= frm.input :salesrepemail, label: 'Sales Rep Email' %>
<%= frm.input :city %> <%= frm.input :businessphone, label: 'Business Phone' %>
<%= frm.input :state %> <%= frm.input :contactphone, label: 'Contact Phone' %>
<%= frm.input :zip %>
<%= frm.input :emailaddress %> <%= frm.input :customerfirstname, label: 'Customer First Name' %>
<%= frm.input :customerfirstname %> <%= frm.input :customerlastname, label: 'Customer Last Name' %>
<%= frm.input :customerlastname %> <%= frm.input :address1, label: 'Address Line 1' %>
<%= frm.input :salesrep %> <%= frm.input :address2, label: 'Address Line 2' %>
<%= frm.input :salesrepemail %> <%= frm.input :city, label: 'City' %>
<%= frm.input :businessphone %> <%= frm.input :state, label: 'State' %>
<%= frm.input :contactphone %> <%= frm.input :zip, label: 'ZIP' %>
<%= frm.input :websiteurl %>
<div class="videolisting">
<%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |vidlist| %>
<div class="<%= cycle('odd','even') %>">
<%= vidlist.input :videocode, label: 'Video Code' %>
<%= vidlist.input :producttypeid, label: 'Product Type ID' %>
<%= vidlist.input :remoteassetsarchive, label: 'Remote Assets Archive' %>
<%= vidlist.input :voiceoverselection, label: 'Voiceover Selection' %>
<%= vidlist.input :musicselection, label: 'Music Selection' %>
<%= vidlist.input :clientprovidedscript, label: 'Client Provided Script' %>
<%= vidlist.input :keywords, label: 'Keywords' %>
<%= vidlist.input :focus, label: 'Focus' %>
<%= vidlist.input :notes, label: 'Notes' %>
<%= vidlist.input :asseturls, label: 'Asset Urls' %>
</div> </div>
<div class="small-6 medium-6 large-6 columns">
<ul>
<%= frm.simple_fields_for :videolistings do |vidlist| %>
<li>
<%= vidlist.input :videocode %>
<%= vidlist.input :producttypeid %>
<%= vidlist.input :remoteassetsarchive %>
<%= vidlist.input :voiceoverselection %>
<%= vidlist.input :musicselection %>
<%= vidlist.input :clientprovidedscript %>
<%= vidlist.input :keywords %>
<%= vidlist.input :focus %>
<%= vidlist.input :notes %>
<%= vidlist.input :asseturls %>
</li>
<% end %> <% end %>
</ul>
</div>
</div> </div>

View File

@ -11,11 +11,7 @@
<%= render 'layouts/header' %> <%= render 'layouts/header' %>
<%= render 'flashes' -%> <%= render 'flashes' -%>
<div class="row">
<div class="small-12 medium-12 large-12 columns">
<%= yield %> <%= yield %>
</div>
</div>
<%= render 'javascript' %> <%= render 'javascript' %>
</body> </body>
</html> </html>

View File

@ -66,7 +66,7 @@ SimpleForm.setup do |config|
config.error_notification_tag = :div config.error_notification_tag = :div
# CSS class to add for error notification helper. # CSS class to add for error notification helper.
config.error_notification_class = 'alert alert-error' config.error_notification_class = 'error_notification'
# ID to add for error notification helper. # ID to add for error notification helper.
# config.error_notification_id = nil # config.error_notification_id = nil
@ -95,7 +95,7 @@ SimpleForm.setup do |config|
# config.label_text = lambda { |label, required| "#{required} #{label}" } # config.label_text = lambda { |label, required| "#{required} #{label}" }
# You can define the class to use on all labels. Default is nil. # You can define the class to use on all labels. Default is nil.
config.label_class = 'control-label' # config.label_class = nil
# You can define the class to use on all forms. Default is simple_form. # You can define the class to use on all forms. Default is simple_form.
# config.form_class = :simple_form # config.form_class = :simple_form
@ -142,4 +142,11 @@ SimpleForm.setup do |config|
# Default class for inputs # Default class for inputs
# config.input_class = nil # config.input_class = nil
# Define the default class of the input wrapper of the boolean input.
config.boolean_label_class = 'checkbox'
# Defines if the default input wrapper class should be included in radio
# collection wrappers.
# config.include_default_input_wrapper_class = true
end end

View File

@ -1,26 +0,0 @@
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.wrappers :foundation, class: :input, hint_class: :field_with_hint, error_class: :error do |b|
b.use :html5
b.use :placeholder
b.optional :maxlength
b.optional :pattern
b.optional :min_max
b.optional :readonly
b.use :label_input
b.use :error, wrap_with: { tag: :small }
# Uncomment the following line to enable hints. The line is commented out by default since Foundation
# does't provide styles for hints. You will need to provide your own CSS styles for hints.
# b.use :hint, wrap_with: { tag: :span, class: :hint }
end
# CSS class for buttons
config.button_class = 'button'
# CSS class to add for error notification helper.
config.error_notification_class = 'alert-box alert'
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :foundation
end

View File

@ -23,4 +23,3 @@ en:
# defaults: # defaults:
# username: 'User name to sign in.' # username: 'User name to sign in.'
# password: 'No special characters, please.' # password: 'No special characters, please.'