twitter-bootstrap-rails 3.2.2 → 5.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 twitter-bootstrap-rails might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/README.md +181 -134
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +273 -214
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/javascripts/twitter/bootstrap/affix.js +46 -26
- data/app/assets/javascripts/twitter/bootstrap/alert.js +7 -5
- data/app/assets/javascripts/twitter/bootstrap/button.js +27 -17
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +35 -21
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +68 -27
- data/app/assets/javascripts/twitter/bootstrap/dropdown.js +55 -41
- data/app/assets/javascripts/twitter/bootstrap/modal.js +88 -31
- data/app/assets/javascripts/twitter/bootstrap/popover.js +5 -10
- data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +28 -26
- data/app/assets/javascripts/twitter/bootstrap/tab.js +45 -18
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +111 -54
- data/app/assets/javascripts/twitter/bootstrap/transition.js +2 -2
- data/app/helpers/glyph_helper.rb +6 -3
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +7 -18
- data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -0
- data/lib/generators/bootstrap/themed/templates/index.html.haml +1 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +2 -0
- data/lib/twitter/bootstrap/rails/breadcrumbs.rb +1 -1
- data/lib/twitter/bootstrap/rails/engine.rb +1 -0
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/toolkit/twitter/bootstrap/alerts.less +5 -0
- data/vendor/toolkit/twitter/bootstrap/badges.less +14 -3
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +6 -0
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +13 -14
- data/vendor/toolkit/twitter/bootstrap/buttons.less +14 -7
- data/vendor/toolkit/twitter/bootstrap/carousel.less +34 -7
- data/vendor/toolkit/twitter/bootstrap/close.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/code.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +3 -1
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +9 -8
- data/vendor/toolkit/twitter/bootstrap/forms.less +110 -41
- data/vendor/toolkit/twitter/bootstrap/glyphicons.less +80 -9
- data/vendor/toolkit/twitter/bootstrap/grid.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/input-groups.less +8 -3
- data/vendor/toolkit/twitter/bootstrap/jumbotron.less +10 -4
- data/vendor/toolkit/twitter/bootstrap/labels.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/list-group.less +11 -13
- data/vendor/toolkit/twitter/bootstrap/media.less +40 -30
- data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +2 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +19 -6
- data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +2 -2
- data/vendor/toolkit/twitter/bootstrap/mixins/image.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +2 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +2 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/size.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +2 -1
- data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +8 -5
- data/vendor/toolkit/twitter/bootstrap/mixins.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/modals.less +3 -3
- data/vendor/toolkit/twitter/bootstrap/navbar.less +6 -1
- data/vendor/toolkit/twitter/bootstrap/navs.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/normalize.less +12 -13
- data/vendor/toolkit/twitter/bootstrap/pager.less +1 -2
- data/vendor/toolkit/twitter/bootstrap/pagination.less +5 -4
- data/vendor/toolkit/twitter/bootstrap/panels.less +27 -4
- data/vendor/toolkit/twitter/bootstrap/popovers.less +5 -7
- data/vendor/toolkit/twitter/bootstrap/print.less +96 -96
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +1 -14
- data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +10 -9
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +0 -0
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +12 -1
- data/vendor/toolkit/twitter/bootstrap/tables.less +6 -5
- data/vendor/toolkit/twitter/bootstrap/theme.less +47 -16
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +13 -7
- data/vendor/toolkit/twitter/bootstrap/type.less +2 -8
- data/vendor/toolkit/twitter/bootstrap/utilities.less +0 -1
- data/vendor/toolkit/twitter/bootstrap/variables.less +36 -14
- data/vendor/toolkit/twitter/bootstrap/wells.less +0 -0
- metadata +49 -61
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +0 -640
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -2026
- data/vendor/static-source/fontawesome.less +0 -8
- data/vendor/toolkit/fontawesome/bordered-pulled.less +0 -16
- data/vendor/toolkit/fontawesome/core.less +0 -11
- data/vendor/toolkit/fontawesome/fixed-width.less +0 -6
- data/vendor/toolkit/fontawesome/font-awesome.less +0 -17
- data/vendor/toolkit/fontawesome/icons.less +0 -552
- data/vendor/toolkit/fontawesome/larger.less +0 -13
- data/vendor/toolkit/fontawesome/list.less +0 -19
- data/vendor/toolkit/fontawesome/mixins.less +0 -25
- data/vendor/toolkit/fontawesome/path.less +0 -14
- data/vendor/toolkit/fontawesome/rotated-flipped.less +0 -20
- data/vendor/toolkit/fontawesome/spinning.less +0 -29
- data/vendor/toolkit/fontawesome/stacked.less +0 -20
- data/vendor/toolkit/fontawesome/variables.less +0 -561
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: dropdown.js v3.
|
2
|
+
* Bootstrap: dropdown.js v3.3.6
|
3
3
|
* http://getbootstrap.com/javascript/#dropdowns
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -19,7 +19,41 @@
|
|
19
19
|
$(element).on('click.bs.dropdown', this.toggle)
|
20
20
|
}
|
21
21
|
|
22
|
-
Dropdown.VERSION = '3.
|
22
|
+
Dropdown.VERSION = '3.3.6'
|
23
|
+
|
24
|
+
function getParent($this) {
|
25
|
+
var selector = $this.attr('data-target')
|
26
|
+
|
27
|
+
if (!selector) {
|
28
|
+
selector = $this.attr('href')
|
29
|
+
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
30
|
+
}
|
31
|
+
|
32
|
+
var $parent = selector && $(selector)
|
33
|
+
|
34
|
+
return $parent && $parent.length ? $parent : $this.parent()
|
35
|
+
}
|
36
|
+
|
37
|
+
function clearMenus(e) {
|
38
|
+
if (e && e.which === 3) return
|
39
|
+
$(backdrop).remove()
|
40
|
+
$(toggle).each(function () {
|
41
|
+
var $this = $(this)
|
42
|
+
var $parent = getParent($this)
|
43
|
+
var relatedTarget = { relatedTarget: this }
|
44
|
+
|
45
|
+
if (!$parent.hasClass('open')) return
|
46
|
+
|
47
|
+
if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
|
48
|
+
|
49
|
+
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
50
|
+
|
51
|
+
if (e.isDefaultPrevented()) return
|
52
|
+
|
53
|
+
$this.attr('aria-expanded', 'false')
|
54
|
+
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
|
55
|
+
})
|
56
|
+
}
|
23
57
|
|
24
58
|
Dropdown.prototype.toggle = function (e) {
|
25
59
|
var $this = $(this)
|
@@ -34,7 +68,10 @@
|
|
34
68
|
if (!isActive) {
|
35
69
|
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
|
36
70
|
// if mobile we use a backdrop because click events don't delegate
|
37
|
-
$('
|
71
|
+
$(document.createElement('div'))
|
72
|
+
.addClass('dropdown-backdrop')
|
73
|
+
.insertAfter($(this))
|
74
|
+
.on('click', clearMenus)
|
38
75
|
}
|
39
76
|
|
40
77
|
var relatedTarget = { relatedTarget: this }
|
@@ -42,18 +79,20 @@
|
|
42
79
|
|
43
80
|
if (e.isDefaultPrevented()) return
|
44
81
|
|
45
|
-
$this
|
82
|
+
$this
|
83
|
+
.trigger('focus')
|
84
|
+
.attr('aria-expanded', 'true')
|
46
85
|
|
47
86
|
$parent
|
48
87
|
.toggleClass('open')
|
49
|
-
.trigger('shown.bs.dropdown', relatedTarget)
|
88
|
+
.trigger($.Event('shown.bs.dropdown', relatedTarget))
|
50
89
|
}
|
51
90
|
|
52
91
|
return false
|
53
92
|
}
|
54
93
|
|
55
94
|
Dropdown.prototype.keydown = function (e) {
|
56
|
-
if (!/(38|40|27)/.test(e.
|
95
|
+
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
|
57
96
|
|
58
97
|
var $this = $(this)
|
59
98
|
|
@@ -65,51 +104,25 @@
|
|
65
104
|
var $parent = getParent($this)
|
66
105
|
var isActive = $parent.hasClass('open')
|
67
106
|
|
68
|
-
if (!isActive ||
|
107
|
+
if (!isActive && e.which != 27 || isActive && e.which == 27) {
|
69
108
|
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
70
109
|
return $this.trigger('click')
|
71
110
|
}
|
72
111
|
|
73
|
-
var desc = ' li:not(.
|
74
|
-
var $items = $parent.find('
|
112
|
+
var desc = ' li:not(.disabled):visible a'
|
113
|
+
var $items = $parent.find('.dropdown-menu' + desc)
|
75
114
|
|
76
115
|
if (!$items.length) return
|
77
116
|
|
78
|
-
var index = $items.index(
|
117
|
+
var index = $items.index(e.target)
|
79
118
|
|
80
|
-
if (e.
|
81
|
-
if (e.
|
82
|
-
if (!~index)
|
119
|
+
if (e.which == 38 && index > 0) index-- // up
|
120
|
+
if (e.which == 40 && index < $items.length - 1) index++ // down
|
121
|
+
if (!~index) index = 0
|
83
122
|
|
84
123
|
$items.eq(index).trigger('focus')
|
85
124
|
}
|
86
125
|
|
87
|
-
function clearMenus(e) {
|
88
|
-
if (e && e.which === 3) return
|
89
|
-
$(backdrop).remove()
|
90
|
-
$(toggle).each(function () {
|
91
|
-
var $parent = getParent($(this))
|
92
|
-
var relatedTarget = { relatedTarget: this }
|
93
|
-
if (!$parent.hasClass('open')) return
|
94
|
-
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
95
|
-
if (e.isDefaultPrevented()) return
|
96
|
-
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
97
|
-
})
|
98
|
-
}
|
99
|
-
|
100
|
-
function getParent($this) {
|
101
|
-
var selector = $this.attr('data-target')
|
102
|
-
|
103
|
-
if (!selector) {
|
104
|
-
selector = $this.attr('href')
|
105
|
-
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
106
|
-
}
|
107
|
-
|
108
|
-
var $parent = selector && $(selector)
|
109
|
-
|
110
|
-
return $parent && $parent.length ? $parent : $this.parent()
|
111
|
-
}
|
112
|
-
|
113
126
|
|
114
127
|
// DROPDOWN PLUGIN DEFINITION
|
115
128
|
// ==========================
|
@@ -146,6 +159,7 @@
|
|
146
159
|
.on('click.bs.dropdown.data-api', clearMenus)
|
147
160
|
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
148
161
|
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
149
|
-
.on('keydown.bs.dropdown.data-api', toggle
|
162
|
+
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
163
|
+
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
150
164
|
|
151
165
|
}(jQuery);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: modal.js v3.
|
2
|
+
* Bootstrap: modal.js v3.3.6
|
3
3
|
* http://getbootstrap.com/javascript/#modals
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,12 +14,15 @@
|
|
14
14
|
// ======================
|
15
15
|
|
16
16
|
var Modal = function (element, options) {
|
17
|
-
this.options
|
18
|
-
this.$body
|
19
|
-
this.$element
|
20
|
-
this.$
|
21
|
-
this
|
22
|
-
this.
|
17
|
+
this.options = options
|
18
|
+
this.$body = $(document.body)
|
19
|
+
this.$element = $(element)
|
20
|
+
this.$dialog = this.$element.find('.modal-dialog')
|
21
|
+
this.$backdrop = null
|
22
|
+
this.isShown = null
|
23
|
+
this.originalBodyPad = null
|
24
|
+
this.scrollbarWidth = 0
|
25
|
+
this.ignoreBackdropClick = false
|
23
26
|
|
24
27
|
if (this.options.remote) {
|
25
28
|
this.$element
|
@@ -30,7 +33,10 @@
|
|
30
33
|
}
|
31
34
|
}
|
32
35
|
|
33
|
-
Modal.VERSION = '3.
|
36
|
+
Modal.VERSION = '3.3.6'
|
37
|
+
|
38
|
+
Modal.TRANSITION_DURATION = 300
|
39
|
+
Modal.BACKDROP_TRANSITION_DURATION = 150
|
34
40
|
|
35
41
|
Modal.DEFAULTS = {
|
36
42
|
backdrop: true,
|
@@ -53,13 +59,20 @@
|
|
53
59
|
this.isShown = true
|
54
60
|
|
55
61
|
this.checkScrollbar()
|
62
|
+
this.setScrollbar()
|
56
63
|
this.$body.addClass('modal-open')
|
57
64
|
|
58
|
-
this.setScrollbar()
|
59
65
|
this.escape()
|
66
|
+
this.resize()
|
60
67
|
|
61
68
|
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
62
69
|
|
70
|
+
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
|
71
|
+
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
|
72
|
+
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
|
73
|
+
})
|
74
|
+
})
|
75
|
+
|
63
76
|
this.backdrop(function () {
|
64
77
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
65
78
|
|
@@ -71,24 +84,24 @@
|
|
71
84
|
.show()
|
72
85
|
.scrollTop(0)
|
73
86
|
|
87
|
+
that.adjustDialog()
|
88
|
+
|
74
89
|
if (transition) {
|
75
90
|
that.$element[0].offsetWidth // force reflow
|
76
91
|
}
|
77
92
|
|
78
|
-
that.$element
|
79
|
-
.addClass('in')
|
80
|
-
.attr('aria-hidden', false)
|
93
|
+
that.$element.addClass('in')
|
81
94
|
|
82
95
|
that.enforceFocus()
|
83
96
|
|
84
97
|
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
85
98
|
|
86
99
|
transition ?
|
87
|
-
that.$
|
100
|
+
that.$dialog // wait for modal to slide in
|
88
101
|
.one('bsTransitionEnd', function () {
|
89
102
|
that.$element.trigger('focus').trigger(e)
|
90
103
|
})
|
91
|
-
.emulateTransitionEnd(
|
104
|
+
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
|
92
105
|
that.$element.trigger('focus').trigger(e)
|
93
106
|
})
|
94
107
|
}
|
@@ -104,22 +117,22 @@
|
|
104
117
|
|
105
118
|
this.isShown = false
|
106
119
|
|
107
|
-
this.$body.removeClass('modal-open')
|
108
|
-
|
109
|
-
this.resetScrollbar()
|
110
120
|
this.escape()
|
121
|
+
this.resize()
|
111
122
|
|
112
123
|
$(document).off('focusin.bs.modal')
|
113
124
|
|
114
125
|
this.$element
|
115
126
|
.removeClass('in')
|
116
|
-
.attr('aria-hidden', true)
|
117
127
|
.off('click.dismiss.bs.modal')
|
128
|
+
.off('mouseup.dismiss.bs.modal')
|
129
|
+
|
130
|
+
this.$dialog.off('mousedown.dismiss.bs.modal')
|
118
131
|
|
119
132
|
$.support.transition && this.$element.hasClass('fade') ?
|
120
133
|
this.$element
|
121
134
|
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
|
122
|
-
.emulateTransitionEnd(
|
135
|
+
.emulateTransitionEnd(Modal.TRANSITION_DURATION) :
|
123
136
|
this.hideModal()
|
124
137
|
}
|
125
138
|
|
@@ -135,11 +148,19 @@
|
|
135
148
|
|
136
149
|
Modal.prototype.escape = function () {
|
137
150
|
if (this.isShown && this.options.keyboard) {
|
138
|
-
this.$element.on('
|
151
|
+
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
|
139
152
|
e.which == 27 && this.hide()
|
140
153
|
}, this))
|
141
154
|
} else if (!this.isShown) {
|
142
|
-
this.$element.off('
|
155
|
+
this.$element.off('keydown.dismiss.bs.modal')
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
Modal.prototype.resize = function () {
|
160
|
+
if (this.isShown) {
|
161
|
+
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
|
162
|
+
} else {
|
163
|
+
$(window).off('resize.bs.modal')
|
143
164
|
}
|
144
165
|
}
|
145
166
|
|
@@ -147,6 +168,9 @@
|
|
147
168
|
var that = this
|
148
169
|
this.$element.hide()
|
149
170
|
this.backdrop(function () {
|
171
|
+
that.$body.removeClass('modal-open')
|
172
|
+
that.resetAdjustments()
|
173
|
+
that.resetScrollbar()
|
150
174
|
that.$element.trigger('hidden.bs.modal')
|
151
175
|
})
|
152
176
|
}
|
@@ -163,14 +187,19 @@
|
|
163
187
|
if (this.isShown && this.options.backdrop) {
|
164
188
|
var doAnimate = $.support.transition && animate
|
165
189
|
|
166
|
-
this.$backdrop = $('
|
190
|
+
this.$backdrop = $(document.createElement('div'))
|
191
|
+
.addClass('modal-backdrop ' + animate)
|
167
192
|
.appendTo(this.$body)
|
168
193
|
|
169
194
|
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
195
|
+
if (this.ignoreBackdropClick) {
|
196
|
+
this.ignoreBackdropClick = false
|
197
|
+
return
|
198
|
+
}
|
170
199
|
if (e.target !== e.currentTarget) return
|
171
200
|
this.options.backdrop == 'static'
|
172
|
-
? this.$element[0].focus
|
173
|
-
: this.hide
|
201
|
+
? this.$element[0].focus()
|
202
|
+
: this.hide()
|
174
203
|
}, this))
|
175
204
|
|
176
205
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
@@ -182,7 +211,7 @@
|
|
182
211
|
doAnimate ?
|
183
212
|
this.$backdrop
|
184
213
|
.one('bsTransitionEnd', callback)
|
185
|
-
.emulateTransitionEnd(
|
214
|
+
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
|
186
215
|
callback()
|
187
216
|
|
188
217
|
} else if (!this.isShown && this.$backdrop) {
|
@@ -195,7 +224,7 @@
|
|
195
224
|
$.support.transition && this.$element.hasClass('fade') ?
|
196
225
|
this.$backdrop
|
197
226
|
.one('bsTransitionEnd', callbackRemove)
|
198
|
-
.emulateTransitionEnd(
|
227
|
+
.emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
|
199
228
|
callbackRemove()
|
200
229
|
|
201
230
|
} else if (callback) {
|
@@ -203,18 +232,46 @@
|
|
203
232
|
}
|
204
233
|
}
|
205
234
|
|
235
|
+
// these following methods are used to handle overflowing modals
|
236
|
+
|
237
|
+
Modal.prototype.handleUpdate = function () {
|
238
|
+
this.adjustDialog()
|
239
|
+
}
|
240
|
+
|
241
|
+
Modal.prototype.adjustDialog = function () {
|
242
|
+
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
243
|
+
|
244
|
+
this.$element.css({
|
245
|
+
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
|
246
|
+
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
|
247
|
+
})
|
248
|
+
}
|
249
|
+
|
250
|
+
Modal.prototype.resetAdjustments = function () {
|
251
|
+
this.$element.css({
|
252
|
+
paddingLeft: '',
|
253
|
+
paddingRight: ''
|
254
|
+
})
|
255
|
+
}
|
256
|
+
|
206
257
|
Modal.prototype.checkScrollbar = function () {
|
207
|
-
|
208
|
-
|
258
|
+
var fullWindowWidth = window.innerWidth
|
259
|
+
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
|
260
|
+
var documentElementRect = document.documentElement.getBoundingClientRect()
|
261
|
+
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
|
262
|
+
}
|
263
|
+
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
|
264
|
+
this.scrollbarWidth = this.measureScrollbar()
|
209
265
|
}
|
210
266
|
|
211
267
|
Modal.prototype.setScrollbar = function () {
|
212
268
|
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
|
213
|
-
|
269
|
+
this.originalBodyPad = document.body.style.paddingRight || ''
|
270
|
+
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
|
214
271
|
}
|
215
272
|
|
216
273
|
Modal.prototype.resetScrollbar = function () {
|
217
|
-
this.$body.css('padding-right',
|
274
|
+
this.$body.css('padding-right', this.originalBodyPad)
|
218
275
|
}
|
219
276
|
|
220
277
|
Modal.prototype.measureScrollbar = function () { // thx walsh
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.
|
2
|
+
* Bootstrap: popover.js v3.3.6
|
3
3
|
* http://getbootstrap.com/javascript/#popovers
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
21
21
|
|
22
|
-
Popover.VERSION = '3.
|
22
|
+
Popover.VERSION = '3.3.6'
|
23
23
|
|
24
24
|
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
25
25
|
placement: 'right',
|
@@ -46,7 +46,7 @@
|
|
46
46
|
var content = this.getContent()
|
47
47
|
|
48
48
|
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
49
|
-
$tip.find('.popover-content').
|
49
|
+
$tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
|
50
50
|
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
|
51
51
|
](content)
|
52
52
|
|
@@ -75,11 +75,6 @@
|
|
75
75
|
return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
|
76
76
|
}
|
77
77
|
|
78
|
-
Popover.prototype.tip = function () {
|
79
|
-
if (!this.$tip) this.$tip = $(this.options.template)
|
80
|
-
return this.$tip
|
81
|
-
}
|
82
|
-
|
83
78
|
|
84
79
|
// POPOVER PLUGIN DEFINITION
|
85
80
|
// =========================
|
@@ -90,7 +85,7 @@
|
|
90
85
|
var data = $this.data('bs.popover')
|
91
86
|
var options = typeof option == 'object' && option
|
92
87
|
|
93
|
-
if (!data && option
|
88
|
+
if (!data && /destroy|hide/.test(option)) return
|
94
89
|
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
95
90
|
if (typeof option == 'string') data[option]()
|
96
91
|
})
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.
|
2
|
+
* Bootstrap: scrollspy.js v3.3.6
|
3
3
|
* http://getbootstrap.com/javascript/#scrollspy
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -14,10 +14,8 @@
|
|
14
14
|
// ==========================
|
15
15
|
|
16
16
|
function ScrollSpy(element, options) {
|
17
|
-
|
18
|
-
|
19
|
-
this.$body = $('body')
|
20
|
-
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
|
17
|
+
this.$body = $(document.body)
|
18
|
+
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
|
21
19
|
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
|
22
20
|
this.selector = (this.options.target || '') + ' .nav li > a'
|
23
21
|
this.offsets = []
|
@@ -25,12 +23,12 @@
|
|
25
23
|
this.activeTarget = null
|
26
24
|
this.scrollHeight = 0
|
27
25
|
|
28
|
-
this.$scrollElement.on('scroll.bs.scrollspy', process)
|
26
|
+
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
|
29
27
|
this.refresh()
|
30
28
|
this.process()
|
31
29
|
}
|
32
30
|
|
33
|
-
ScrollSpy.VERSION = '3.
|
31
|
+
ScrollSpy.VERSION = '3.3.6'
|
34
32
|
|
35
33
|
ScrollSpy.DEFAULTS = {
|
36
34
|
offset: 10
|
@@ -41,20 +39,19 @@
|
|
41
39
|
}
|
42
40
|
|
43
41
|
ScrollSpy.prototype.refresh = function () {
|
44
|
-
var
|
45
|
-
var
|
42
|
+
var that = this
|
43
|
+
var offsetMethod = 'offset'
|
44
|
+
var offsetBase = 0
|
45
|
+
|
46
|
+
this.offsets = []
|
47
|
+
this.targets = []
|
48
|
+
this.scrollHeight = this.getScrollHeight()
|
46
49
|
|
47
50
|
if (!$.isWindow(this.$scrollElement[0])) {
|
48
51
|
offsetMethod = 'position'
|
49
52
|
offsetBase = this.$scrollElement.scrollTop()
|
50
53
|
}
|
51
54
|
|
52
|
-
this.offsets = []
|
53
|
-
this.targets = []
|
54
|
-
this.scrollHeight = this.getScrollHeight()
|
55
|
-
|
56
|
-
var self = this
|
57
|
-
|
58
55
|
this.$body
|
59
56
|
.find(this.selector)
|
60
57
|
.map(function () {
|
@@ -69,8 +66,8 @@
|
|
69
66
|
})
|
70
67
|
.sort(function (a, b) { return a[0] - b[0] })
|
71
68
|
.each(function () {
|
72
|
-
|
73
|
-
|
69
|
+
that.offsets.push(this[0])
|
70
|
+
that.targets.push(this[1])
|
74
71
|
})
|
75
72
|
}
|
76
73
|
|
@@ -91,14 +88,15 @@
|
|
91
88
|
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
|
92
89
|
}
|
93
90
|
|
94
|
-
if (activeTarget && scrollTop
|
95
|
-
|
91
|
+
if (activeTarget && scrollTop < offsets[0]) {
|
92
|
+
this.activeTarget = null
|
93
|
+
return this.clear()
|
96
94
|
}
|
97
95
|
|
98
96
|
for (i = offsets.length; i--;) {
|
99
97
|
activeTarget != targets[i]
|
100
98
|
&& scrollTop >= offsets[i]
|
101
|
-
&& (
|
99
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
102
100
|
&& this.activate(targets[i])
|
103
101
|
}
|
104
102
|
}
|
@@ -106,13 +104,11 @@
|
|
106
104
|
ScrollSpy.prototype.activate = function (target) {
|
107
105
|
this.activeTarget = target
|
108
106
|
|
109
|
-
|
110
|
-
.parentsUntil(this.options.target, '.active')
|
111
|
-
.removeClass('active')
|
107
|
+
this.clear()
|
112
108
|
|
113
109
|
var selector = this.selector +
|
114
|
-
|
115
|
-
|
110
|
+
'[data-target="' + target + '"],' +
|
111
|
+
this.selector + '[href="' + target + '"]'
|
116
112
|
|
117
113
|
var active = $(selector)
|
118
114
|
.parents('li')
|
@@ -127,6 +123,12 @@
|
|
127
123
|
active.trigger('activate.bs.scrollspy')
|
128
124
|
}
|
129
125
|
|
126
|
+
ScrollSpy.prototype.clear = function () {
|
127
|
+
$(this.selector)
|
128
|
+
.parentsUntil(this.options.target, '.active')
|
129
|
+
.removeClass('active')
|
130
|
+
}
|
131
|
+
|
130
132
|
|
131
133
|
// SCROLLSPY PLUGIN DEFINITION
|
132
134
|
// ===========================
|