anjlab-bootstrap-rails 3.0.2.0 → 3.0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/Rakefile +6 -6
  4. data/app/assets/javascripts/twitter/bootstrap/affix.js +1 -1
  5. data/app/assets/javascripts/twitter/bootstrap/alert.js +1 -1
  6. data/app/assets/javascripts/twitter/bootstrap/button.js +11 -5
  7. data/app/assets/javascripts/twitter/bootstrap/carousel.js +5 -5
  8. data/app/assets/javascripts/twitter/bootstrap/collapse.js +1 -1
  9. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +5 -5
  10. data/app/assets/javascripts/twitter/bootstrap/modal.js +1 -1
  11. data/app/assets/javascripts/twitter/bootstrap/popover.js +1 -1
  12. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +2 -2
  13. data/app/assets/javascripts/twitter/bootstrap/tab.js +1 -1
  14. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +1 -1
  15. data/app/assets/javascripts/twitter/bootstrap/transition.js +1 -1
  16. data/app/assets/stylesheets/twitter/bootstrap/_badges.scss +6 -6
  17. data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +7 -33
  18. data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +1 -3
  19. data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +1 -0
  20. data/app/assets/stylesheets/twitter/bootstrap/_component-animations.scss +1 -1
  21. data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +3 -8
  22. data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +11 -0
  23. data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +12 -26
  24. data/app/assets/stylesheets/twitter/bootstrap/_input-groups.scss +1 -1
  25. data/app/assets/stylesheets/twitter/bootstrap/_jumbotron.scss +8 -2
  26. data/app/assets/stylesheets/twitter/bootstrap/_labels.scss +6 -0
  27. data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +32 -45
  28. data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +2 -5
  29. data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +41 -53
  30. data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +0 -20
  31. data/app/assets/stylesheets/twitter/bootstrap/_panels.scss +11 -1
  32. data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +0 -12
  33. data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +17 -22
  34. data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +9 -3
  35. data/app/assets/stylesheets/twitter/bootstrap/_type.scss +54 -52
  36. data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +16 -11
  37. data/bootstrap-rails.gemspec +1 -1
  38. data/lib/bootstrap-rails/version.rb +1 -1
  39. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2b9d8187387ac35d2c470b5f10b0ec16ac21a8c
4
- data.tar.gz: a06fb6e823a3f15a754b3aeb0de2489aaa0193a6
3
+ metadata.gz: 08327e7bd4624d6942b466b669a2ce2689a7e492
4
+ data.tar.gz: ef8bb31e7f1d0b29b4b9b6b6a1a217bc9ed63de3
5
5
  SHA512:
6
- metadata.gz: c5c388e6086e806fab4ad25d92578a4391dc9a590712f4c2f3ac853906c1bfbc26d90c3637a5dd1b15553175aa7407efa50be63e9b42c0b6038abca2d350ea3f
7
- data.tar.gz: 4697a2411d21d08ea6b1c37d4bea029f125c9b776ab4bb90ba987831b95dcf9a7e4ee4db93d248e5c4e0ce7dc9612ccd27235c20824a2a2da9d02c01396c5ed2
6
+ metadata.gz: 862f4e261b3c17b9159da25b3f80b10a30a1f9f53f146fb2962065dbab298d8116735a2cefee77578ad239c9700eda78502da6a7cd1409966e77d6885548ca44
7
+ data.tar.gz: 4605c4aa8b0aaccf58dcb268835ef2789f723d157150070bfb91c1f19d59cdbb0bfb06bc38c5edcd9978ba8171271931119a1826100a5c97d675c4eab2cf5dd1
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Twitter Bootstrap v3.0.1 for Rails 3/4
2
- Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
1
+ # Bootstrap v3.0.3 for Rails 3/4
2
+ Bootstrap is a toolkit originated at Twitter that's designed to kickstart development of webapps and sites.
3
3
  It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
4
4
 
5
5
  Note: if you are looking for bootstrapped date and time pickers please take a look at [anjlab-widgets](https://github.com/anjlab/anjlab-widgets) gem.
@@ -19,7 +19,7 @@ You can install from latest build via git
19
19
 
20
20
  ``` ruby
21
21
 
22
- gem 'anjlab-bootstrap-rails', '~> 3.0.1.0', :require => 'bootstrap-rails'
22
+ gem 'anjlab-bootstrap-rails', '~> 3.0.3.0', :require => 'bootstrap-rails'
23
23
  ```
24
24
 
25
25
  and run bundle install.
@@ -27,7 +27,7 @@ and run bundle install.
27
27
  ## Stylesheets
28
28
 
29
29
  1. Rename application.css to application.css.scss
30
- 2. Import twitter bootstrap `@import "twitter/bootstrap";`
30
+ 2. Import bootstrap `@import "twitter/bootstrap";`
31
31
  3. You can override vars above `@import "twitter/bootstrap";`
32
32
 
33
33
  ```scss
@@ -46,7 +46,7 @@ $link-color: red;
46
46
  Add necessary javascript(s) files to app/assets/javascripts/application.js
47
47
 
48
48
  ``` javascript
49
- // Include all twitter's javascripts
49
+ // Include all bootstrap javascripts
50
50
  //= require twitter/bootstrap
51
51
 
52
52
  // Or peek any of them yourself
@@ -70,7 +70,7 @@ Add necessary javascript(s) files to app/assets/javascripts/application.js
70
70
 
71
71
  ## Thanks
72
72
  Thanks Twitter for Bootstrap
73
- http://twitter.github.com/bootstrap
73
+ http://getbootstrap.com
74
74
 
75
75
  Inspired by Seyhun Akyürek and his [twitter-bootstrap-rails gem](https://github.com/seyhunak/twitter-bootstrap-rails)
76
76
 
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/testtask'
4
4
 
5
5
  namespace :twitter do
6
6
 
7
- desc "Pulls Twitter's Bootstrap Scss"
7
+ desc "Pulls Bootstrap Scss"
8
8
  task :pull do
9
9
  if !system "cd bootstrap && git pull"
10
10
  abort "...."
@@ -30,10 +30,10 @@ namespace :twitter do
30
30
  file target => [source] { cp source, target, verbose: true }
31
31
  end
32
32
 
33
- desc "Update Twitter's Bootstrap Fonts"
33
+ desc "Update Bootstrap Fonts"
34
34
  task :fonts => ASSETS_FONTS
35
35
 
36
- desc "Update Twitter's Bootstrap JS"
36
+ desc "Update Bootstrap JS"
37
37
  task :js => ASSETS_JS do
38
38
  js = {}
39
39
  ASSETS_JS.pathmap("%f").each { |f| js[f] = 1 }
@@ -46,7 +46,7 @@ namespace :twitter do
46
46
  File.write "app/assets/javascripts/twitter/bootstrap.js", list.map {|f| "//= require #{f}"}.join("\n")
47
47
  end
48
48
 
49
- desc "Update Twitter's icons"
49
+ desc "Update Bootstrap Glyphicons icons"
50
50
  task :icons do
51
51
  vars_path = 'app/assets/stylesheets/twitter/bootstrap/_variables.scss'
52
52
  variables = File.read vars_path
@@ -59,7 +59,7 @@ namespace :twitter do
59
59
  File.write(icons_path, icons)
60
60
  end
61
61
 
62
- desc "Update Twitter's Bootstrap SCSS"
62
+ desc "Update Bootstrap SCSS"
63
63
  task :scss => ASSETS_SCSS do
64
64
  File.write "app/assets/stylesheets/twitter/bootstrap.scss", '@import "twitter/bootstrap/bootstrap";'
65
65
  end
@@ -72,7 +72,7 @@ namespace :twitter do
72
72
  FileUtils.mkpath 'app/assets/stylesheets/twitter/bootstrap'
73
73
  end
74
74
 
75
- desc "Update Twitter's Bootstrap Assets"
75
+ desc "Update Bootstrap Assets"
76
76
  task :assets => [:pull, :clean, :fonts, :scss, :js, :icons]
77
77
 
78
78
  end
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.0.2
2
+ * Bootstrap: affix.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#affix
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.0.2
2
+ * Bootstrap: alert.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#alerts
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.0.2
2
+ * Bootstrap: button.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#buttons
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -54,15 +54,21 @@
54
54
 
55
55
  Button.prototype.toggle = function () {
56
56
  var $parent = this.$element.closest('[data-toggle="buttons"]')
57
+ var changed = true
57
58
 
58
59
  if ($parent.length) {
59
60
  var $input = this.$element.find('input')
60
- .prop('checked', !this.$element.hasClass('active'))
61
- .trigger('change')
62
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
61
+ if ($input.prop('type') === 'radio') {
62
+ // see if clicking on current one
63
+ if ($input.prop('checked') && this.$element.hasClass('active'))
64
+ changed = false
65
+ else
66
+ $parent.find('.active').removeClass('active')
67
+ }
68
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
63
69
  }
64
70
 
65
- this.$element.toggleClass('active')
71
+ if (changed) this.$element.toggleClass('active')
66
72
  }
67
73
 
68
74
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.0.2
2
+ * Bootstrap: carousel.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#carousel
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -69,7 +69,7 @@
69
69
 
70
70
  if (pos > (this.$items.length - 1) || pos < 0) return
71
71
 
72
- if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
72
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
73
73
  if (activeIndex == pos) return this.pause().cycle()
74
74
 
75
75
  return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -121,7 +121,7 @@
121
121
 
122
122
  if (this.$indicators.length) {
123
123
  this.$indicators.find('.active').removeClass('active')
124
- this.$element.one('slid', function () {
124
+ this.$element.one('slid.bs.carousel', function () {
125
125
  var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
126
126
  $nextIndicator && $nextIndicator.addClass('active')
127
127
  })
@@ -139,7 +139,7 @@
139
139
  $next.removeClass([type, direction].join(' ')).addClass('active')
140
140
  $active.removeClass(['active', direction].join(' '))
141
141
  that.sliding = false
142
- setTimeout(function () { that.$element.trigger('slid') }, 0)
142
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
143
143
  })
144
144
  .emulateTransitionEnd(600)
145
145
  } else {
@@ -148,7 +148,7 @@
148
148
  $active.removeClass('active')
149
149
  $next.addClass('active')
150
150
  this.sliding = false
151
- this.$element.trigger('slid')
151
+ this.$element.trigger('slid.bs.carousel')
152
152
  }
153
153
 
154
154
  isCycling && this.cycle()
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.0.2
2
+ * Bootstrap: collapse.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#collapse
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.0.2
2
+ * Bootstrap: dropdown.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#dropdowns
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -26,7 +26,7 @@
26
26
  var backdrop = '.dropdown-backdrop'
27
27
  var toggle = '[data-toggle=dropdown]'
28
28
  var Dropdown = function (element) {
29
- var $el = $(element).on('click.bs.dropdown', this.toggle)
29
+ $(element).on('click.bs.dropdown', this.toggle)
30
30
  }
31
31
 
32
32
  Dropdown.prototype.toggle = function (e) {
@@ -41,7 +41,7 @@
41
41
 
42
42
  if (!isActive) {
43
43
  if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
44
- // if mobile we we use a backdrop because click events don't delegate
44
+ // if mobile we use a backdrop because click events don't delegate
45
45
  $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
46
46
  }
47
47
 
@@ -123,9 +123,9 @@
123
123
  $.fn.dropdown = function (option) {
124
124
  return this.each(function () {
125
125
  var $this = $(this)
126
- var data = $this.data('dropdown')
126
+ var data = $this.data('bs.dropdown')
127
127
 
128
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
128
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
129
129
  if (typeof option == 'string') data[option].call($this)
130
130
  })
131
131
  }
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.0.2
2
+ * Bootstrap: modal.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: popover.js v3.0.2
2
+ * Bootstrap: popover.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#popovers
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: scrollspy.js v3.0.2
2
+ * Bootstrap: scrollspy.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#scrollspy
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -113,7 +113,7 @@
113
113
  .addClass('active')
114
114
  }
115
115
 
116
- active.trigger('activate')
116
+ active.trigger('activate.bs.scrollspy')
117
117
  }
118
118
 
119
119
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.0.2
2
+ * Bootstrap: tab.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.0.2
2
+ * Bootstrap: tooltip.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.0.2
2
+ * Bootstrap: transition.js v3.0.3
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2013 Twitter, Inc.
@@ -24,6 +24,12 @@
24
24
  }
25
25
  }
26
26
 
27
+ // Quick fix for badges in buttons
28
+ .btn .badge {
29
+ position: relative;
30
+ top: -1px;
31
+ }
32
+
27
33
  // Hover state, but only for links
28
34
  a.badge {
29
35
  &:hover,
@@ -34,12 +40,6 @@ a.badge {
34
40
  }
35
41
  }
36
42
 
37
- // Quick fix for labels/badges in buttons
38
- .btn .badge {
39
- position: relative;
40
- top: -1px;
41
- }
42
-
43
43
  // Account for counters in navs
44
44
  a.list-group-item.active > .badge,
45
45
  .nav-pills > .active > a > .badge {
@@ -2,37 +2,6 @@
2
2
  // Button groups
3
3
  // --------------------------------------------------
4
4
 
5
- // Button carets
6
- //
7
- // Match the button text color to the arrow/caret for indicating dropdown-ness.
8
-
9
- .caret {
10
- .btn-default & {
11
- border-top-color: $btn-default-color;
12
- }
13
- .btn-primary &,
14
- .btn-success &,
15
- .btn-warning &,
16
- .btn-danger &,
17
- .btn-info & {
18
- border-top-color: #fff;
19
- }
20
- }
21
- .dropup {
22
- .btn-default .caret {
23
- border-bottom-color: $btn-default-color;
24
- }
25
- .btn-primary,
26
- .btn-success,
27
- .btn-warning,
28
- .btn-danger,
29
- .btn-info {
30
- .caret {
31
- border-bottom-color: #fff;
32
- }
33
- }
34
- }
35
-
36
5
  // Make the div behave like a button
37
6
  .btn-group,
38
7
  .btn-group-vertical {
@@ -178,7 +147,8 @@
178
147
 
179
148
  .btn-group-vertical {
180
149
  > .btn,
181
- > .btn-group {
150
+ > .btn-group,
151
+ > .btn-group > .btn {
182
152
  display: block;
183
153
  float: none;
184
154
  width: 100%;
@@ -238,11 +208,15 @@
238
208
  width: 100%;
239
209
  table-layout: fixed;
240
210
  border-collapse: separate;
241
- .btn {
211
+ > .btn,
212
+ > .btn-group {
242
213
  float: none;
243
214
  display: table-cell;
244
215
  width: 1%;
245
216
  }
217
+ > .btn-group .btn {
218
+ width: 100%;
219
+ }
246
220
  }
247
221
 
248
222
 
@@ -6,7 +6,6 @@
6
6
  // Base styles
7
7
  // --------------------------------------------------
8
8
 
9
- // Core styles
10
9
  .btn {
11
10
  display: inline-block;
12
11
  margin-bottom: 0; // For input.btn
@@ -45,7 +44,6 @@
45
44
  @include opacity(.65);
46
45
  @include box-shadow(none);
47
46
  }
48
-
49
47
  }
50
48
 
51
49
 
@@ -121,7 +119,7 @@
121
119
  @include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
122
120
  }
123
121
  @mixin btn-xs {
124
- padding: 1px 5px;
122
+ @include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $border-radius-small);
125
123
  }
126
124
 
127
125
  .btn-lg {@include btn-lg}
@@ -91,6 +91,7 @@
91
91
  // Hover/focus state
92
92
  &:hover,
93
93
  &:focus {
94
+ outline: none;
94
95
  color: $carousel-control-color;
95
96
  text-decoration: none;
96
97
  @include opacity(.9);
@@ -5,7 +5,7 @@
5
5
  // Heads up!
6
6
  //
7
7
  // We don't use the `.opacity()` mixin here since it causes a bug with text
8
- // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
8
+ // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9
9
 
10
10
  .fade {
11
11
  opacity: 0;
@@ -10,12 +10,9 @@
10
10
  height: 0;
11
11
  margin-left: 2px;
12
12
  vertical-align: middle;
13
- border-top: $caret-width-base solid $dropdown-caret-color;
13
+ border-top: $caret-width-base solid;
14
14
  border-right: $caret-width-base solid transparent;
15
15
  border-left: $caret-width-base solid transparent;
16
- // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed,
17
- // we can just straight up remove this.
18
- border-bottom: 0 dotted;
19
16
  }
20
17
 
21
18
  // The dropdown wrapper (div)
@@ -163,10 +160,8 @@
163
160
  .navbar-fixed-bottom .dropdown {
164
161
  // Reverse the caret
165
162
  .caret {
166
- // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this
167
- // gets fixed, restore `border-top: 0;`.
168
- border-top: 0 dotted;
169
- border-bottom: $caret-width-base solid $dropdown-caret-color;
163
+ border-top: 0;
164
+ border-bottom: $caret-width-base solid;
170
165
  content: "";
171
166
  }
172
167
  // Different positioning for bottom up menu