Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap 3 support #28

Merged
merged 50 commits into from
Apr 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d4912b7
Install bootstrap 3 using bower
rafaelfranca Sep 21, 2013
2346d88
Fix the header
rafaelfranca Sep 21, 2013
080ae43
Fix the breadcrumb
rafaelfranca Sep 21, 2013
4bd978a
Fix the buttons in the form
rafaelfranca Sep 21, 2013
f8b0aba
Use the right bootstrap classes
rafaelfranca Sep 21, 2013
7cd33a8
Better look for the label
rafaelfranca Sep 21, 2013
86094f3
Prepended inputs are not input groups
rafaelfranca Sep 21, 2013
491a466
Make form look nicer
rafaelfranca Sep 21, 2013
7d76738
Inplement boolean checkbox with normal Rails helpers
rafaelfranca Sep 21, 2013
9e8753a
update gems
Nerian Nov 9, 2013
e9146ed
side by side comparison
Nerian Nov 10, 2013
6eecc62
using pry
Nerian Nov 10, 2013
7abcefe
Prototype checkbox wrappers
Nerian Nov 10, 2013
64f1644
cleanup
Nerian Nov 10, 2013
3be0c0b
set correct width
Nerian Nov 11, 2013
78abfd3
Merge pull request #31 from Nerian/rm-bootstrap-3
rafaelfranca Nov 11, 2013
0bae435
:bomb: pry
rafaelfranca Nov 12, 2013
ccf12da
Merge branch 'master' into rm-bootstrap-3
rafaelfranca Mar 12, 2014
900204b
Use new features present on bootstrap-3 branch
rafaelfranca Mar 12, 2014
af273de
Make both forms look the same
rafaelfranca Mar 12, 2014
89763bb
Fix inline form
rafaelfranca Mar 12, 2014
b7f00aa
Fix typo
rafaelfranca Mar 12, 2014
4151ad6
Use the same label
rafaelfranca Mar 12, 2014
6ef5a57
Make form horizontal works
rafaelfranca Mar 12, 2014
7cb7fa6
To be a fair comparation both forms should looks the same
rafaelfranca Mar 12, 2014
2adc40b
File input is now right
rafaelfranca Mar 12, 2014
8e4f7e6
Changing bootstrap error class to has-error
bradly Mar 17, 2014
81989b5
Merge pull request #33 from bradly/rm-bootstrap-3
rafaelfranca Mar 17, 2014
3c2784c
Use Simple Form master
rafaelfranca Mar 21, 2014
de441c5
Fix the column size
rafaelfranca Mar 21, 2014
931c466
Use the wrapper_mappings option
rafaelfranca Mar 21, 2014
cbeeb3b
Cleanup the config files
rafaelfranca Mar 21, 2014
baa9709
Use better names for wrappers
rafaelfranca Mar 21, 2014
789ddaa
Use the assets gem
rafaelfranca Mar 21, 2014
5c96ace
Extract bootstrap configuration to its own file
rafaelfranca Mar 21, 2014
87a4c56
Fix the error classes
rafaelfranca Mar 25, 2014
b781e38
Remove broken wrappers
rafaelfranca Mar 25, 2014
e0062df
Fix the alert
rafaelfranca Mar 25, 2014
f8afe01
Tweaks to example forms for visual parity
techmaverick Mar 25, 2014
84e736c
Merge pull request #38 from techmaverick/rm-bootstrap-3
rafaelfranca Mar 25, 2014
020f677
Use laters simple_form
rafaelfranca Mar 31, 2014
0435e60
Remove the articles page
rafaelfranca Mar 31, 2014
aa8c698
More cleanup
rafaelfranca Mar 31, 2014
9ac30fe
Fix footer
rafaelfranca Mar 31, 2014
6f846df
Some copyedits
rafaelfranca Mar 31, 2014
64b7791
Merge branch 'master' into rm-bootstrap-3
rafaelfranca Mar 31, 2014
4860d6c
Show errors on the form
rafaelfranca Mar 31, 2014
5991e1e
Remove code prettify
rafaelfranca Apr 1, 2014
4d51fca
Change the Bootstrap forms to have the same elements as Simple Form
rafaelfranca Apr 1, 2014
484094f
Upgrade SimpleForm
rafaelfranca Apr 3, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ gem 'thin'

gem 'uglifier'
gem 'jquery-rails'
gem 'sass-rails', '~> 4.0.2'
gem 'bootstrap-sass', '~> 3.1.1.0'

gem 'simple_form', '~> 3.0.0'
gem 'simple_form', '~> 3.0.0', github: 'plataformatec/simple_form', branch: 'master'

group :production do
gem 'pg'
Expand Down
76 changes: 46 additions & 30 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
GIT
remote: git://github.com/plataformatec/simple_form.git
revision: af27764b814067687128820dd5b14cc129696a86
branch: master
specs:
simple_form (3.0.1)
actionpack (~> 4.0)
activemodel (~> 4.0)

GEM
remote: http://rubygems.org/
specs:
actionmailer (4.0.3)
actionpack (= 4.0.3)
actionmailer (4.0.4)
actionpack (= 4.0.4)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
actionpack (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.3)
activesupport (= 4.0.3)
activemodel (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
activerecord (4.0.3)
activemodel (= 4.0.3)
activerecord (4.0.4)
activemodel (= 4.0.4)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.3)
activesupport (= 4.0.4)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
activesupport (4.0.4)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
atomic (1.1.15)
atomic (1.1.16)
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
builder (3.1.4)
daemons (1.1.9)
erubis (2.7.0)
Expand All @@ -43,29 +54,32 @@ GEM
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.9.0)
multi_json (1.9.2)
pg (0.17.1)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.3)
actionmailer (= 4.0.3)
actionpack (= 4.0.3)
activerecord (= 4.0.3)
activesupport (= 4.0.3)
rails (4.0.4)
actionmailer (= 4.0.4)
actionpack (= 4.0.4)
activerecord (= 4.0.4)
activesupport (= 4.0.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.3)
railties (= 4.0.4)
sprockets-rails (~> 2.0.0)
railties (4.0.3)
actionpack (= 4.0.3)
activesupport (= 4.0.3)
railties (4.0.4)
actionpack (= 4.0.4)
activesupport (= 4.0.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
simple_form (3.0.1)
actionpack (>= 4.0.0, < 4.1)
activemodel (>= 4.0.0, < 4.1)
rake (10.2.2)
sass (3.2.18)
sass-rails (4.0.2)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -80,27 +94,29 @@ GEM
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.18.1)
thread_safe (0.2.0)
thor (0.19.1)
thread_safe (0.3.1)
atomic (>= 1.1.7, < 2)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.39)
uglifier (2.4.0)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 3.1.1.0)
jquery-rails
json
pg
rails (~> 4.0.3)
simple_form (~> 3.0.0)
sass-rails (~> 4.0.2)
simple_form (~> 3.0.0)!
sqlite3
thin
uglifier
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# SimpleForm and Twitter Bootstrap
# Simple Form and Bootstrap

This is a example application using [SimpleForm](https://github.com/plataformatec/simple_form)
and [Twitter Bootstrap](http://twitter.github.io/bootstrap/).

A copy of the `bootstrap.css` can be downloaded from the [official home page](http://twitter.github.io/bootstrap/), or using the following command to download from the demo site:

```
curl -L http://twitter.github.io/bootstrap/assets/css/bootstrap.css > vendor/assets/stylesheets/bootstrap.css
```
This is a example application using [Simple Form](https://github.com/plataformatec/simple_form)
and [Bootstrap](http://getbootstrap.com/).

## License

Expand Down
16 changes: 0 additions & 16 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,4 @@
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require google-code-prettify
//

$(function() {
prettyPrint();

$('a[data-code]').click(function(e) {
e.preventDefault();
$('pre').slideToggle();
});

$('#toggle-form').on('click', function(e) {
e.preventDefault();
$('.simple_form').toggleClass('form-vertical').toggleClass('form-horizontal');
})
});

3 changes: 0 additions & 3 deletions app/assets/javascripts/bootstrap.js

This file was deleted.

51 changes: 1 addition & 50 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -1,61 +1,11 @@
/*
*= require bootstrap
*= require google-code-prettify
*/

body {
padding-top: 60px;
}

.alert p.error_notification {
margin-bottom: 0;
}

div.well {
padding: 5px 10px;
}

pre { display: none; }

article .content {
margin: 10px 0;
}

#article-comments {
padding: 10px;
border: 1px solid #ccc;
background: #f5f5f5;
border-radius: 3px;
margin-bottom: 10px;
}

#comments {
margin-bottom: 10px;
}

#article-comments form {
border-top: 1px solid #ccc;
padding-top: 10px;
margin-bottom: 0;
}

#article-comments .form-actions {
margin-bottom: 0;
padding-bottom: 0;
}
.form-actions {
height: 30px;
}

.navbar .brand {
float: right;
padding-right: 0;
}

.form-vertical .boolean .controls {
display: inline-block;
}

.footer {
padding: 70px 0;
margin-top: 70px;
Expand All @@ -70,6 +20,7 @@ article .content {

.footer-links {
margin: 10px 0;
padding: 0;
}

.footer-links li {
Expand Down
28 changes: 0 additions & 28 deletions app/controllers/articles/comments_controller.rb

This file was deleted.

58 changes: 0 additions & 58 deletions app/controllers/articles_controller.rb

This file was deleted.

Loading