bootstrap-sass 3.3.0.1 → 3.3.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +23 -24
  4. data/assets/javascripts/bootstrap.js +72 -28
  5. data/assets/javascripts/bootstrap/affix.js +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +2 -2
  7. data/assets/javascripts/bootstrap/button.js +3 -3
  8. data/assets/javascripts/bootstrap/carousel.js +3 -2
  9. data/assets/javascripts/bootstrap/collapse.js +2 -2
  10. data/assets/javascripts/bootstrap/dropdown.js +3 -3
  11. data/assets/javascripts/bootstrap/modal.js +48 -5
  12. data/assets/javascripts/bootstrap/popover.js +2 -2
  13. data/assets/javascripts/bootstrap/scrollspy.js +2 -2
  14. data/assets/javascripts/bootstrap/tab.js +2 -2
  15. data/assets/javascripts/bootstrap/tooltip.js +2 -2
  16. data/assets/javascripts/bootstrap/transition.js +1 -1
  17. data/assets/stylesheets/bootstrap/_badges.scss +7 -1
  18. data/assets/stylesheets/bootstrap/_button-groups.scss +0 -4
  19. data/assets/stylesheets/bootstrap/_forms.scss +19 -32
  20. data/assets/stylesheets/bootstrap/_jumbotron.scss +2 -1
  21. data/assets/stylesheets/bootstrap/_list-group.scss +0 -8
  22. data/assets/stylesheets/bootstrap/_modals.scss +1 -2
  23. data/assets/stylesheets/bootstrap/_navbar.scss +1 -0
  24. data/assets/stylesheets/bootstrap/_popovers.scss +1 -0
  25. data/assets/stylesheets/bootstrap/_theme.scss +12 -0
  26. data/assets/stylesheets/bootstrap/_tooltip.scss +12 -4
  27. data/assets/stylesheets/bootstrap/_variables.scss +1 -1
  28. data/bower.json +1 -1
  29. data/lib/bootstrap-sass/version.rb +2 -2
  30. data/package.json +1 -1
  31. data/tasks/converter/less_conversion.rb +1 -1
  32. data/templates/project/_bootstrap-variables.sass +2 -2
  33. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31033a372c2d4db203ed619a90f1c2e82581042e
4
- data.tar.gz: ddbeb169e705fed90b1a8a09d719f5f3454e2e25
3
+ metadata.gz: 32b77fd9e1906f3c9c2d9b4819fae6ee15f291b3
4
+ data.tar.gz: 0a0bb52c925c2c43fa3fe7a64184156493d30343
5
5
  SHA512:
6
- metadata.gz: 377849974184f5bb57f9237856db197795b41458841254b273278d188aa52500ca324f3ce8a97f3e8debcf3a35c45874eda8136df57d131cbabab66e61e11b22
7
- data.tar.gz: 0d5734cc3e93595a6de71d7616a4502f91d69d108c0f3141f7b710612dcb3271e3484a0aa6716e1087c78a3623e6ceecd66d10496e4a580d716f1ae6daf83ae1
6
+ metadata.gz: 6ada02fc5158ee8beb009391175d43ce0c40b67267e8ae6a2f7ce040787a94d4a472ec7c403f699fc06b485b04fd8dfbf0c1a10170f55877bf24fa3c3c469d0f
7
+ data.tar.gz: 0923525f442847a27649b0b69281dcf79a6972f1ae7a0261a028301c20836eafd2358d20b7e671f99868ea25d0dfee5f07f59fba9f56746976be5994518b1b0a
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.3.1.0
4
+
5
+ * Variables override template at templates/project/_bootstrap-variables.sass
6
+ * Readme: Bower + Rails configuration
7
+
8
+ ## 3.3.0.1
9
+
10
+ * Fix loading issue with the ruby gem version
11
+
3
12
  ## 3.3.0
4
13
 
5
14
  * Improve libsass compatibility
data/README.md CHANGED
@@ -17,7 +17,7 @@ Please see the appropriate guide for your environment of choice:
17
17
  In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
18
18
 
19
19
  ```ruby
20
- gem 'bootstrap-sass', '~> 3.3.0'
20
+ gem 'bootstrap-sass', '~> 3.3.1'
21
21
  gem 'sass-rails', '>= 3.2'
22
22
  ```
23
23
 
@@ -58,23 +58,32 @@ Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
58
58
 
59
59
  #### Bower with Rails
60
60
 
61
- When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, add Bootstrap asset paths:
61
+ When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, configure assets in `config/application.rb`:
62
62
 
63
63
  ```ruby
64
- # config/application.rb
65
- # bootstrap-sass asset paths
66
- root.join('vendor/assets/bower_components/bootstrap-sass/assets').tap do |path|
67
- config.sass.load_paths << path.join('stylesheets')
68
- config.assets.paths += %w(javascripts fonts images).map(&path.method(:join))
64
+ # Bower asset paths
65
+ root.join('vendor', 'assets', 'bower_components').to_s.tap do |bower_path|
66
+ config.sass.load_paths << bower_path
67
+ config.assets.paths << bower_path
69
68
  end
69
+ # Precompile Bootstrap fonts
70
+ config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff)$)
71
+ # Minimum Sass number precision required by bootstrap-sass
72
+ ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
70
73
  ```
71
74
 
72
- Then, ensure [minimum Sass number precision](#sass-number-precision):
75
+ Replace Bootstrap `@import` statements in `application.css.scss` with:
73
76
 
74
- ```ruby
75
- # config/initializers/sass.rb
76
- # Minimum precision required by bootstrap-sass
77
- ::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max
77
+ ```scss
78
+ $icon-font-path: "bootstrap-sass/assets/fonts/bootstrap/";
79
+ @import "bootstrap-sass/assets/stylesheets/bootstrap-sprockets";
80
+ @import "bootstrap-sass/assets/stylesheets/bootstrap";
81
+ ```
82
+
83
+ Replace Bootstrap `require` directive in `application.js` with:
84
+
85
+ ```js
86
+ //= require bootstrap-sass/assets/javascripts/bootstrap-sprockets
78
87
  ```
79
88
 
80
89
  #### Rails 4.x
@@ -83,17 +92,7 @@ Please make sure `sprockets-rails` is at least v2.1.4.
83
92
 
84
93
  #### Rails 3.2.x
85
94
 
86
- Rails 3.2 is [no longer maintained for bugfixes](http://guides.rubyonrails.org/maintenance_policy.html), and you should upgrade as soon as possible.
87
-
88
- Starting with bootstrap-sass v3.1.1.1, due to the structural changes from upstream you will need these
89
- backported asset pipeline gems on Rails 3.2. There is more on why this is necessary in
90
- https://github.com/twbs/bootstrap-sass/issues/523 and https://github.com/twbs/bootstrap-sass/issues/578.
91
-
92
- ```ruby
93
- gem 'sprockets-rails', '=2.0.0.backport1'
94
- gem 'sprockets', '=2.2.2.backport2'
95
- gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
96
- ```
95
+ bootstrap-sass is no longer compatible with Rails 3. The latest version of bootstrap-sass compatible with Rails 3.2 is v3.1.1.0.
97
96
 
98
97
  ### b. Compass without Rails
99
98
 
@@ -128,7 +127,7 @@ $ compass create my-new-project -r bootstrap-sass --using bootstrap
128
127
  This will create a new Compass project with the following files in it:
129
128
 
130
129
  * [styles.sass](/templates/project/styles.sass) - main project Sass file, imports Bootstrap and variables.
131
- * [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass.erb) - all of Bootstrap variables, override them here.
130
+ * [_bootstrap-variables.sass](/templates/project/_bootstrap-variables.sass) - all of Bootstrap variables, override them here.
132
131
 
133
132
  Some bootstrap-sass mixins may conflict with the Compass ones.
134
133
  If this happens, change the import order so that Compass mixins are loaded later.
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.3.0
2
+ * Bootstrap: affix.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#affix
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -28,7 +28,7 @@
28
28
  this.checkPosition()
29
29
  }
30
30
 
31
- Affix.VERSION = '3.3.0'
31
+ Affix.VERSION = '3.3.1'
32
32
 
33
33
  Affix.RESET = 'affix affix-top affix-bottom'
34
34
 
@@ -162,7 +162,7 @@
162
162
  }(jQuery);
163
163
 
164
164
  /* ========================================================================
165
- * Bootstrap: alert.js v3.3.0
165
+ * Bootstrap: alert.js v3.3.1
166
166
  * http://getbootstrap.com/javascript/#alerts
167
167
  * ========================================================================
168
168
  * Copyright 2011-2014 Twitter, Inc.
@@ -181,7 +181,7 @@
181
181
  $(el).on('click', dismiss, this.close)
182
182
  }
183
183
 
184
- Alert.VERSION = '3.3.0'
184
+ Alert.VERSION = '3.3.1'
185
185
 
186
186
  Alert.TRANSITION_DURATION = 150
187
187
 
@@ -257,7 +257,7 @@
257
257
  }(jQuery);
258
258
 
259
259
  /* ========================================================================
260
- * Bootstrap: button.js v3.3.0
260
+ * Bootstrap: button.js v3.3.1
261
261
  * http://getbootstrap.com/javascript/#buttons
262
262
  * ========================================================================
263
263
  * Copyright 2011-2014 Twitter, Inc.
@@ -277,7 +277,7 @@
277
277
  this.isLoading = false
278
278
  }
279
279
 
280
- Button.VERSION = '3.3.0'
280
+ Button.VERSION = '3.3.1'
281
281
 
282
282
  Button.DEFAULTS = {
283
283
  loadingText: 'loading...'
@@ -368,13 +368,13 @@
368
368
  e.preventDefault()
369
369
  })
370
370
  .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
371
- $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
371
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
372
372
  })
373
373
 
374
374
  }(jQuery);
375
375
 
376
376
  /* ========================================================================
377
- * Bootstrap: carousel.js v3.3.0
377
+ * Bootstrap: carousel.js v3.3.1
378
378
  * http://getbootstrap.com/javascript/#carousel
379
379
  * ========================================================================
380
380
  * Copyright 2011-2014 Twitter, Inc.
@@ -405,7 +405,7 @@
405
405
  .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
406
406
  }
407
407
 
408
- Carousel.VERSION = '3.3.0'
408
+ Carousel.VERSION = '3.3.1'
409
409
 
410
410
  Carousel.TRANSITION_DURATION = 600
411
411
 
@@ -417,6 +417,7 @@
417
417
  }
418
418
 
419
419
  Carousel.prototype.keydown = function (e) {
420
+ if (/input|textarea/i.test(e.target.tagName)) return
420
421
  switch (e.which) {
421
422
  case 37: this.prev(); break
422
423
  case 39: this.next(); break
@@ -614,7 +615,7 @@
614
615
  }(jQuery);
615
616
 
616
617
  /* ========================================================================
617
- * Bootstrap: collapse.js v3.3.0
618
+ * Bootstrap: collapse.js v3.3.1
618
619
  * http://getbootstrap.com/javascript/#collapse
619
620
  * ========================================================================
620
621
  * Copyright 2011-2014 Twitter, Inc.
@@ -643,7 +644,7 @@
643
644
  if (this.options.toggle) this.toggle()
644
645
  }
645
646
 
646
- Collapse.VERSION = '3.3.0'
647
+ Collapse.VERSION = '3.3.1'
647
648
 
648
649
  Collapse.TRANSITION_DURATION = 350
649
650
 
@@ -826,7 +827,7 @@
826
827
  }(jQuery);
827
828
 
828
829
  /* ========================================================================
829
- * Bootstrap: dropdown.js v3.3.0
830
+ * Bootstrap: dropdown.js v3.3.1
830
831
  * http://getbootstrap.com/javascript/#dropdowns
831
832
  * ========================================================================
832
833
  * Copyright 2011-2014 Twitter, Inc.
@@ -846,7 +847,7 @@
846
847
  $(element).on('click.bs.dropdown', this.toggle)
847
848
  }
848
849
 
849
- Dropdown.VERSION = '3.3.0'
850
+ Dropdown.VERSION = '3.3.1'
850
851
 
851
852
  Dropdown.prototype.toggle = function (e) {
852
853
  var $this = $(this)
@@ -882,7 +883,7 @@
882
883
  }
883
884
 
884
885
  Dropdown.prototype.keydown = function (e) {
885
- if (!/(38|40|27|32)/.test(e.which)) return
886
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
886
887
 
887
888
  var $this = $(this)
888
889
 
@@ -988,7 +989,7 @@
988
989
  }(jQuery);
989
990
 
990
991
  /* ========================================================================
991
- * Bootstrap: tab.js v3.3.0
992
+ * Bootstrap: tab.js v3.3.1
992
993
  * http://getbootstrap.com/javascript/#tabs
993
994
  * ========================================================================
994
995
  * Copyright 2011-2014 Twitter, Inc.
@@ -1006,7 +1007,7 @@
1006
1007
  this.element = $(element)
1007
1008
  }
1008
1009
 
1009
- Tab.VERSION = '3.3.0'
1010
+ Tab.VERSION = '3.3.1'
1010
1011
 
1011
1012
  Tab.TRANSITION_DURATION = 150
1012
1013
 
@@ -1142,7 +1143,7 @@
1142
1143
  }(jQuery);
1143
1144
 
1144
1145
  /* ========================================================================
1145
- * Bootstrap: transition.js v3.3.0
1146
+ * Bootstrap: transition.js v3.3.1
1146
1147
  * http://getbootstrap.com/javascript/#transitions
1147
1148
  * ========================================================================
1148
1149
  * Copyright 2011-2014 Twitter, Inc.
@@ -1202,7 +1203,7 @@
1202
1203
  }(jQuery);
1203
1204
 
1204
1205
  /* ========================================================================
1205
- * Bootstrap: scrollspy.js v3.3.0
1206
+ * Bootstrap: scrollspy.js v3.3.1
1206
1207
  * http://getbootstrap.com/javascript/#scrollspy
1207
1208
  * ========================================================================
1208
1209
  * Copyright 2011-2014 Twitter, Inc.
@@ -1233,7 +1234,7 @@
1233
1234
  this.process()
1234
1235
  }
1235
1236
 
1236
- ScrollSpy.VERSION = '3.3.0'
1237
+ ScrollSpy.VERSION = '3.3.1'
1237
1238
 
1238
1239
  ScrollSpy.DEFAULTS = {
1239
1240
  offset: 10
@@ -1378,7 +1379,7 @@
1378
1379
  }(jQuery);
1379
1380
 
1380
1381
  /* ========================================================================
1381
- * Bootstrap: modal.js v3.3.0
1382
+ * Bootstrap: modal.js v3.3.1
1382
1383
  * http://getbootstrap.com/javascript/#modals
1383
1384
  * ========================================================================
1384
1385
  * Copyright 2011-2014 Twitter, Inc.
@@ -1409,7 +1410,7 @@
1409
1410
  }
1410
1411
  }
1411
1412
 
1412
- Modal.VERSION = '3.3.0'
1413
+ Modal.VERSION = '3.3.1'
1413
1414
 
1414
1415
  Modal.TRANSITION_DURATION = 300
1415
1416
  Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -1435,10 +1436,11 @@
1435
1436
  this.isShown = true
1436
1437
 
1437
1438
  this.checkScrollbar()
1439
+ this.setScrollbar()
1438
1440
  this.$body.addClass('modal-open')
1439
1441
 
1440
- this.setScrollbar()
1441
1442
  this.escape()
1443
+ this.resize()
1442
1444
 
1443
1445
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
1444
1446
 
@@ -1453,6 +1455,9 @@
1453
1455
  .show()
1454
1456
  .scrollTop(0)
1455
1457
 
1458
+ if (that.options.backdrop) that.adjustBackdrop()
1459
+ that.adjustDialog()
1460
+
1456
1461
  if (transition) {
1457
1462
  that.$element[0].offsetWidth // force reflow
1458
1463
  }
@@ -1487,6 +1492,7 @@
1487
1492
  this.isShown = false
1488
1493
 
1489
1494
  this.escape()
1495
+ this.resize()
1490
1496
 
1491
1497
  $(document).off('focusin.bs.modal')
1492
1498
 
@@ -1522,11 +1528,20 @@
1522
1528
  }
1523
1529
  }
1524
1530
 
1531
+ Modal.prototype.resize = function () {
1532
+ if (this.isShown) {
1533
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1534
+ } else {
1535
+ $(window).off('resize.bs.modal')
1536
+ }
1537
+ }
1538
+
1525
1539
  Modal.prototype.hideModal = function () {
1526
1540
  var that = this
1527
1541
  this.$element.hide()
1528
1542
  this.backdrop(function () {
1529
1543
  that.$body.removeClass('modal-open')
1544
+ that.resetAdjustments()
1530
1545
  that.resetScrollbar()
1531
1546
  that.$element.trigger('hidden.bs.modal')
1532
1547
  })
@@ -1583,13 +1598,43 @@
1583
1598
  }
1584
1599
  }
1585
1600
 
1601
+ // these following methods are used to handle overflowing modals
1602
+
1603
+ Modal.prototype.handleUpdate = function () {
1604
+ if (this.options.backdrop) this.adjustBackdrop()
1605
+ this.adjustDialog()
1606
+ }
1607
+
1608
+ Modal.prototype.adjustBackdrop = function () {
1609
+ this.$backdrop
1610
+ .css('height', 0)
1611
+ .css('height', this.$element[0].scrollHeight)
1612
+ }
1613
+
1614
+ Modal.prototype.adjustDialog = function () {
1615
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1616
+
1617
+ this.$element.css({
1618
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1619
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1620
+ })
1621
+ }
1622
+
1623
+ Modal.prototype.resetAdjustments = function () {
1624
+ this.$element.css({
1625
+ paddingLeft: '',
1626
+ paddingRight: ''
1627
+ })
1628
+ }
1629
+
1586
1630
  Modal.prototype.checkScrollbar = function () {
1631
+ this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
1587
1632
  this.scrollbarWidth = this.measureScrollbar()
1588
1633
  }
1589
1634
 
1590
1635
  Modal.prototype.setScrollbar = function () {
1591
1636
  var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1592
- if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1637
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1593
1638
  }
1594
1639
 
1595
1640
  Modal.prototype.resetScrollbar = function () {
@@ -1597,7 +1642,6 @@
1597
1642
  }
1598
1643
 
1599
1644
  Modal.prototype.measureScrollbar = function () { // thx walsh
1600
- if (document.body.clientWidth >= window.innerWidth) return 0
1601
1645
  var scrollDiv = document.createElement('div')
1602
1646
  scrollDiv.className = 'modal-scrollbar-measure'
1603
1647
  this.$body.append(scrollDiv)
@@ -1660,7 +1704,7 @@
1660
1704
  }(jQuery);
1661
1705
 
1662
1706
  /* ========================================================================
1663
- * Bootstrap: tooltip.js v3.3.0
1707
+ * Bootstrap: tooltip.js v3.3.1
1664
1708
  * http://getbootstrap.com/javascript/#tooltip
1665
1709
  * Inspired by the original jQuery.tipsy by Jason Frame
1666
1710
  * ========================================================================
@@ -1686,7 +1730,7 @@
1686
1730
  this.init('tooltip', element, options)
1687
1731
  }
1688
1732
 
1689
- Tooltip.VERSION = '3.3.0'
1733
+ Tooltip.VERSION = '3.3.1'
1690
1734
 
1691
1735
  Tooltip.TRANSITION_DURATION = 150
1692
1736
 
@@ -2139,7 +2183,7 @@
2139
2183
  }(jQuery);
2140
2184
 
2141
2185
  /* ========================================================================
2142
- * Bootstrap: popover.js v3.3.0
2186
+ * Bootstrap: popover.js v3.3.1
2143
2187
  * http://getbootstrap.com/javascript/#popovers
2144
2188
  * ========================================================================
2145
2189
  * Copyright 2011-2014 Twitter, Inc.
@@ -2159,7 +2203,7 @@
2159
2203
 
2160
2204
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
2161
2205
 
2162
- Popover.VERSION = '3.3.0'
2206
+ Popover.VERSION = '3.3.1'
2163
2207
 
2164
2208
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
2165
2209
  placement: 'right',
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: affix.js v3.3.0
2
+ * Bootstrap: affix.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#affix
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -28,7 +28,7 @@
28
28
  this.checkPosition()
29
29
  }
30
30
 
31
- Affix.VERSION = '3.3.0'
31
+ Affix.VERSION = '3.3.1'
32
32
 
33
33
  Affix.RESET = 'affix affix-top affix-bottom'
34
34
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: alert.js v3.3.0
2
+ * Bootstrap: alert.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#alerts
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -18,7 +18,7 @@
18
18
  $(el).on('click', dismiss, this.close)
19
19
  }
20
20
 
21
- Alert.VERSION = '3.3.0'
21
+ Alert.VERSION = '3.3.1'
22
22
 
23
23
  Alert.TRANSITION_DURATION = 150
24
24
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.3.0
2
+ * Bootstrap: button.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#buttons
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
19
19
  this.isLoading = false
20
20
  }
21
21
 
22
- Button.VERSION = '3.3.0'
22
+ Button.VERSION = '3.3.1'
23
23
 
24
24
  Button.DEFAULTS = {
25
25
  loadingText: 'loading...'
@@ -110,7 +110,7 @@
110
110
  e.preventDefault()
111
111
  })
112
112
  .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
113
- $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
113
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
114
114
  })
115
115
 
116
116
  }(jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: carousel.js v3.3.0
2
+ * Bootstrap: carousel.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#carousel
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
30
30
  .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
31
31
  }
32
32
 
33
- Carousel.VERSION = '3.3.0'
33
+ Carousel.VERSION = '3.3.1'
34
34
 
35
35
  Carousel.TRANSITION_DURATION = 600
36
36
 
@@ -42,6 +42,7 @@
42
42
  }
43
43
 
44
44
  Carousel.prototype.keydown = function (e) {
45
+ if (/input|textarea/i.test(e.target.tagName)) return
45
46
  switch (e.which) {
46
47
  case 37: this.prev(); break
47
48
  case 39: this.next(); break
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: collapse.js v3.3.0
2
+ * Bootstrap: collapse.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#collapse
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -28,7 +28,7 @@
28
28
  if (this.options.toggle) this.toggle()
29
29
  }
30
30
 
31
- Collapse.VERSION = '3.3.0'
31
+ Collapse.VERSION = '3.3.1'
32
32
 
33
33
  Collapse.TRANSITION_DURATION = 350
34
34
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.3.0
2
+ * Bootstrap: dropdown.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#dropdowns
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
19
19
  $(element).on('click.bs.dropdown', this.toggle)
20
20
  }
21
21
 
22
- Dropdown.VERSION = '3.3.0'
22
+ Dropdown.VERSION = '3.3.1'
23
23
 
24
24
  Dropdown.prototype.toggle = function (e) {
25
25
  var $this = $(this)
@@ -55,7 +55,7 @@
55
55
  }
56
56
 
57
57
  Dropdown.prototype.keydown = function (e) {
58
- if (!/(38|40|27|32)/.test(e.which)) return
58
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
59
59
 
60
60
  var $this = $(this)
61
61
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.3.0
2
+ * Bootstrap: modal.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- Modal.VERSION = '3.3.0'
33
+ Modal.VERSION = '3.3.1'
34
34
 
35
35
  Modal.TRANSITION_DURATION = 300
36
36
  Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -56,10 +56,11 @@
56
56
  this.isShown = true
57
57
 
58
58
  this.checkScrollbar()
59
+ this.setScrollbar()
59
60
  this.$body.addClass('modal-open')
60
61
 
61
- this.setScrollbar()
62
62
  this.escape()
63
+ this.resize()
63
64
 
64
65
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
65
66
 
@@ -74,6 +75,9 @@
74
75
  .show()
75
76
  .scrollTop(0)
76
77
 
78
+ if (that.options.backdrop) that.adjustBackdrop()
79
+ that.adjustDialog()
80
+
77
81
  if (transition) {
78
82
  that.$element[0].offsetWidth // force reflow
79
83
  }
@@ -108,6 +112,7 @@
108
112
  this.isShown = false
109
113
 
110
114
  this.escape()
115
+ this.resize()
111
116
 
112
117
  $(document).off('focusin.bs.modal')
113
118
 
@@ -143,11 +148,20 @@
143
148
  }
144
149
  }
145
150
 
151
+ Modal.prototype.resize = function () {
152
+ if (this.isShown) {
153
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
154
+ } else {
155
+ $(window).off('resize.bs.modal')
156
+ }
157
+ }
158
+
146
159
  Modal.prototype.hideModal = function () {
147
160
  var that = this
148
161
  this.$element.hide()
149
162
  this.backdrop(function () {
150
163
  that.$body.removeClass('modal-open')
164
+ that.resetAdjustments()
151
165
  that.resetScrollbar()
152
166
  that.$element.trigger('hidden.bs.modal')
153
167
  })
@@ -204,13 +218,43 @@
204
218
  }
205
219
  }
206
220
 
221
+ // these following methods are used to handle overflowing modals
222
+
223
+ Modal.prototype.handleUpdate = function () {
224
+ if (this.options.backdrop) this.adjustBackdrop()
225
+ this.adjustDialog()
226
+ }
227
+
228
+ Modal.prototype.adjustBackdrop = function () {
229
+ this.$backdrop
230
+ .css('height', 0)
231
+ .css('height', this.$element[0].scrollHeight)
232
+ }
233
+
234
+ Modal.prototype.adjustDialog = function () {
235
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
236
+
237
+ this.$element.css({
238
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
239
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
240
+ })
241
+ }
242
+
243
+ Modal.prototype.resetAdjustments = function () {
244
+ this.$element.css({
245
+ paddingLeft: '',
246
+ paddingRight: ''
247
+ })
248
+ }
249
+
207
250
  Modal.prototype.checkScrollbar = function () {
251
+ this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
208
252
  this.scrollbarWidth = this.measureScrollbar()
209
253
  }
210
254
 
211
255
  Modal.prototype.setScrollbar = function () {
212
256
  var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
213
- if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
257
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
214
258
  }
215
259
 
216
260
  Modal.prototype.resetScrollbar = function () {
@@ -218,7 +262,6 @@
218
262
  }
219
263
 
220
264
  Modal.prototype.measureScrollbar = function () { // thx walsh
221
- if (document.body.clientWidth >= window.innerWidth) return 0
222
265
  var scrollDiv = document.createElement('div')
223
266
  scrollDiv.className = 'modal-scrollbar-measure'
224
267
  this.$body.append(scrollDiv)
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: popover.js v3.3.0
2
+ * Bootstrap: popover.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#popovers
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
19
19
 
20
20
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
21
21
 
22
- Popover.VERSION = '3.3.0'
22
+ Popover.VERSION = '3.3.1'
23
23
 
24
24
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
25
25
  placement: 'right',
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: scrollspy.js v3.3.0
2
+ * Bootstrap: scrollspy.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#scrollspy
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
30
30
  this.process()
31
31
  }
32
32
 
33
- ScrollSpy.VERSION = '3.3.0'
33
+ ScrollSpy.VERSION = '3.3.1'
34
34
 
35
35
  ScrollSpy.DEFAULTS = {
36
36
  offset: 10
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tab.js v3.3.0
2
+ * Bootstrap: tab.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#tabs
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -17,7 +17,7 @@
17
17
  this.element = $(element)
18
18
  }
19
19
 
20
- Tab.VERSION = '3.3.0'
20
+ Tab.VERSION = '3.3.1'
21
21
 
22
22
  Tab.TRANSITION_DURATION = 150
23
23
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.3.0
2
+ * Bootstrap: tooltip.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -25,7 +25,7 @@
25
25
  this.init('tooltip', element, options)
26
26
  }
27
27
 
28
- Tooltip.VERSION = '3.3.0'
28
+ Tooltip.VERSION = '3.3.1'
29
29
 
30
30
  Tooltip.TRANSITION_DURATION = 150
31
31
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: transition.js v3.3.0
2
+ * Bootstrap: transition.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#transitions
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -36,11 +36,17 @@
36
36
  // [converter] extracted a& to a.badge
37
37
 
38
38
  // Account for badges in navs
39
- a.list-group-item.active > &,
39
+ .list-group-item.active > &,
40
40
  .nav-pills > .active > a > & {
41
41
  color: $badge-active-color;
42
42
  background-color: $badge-active-bg;
43
43
  }
44
+ .list-group-item > & {
45
+ float: right;
46
+ }
47
+ .list-group-item > & + & {
48
+ margin-right: 5px;
49
+ }
44
50
  .nav-pills > li > a > & {
45
51
  margin-left: 3px;
46
52
  }
@@ -18,10 +18,6 @@
18
18
  &.active {
19
19
  z-index: 2;
20
20
  }
21
- &:focus {
22
- // Remove focus outline when dropdown JS adds it after closing the menu
23
- outline: 0;
24
- }
25
21
  }
26
22
  }
27
23
 
@@ -170,41 +170,28 @@ input[type="search"] {
170
170
  // Special styles for iOS temporal inputs
171
171
  //
172
172
  // In Mobile Safari, setting `display: block` on temporal inputs causes the
173
- // text within the input to become vertically misaligned.
174
- // As a workaround, we set a pixel line-height that matches the
175
- // given height of the input. Since this fucks up everything else, we have to
176
- // appropriately reset it for Internet Explorer and the size variations.
177
-
178
- input[type="date"],
179
- input[type="time"],
180
- input[type="datetime-local"],
181
- input[type="month"] {
182
- line-height: $input-height-base;
183
- // IE8+ misaligns the text within date inputs, so we reset
184
- line-height: $line-height-base #{\0};
185
-
186
- &.input-sm {
173
+ // text within the input to become vertically misaligned. As a workaround, we
174
+ // set a pixel line-height that matches the given height of the input, but only
175
+ // for Safari.
176
+
177
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
178
+ input[type="date"],
179
+ input[type="time"],
180
+ input[type="datetime-local"],
181
+ input[type="month"] {
182
+ line-height: $input-height-base;
183
+ }
184
+ input[type="date"].input-sm,
185
+ input[type="time"].input-sm,
186
+ input[type="datetime-local"].input-sm,
187
+ input[type="month"].input-sm {
187
188
  line-height: $input-height-small;
188
- line-height: $line-height-small #{\0};
189
189
  }
190
- &.input-lg {
190
+ input[type="date"].input-lg,
191
+ input[type="time"].input-lg,
192
+ input[type="datetime-local"].input-lg,
193
+ input[type="month"].input-lg {
191
194
  line-height: $input-height-large;
192
- line-height: $line-height-large #{\0};
193
- }
194
- }
195
-
196
- // IE 11 hack to reverse the iOS temporal input hack.
197
- _:-ms-fullscreen, :root input[type="date"],
198
- _:-ms-fullscreen, :root input[type="time"],
199
- _:-ms-fullscreen, :root input[type="datetime-local"],
200
- _:-ms-fullscreen, :root input[type="month"] {
201
- line-height: $line-height-base;
202
-
203
- &.input-sm {
204
- line-height: $line-height-small;
205
- }
206
- &.input-lg {
207
- line-height: $line-height-large;
208
195
  }
209
196
  }
210
197
 
@@ -35,7 +35,8 @@
35
35
  @media screen and (min-width: $screen-sm-min) {
36
36
  padding: ($jumbotron-padding * 1.6) 0;
37
37
 
38
- .container & {
38
+ .container &,
39
+ .container-fluid & {
39
40
  padding-left: ($jumbotron-padding * 2);
40
41
  padding-right: ($jumbotron-padding * 2);
41
42
  }
@@ -35,14 +35,6 @@
35
35
  margin-bottom: 0;
36
36
  @include border-bottom-radius($list-group-border-radius);
37
37
  }
38
-
39
- // Align badges within list items
40
- > .badge {
41
- float: right;
42
- }
43
- > .badge + .badge {
44
- margin-right: 5px;
45
- }
46
38
  }
47
39
 
48
40
 
@@ -62,10 +62,9 @@
62
62
 
63
63
  // Modal background
64
64
  .modal-backdrop {
65
- position: fixed;
65
+ position: absolute;
66
66
  top: 0;
67
67
  right: 0;
68
- bottom: 0;
69
68
  left: 0;
70
69
  background-color: $modal-backdrop-bg;
71
70
  // Fade for backdrop
@@ -331,6 +331,7 @@
331
331
  }
332
332
  // Menu position and menu caret support for dropups via extra dropup class
333
333
  .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
334
+ @include border-top-radius($navbar-border-radius);
334
335
  @include border-bottom-radius(0);
335
336
  }
336
337
 
@@ -12,6 +12,7 @@
12
12
  max-width: $popover-max-width;
13
13
  padding: 1px;
14
14
  // Reset font and text propertes given new insertion method
15
+ font-family: $font-family-base;
15
16
  font-size: $font-size-base;
16
17
  font-weight: normal;
17
18
  line-height: $line-height-base;
@@ -151,6 +151,18 @@
151
151
  border-radius: 0;
152
152
  }
153
153
 
154
+ // Fix active state of dropdown items in collapsed mode
155
+ @media (max-width: $grid-float-breakpoint-max) {
156
+ .navbar .navbar-nav .open .dropdown-menu > .active > a {
157
+ &,
158
+ &:hover,
159
+ &:focus {
160
+ color: #fff;
161
+ @include gradient-vertical($start-color: $dropdown-link-active-bg, $end-color: darken($dropdown-link-active-bg, 5%));
162
+ }
163
+ }
164
+ }
165
+
154
166
 
155
167
  //
156
168
  // Alerts
@@ -9,7 +9,10 @@
9
9
  z-index: $zindex-tooltip;
10
10
  display: block;
11
11
  visibility: visible;
12
+ // Reset font and text propertes given new insertion method
13
+ font-family: $font-family-base;
12
14
  font-size: $font-size-small;
15
+ font-weight: normal;
13
16
  line-height: 1.4;
14
17
  @include opacity(0);
15
18
 
@@ -39,6 +42,7 @@
39
42
  border-color: transparent;
40
43
  border-style: solid;
41
44
  }
45
+ // Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
42
46
  .tooltip {
43
47
  &.top .tooltip-arrow {
44
48
  bottom: 0;
@@ -49,13 +53,15 @@
49
53
  }
50
54
  &.top-left .tooltip-arrow {
51
55
  bottom: 0;
52
- left: $tooltip-arrow-width;
56
+ right: $tooltip-arrow-width;
57
+ margin-bottom: -$tooltip-arrow-width;
53
58
  border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
54
59
  border-top-color: $tooltip-arrow-color;
55
60
  }
56
61
  &.top-right .tooltip-arrow {
57
62
  bottom: 0;
58
- right: $tooltip-arrow-width;
63
+ left: $tooltip-arrow-width;
64
+ margin-bottom: -$tooltip-arrow-width;
59
65
  border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
60
66
  border-top-color: $tooltip-arrow-color;
61
67
  }
@@ -82,13 +88,15 @@
82
88
  }
83
89
  &.bottom-left .tooltip-arrow {
84
90
  top: 0;
85
- left: $tooltip-arrow-width;
91
+ right: $tooltip-arrow-width;
92
+ margin-top: -$tooltip-arrow-width;
86
93
  border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
87
94
  border-bottom-color: $tooltip-arrow-color;
88
95
  }
89
96
  &.bottom-right .tooltip-arrow {
90
97
  top: 0;
91
- right: $tooltip-arrow-width;
98
+ left: $tooltip-arrow-width;
99
+ margin-top: -$tooltip-arrow-width;
92
100
  border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
93
101
  border-bottom-color: $tooltip-arrow-color;
94
102
  }
@@ -19,7 +19,7 @@ $gray: lighten($gray-base, 33.5%) !default; // #555
19
19
  $gray-light: lighten($gray-base, 46.7%) !default; // #777
20
20
  $gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
21
21
 
22
- $brand-primary: #428bca !default;
22
+ $brand-primary: darken(#428bca, 6.5%) !default;
23
23
  $brand-success: #5cb85c !default;
24
24
  $brand-info: #5bc0de !default;
25
25
  $brand-warning: #f0ad4e !default;
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "homepage": "https://github.com/twbs/bootstrap-sass",
5
5
  "authors": [
6
6
  "Thomas McDonald",
@@ -1,4 +1,4 @@
1
1
  module Bootstrap
2
- VERSION = '3.3.0.1'
3
- BOOTSTRAP_SHA = '16dbdbd7a2c6cfa3be4e5dcc52249e577c02c84a'
2
+ VERSION = '3.3.1.0'
3
+ BOOTSTRAP_SHA = '9a7e365c2c4360335d25246dac11afb1f577210a'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap-sass",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -145,7 +145,7 @@ class Converter
145
145
 
146
146
  # generate variables template
147
147
  save_file 'templates/project/_bootstrap-variables.sass',
148
- "// Override Bootstrap variables here (defaults from bootstrap-sass v<%= Bootstrap::VERSION %>):\n\n" +
148
+ "// Override Bootstrap variables here (defaults from bootstrap-sass v#{Bootstrap::VERSION}):\n\n" +
149
149
  File.read("#{save_to}/_variables.scss").gsub(/^(?=\$)/, '// ').gsub(/ !default;/, '')
150
150
  end
151
151
 
@@ -1,4 +1,4 @@
1
- // Override Bootstrap variables here (defaults from bootstrap-sass v<%= Bootstrap::VERSION %>):
1
+ // Override Bootstrap variables here (defaults from bootstrap-sass v3.3.1.0):
2
2
 
3
3
  // When true, asset path helpers are used, otherwise the regular CSS `url()` is used.
4
4
  // When there no function is defined, `fn('')` is parsed as string that equals the right hand side
@@ -21,7 +21,7 @@
21
21
  // $gray-light: lighten($gray-base, 46.7%) // #777
22
22
  // $gray-lighter: lighten($gray-base, 93.5%) // #eee
23
23
 
24
- // $brand-primary: #428bca
24
+ // $brand-primary: darken(#428bca, 6.5%)
25
25
  // $brand-success: #5cb85c
26
26
  // $brand-info: #5bc0de
27
27
  // $brand-warning: #f0ad4e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0.1
4
+ version: 3.3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas McDonald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-30 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass