anjlab-bootstrap-rails 3.0.0.rc1 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -12
- data/Rakefile +3 -2
- data/app/assets/javascripts/twitter/bootstrap.js +2 -1
- data/app/assets/javascripts/twitter/bootstrap/button.js +4 -2
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +6 -2
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +2 -2
- data/app/assets/javascripts/twitter/bootstrap/modal.js +19 -16
- data/app/assets/javascripts/twitter/bootstrap/popover.js +7 -5
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +39 -21
- data/app/assets/javascripts/twitter/bootstrap/transition.js +2 -2
- data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +21 -19
- data/app/assets/stylesheets/twitter/bootstrap/_badges.scss +5 -5
- data/app/assets/stylesheets/twitter/bootstrap/_bootstrap.scss +1 -1
- data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +96 -23
- data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +24 -18
- data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +10 -11
- data/app/assets/stylesheets/twitter/bootstrap/_close.scss +1 -1
- data/app/assets/stylesheets/twitter/bootstrap/_code.scss +4 -3
- data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +23 -18
- data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +65 -160
- data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +244 -59
- data/app/assets/stylesheets/twitter/bootstrap/_input-groups.scss +127 -0
- data/app/assets/stylesheets/twitter/bootstrap/_labels.scss +12 -4
- data/app/assets/stylesheets/twitter/bootstrap/_list-group.scss +36 -36
- data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +227 -52
- data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +6 -9
- data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +268 -82
- data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +10 -18
- data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +5 -41
- data/app/assets/stylesheets/twitter/bootstrap/_panels.scss +83 -57
- data/app/assets/stylesheets/twitter/bootstrap/_popovers.scss +0 -2
- data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +2 -8
- data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +76 -21
- data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +18 -2
- data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +1 -1
- data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +2 -2
- data/app/assets/stylesheets/twitter/bootstrap/_tooltip.scss +1 -1
- data/app/assets/stylesheets/twitter/bootstrap/_type.scss +19 -13
- data/app/assets/stylesheets/twitter/bootstrap/_utilities.scss +3 -2
- data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +86 -46
- data/app/assets/stylesheets/twitter/bootstrap/_wells.scss +2 -2
- data/lib/bootstrap-rails/version.rb +1 -1
- data/vendor/assets/javascripts/holder.js +419 -0
- metadata +4 -3
- data/app/assets/stylesheets/twitter/bootstrap/_accordion.scss +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02076357f17eb8e5ca47387b96b1bf7fcb0ba95c
|
4
|
+
data.tar.gz: 2d9c58549fd13b52a665504e497eace699da950a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b70552bdae48dea07da181ef08f2d087a1d5d5b741b91af488ff856e5e1594f32b2b46472f7ae4178ada229c5cdbe1990f81f4033bad7259b5eed8284d62ac2c
|
7
|
+
data.tar.gz: ced4c11f9d83cd79b6546f6f474f6059883e48825b8be1497d7be24310b5cb977644b68088b91c96441b0ce8b5b08fa0d6df204ed3840f435c24572467a1f5bc
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Twitter Bootstrap v3.0.0.
|
1
|
+
# Twitter Bootstrap v3.0.0.rc2 for Rails 3/4
|
2
2
|
Bootstrap is a toolkit from Twitter 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
|
|
@@ -23,16 +23,9 @@ and run bundle install.
|
|
23
23
|
|
24
24
|
## Stylesheets
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
*= require twitter/bootstrap
|
30
|
-
```
|
31
|
-
|
32
|
-
You can override bootstrap variables:
|
33
|
-
|
34
|
-
1. rename application.css to application.css.scss
|
35
|
-
2. override vars above `@import "twitter/bootstrap";`
|
26
|
+
1. Rename application.css to application.css.scss
|
27
|
+
2. Import twitter bootstrap `@import "twitter/bootstrap";`
|
28
|
+
3. You can override vars above `@import "twitter/bootstrap";`
|
36
29
|
|
37
30
|
```scss
|
38
31
|
|
@@ -65,7 +58,6 @@ Add necessary javascript(s) files to app/assets/javascripts/application.js
|
|
65
58
|
//= require twitter/bootstrap/button
|
66
59
|
//= require twitter/bootstrap/collapse
|
67
60
|
//= require twitter/bootstrap/carousel
|
68
|
-
//= require twitter/bootstrap/typeahead
|
69
61
|
//= require twitter/bootstrap/affix
|
70
62
|
```
|
71
63
|
|
data/Rakefile
CHANGED
@@ -33,8 +33,9 @@ namespace :twitter do
|
|
33
33
|
order = %w{transition.js alert.js button.js carousel.js collapse.js dropdown.js modal.js tooltip.js popover.js scrollspy.js tab.js affix.js}
|
34
34
|
order.each_with_index {|o, i| js[o] = i }
|
35
35
|
|
36
|
-
list = js.to_a.sort {|a,b| a[1] <=> b[1]}.map{|p| p[0]}
|
37
|
-
|
36
|
+
list = js.to_a.sort {|a,b| a[1] <=> b[1]}.map{|p| "twitter/bootstrap/#{p[0]}"}
|
37
|
+
list << "holder.js"
|
38
|
+
File.write "app/assets/javascripts/twitter/bootstrap.js", list.map {|f| "//= require #{f}"}.join("\n")
|
38
39
|
end
|
39
40
|
|
40
41
|
desc "Update Twitter's Bootstrap SCSS"
|
@@ -56,7 +56,9 @@
|
|
56
56
|
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
57
57
|
|
58
58
|
if ($parent.length) {
|
59
|
-
var $input = this.$element.find('input')
|
59
|
+
var $input = this.$element.find('input')
|
60
|
+
.prop('checked', !this.$element.hasClass('active'))
|
61
|
+
.trigger('change')
|
60
62
|
if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
|
61
63
|
}
|
62
64
|
|
@@ -72,7 +74,7 @@
|
|
72
74
|
$.fn.button = function (option) {
|
73
75
|
return this.each(function () {
|
74
76
|
var $this = $(this)
|
75
|
-
var data = $this.data('button')
|
77
|
+
var data = $this.data('bs.button')
|
76
78
|
var options = typeof option == 'object' && option
|
77
79
|
|
78
80
|
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
@@ -41,6 +41,7 @@
|
|
41
41
|
Carousel.DEFAULTS = {
|
42
42
|
interval: 5000
|
43
43
|
, pause: 'hover'
|
44
|
+
, wrap: true
|
44
45
|
}
|
45
46
|
|
46
47
|
Carousel.prototype.cycle = function (e) {
|
@@ -105,12 +106,15 @@
|
|
105
106
|
var fallback = type == 'next' ? 'first' : 'last'
|
106
107
|
var that = this
|
107
108
|
|
109
|
+
if (!$next.length) {
|
110
|
+
if (!this.options.wrap) return
|
111
|
+
$next = this.$element.find('.item')[fallback]()
|
112
|
+
}
|
113
|
+
|
108
114
|
this.sliding = true
|
109
115
|
|
110
116
|
isCycling && this.pause()
|
111
117
|
|
112
|
-
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
113
|
-
|
114
118
|
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
|
115
119
|
|
116
120
|
if ($next.hasClass('active')) return
|
@@ -48,7 +48,7 @@
|
|
48
48
|
this.$element.trigger(startEvent)
|
49
49
|
if (startEvent.isDefaultPrevented()) return
|
50
50
|
|
51
|
-
var actives
|
51
|
+
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
52
52
|
|
53
53
|
if (actives && actives.length) {
|
54
54
|
var hasData = actives.data('bs.collapse')
|
@@ -169,7 +169,7 @@
|
|
169
169
|
var $parent = parent && $(parent)
|
170
170
|
|
171
171
|
if (!data || !data.transitioning) {
|
172
|
-
if ($parent) $parent.find('[data-toggle=collapse][data-parent=' + parent + ']').not($this).addClass('collapsed')
|
172
|
+
if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
173
173
|
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
174
174
|
}
|
175
175
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
this.$backdrop =
|
30
30
|
this.isShown = null
|
31
31
|
|
32
|
-
if (this.options.remote) this.$element.
|
32
|
+
if (this.options.remote) this.$element.load(this.options.remote)
|
33
33
|
}
|
34
34
|
|
35
35
|
Modal.DEFAULTS = {
|
@@ -38,13 +38,13 @@
|
|
38
38
|
, show: true
|
39
39
|
}
|
40
40
|
|
41
|
-
Modal.prototype.toggle = function () {
|
42
|
-
return this[!this.isShown ? 'show' : 'hide']()
|
41
|
+
Modal.prototype.toggle = function (_relatedTarget) {
|
42
|
+
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
|
43
43
|
}
|
44
44
|
|
45
|
-
Modal.prototype.show = function () {
|
45
|
+
Modal.prototype.show = function (_relatedTarget) {
|
46
46
|
var that = this
|
47
|
-
var e = $.Event('show.bs.modal')
|
47
|
+
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
|
48
48
|
|
49
49
|
this.$element.trigger(e)
|
50
50
|
|
@@ -73,13 +73,15 @@
|
|
73
73
|
|
74
74
|
that.enforceFocus()
|
75
75
|
|
76
|
+
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
77
|
+
|
76
78
|
transition ?
|
77
79
|
that.$element
|
78
80
|
.one($.support.transition.end, function () {
|
79
|
-
that.$element.focus().trigger(
|
81
|
+
that.$element.focus().trigger(e)
|
80
82
|
})
|
81
83
|
.emulateTransitionEnd(300) :
|
82
|
-
that.$element.focus().trigger(
|
84
|
+
that.$element.focus().trigger(e)
|
83
85
|
})
|
84
86
|
}
|
85
87
|
|
@@ -101,6 +103,7 @@
|
|
101
103
|
this.$element
|
102
104
|
.removeClass('in')
|
103
105
|
.attr('aria-hidden', true)
|
106
|
+
.off('click.dismiss.modal')
|
104
107
|
|
105
108
|
$.support.transition && this.$element.hasClass('fade') ?
|
106
109
|
this.$element
|
@@ -153,7 +156,7 @@
|
|
153
156
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
154
157
|
.appendTo(document.body)
|
155
158
|
|
156
|
-
this.$element.on('click', $.proxy(function (e) {
|
159
|
+
this.$element.on('click.dismiss.modal', $.proxy(function (e) {
|
157
160
|
if (e.target !== e.currentTarget) return
|
158
161
|
this.options.backdrop == 'static'
|
159
162
|
? this.$element[0].focus.call(this.$element[0])
|
@@ -192,15 +195,15 @@
|
|
192
195
|
|
193
196
|
var old = $.fn.modal
|
194
197
|
|
195
|
-
$.fn.modal = function (option) {
|
198
|
+
$.fn.modal = function (option, _relatedTarget) {
|
196
199
|
return this.each(function () {
|
197
200
|
var $this = $(this)
|
198
201
|
var data = $this.data('bs.modal')
|
199
202
|
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
200
203
|
|
201
204
|
if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
|
202
|
-
if (typeof option == 'string') data[option]()
|
203
|
-
else if (options.show) data.show()
|
205
|
+
if (typeof option == 'string') data[option](_relatedTarget)
|
206
|
+
else if (options.show) data.show(_relatedTarget)
|
204
207
|
})
|
205
208
|
}
|
206
209
|
|
@@ -223,19 +226,19 @@
|
|
223
226
|
var $this = $(this)
|
224
227
|
var href = $this.attr('href')
|
225
228
|
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
226
|
-
var option = $target.data('modal') ? 'toggle' : $.extend({ remote
|
229
|
+
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
227
230
|
|
228
231
|
e.preventDefault()
|
229
232
|
|
230
233
|
$target
|
231
|
-
.modal(option)
|
234
|
+
.modal(option, this)
|
232
235
|
.one('hide', function () {
|
233
236
|
$this.is(':visible') && $this.focus()
|
234
237
|
})
|
235
238
|
})
|
236
239
|
|
237
|
-
|
238
|
-
.on('shown.bs.modal', '.modal', function () { $body.addClass('modal-open') })
|
239
|
-
.on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') })
|
240
|
+
$(document)
|
241
|
+
.on('shown.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
|
242
|
+
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
|
240
243
|
|
241
244
|
}(window.jQuery);
|
@@ -58,7 +58,9 @@
|
|
58
58
|
|
59
59
|
$tip.removeClass('fade top bottom left right in')
|
60
60
|
|
61
|
-
|
61
|
+
// IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
|
62
|
+
// this manually by checking the contents.
|
63
|
+
if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
|
62
64
|
}
|
63
65
|
|
64
66
|
Popover.prototype.hasContent = function () {
|
@@ -75,15 +77,15 @@
|
|
75
77
|
o.content)
|
76
78
|
}
|
77
79
|
|
80
|
+
Popover.prototype.arrow = function () {
|
81
|
+
return this.$arrow = this.$arrow || this.tip().find('.arrow')
|
82
|
+
}
|
83
|
+
|
78
84
|
Popover.prototype.tip = function () {
|
79
85
|
if (!this.$tip) this.$tip = $(this.options.template)
|
80
86
|
return this.$tip
|
81
87
|
}
|
82
88
|
|
83
|
-
Popover.prototype.destroy = function () {
|
84
|
-
this.hide().$element.off('.' + this.type).removeData(this.type)
|
85
|
-
}
|
86
|
-
|
87
89
|
|
88
90
|
// POPOVER PLUGIN DEFINITION
|
89
91
|
// =========================
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ========================================================================
|
2
2
|
* Bootstrap: tooltip.js v3.0.0
|
3
|
-
* http://twbs.github.com/bootstrap/javascript.html#
|
3
|
+
* http://twbs.github.com/bootstrap/javascript.html#tooltip
|
4
4
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
5
5
|
* ========================================================================
|
6
6
|
* Copyright 2012 Twitter, Inc.
|
@@ -64,7 +64,7 @@
|
|
64
64
|
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
65
65
|
var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
66
66
|
|
67
|
-
this.$element.on(eventIn
|
67
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
68
68
|
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
69
69
|
}
|
70
70
|
}
|
@@ -91,16 +91,20 @@
|
|
91
91
|
return options
|
92
92
|
}
|
93
93
|
|
94
|
-
Tooltip.prototype.
|
95
|
-
var defaults = this.getDefaults()
|
94
|
+
Tooltip.prototype.getDelegateOptions = function () {
|
96
95
|
var options = {}
|
96
|
+
var defaults = this.getDefaults()
|
97
97
|
|
98
98
|
this._options && $.each(this._options, function (key, value) {
|
99
99
|
if (defaults[key] != value) options[key] = value
|
100
100
|
})
|
101
101
|
|
102
|
+
return options
|
103
|
+
}
|
104
|
+
|
105
|
+
Tooltip.prototype.enter = function (obj) {
|
102
106
|
var self = obj instanceof this.constructor ?
|
103
|
-
obj : $(obj.currentTarget)[this.type](
|
107
|
+
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
|
104
108
|
|
105
109
|
clearTimeout(self.timeout)
|
106
110
|
|
@@ -114,7 +118,7 @@
|
|
114
118
|
|
115
119
|
Tooltip.prototype.leave = function (obj) {
|
116
120
|
var self = obj instanceof this.constructor ?
|
117
|
-
obj : $(obj.currentTarget)[this.type](this.
|
121
|
+
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
|
118
122
|
|
119
123
|
clearTimeout(self.timeout)
|
120
124
|
|
@@ -179,12 +183,9 @@
|
|
179
183
|
.addClass(placement)
|
180
184
|
}
|
181
185
|
|
182
|
-
var
|
183
|
-
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
184
|
-
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
185
|
-
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
186
|
+
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
186
187
|
|
187
|
-
this.applyPlacement(
|
188
|
+
this.applyPlacement(calculatedOffset, placement)
|
188
189
|
this.$element.trigger('shown.bs.' + this.type)
|
189
190
|
}
|
190
191
|
}
|
@@ -196,25 +197,33 @@
|
|
196
197
|
var height = $tip[0].offsetHeight
|
197
198
|
|
198
199
|
// manually read margins because getBoundingClientRect includes difference
|
199
|
-
|
200
|
-
|
200
|
+
var marginTop = parseInt($tip.css('margin-top'), 10)
|
201
|
+
var marginLeft = parseInt($tip.css('margin-left'), 10)
|
202
|
+
|
203
|
+
// we must check for NaN for ie 8/9
|
204
|
+
if (isNaN(marginTop)) marginTop = 0
|
205
|
+
if (isNaN(marginLeft)) marginLeft = 0
|
206
|
+
|
207
|
+
offset.top = offset.top + marginTop
|
208
|
+
offset.left = offset.left + marginLeft
|
201
209
|
|
202
210
|
$tip
|
203
211
|
.offset(offset)
|
204
212
|
.addClass('in')
|
205
213
|
|
214
|
+
// check to see if placing tip in new offset caused the tip to resize itself
|
206
215
|
var actualWidth = $tip[0].offsetWidth
|
207
216
|
var actualHeight = $tip[0].offsetHeight
|
208
217
|
|
209
218
|
if (placement == 'top' && actualHeight != height) {
|
210
219
|
replace = true
|
211
|
-
offset.top
|
220
|
+
offset.top = offset.top + height - actualHeight
|
212
221
|
}
|
213
222
|
|
214
|
-
if (
|
223
|
+
if (/bottom|top/.test(placement)) {
|
215
224
|
var delta = 0
|
216
225
|
|
217
|
-
if (offset.left < 0){
|
226
|
+
if (offset.left < 0) {
|
218
227
|
delta = offset.left * -2
|
219
228
|
offset.left = 0
|
220
229
|
|
@@ -249,6 +258,8 @@
|
|
249
258
|
var $tip = this.tip()
|
250
259
|
var e = $.Event('hide.bs.' + this.type)
|
251
260
|
|
261
|
+
function complete() { $tip.detach() }
|
262
|
+
|
252
263
|
this.$element.trigger(e)
|
253
264
|
|
254
265
|
if (e.isDefaultPrevented()) return
|
@@ -257,9 +268,9 @@
|
|
257
268
|
|
258
269
|
$.support.transition && this.$tip.hasClass('fade') ?
|
259
270
|
$tip
|
260
|
-
.one($.support.transition.end,
|
271
|
+
.one($.support.transition.end, complete)
|
261
272
|
.emulateTransitionEnd(150) :
|
262
|
-
|
273
|
+
complete()
|
263
274
|
|
264
275
|
this.$element.trigger('hidden.bs.' + this.type)
|
265
276
|
|
@@ -285,6 +296,13 @@
|
|
285
296
|
}, this.$element.offset())
|
286
297
|
}
|
287
298
|
|
299
|
+
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
300
|
+
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
301
|
+
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
302
|
+
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
303
|
+
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
304
|
+
}
|
305
|
+
|
288
306
|
Tooltip.prototype.getTitle = function () {
|
289
307
|
var title
|
290
308
|
var $e = this.$element
|
@@ -300,8 +318,8 @@
|
|
300
318
|
return this.$tip = this.$tip || $(this.options.template)
|
301
319
|
}
|
302
320
|
|
303
|
-
Tooltip.prototype.arrow =function(){
|
304
|
-
return this.$arrow = this.$arrow || this.tip().find(
|
321
|
+
Tooltip.prototype.arrow = function () {
|
322
|
+
return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
|
305
323
|
}
|
306
324
|
|
307
325
|
Tooltip.prototype.validate = function () {
|
@@ -325,7 +343,7 @@
|
|
325
343
|
}
|
326
344
|
|
327
345
|
Tooltip.prototype.toggle = function (e) {
|
328
|
-
var self = e ? $(e.currentTarget)[this.type](this.
|
346
|
+
var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
|
329
347
|
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
330
348
|
}
|
331
349
|
|
@@ -43,8 +43,8 @@
|
|
43
43
|
// http://blog.alexmaccaw.com/css-transitions
|
44
44
|
$.fn.emulateTransitionEnd = function (duration) {
|
45
45
|
var called = false, $el = this
|
46
|
-
$(this).one(
|
47
|
-
var callback = function () { if (!called) $($el).trigger(
|
46
|
+
$(this).one($.support.transition.end, function () { called = true })
|
47
|
+
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
|
48
48
|
setTimeout(callback, duration)
|
49
49
|
return this
|
50
50
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
// -------------------------
|
8
8
|
|
9
9
|
.alert {
|
10
|
-
padding:
|
10
|
+
padding: $alert-padding;
|
11
11
|
margin-bottom: $line-height-computed;
|
12
12
|
color: $alert-text;
|
13
13
|
background-color: $alert-bg;
|
@@ -26,10 +26,27 @@
|
|
26
26
|
}
|
27
27
|
// Provide class for links that match alerts
|
28
28
|
.alert-link {
|
29
|
-
font-weight:
|
29
|
+
font-weight: $alert-link-font-weight;
|
30
30
|
color: darken($alert-text, 10%);
|
31
31
|
}
|
32
32
|
|
33
|
+
// Improve alignment and spacing of inner content
|
34
|
+
> p,
|
35
|
+
> ul {
|
36
|
+
margin-bottom: 0;
|
37
|
+
}
|
38
|
+
> p + p {
|
39
|
+
margin-top: 5px;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// Dismissable alerts
|
44
|
+
//
|
45
|
+
// Expand the right padding and account for the close button's positioning.
|
46
|
+
|
47
|
+
.alert-dismissable {
|
48
|
+
padding-right: ($alert-padding + 20);
|
49
|
+
|
33
50
|
// Adjust close link position
|
34
51
|
.close {
|
35
52
|
position: relative;
|
@@ -40,7 +57,8 @@
|
|
40
57
|
}
|
41
58
|
|
42
59
|
// Alternate styles
|
43
|
-
//
|
60
|
+
//
|
61
|
+
// Generate contextual modifier classes for colorizing the alert.
|
44
62
|
|
45
63
|
.alert-success {
|
46
64
|
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
@@ -51,19 +69,3 @@
|
|
51
69
|
.alert-info {
|
52
70
|
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
53
71
|
}
|
54
|
-
|
55
|
-
// Block alerts
|
56
|
-
// -------------------------
|
57
|
-
|
58
|
-
.alert-block {
|
59
|
-
padding-top: 15px;
|
60
|
-
padding-bottom: 15px;
|
61
|
-
|
62
|
-
> p,
|
63
|
-
> ul {
|
64
|
-
margin-bottom: 0;
|
65
|
-
}
|
66
|
-
p + p {
|
67
|
-
margin-top: 5px;
|
68
|
-
}
|
69
|
-
}
|