Commit 7ee976f0985e1bd3ea5a12e83eaf19ffb1ef9462

Authored by Rafael Manzo
Committed by Diego Camarinha
1 parent 854989ec

Replaced twitter-bootstrap-rails by railstrap

twitter-bootstrap-rails rubygems version is way behing the git version, which
required the Gemfile to use the git reference. Using the git reference leads
to a harder version management and packaging problems.
Gemfile
... ... @@ -34,7 +34,8 @@ gem 'kalibro_client', '~> 1.3.0'
34 34 gem "pg", "~> 0.18.1"
35 35  
36 36 # Twitter Bootstrap for layout
37   -gem 'twitter-bootstrap-rails', :git => 'https://github.com/seyhunak/twitter-bootstrap-rails.git'
  37 +gem 'less-rails', '~> 2.7.0'
  38 +gem 'railsstrap', '~> 3.3.4'
38 39  
39 40 # Chart generation
40 41 gem "chart-js-rails", "~> 0.0.6"
... ...
Gemfile.lock
1   -GIT
2   - remote: https://github.com/seyhunak/twitter-bootstrap-rails.git
3   - revision: a889e2d6e6527b94234b88f0c6b635d29d8e7ae8
4   - specs:
5   - twitter-bootstrap-rails (3.2.1)
6   - actionpack (>= 3.1)
7   - execjs (>= 2.2.2, >= 2.2)
8   - less-rails (>= 2.5.0)
9   - railties (>= 3.1)
10   -
11 1 GEM
12 2 remote: https://rubygems.org/
13 3 specs:
... ... @@ -235,6 +225,9 @@ GEM
235 225 rails-deprecated_sanitizer (>= 1.0.1)
236 226 rails-html-sanitizer (1.0.2)
237 227 loofah (~> 2.0)
  228 + railsstrap (3.3.4)
  229 + actionpack (>= 3.1)
  230 + therubyracer
238 231 railties (4.2.4)
239 232 actionpack (= 4.2.4)
240 233 activesupport (= 4.2.4)
... ... @@ -357,11 +350,13 @@ DEPENDENCIES
357 350 js-routes (~> 1.1.0)
358 351 kalibro_client (~> 1.3.0)
359 352 konacha
  353 + less-rails (~> 2.7.0)
360 354 mocha
361 355 pg (~> 0.18.1)
362 356 poltergeist (~> 1.6.0)
363 357 rails (= 4.2.4)
364 358 rails-html-sanitizer (~> 1.0)
  359 + railsstrap (~> 3.3.4)
365 360 rspec-rails (~> 3.3.2)
366 361 sass-rails (~> 5.0.0)
367 362 sdoc (~> 0.4.0)
... ... @@ -374,7 +369,6 @@ DEPENDENCIES
374 369 therubyracer
375 370 thin
376 371 turbolinks
377   - twitter-bootstrap-rails!
378 372 uglifier (>= 1.3.0)
379 373 web-console (~> 2.0.0)
380 374  
... ...
app/assets/javascripts/application.js
... ... @@ -12,8 +12,8 @@
12 12 //
13 13 //= require jquery
14 14 //= require jquery_ujs
  15 +//= require bootstrap/dist/js/bootstrap
15 16 //= require jquery-ui
16   -//= require twitter/bootstrap
17 17 //= require turbolinks
18 18 //= require modules
19 19 //= require repository
... ...
app/assets/javascripts/bootstrap.js.coffee
1 1 jQuery ->
2 2 $("a[rel~=popover], .has-popover").popover()
3 3 $("a[rel~=tooltip], .has-tooltip").tooltip()
  4 +
  5 +# # comment this out if you want to add the animation to an element. You may need to handle events for them to work correctly.
  6 +# # This is just a generic example, your mileage will vary depending on what you're trying to do.
  7 +# $("[data-animation]") ->
  8 +# e.preventDefault()
  9 +# if $(this).data("animation")?
  10 +# $(this).next().removeClass($(this).data("easein")).addClass "animated " + $(this).data("easein")
  11 +# else
  12 +# $(this).next().addClass "animated " + _easeIn
  13 +# return
... ...
app/assets/stylesheets/bootstrap_and_overrides.css
... ... @@ -1,61 +0,0 @@
1   -/*
2   - =require twitter-bootstrap-static/bootstrap
3   -
4   - Use Font Awesome icons (default)
5   - To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
6   - =require twitter-bootstrap-static/fontawesome
7   - */
8   -
9   -footer div {
10   - width: 50%;
11   -}
12   -
13   -.footer-right {
14   - float: right;
15   - text-align: right;
16   -}
17   -
18   -.footer-left {
19   - float: left;
20   -}
21   -
22   -#error_explanation {
23   - background-color: #F2DEDE;
24   - border-color: #EED3D7;
25   - color: #B94A48;
26   - border-radius: 4px 4px 4px 4px;
27   - margin-bottom: 20px;
28   - padding: 8px 35px 8px 14px;
29   - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
30   -}
31   -
32   -.field_with_errors .control-label{
33   - color: #B94A48;
34   -}
35   -
36   -.field_with_errors .form-control{
37   - border-color: #B94A48;
38   - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
39   -}
40   -
41   -.popover-title{
42   - font-weight: bolder;
43   -}
44   -
45   -.jquery-ui-accordion{
46   - line-height: normal; /*overrides h3 line-height specifically for the accordion ones*/
47   -}
48   -
49   -.nav-header{
50   - display: block;
51   - padding: 3px 15px;
52   - font-size: 11px;
53   - font-weight: bold;
54   - line-height: 20px;
55   - color: #999999;
56   - text-transform: uppercase;
57   -}
58   -
59   -dd {
60   - margin-left: 40px !important;
61   -}
app/assets/stylesheets/bootstrap_and_overrides.css.less 0 → 100644
... ... @@ -0,0 +1,95 @@
  1 +/*
  2 + Bootstrap
  3 + This line imports bootstrap, modified to use glyphicons from Cloudflare CDN.
  4 +*/
  5 +@import "bootstrap";
  6 +
  7 +/*
  8 + Glyphicons - included by default in bootstrap.
  9 + If for any reason you prefer to have them as part of the asset pipeline, uncomment this.
  10 + If you choose to use this, open config/initializers/assets.rb (rails 4) and add this line:
  11 + Rails.application.config.assets.precompile += %w( *.eot *.woff *.ttf *.svg )
  12 +*/
  13 +
  14 +// @import "glyphicons";
  15 +
  16 +/*
  17 + FontAwesome is hosted via CDN as well. If you prefer to have them included in the asset
  18 + pipeline, comment this out and see the next section.
  19 +*/
  20 +@import 'fontawesome';
  21 +
  22 +/*
  23 + Font Awesome
  24 + If for some reason you want fontawesome as part of the asset pipeline, comment out
  25 + the above refererence and uncomment the following lines. If you choose to use this, open
  26 + config/initializers/assets.rb (rails 4) and add this line:
  27 + Rails.application.config.assets.precompile += %w( *.eot *.woff *.ttf *.svg )
  28 +*/
  29 +
  30 +//@import 'fontawesome-local';
  31 +
  32 +//If you want exotic placement features, animations, and more, import this:
  33 +@import "railsstrap";
  34 +
  35 +/*
  36 + Date and Time Picker (https://github.com/toadkicker/railsstrap/wiki/Date-and-Time-Picker)
  37 + To enable the date and time picker, uncomment this line:
  38 + Don't forget to include the javascript library as well.
  39 +*/
  40 +
  41 +//@import "datepicker/datepicker";
  42 +
  43 +footer div {
  44 + width: 50%;
  45 +}
  46 +
  47 +.footer-right {
  48 + float: right;
  49 + text-align: right;
  50 +}
  51 +
  52 +.footer-left {
  53 + float: left;
  54 +}
  55 +
  56 +#error_explanation {
  57 + background-color: #F2DEDE;
  58 + border-color: #EED3D7;
  59 + color: #B94A48;
  60 + border-radius: 4px 4px 4px 4px;
  61 + margin-bottom: 20px;
  62 + padding: 8px 35px 8px 14px;
  63 + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  64 +}
  65 +
  66 +.field_with_errors .control-label{
  67 + color: #B94A48;
  68 +}
  69 +
  70 +.field_with_errors .form-control{
  71 + border-color: #B94A48;
  72 + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
  73 +}
  74 +
  75 +.popover-title{
  76 + font-weight: bolder;
  77 +}
  78 +
  79 +.jquery-ui-accordion{
  80 + line-height: normal; /*overrides h3 line-height specifically for the accordion ones*/
  81 +}
  82 +
  83 +.nav-header{
  84 + display: block;
  85 + padding: 3px 15px;
  86 + font-size: 11px;
  87 + font-weight: bold;
  88 + line-height: 20px;
  89 + color: #999999;
  90 + text-transform: uppercase;
  91 +}
  92 +
  93 +dd {
  94 + margin-left: 40px !important;
  95 +}
... ...
config/locales/en.railsstrap.yml 0 → 100644
... ... @@ -0,0 +1,23 @@
  1 +# Sample localization file for English. Add more files in this directory for other locales.
  2 +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  3 +
  4 +en:
  5 + breadcrumbs:
  6 + application:
  7 + root: "Index"
  8 + pages:
  9 + pages: "Pages"
  10 + helpers:
  11 + actions: "Actions"
  12 + links:
  13 + back: "Back"
  14 + cancel: "Cancel"
  15 + confirm: "Are you sure?"
  16 + destroy: "Delete"
  17 + new: "New"
  18 + edit: "Edit"
  19 + titles:
  20 + edit: "Edit %{model}"
  21 + save: "Save %{model}"
  22 + new: "New %{model}"
  23 + delete: "Delete %{model}"
... ...