bootstrap-sass 2.2.2.0 → 2.3.0.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.
- data/README.md +44 -22
- data/lib/bootstrap-sass.rb +3 -1
- data/vendor/assets/javascripts/bootstrap-affix.js +1 -1
- data/vendor/assets/javascripts/bootstrap-alert.js +1 -1
- data/vendor/assets/javascripts/bootstrap-button.js +1 -1
- data/vendor/assets/javascripts/bootstrap-carousel.js +31 -9
- data/vendor/assets/javascripts/bootstrap-collapse.js +4 -4
- data/vendor/assets/javascripts/bootstrap-dropdown.js +14 -10
- data/vendor/assets/javascripts/bootstrap-modal.js +13 -11
- data/vendor/assets/javascripts/bootstrap-popover.js +5 -5
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +2 -2
- data/vendor/assets/javascripts/bootstrap-tab.js +1 -1
- data/vendor/assets/javascripts/bootstrap-tooltip.js +95 -29
- data/vendor/assets/javascripts/bootstrap-transition.js +1 -1
- data/vendor/assets/javascripts/bootstrap-typeahead.js +16 -4
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +4 -2
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +8 -10
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +33 -6
- data/vendor/assets/stylesheets/bootstrap/_close.scss +2 -1
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +16 -12
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +5 -2
- data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +4 -2
- data/vendor/assets/stylesheets/bootstrap/_media.scss +2 -2
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +6 -0
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +3 -3
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +18 -11
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +39 -21
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +3 -1
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +3 -1
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +5 -1
- data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +6 -2
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +29 -13
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +2 -1
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +7 -3
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +24 -17
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +3 -2
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +6 -6
- data/vendor/assets/stylesheets/bootstrap/_type.scss +20 -8
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +2 -2
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +1 -1
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +1 -10
- metadata +9 -24
data/README.md
CHANGED
@@ -12,14 +12,18 @@ Enjoy.
|
|
12
12
|
|
13
13
|
In your Gemfile:
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
```ruby
|
16
|
+
gem 'sass-rails', '~> 3.2'
|
17
|
+
gem 'bootstrap-sass', '~> 2.3.0.0'
|
18
|
+
```
|
17
19
|
|
18
20
|
#### CSS
|
19
21
|
|
20
22
|
Import "bootstrap" in your SCSS file of choice to get all of Bootstrap's styles, mixins and variables! We recommend against using `//= require` directives, since none of your other stylesheets will be [able to use](https://github.com/thomas-mcdonald/bootstrap-sass/issues/79#issuecomment-4428595) the awesome mixins that Bootstrap has defined.
|
21
23
|
|
22
|
-
|
24
|
+
```css
|
25
|
+
@import "bootstrap";
|
26
|
+
```
|
23
27
|
|
24
28
|
#### Javascripts
|
25
29
|
|
@@ -27,14 +31,18 @@ You can include the Bootstrap javascripts through two methods. In this case, Spr
|
|
27
31
|
|
28
32
|
We have a helper that includes all available javascripts:
|
29
33
|
|
30
|
-
|
31
|
-
|
34
|
+
```js
|
35
|
+
// Loads all Bootstrap javascripts
|
36
|
+
//= require bootstrap
|
37
|
+
```
|
32
38
|
|
33
39
|
You can also load individual modules, provided you sort out any related dependencies.
|
34
40
|
|
35
|
-
|
36
|
-
|
37
|
-
|
41
|
+
```js
|
42
|
+
//= require bootstrap-scrollspy
|
43
|
+
//= require bootstrap-modal
|
44
|
+
//= require bootstrap-dropdown
|
45
|
+
```
|
38
46
|
|
39
47
|
Simples.
|
40
48
|
|
@@ -46,8 +54,10 @@ Simples.
|
|
46
54
|
|
47
55
|
Install the gem and create a new project using the gem.
|
48
56
|
|
49
|
-
|
50
|
-
|
57
|
+
```console
|
58
|
+
gem install bootstrap-sass
|
59
|
+
compass create compass-test -r bootstrap-sass --using bootstrap
|
60
|
+
```
|
51
61
|
|
52
62
|
This will sort a few things out:
|
53
63
|
|
@@ -59,20 +69,28 @@ This will sort a few things out:
|
|
59
69
|
|
60
70
|
Install the gem, add the require statement to the top of your configuration file, and install the extension.
|
61
71
|
|
62
|
-
|
72
|
+
```console
|
73
|
+
gem install bootstrap-sass
|
74
|
+
```
|
63
75
|
|
64
|
-
|
65
|
-
|
76
|
+
```ruby
|
77
|
+
# In config.rb
|
78
|
+
require 'bootstrap-sass'
|
79
|
+
```
|
66
80
|
|
67
|
-
|
81
|
+
```console
|
82
|
+
compass install bootstrap
|
83
|
+
```
|
68
84
|
|
69
85
|
You'll get the same benefits as those starting from scratch. Radical.
|
70
86
|
|
71
87
|
## Configuration
|
72
88
|
Need to configure a variable or two? Simply define the value of the variable you want to change *before* importing Bootstrap. Sass will respect your existing definition rather than overwriting it with the Bootstrap defaults. A list of customisable variables can be found in the [Bootstrap documentation](http://twitter.github.com/bootstrap/customize.html#variables).
|
73
89
|
|
74
|
-
|
75
|
-
|
90
|
+
```scss
|
91
|
+
$btnPrimaryBackground: #f00;
|
92
|
+
@import "bootstrap";
|
93
|
+
```
|
76
94
|
|
77
95
|
**Note**: It's important that the file you are importing is not named `bootstrap`, since this will cause an import loop. As a general rule, errors are something you should try to avoid.
|
78
96
|
|
@@ -80,21 +98,25 @@ Need to configure a variable or two? Simply define the value of the variable you
|
|
80
98
|
|
81
99
|
Some CSS3 properties take multiple values, such as `box-shadow` or `text-shadow`. To pass multiple values to the Bootstrap mixins, you must escape the values or else the Sass parser will choke on the commas. Here's how to escape the values in Sass:
|
82
100
|
|
83
|
-
|
84
|
-
|
85
|
-
|
101
|
+
```scss
|
102
|
+
.selector {
|
103
|
+
@include box-shadow(#{0 2px 5px rgba(0,0,0,.25) inset, 0 -2px 5px rgba(0,0,0,.25) inset});
|
104
|
+
}
|
105
|
+
```
|
86
106
|
|
87
107
|
### Responsive styling?
|
88
108
|
As per the Bootstrap project we don't include the responsive styles by default. `@import "bootstrap-responsive";` to get them.
|
89
109
|
|
90
110
|
## Versioning
|
91
|
-
Bootstrap [claims](https://github.com/twitter/bootstrap#versioning) to use SemVer, although this is for values of public API that don't seem to include selectively requiring CSS components (see breaking change 2.0.2 -> 2.0.3). Since many people using bootstrap-sass *do* selectively require CSS components and I consider it part of the public API we can't really follow SemVer without becoming wildly out of sync with the Bootstrap version number, which is confusing for everyone involved. Further releases to bootstrap-sass will therefore have version numbers of the form `2.x.y.z`, where `2.x.y` is the release of Bootstrap we should be compatible with, and `
|
111
|
+
Bootstrap [claims](https://github.com/twitter/bootstrap#versioning) to use SemVer, although this is for values of public API that don't seem to include selectively requiring CSS components (see breaking change 2.0.2 -> 2.0.3). Since many people using bootstrap-sass *do* selectively require CSS components and I consider it part of the public API we can't really follow SemVer without becoming wildly out of sync with the Bootstrap version number, which is confusing for everyone involved. Further releases to bootstrap-sass will therefore have version numbers of the form `2.x.y.z`, where `2.x.y` is the release of Bootstrap we should be compatible with, and `z` is the patch version.
|
92
112
|
|
93
113
|
Basically this means you should expect to append a separate patch version to the bootstrap version, which allows our versioning to stay more honest about changes.
|
94
114
|
|
95
115
|
### Bundler?
|
96
116
|
|
97
|
-
|
117
|
+
```ruby
|
118
|
+
gem 'bootstrap-sass', '~> 2.3.0.0'
|
119
|
+
```
|
98
120
|
|
99
121
|
Don't use the standard `~> 2.x.y`. Your apps may break.
|
100
122
|
|
@@ -102,4 +124,4 @@ Don't use the standard `~> 2.x.y`. Your apps may break.
|
|
102
124
|
bootstrap-sass is a project by [Thomas McDonald](https://twitter.com/#!/thomasmcdonald_), with support from [other awesome people](https://github.com/thomas-mcdonald/bootstrap-sass/graphs/contributors).
|
103
125
|
|
104
126
|
## You're in good company
|
105
|
-
bootstrap-sass is used to build some awesome projects, including [Diaspora](http://diasporaproject.org/), [rails_admin](https://github.com/sferik/rails_admin), Michael Hartl's [Rails Tutorial](http://railstutorial.org/) and [gitlabhq](http://gitlabhq.com/). Using bootstrap-sass? I'd love it if you let me know.
|
127
|
+
bootstrap-sass is used to build some awesome projects, including [Diaspora](http://diasporaproject.org/), [rails_admin](https://github.com/sferik/rails_admin), Michael Hartl's [Rails Tutorial](http://railstutorial.org/) and [gitlabhq](http://gitlabhq.com/). Using bootstrap-sass? I'd love it if you let me know.
|
data/lib/bootstrap-sass.rb
CHANGED
@@ -17,11 +17,13 @@ module Bootstrap
|
|
17
17
|
else
|
18
18
|
raise Bootstrap::FrameworkNotFound, "bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded"
|
19
19
|
end
|
20
|
+
stylesheets = File.expand_path(File.join("..", 'vendor', 'assets', 'stylesheets'))
|
21
|
+
Sass.load_paths << stylesheets
|
20
22
|
end
|
21
23
|
|
22
24
|
private
|
23
25
|
def self.asset_pipeline?
|
24
|
-
defined?(::
|
26
|
+
defined?(::Sprockets)
|
25
27
|
end
|
26
28
|
|
27
29
|
def self.compass?
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-affix.js v2.
|
2
|
+
* bootstrap-affix.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#affix
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-alert.js v2.
|
2
|
+
* bootstrap-alert.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-button.js v2.
|
2
|
+
* bootstrap-button.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-carousel.js v2.
|
2
|
+
* bootstrap-carousel.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -28,6 +28,7 @@
|
|
28
28
|
|
29
29
|
var Carousel = function (element, options) {
|
30
30
|
this.$element = $(element)
|
31
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
31
32
|
this.options = options
|
32
33
|
this.options.pause == 'hover' && this.$element
|
33
34
|
.on('mouseenter', $.proxy(this.pause, this))
|
@@ -38,19 +39,24 @@
|
|
38
39
|
|
39
40
|
cycle: function (e) {
|
40
41
|
if (!e) this.paused = false
|
42
|
+
if (this.interval) clearInterval(this.interval);
|
41
43
|
this.options.interval
|
42
44
|
&& !this.paused
|
43
45
|
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
44
46
|
return this
|
45
47
|
}
|
46
48
|
|
49
|
+
, getActiveIndex: function () {
|
50
|
+
this.$active = this.$element.find('.item.active')
|
51
|
+
this.$items = this.$active.parent().children()
|
52
|
+
return this.$items.index(this.$active)
|
53
|
+
}
|
54
|
+
|
47
55
|
, to: function (pos) {
|
48
|
-
var
|
49
|
-
, children = $active.parent().children()
|
50
|
-
, activePos = children.index($active)
|
56
|
+
var activeIndex = this.getActiveIndex()
|
51
57
|
, that = this
|
52
58
|
|
53
|
-
if (pos > (
|
59
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
54
60
|
|
55
61
|
if (this.sliding) {
|
56
62
|
return this.$element.one('slid', function () {
|
@@ -58,11 +64,11 @@
|
|
58
64
|
})
|
59
65
|
}
|
60
66
|
|
61
|
-
if (
|
67
|
+
if (activeIndex == pos) {
|
62
68
|
return this.pause().cycle()
|
63
69
|
}
|
64
70
|
|
65
|
-
return this.slide(pos >
|
71
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
66
72
|
}
|
67
73
|
|
68
74
|
, pause: function (e) {
|
@@ -103,10 +109,19 @@
|
|
103
109
|
|
104
110
|
e = $.Event('slide', {
|
105
111
|
relatedTarget: $next[0]
|
112
|
+
, direction: direction
|
106
113
|
})
|
107
114
|
|
108
115
|
if ($next.hasClass('active')) return
|
109
116
|
|
117
|
+
if (this.$indicators.length) {
|
118
|
+
this.$indicators.find('.active').removeClass('active')
|
119
|
+
this.$element.one('slid', function () {
|
120
|
+
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
121
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
122
|
+
})
|
123
|
+
}
|
124
|
+
|
110
125
|
if ($.support.transition && this.$element.hasClass('slide')) {
|
111
126
|
this.$element.trigger(e)
|
112
127
|
if (e.isDefaultPrevented()) return
|
@@ -151,7 +166,7 @@
|
|
151
166
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
152
167
|
if (typeof option == 'number') data.to(option)
|
153
168
|
else if (action) data[action]()
|
154
|
-
else if (options.interval) data.cycle()
|
169
|
+
else if (options.interval) data.pause().cycle()
|
155
170
|
})
|
156
171
|
}
|
157
172
|
|
@@ -174,11 +189,18 @@
|
|
174
189
|
/* CAROUSEL DATA-API
|
175
190
|
* ================= */
|
176
191
|
|
177
|
-
$(document).on('click.carousel.data-api', '[data-slide]', function (e) {
|
192
|
+
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
178
193
|
var $this = $(this), href
|
179
194
|
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
180
195
|
, options = $.extend({}, $target.data(), $this.data())
|
196
|
+
, slideIndex
|
197
|
+
|
181
198
|
$target.carousel(options)
|
199
|
+
|
200
|
+
if (slideIndex = $this.attr('data-slide-to')) {
|
201
|
+
$target.data('carousel').pause().to(slideIndex).cycle()
|
202
|
+
}
|
203
|
+
|
182
204
|
e.preventDefault()
|
183
205
|
})
|
184
206
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-collapse.js v2.
|
2
|
+
* bootstrap-collapse.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -52,7 +52,7 @@
|
|
52
52
|
, actives
|
53
53
|
, hasData
|
54
54
|
|
55
|
-
if (this.transitioning) return
|
55
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
56
56
|
|
57
57
|
dimension = this.dimension()
|
58
58
|
scroll = $.camelCase(['scroll', dimension].join('-'))
|
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
, hide: function () {
|
74
74
|
var dimension
|
75
|
-
if (this.transitioning) return
|
75
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
76
76
|
dimension = this.dimension()
|
77
77
|
this.reset(this.$element[dimension]())
|
78
78
|
this.transition('removeClass', $.Event('hide'), 'hidden')
|
@@ -129,7 +129,7 @@
|
|
129
129
|
return this.each(function () {
|
130
130
|
var $this = $(this)
|
131
131
|
, data = $this.data('collapse')
|
132
|
-
, options = typeof option == 'object' && option
|
132
|
+
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
|
133
133
|
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
134
134
|
if (typeof option == 'string') data[option]()
|
135
135
|
})
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-dropdown.js v2.
|
2
|
+
* bootstrap-dropdown.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -81,7 +81,10 @@
|
|
81
81
|
|
82
82
|
isActive = $parent.hasClass('open')
|
83
83
|
|
84
|
-
if (!isActive || (isActive && e.keyCode == 27))
|
84
|
+
if (!isActive || (isActive && e.keyCode == 27)) {
|
85
|
+
if (e.which == 27) $parent.find(toggle).focus()
|
86
|
+
return $this.click()
|
87
|
+
}
|
85
88
|
|
86
89
|
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
87
90
|
|
@@ -115,8 +118,9 @@
|
|
115
118
|
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
116
119
|
}
|
117
120
|
|
118
|
-
$parent = $(selector)
|
119
|
-
|
121
|
+
$parent = selector && $(selector)
|
122
|
+
|
123
|
+
if (!$parent || !$parent.length) $parent = $this.parent()
|
120
124
|
|
121
125
|
return $parent
|
122
126
|
}
|
@@ -152,10 +156,10 @@
|
|
152
156
|
* =================================== */
|
153
157
|
|
154
158
|
$(document)
|
155
|
-
.on('click.dropdown.data-api
|
156
|
-
.on('click.dropdown
|
157
|
-
.on('
|
158
|
-
.on('click.dropdown.data-api
|
159
|
-
.on('keydown.dropdown.data-api
|
159
|
+
.on('click.dropdown.data-api', clearMenus)
|
160
|
+
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
161
|
+
.on('.dropdown-menu', function (e) { e.stopPropagation() })
|
162
|
+
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
163
|
+
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
160
164
|
|
161
|
-
}(window.jQuery);
|
165
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =========================================================
|
2
|
-
* bootstrap-modal.js v2.
|
2
|
+
* bootstrap-modal.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
4
|
* =========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -60,8 +60,7 @@
|
|
60
60
|
that.$element.appendTo(document.body) //don't move modals dom position
|
61
61
|
}
|
62
62
|
|
63
|
-
that.$element
|
64
|
-
.show()
|
63
|
+
that.$element.show()
|
65
64
|
|
66
65
|
if (transition) {
|
67
66
|
that.$element[0].offsetWidth // force reflow
|
@@ -139,12 +138,13 @@
|
|
139
138
|
})
|
140
139
|
}
|
141
140
|
|
142
|
-
, hideModal: function (
|
143
|
-
this
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
141
|
+
, hideModal: function () {
|
142
|
+
var that = this
|
143
|
+
this.$element.hide()
|
144
|
+
this.backdrop(function () {
|
145
|
+
that.removeBackdrop()
|
146
|
+
that.$element.trigger('hidden')
|
147
|
+
})
|
148
148
|
}
|
149
149
|
|
150
150
|
, removeBackdrop: function () {
|
@@ -172,6 +172,8 @@
|
|
172
172
|
|
173
173
|
this.$backdrop.addClass('in')
|
174
174
|
|
175
|
+
if (!callback) return
|
176
|
+
|
175
177
|
doAnimate ?
|
176
178
|
this.$backdrop.one($.support.transition.end, callback) :
|
177
179
|
callback()
|
@@ -180,8 +182,8 @@
|
|
180
182
|
this.$backdrop.removeClass('in')
|
181
183
|
|
182
184
|
$.support.transition && this.$element.hasClass('fade')?
|
183
|
-
this.$backdrop.one($.support.transition.end,
|
184
|
-
|
185
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
186
|
+
callback()
|
185
187
|
|
186
188
|
} else if (callback) {
|
187
189
|
callback()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.
|
2
|
+
* bootstrap-popover.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
4
|
* ===========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -58,8 +58,8 @@
|
|
58
58
|
, $e = this.$element
|
59
59
|
, o = this.options
|
60
60
|
|
61
|
-
content = $e.
|
62
|
-
||
|
61
|
+
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
62
|
+
|| $e.attr('data-content')
|
63
63
|
|
64
64
|
return content
|
65
65
|
}
|
@@ -99,7 +99,7 @@
|
|
99
99
|
placement: 'right'
|
100
100
|
, trigger: 'click'
|
101
101
|
, content: ''
|
102
|
-
, template: '<div class="popover"><div class="arrow"></div><
|
102
|
+
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
103
103
|
})
|
104
104
|
|
105
105
|
|
@@ -111,4 +111,4 @@
|
|
111
111
|
return this
|
112
112
|
}
|
113
113
|
|
114
|
-
}(window.jQuery);
|
114
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-scrollspy.js v2.
|
2
|
+
* bootstrap-scrollspy.js v2.3.0
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -59,7 +59,7 @@
|
|
59
59
|
, $href = /^#\w/.test(href) && $(href)
|
60
60
|
return ( $href
|
61
61
|
&& $href.length
|
62
|
-
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
62
|
+
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
|
63
63
|
})
|
64
64
|
.sort(function (a, b) { return a[0] - b[0] })
|
65
65
|
.each(function () {
|