Upgrade to Bootstrap 2.0.2
This commit is contained in:
parent
d4430ef794
commit
c76da373a1
File diff suppressed because it is too large
Load Diff
|
@ -105,8 +105,7 @@ $(function() {
|
|||
$('#address').parent().addClass('error');
|
||||
$('#address').focus();
|
||||
} else {
|
||||
$('#address_label').removeClass('error', 500);
|
||||
$('#address').removeClass('error', 500);
|
||||
$('#address').parent().removeClass('error');
|
||||
var i = -1;
|
||||
$(data).each(function(index, thing) {
|
||||
if($.inArray(thing.id, thingIds) == -1) {
|
||||
|
@ -161,8 +160,7 @@ $(function() {
|
|||
$('#address').parent().addClass('error');
|
||||
$('#address').focus();
|
||||
} else {
|
||||
$('#address_label').removeClass('error', 500);
|
||||
$('#address').removeClass('error', 500);
|
||||
$('#address').parent().removeClass('error');
|
||||
addMarkersAround(data[0], data[1]);
|
||||
var center = new google.maps.LatLng(data[0], data[1]);
|
||||
map.setCenter(center);
|
||||
|
@ -695,8 +693,4 @@ $(function() {
|
|||
return false;
|
||||
});
|
||||
$('.alert-message').alert();
|
||||
$('#tos').modal({
|
||||
backdrop: true,
|
||||
keyboard: true
|
||||
});
|
||||
});
|
File diff suppressed because it is too large
Load Diff
|
@ -18,15 +18,10 @@ h2 {
|
|||
margin: 10px 0;
|
||||
}
|
||||
|
||||
form.form-stacked {
|
||||
padding-left: 0;
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
form.form-stacked fieldset.control-group {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
text-align: left;
|
||||
}
|
||||
|
@ -58,10 +53,6 @@ form select, button.btn, input[type="submit"].btn {
|
|||
width: 210px;
|
||||
}
|
||||
|
||||
/* Copied from Bootstrap 2.0-wip
|
||||
* Modifications:
|
||||
* width: 180px
|
||||
*/
|
||||
form input.search-query {
|
||||
-moz-border-radius: 14px;
|
||||
-webkit-border-radius: 14px;
|
||||
|
@ -74,77 +65,11 @@ form input.search-query {
|
|||
|
||||
.sidebar p {
|
||||
padding: 0 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a.btn {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
/* Copied from Bootstrap 2.0-wip */
|
||||
.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.control-group.error input, .control-group.error textarea {
|
||||
color: #b94a48;
|
||||
border-color: #ee5f5b;
|
||||
}
|
||||
|
||||
.control-group.error input:focus, .control-group.error textarea:focus {
|
||||
border-color: #e9322d;
|
||||
-webkit-box-shadow: 0 0 6px #f8b9b7;
|
||||
-moz-box-shadow: 0 0 6px #f8b9b7;
|
||||
box-shadow: 0 0 6px #f8b9b7;
|
||||
}
|
||||
|
||||
.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
|
||||
color: #b94a48;
|
||||
background-color: #fce6e6;
|
||||
border-color: #b94a48;
|
||||
}
|
||||
|
||||
.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
.control-group.warning input, .control-group.warning textarea {
|
||||
color: #c09853;
|
||||
border-color: #ccae64;
|
||||
}
|
||||
|
||||
.control-group.warning input:focus, .control-group.warning textarea:focus {
|
||||
border-color: #be9a3f;
|
||||
-webkit-box-shadow: 0 0 6px #e5d6b1;
|
||||
-moz-box-shadow: 0 0 6px #e5d6b1;
|
||||
box-shadow: 0 0 6px #e5d6b1;
|
||||
}
|
||||
|
||||
.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
|
||||
color: #c09853;
|
||||
background-color: #d2b877;
|
||||
border-color: #c09853;
|
||||
}
|
||||
|
||||
.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
.control-group.success input, .control-group.success textarea {
|
||||
color: #468847;
|
||||
border-color: #57a957;
|
||||
}
|
||||
|
||||
.control-group.success input:focus, .control-group.success textarea:focus {
|
||||
border-color: #458845;
|
||||
-webkit-box-shadow: 0 0 6px #9acc9a;
|
||||
-moz-box-shadow: 0 0 6px #9acc9a;
|
||||
box-shadow: 0 0 6px #9acc9a;
|
||||
}
|
||||
|
||||
.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
|
||||
color: #468847;
|
||||
background-color: #bcddbc;
|
||||
border-color: #468847;
|
||||
width: 188px;
|
||||
}
|
||||
|
||||
.table {
|
||||
|
@ -176,32 +101,18 @@ a.btn {
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
border-right: 1px solid #ccc;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar fieldset.control-group {
|
||||
.sidebar .control-group {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* Copied from Bootstrap 2.0-wip
|
||||
* Modifications:
|
||||
* padding-bottom: 10px
|
||||
* margin-top: 10px
|
||||
* margin-bottom: 10px
|
||||
*/
|
||||
.sidebar fieldset.form-actions {
|
||||
.sidebar .form-actions {
|
||||
padding: 17px 20px 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #f5f5f5;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.sidebar p#tagline {
|
||||
|
@ -269,9 +180,13 @@ fieldset {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.modal {
|
||||
max-height: 500px;
|
||||
overflow: auto;
|
||||
#tos {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#tos p {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.upcase {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
class JavascriptsController < ApplicationController
|
||||
end
|
|
@ -1,17 +1,17 @@
|
|||
- if flash[:notice]
|
||||
.alert-message.block-message.info.fade.in{:"data-alert" => true}
|
||||
.alert.alert-info.fade.in{:"data-alert" => true}
|
||||
%a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
|
||||
×
|
||||
%p
|
||||
= flash[:notice]
|
||||
- if flash[:warning]
|
||||
.alert-message.block-message.warning.fade.in{:"data-alert" => true}
|
||||
.alert.fade.in{:"data-alert" => true}
|
||||
%a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
|
||||
×
|
||||
%p
|
||||
= flash[:warning]
|
||||
- if flash[:error]
|
||||
.alert-message.block-message.error.fade.in{:"data-alert" => true}
|
||||
.alert.alert-error.fade.in{:"data-alert" => true}
|
||||
%a{:class => "close", :"data-dismiss" => "alert", :href => "#"}
|
||||
×
|
||||
%p
|
||||
|
|
|
@ -11,13 +11,9 @@
|
|||
= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false&language=#{I18n.locale}"
|
||||
= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
||||
= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"
|
||||
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-twipsy.min.js"
|
||||
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-alerts.min.js"
|
||||
= javascript_include_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.min.js"
|
||||
= javascript_include_tag javascript_path
|
||||
= javascript_include_tag "application"
|
||||
%script{:type => "text/javascript"}
|
||||
var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-20825280-2"]),_gaq.push(["_setDomainName",".adoptahydrant.org"]),_gaq.push(["_trackPageview"]),function(){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}();
|
||||
= stylesheet_link_tag "http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"
|
||||
= stylesheet_link_tag "screen"
|
||||
= stylesheet_link_tag "application"
|
||||
%body
|
||||
= yield
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%h2
|
||||
= t("titles.edit_profile")
|
||||
= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :class => "form-stacked", :method => :put} do |f|
|
||||
= form_for resource, :as => resource_name, :url => password_path(resource_name), :html => {:id => "edit_form", :method => :put} do |f|
|
||||
= f.hidden_field "reset_password_token"
|
||||
%fieldset.control-group
|
||||
= f.label "password", t("labels.password_new"), :id => "user_password_label"
|
||||
|
|
|
@ -1,65 +1,65 @@
|
|||
= form_for :user, :html => {:id => "combo-form", :class => "form-stacked"} do |f|
|
||||
#common_fields
|
||||
%fieldset.control-group
|
||||
= form_for :user, :html => {:id => "combo-form", :class => "form-vertical"} do |f|
|
||||
%fieldset#common_fields
|
||||
.control-group
|
||||
%label{:for => "user_email", :id => "user_email_label"}
|
||||
= t("labels.email")
|
||||
%small
|
||||
= image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
|
||||
= f.email_field "email", :value => params[:user] ? params[:user][:email] : nil
|
||||
%fieldset.control-group.radio
|
||||
.control-group.radio
|
||||
= f.label "new" , radio_button_tag("user", "new", true).html_safe + t("labels.user_new")
|
||||
= f.label "existing", radio_button_tag("user", "existing").html_safe + t("labels.user_existing")
|
||||
#user_sign_up_fields
|
||||
%fieldset.control-group
|
||||
%fieldset#user_sign_up_fields
|
||||
.control-group
|
||||
%label{:for => "user_name", :id => "user_name_label"}
|
||||
= t("labels.name")
|
||||
%small
|
||||
= t("captions.public")
|
||||
= f.text_field "name"
|
||||
%fieldset.control-group
|
||||
.control-group
|
||||
%label{:for => "user_organization", :id => "user_organization_label"}
|
||||
= t("labels.organization")
|
||||
%small
|
||||
= t("captions.public")
|
||||
= f.text_field "organization"
|
||||
%fieldset.control-group
|
||||
.control-group
|
||||
%label{:for => "user_voice_number", :id => "user_voice_number_label"}
|
||||
= t("labels.voice_number")
|
||||
%small
|
||||
= image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
|
||||
= f.telephone_field "voice_number", :placeholder => t("defaults.voice_number")
|
||||
%fieldset.control-group
|
||||
.control-group
|
||||
%label{:for => "user_sms_number", :id => "user_sms_number_label"}
|
||||
= t("labels.sms_number")
|
||||
%small
|
||||
= image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
|
||||
= f.telephone_field "sms_number", :placeholder => t("defaults.sms_number")
|
||||
%fieldset.control-group
|
||||
.control-group
|
||||
%label{:for => "user_password_confirmation", :id => "user_password_confirmation_label"}
|
||||
= t("labels.password_choose")
|
||||
%small
|
||||
= image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
|
||||
= f.password_field "password_confirmation"
|
||||
%fieldset.form-actions
|
||||
= f.submit t("buttons.sign_up"), :class => "btn primary"
|
||||
.form-actions
|
||||
= f.submit t("buttons.sign_up"), :class => "btn btn-primary"
|
||||
%p
|
||||
= t("defaults.tos", :tos => link_to(t("titles.tos"), "#", :id => "tos_link", :"data-controls-modal" => "tos")).html_safe
|
||||
#user_sign_in_fields{:style => "display: none;"}
|
||||
%fieldset.control-group
|
||||
= t("defaults.tos", :tos => link_to(t("titles.tos"), "#tos", :id => "tos_link", :"data-toggle" => "modal")).html_safe
|
||||
%fieldset#user_sign_in_fields{:style => "display: none;"}
|
||||
.control-group
|
||||
%label{:for => "user_password", :id => "user_password_label"}
|
||||
= t("labels.password")
|
||||
%small
|
||||
= image_tag "lock.png", :class => "lock", :alt => t("captions.private"), :title => t("captions.private")
|
||||
= f.password_field "password"
|
||||
%fieldset.control-group
|
||||
.control-group
|
||||
= f.label "remember_me" , f.check_box("remember_me", :checked => true).html_safe + t("labels.remember_me")
|
||||
%fieldset.form-actions
|
||||
= f.submit t("buttons.sign_in"), :class => "btn primary"
|
||||
.form-actions
|
||||
= f.submit t("buttons.sign_in"), :class => "btn btn-primary"
|
||||
%p
|
||||
= link_to t("links.forgot_password"), "#", :id => "user_forgot_password_link"
|
||||
#user_forgot_password_fields{:style => "display: none;"}
|
||||
%fieldset.form-actions
|
||||
= f.submit t("buttons.email_password"), :class => "btn primary"
|
||||
%fieldset#user_forgot_password_fields{:style => "display: none;"}
|
||||
.form-actions
|
||||
= f.submit t("buttons.email_password"), :class => "btn btn-primary"
|
||||
%p
|
||||
= link_to t("links.remembered_password"), "#", :id => "user_remembered_password_link"
|
||||
= render :partial => "sidebar/tos"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form form-stacked" do
|
||||
= form_tag "/address", :method => "get", :id => "address_form", :class => "search-form" do
|
||||
= hidden_field_tag "limit", params[:limit] || 10
|
||||
%fieldset.control-group
|
||||
= label_tag "city_state", t("labels.city_state"), :id => "city_state_label"
|
||||
|
@ -7,10 +7,10 @@
|
|||
= label_tag "address", t("labels.address"), :id => "address_label"
|
||||
= search_field_tag "address", params[:address], :placeholder => [t("defaults.address_1"), t("defaults.neighborhood")].join(", "), :class => "search-query"
|
||||
%fieldset.form-actions
|
||||
= submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize), :class => "btn primary"
|
||||
= submit_tag t("buttons.find", :thing => t("defaults.thing").pluralize), :class => "btn btn-primary"
|
||||
%a{:href => edit_user_registration_path, :id => "edit_profile_link", :class => "btn"}
|
||||
= t("buttons.edit_profile")
|
||||
%a{:href => destroy_user_session_path, :id => "sign_out_link", :class => "btn danger"}
|
||||
%a{:href => destroy_user_session_path, :id => "sign_out_link", :class => "btn btn-danger"}
|
||||
= t("buttons.sign_out")
|
||||
:javascript
|
||||
$(function() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.modal.hide.fade#tos
|
||||
.modal.hide.fade#tos{:style => "display: none;"}
|
||||
.modal-header
|
||||
%a{:class => "close", :"data-dismiss" => "modal", :href => "#"}
|
||||
×
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:id => "edit_form", :class => "form-stacked", :method => :put} do |f|
|
||||
= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:id => "edit_form", :method => :put} do |f|
|
||||
= f.hidden_field "id"
|
||||
%fieldset.control-group
|
||||
%label{:for => "user_email", :id => "user_email_label"}
|
||||
|
@ -73,7 +73,7 @@
|
|||
= t("captions.required")
|
||||
= f.password_field "current_password"
|
||||
%fieldset.form-actions
|
||||
= f.submit t("buttons.update"), :class => "btn primary"
|
||||
= f.submit t("buttons.update"), :class => "btn btn-primary"
|
||||
%a{:href => root_path, :id => "back_link", :class => "btn"}
|
||||
= t("buttons.back")
|
||||
:javascript
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= form_for :thing, :url => things_path, :method => :put, :html => {:id => "abandon_form", :class => "form-stacked"} do |f|
|
||||
= form_for :thing, :url => things_path, :method => :put, :html => {:id => "abandon_form"} do |f|
|
||||
= f.hidden_field "id"
|
||||
= f.hidden_field "user_id", :value => ""
|
||||
= f.hidden_field "name", :value => ""
|
||||
%fieldset.form-actions
|
||||
%fieldset.control-group
|
||||
= f.submit t("buttons.abandon", :thing => t("defaults.thing")), :class => "btn danger"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
%h2
|
||||
= t("titles.adopt", :thing => t("defaults.thing").titleize)
|
||||
= form_for :thing, :url => things_path, :method => :put, :html => {:id => "adoption_form", :class => "form-stacked"} do |f|
|
||||
= form_for :thing, :url => things_path, :method => :put, :html => {:id => "adoption_form"} do |f|
|
||||
= f.hidden_field "id"
|
||||
= f.hidden_field "user_id", :value => current_user.id
|
||||
%fieldset.control-group
|
||||
= f.label "name", t("labels.name_thing", :thing => t("defaults.thing")), :id => "thing_name_label"
|
||||
= f.text_field "name"
|
||||
%fieldset.form-actions
|
||||
%fieldset.control-group
|
||||
= f.submit t("buttons.adopt"), :class => "btn primary"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= form_for :reminder, :url => reminders_path, :html => {:id => "reminder_form", :class => "form-stacked", :method => "post"} do |f|
|
||||
= form_for :reminder, :url => reminders_path, :html => {:id => "reminder_form", :method => "post"} do |f|
|
||||
= f.hidden_field "from_user_id", :value => current_user.id
|
||||
= f.hidden_field "to_user_id", :value => @thing.user.id
|
||||
= f.hidden_field "thing_id", :value => @thing.id
|
||||
%fieldset.form-actions
|
||||
%fieldset.control-group
|
||||
= f.submit t("buttons.send_reminder"), :class => "btn"
|
||||
|
|
|
@ -8,7 +8,6 @@ AdoptAThing::Application.routes.draw do
|
|||
get 'address' => 'addresses#show', :as => 'address'
|
||||
get 'info_window' => 'info_window#index', :as => 'info_window'
|
||||
get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
|
||||
get 'javascripts/main(.:format)' => 'javascripts#main', :as => 'javascript'
|
||||
|
||||
scope "sidebar", :controller => :sidebar do
|
||||
get :search, :as => 'search'
|
||||
|
|
Loading…
Reference in New Issue