bootstrap-generators 3.3.1 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/Rakefile +3 -3
- data/lib/bootstrap-generators.rb +1 -1
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +1 -1
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +8 -3
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +11 -9
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +4 -4
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +8 -8
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.slim +4 -4
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.haml +15 -15
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.slim +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/edit.html.slim +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/index.html.slim +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/new.html.slim +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/show.html.slim +2 -2
- data/readme-template.md.erb +9 -1
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/javascripts/bootstrap/affix.js +7 -7
- data/vendor/assets/javascripts/bootstrap/alert.js +3 -3
- data/vendor/assets/javascripts/bootstrap/button.js +3 -3
- data/vendor/assets/javascripts/bootstrap/carousel.js +11 -14
- data/vendor/assets/javascripts/bootstrap/collapse.js +9 -9
- data/vendor/assets/javascripts/bootstrap/dropdown.js +4 -4
- data/vendor/assets/javascripts/bootstrap/modal.js +42 -27
- data/vendor/assets/javascripts/bootstrap/popover.js +9 -20
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +18 -21
- data/vendor/assets/javascripts/bootstrap/tab.js +4 -4
- data/vendor/assets/javascripts/bootstrap/tooltip.js +26 -28
- data/vendor/assets/javascripts/bootstrap/transition.js +2 -2
- data/vendor/assets/stylesheets/bootstrap.css.erb +289 -37
- data/vendor/assets/stylesheets/bootstrap.css.map +1 -1
- data/vendor/twitter/bootstrap/less/alerts.less +5 -0
- data/vendor/twitter/bootstrap/less/badges.less +6 -1
- data/vendor/twitter/bootstrap/less/button-groups.less +2 -2
- data/vendor/twitter/bootstrap/less/buttons.less +1 -1
- data/vendor/twitter/bootstrap/less/carousel.less +8 -6
- data/vendor/twitter/bootstrap/less/close.less +1 -0
- data/vendor/twitter/bootstrap/less/component-animations.less +1 -2
- data/vendor/twitter/bootstrap/less/dropdowns.less +3 -2
- data/vendor/twitter/bootstrap/less/forms.less +51 -23
- data/vendor/twitter/bootstrap/less/glyphicons.less +71 -0
- data/vendor/twitter/bootstrap/less/jumbotron.less +1 -0
- data/vendor/twitter/bootstrap/less/media.less +14 -0
- data/vendor/twitter/bootstrap/less/mixins/vendor-prefixes.less +1 -1
- data/vendor/twitter/bootstrap/less/modals.less +3 -1
- data/vendor/twitter/bootstrap/less/navbar.less +1 -1
- data/vendor/twitter/bootstrap/less/navs.less +0 -2
- data/vendor/twitter/bootstrap/less/panels.less +5 -1
- data/vendor/twitter/bootstrap/less/popovers.less +1 -1
- data/vendor/twitter/bootstrap/less/responsive-embed.less +8 -8
- data/vendor/twitter/bootstrap/less/scaffolding.less +12 -0
- data/vendor/twitter/bootstrap/less/tables.less +3 -3
- data/vendor/twitter/bootstrap/less/theme.less +3 -2
- data/vendor/twitter/bootstrap/less/tooltip.less +1 -2
- data/vendor/twitter/bootstrap/less/type.less +1 -1
- data/vendor/twitter/bootstrap/less/utilities.less +0 -1
- data/vendor/twitter/bootstrap/less/variables.less +8 -3
- data/vendor/twitter/bootstrap/sass/_bootstrap-compass.scss +2 -0
- data/vendor/twitter/bootstrap/sass/_bootstrap-mincer.scss +2 -0
- data/vendor/twitter/bootstrap/sass/_bootstrap-sprockets.scss +2 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_alerts.scss +5 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_badges.scss +6 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_button-groups.scss +2 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_buttons.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_carousel.scss +8 -6
- data/vendor/twitter/bootstrap/sass/bootstrap/_close.scss +1 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_component-animations.scss +1 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_dropdowns.scss +3 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_forms.scss +51 -21
- data/vendor/twitter/bootstrap/sass/bootstrap/_glyphicons.scss +71 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_jumbotron.scss +1 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_media.scss +14 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_modals.scss +3 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_navbar.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_navs.scss +0 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_panels.scss +5 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_popovers.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_responsive-embed.scss +8 -8
- data/vendor/twitter/bootstrap/sass/bootstrap/_responsive-utilities.scss +4 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_scaffolding.scss +12 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_tables.scss +3 -3
- data/vendor/twitter/bootstrap/sass/bootstrap/_theme.scss +3 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_tooltip.scss +1 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_type.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_utilities.scss +0 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_variables.scss +11 -9
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_hide-text.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_opacity.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_vendor-prefixes.scss +1 -1
- metadata +3 -2
Binary file
|
Binary file
|
Binary file
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: affix.js v3.3.
|
2
|
+
* Bootstrap: affix.js v3.3.4
|
3
3
|
* http://getbootstrap.com/javascript/#affix
|
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
|
|
@@ -21,14 +21,14 @@
|
|
21
21
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
22
22
|
|
23
23
|
this.$element = $(element)
|
24
|
-
this.affixed =
|
25
|
-
this.unpin =
|
24
|
+
this.affixed = null
|
25
|
+
this.unpin = null
|
26
26
|
this.pinnedOffset = null
|
27
27
|
|
28
28
|
this.checkPosition()
|
29
29
|
}
|
30
30
|
|
31
|
-
Affix.VERSION = '3.3.
|
31
|
+
Affix.VERSION = '3.3.4'
|
32
32
|
|
33
33
|
Affix.RESET = 'affix affix-top affix-bottom'
|
34
34
|
|
@@ -53,7 +53,7 @@
|
|
53
53
|
var colliderTop = initializing ? scrollTop : position.top
|
54
54
|
var colliderHeight = initializing ? targetHeight : height
|
55
55
|
|
56
|
-
if (offsetTop != null &&
|
56
|
+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
57
57
|
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
58
58
|
|
59
59
|
return false
|
@@ -78,7 +78,7 @@
|
|
78
78
|
var offset = this.options.offset
|
79
79
|
var offsetTop = offset.top
|
80
80
|
var offsetBottom = offset.bottom
|
81
|
-
var scrollHeight = $(
|
81
|
+
var scrollHeight = $(document.body).height()
|
82
82
|
|
83
83
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
84
84
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: alert.js v3.3.
|
2
|
+
* Bootstrap: alert.js v3.3.4
|
3
3
|
* http://getbootstrap.com/javascript/#alerts
|
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
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
$(el).on('click', dismiss, this.close)
|
19
19
|
}
|
20
20
|
|
21
|
-
Alert.VERSION = '3.3.
|
21
|
+
Alert.VERSION = '3.3.4'
|
22
22
|
|
23
23
|
Alert.TRANSITION_DURATION = 150
|
24
24
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: button.js v3.3.
|
2
|
+
* Bootstrap: button.js v3.3.4
|
3
3
|
* http://getbootstrap.com/javascript/#buttons
|
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
|
this.isLoading = false
|
20
20
|
}
|
21
21
|
|
22
|
-
Button.VERSION = '3.3.
|
22
|
+
Button.VERSION = '3.3.4'
|
23
23
|
|
24
24
|
Button.DEFAULTS = {
|
25
25
|
loadingText: 'loading...'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: carousel.js v3.3.
|
2
|
+
* Bootstrap: carousel.js v3.3.4
|
3
3
|
* http://getbootstrap.com/javascript/#carousel
|
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
|
|
@@ -17,10 +17,10 @@
|
|
17
17
|
this.$element = $(element)
|
18
18
|
this.$indicators = this.$element.find('.carousel-indicators')
|
19
19
|
this.options = options
|
20
|
-
this.paused =
|
21
|
-
this.sliding =
|
22
|
-
this.interval =
|
23
|
-
this.$active =
|
20
|
+
this.paused = null
|
21
|
+
this.sliding = null
|
22
|
+
this.interval = null
|
23
|
+
this.$active = null
|
24
24
|
this.$items = null
|
25
25
|
|
26
26
|
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
@@ -30,7 +30,7 @@
|
|
30
30
|
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
31
31
|
}
|
32
32
|
|
33
|
-
Carousel.VERSION = '3.3.
|
33
|
+
Carousel.VERSION = '3.3.4'
|
34
34
|
|
35
35
|
Carousel.TRANSITION_DURATION = 600
|
36
36
|
|
@@ -70,8 +70,11 @@
|
|
70
70
|
}
|
71
71
|
|
72
72
|
Carousel.prototype.getItemForDirection = function (direction, active) {
|
73
|
-
var delta = direction == 'prev' ? -1 : 1
|
74
73
|
var activeIndex = this.getItemIndex(active)
|
74
|
+
var willWrap = (direction == 'prev' && activeIndex === 0)
|
75
|
+
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
|
76
|
+
if (willWrap && !this.options.wrap) return active
|
77
|
+
var delta = direction == 'prev' ? -1 : 1
|
75
78
|
var itemIndex = (activeIndex + delta) % this.$items.length
|
76
79
|
return this.$items.eq(itemIndex)
|
77
80
|
}
|
@@ -116,14 +119,8 @@
|
|
116
119
|
var $next = next || this.getItemForDirection(type, $active)
|
117
120
|
var isCycling = this.interval
|
118
121
|
var direction = type == 'next' ? 'left' : 'right'
|
119
|
-
var fallback = type == 'next' ? 'first' : 'last'
|
120
122
|
var that = this
|
121
123
|
|
122
|
-
if (!$next.length) {
|
123
|
-
if (!this.options.wrap) return
|
124
|
-
$next = this.$element.find('.item')[fallback]()
|
125
|
-
}
|
126
|
-
|
127
124
|
if ($next.hasClass('active')) return (this.sliding = false)
|
128
125
|
|
129
126
|
var relatedTarget = $next[0]
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: collapse.js v3.3.
|
2
|
+
* Bootstrap: collapse.js v3.3.4
|
3
3
|
* http://getbootstrap.com/javascript/#collapse
|
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
|
|
@@ -16,7 +16,8 @@
|
|
16
16
|
var Collapse = function (element, options) {
|
17
17
|
this.$element = $(element)
|
18
18
|
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
19
|
-
this.$trigger = $(
|
19
|
+
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
|
20
|
+
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
|
20
21
|
this.transitioning = null
|
21
22
|
|
22
23
|
if (this.options.parent) {
|
@@ -28,13 +29,12 @@
|
|
28
29
|
if (this.options.toggle) this.toggle()
|
29
30
|
}
|
30
31
|
|
31
|
-
Collapse.VERSION = '3.3.
|
32
|
+
Collapse.VERSION = '3.3.4'
|
32
33
|
|
33
34
|
Collapse.TRANSITION_DURATION = 350
|
34
35
|
|
35
36
|
Collapse.DEFAULTS = {
|
36
|
-
toggle: true
|
37
|
-
trigger: '[data-toggle="collapse"]'
|
37
|
+
toggle: true
|
38
38
|
}
|
39
39
|
|
40
40
|
Collapse.prototype.dimension = function () {
|
@@ -46,7 +46,7 @@
|
|
46
46
|
if (this.transitioning || this.$element.hasClass('in')) return
|
47
47
|
|
48
48
|
var activesData
|
49
|
-
var actives = this.$parent && this.$parent.
|
49
|
+
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
|
50
50
|
|
51
51
|
if (actives && actives.length) {
|
52
52
|
activesData = actives.data('bs.collapse')
|
@@ -172,7 +172,7 @@
|
|
172
172
|
var data = $this.data('bs.collapse')
|
173
173
|
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
174
174
|
|
175
|
-
if (!data && options.toggle && option
|
175
|
+
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
|
176
176
|
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
177
177
|
if (typeof option == 'string') data[option]()
|
178
178
|
})
|
@@ -203,7 +203,7 @@
|
|
203
203
|
|
204
204
|
var $target = getTargetFromTrigger($this)
|
205
205
|
var data = $target.data('bs.collapse')
|
206
|
-
var option = data ? 'toggle' :
|
206
|
+
var option = data ? 'toggle' : $this.data()
|
207
207
|
|
208
208
|
Plugin.call($target, option)
|
209
209
|
})
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: dropdown.js v3.3.
|
2
|
+
* Bootstrap: dropdown.js v3.3.4
|
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,7 @@
|
|
19
19
|
$(element).on('click.bs.dropdown', this.toggle)
|
20
20
|
}
|
21
21
|
|
22
|
-
Dropdown.VERSION = '3.3.
|
22
|
+
Dropdown.VERSION = '3.3.4'
|
23
23
|
|
24
24
|
Dropdown.prototype.toggle = function (e) {
|
25
25
|
var $this = $(this)
|
@@ -72,7 +72,7 @@
|
|
72
72
|
return $this.trigger('click')
|
73
73
|
}
|
74
74
|
|
75
|
-
var desc = ' li:not(.
|
75
|
+
var desc = ' li:not(.disabled):visible a'
|
76
76
|
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
|
77
77
|
|
78
78
|
if (!$items.length) return
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: modal.js v3.3.
|
2
|
+
* Bootstrap: modal.js v3.3.4
|
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,7 @@
|
|
30
33
|
}
|
31
34
|
}
|
32
35
|
|
33
|
-
Modal.VERSION = '3.3.
|
36
|
+
Modal.VERSION = '3.3.4'
|
34
37
|
|
35
38
|
Modal.TRANSITION_DURATION = 300
|
36
39
|
Modal.BACKDROP_TRANSITION_DURATION = 150
|
@@ -64,6 +67,12 @@
|
|
64
67
|
|
65
68
|
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
|
66
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
|
+
|
67
76
|
this.backdrop(function () {
|
68
77
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
69
78
|
|
@@ -75,7 +84,6 @@
|
|
75
84
|
.show()
|
76
85
|
.scrollTop(0)
|
77
86
|
|
78
|
-
if (that.options.backdrop) that.adjustBackdrop()
|
79
87
|
that.adjustDialog()
|
80
88
|
|
81
89
|
if (transition) {
|
@@ -91,7 +99,7 @@
|
|
91
99
|
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
92
100
|
|
93
101
|
transition ?
|
94
|
-
that.$
|
102
|
+
that.$dialog // wait for modal to slide in
|
95
103
|
.one('bsTransitionEnd', function () {
|
96
104
|
that.$element.trigger('focus').trigger(e)
|
97
105
|
})
|
@@ -120,6 +128,9 @@
|
|
120
128
|
.removeClass('in')
|
121
129
|
.attr('aria-hidden', true)
|
122
130
|
.off('click.dismiss.bs.modal')
|
131
|
+
.off('mouseup.dismiss.bs.modal')
|
132
|
+
|
133
|
+
this.$dialog.off('mousedown.dismiss.bs.modal')
|
123
134
|
|
124
135
|
$.support.transition && this.$element.hasClass('fade') ?
|
125
136
|
this.$element
|
@@ -180,13 +191,18 @@
|
|
180
191
|
var doAnimate = $.support.transition && animate
|
181
192
|
|
182
193
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
183
|
-
.
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
}
|
194
|
+
.appendTo(this.$body)
|
195
|
+
|
196
|
+
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
197
|
+
if (this.ignoreBackdropClick) {
|
198
|
+
this.ignoreBackdropClick = false
|
199
|
+
return
|
200
|
+
}
|
201
|
+
if (e.target !== e.currentTarget) return
|
202
|
+
this.options.backdrop == 'static'
|
203
|
+
? this.$element[0].focus()
|
204
|
+
: this.hide()
|
205
|
+
}, this))
|
190
206
|
|
191
207
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
192
208
|
|
@@ -221,16 +237,9 @@
|
|
221
237
|
// these following methods are used to handle overflowing modals
|
222
238
|
|
223
239
|
Modal.prototype.handleUpdate = function () {
|
224
|
-
if (this.options.backdrop) this.adjustBackdrop()
|
225
240
|
this.adjustDialog()
|
226
241
|
}
|
227
242
|
|
228
|
-
Modal.prototype.adjustBackdrop = function () {
|
229
|
-
this.$backdrop
|
230
|
-
.css('height', 0)
|
231
|
-
.css('height', this.$element[0].scrollHeight)
|
232
|
-
}
|
233
|
-
|
234
243
|
Modal.prototype.adjustDialog = function () {
|
235
244
|
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
236
245
|
|
@@ -248,17 +257,23 @@
|
|
248
257
|
}
|
249
258
|
|
250
259
|
Modal.prototype.checkScrollbar = function () {
|
251
|
-
|
260
|
+
var fullWindowWidth = window.innerWidth
|
261
|
+
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
|
262
|
+
var documentElementRect = document.documentElement.getBoundingClientRect()
|
263
|
+
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
|
264
|
+
}
|
265
|
+
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
|
252
266
|
this.scrollbarWidth = this.measureScrollbar()
|
253
267
|
}
|
254
268
|
|
255
269
|
Modal.prototype.setScrollbar = function () {
|
256
270
|
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
|
271
|
+
this.originalBodyPad = document.body.style.paddingRight || ''
|
257
272
|
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
|
258
273
|
}
|
259
274
|
|
260
275
|
Modal.prototype.resetScrollbar = function () {
|
261
|
-
this.$body.css('padding-right',
|
276
|
+
this.$body.css('padding-right', this.originalBodyPad)
|
262
277
|
}
|
263
278
|
|
264
279
|
Modal.prototype.measureScrollbar = function () { // thx walsh
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.3.
|
2
|
+
* Bootstrap: popover.js v3.3.4
|
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.3.
|
22
|
+
Popover.VERSION = '3.3.4'
|
23
23
|
|
24
24
|
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
25
25
|
placement: 'right',
|
@@ -75,29 +75,18 @@
|
|
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
|
// =========================
|
86
81
|
|
87
82
|
function Plugin(option) {
|
88
83
|
return this.each(function () {
|
89
|
-
var $this
|
90
|
-
var data
|
91
|
-
var options
|
92
|
-
|
93
|
-
|
94
|
-
if (!data
|
95
|
-
if (selector) {
|
96
|
-
if (!data) $this.data('bs.popover', (data = {}))
|
97
|
-
if (!data[selector]) data[selector] = new Popover(this, options)
|
98
|
-
} else {
|
99
|
-
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
100
|
-
}
|
84
|
+
var $this = $(this)
|
85
|
+
var data = $this.data('bs.popover')
|
86
|
+
var options = typeof option == 'object' && option
|
87
|
+
|
88
|
+
if (!data && /destroy|hide/.test(option)) return
|
89
|
+
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
|
101
90
|
if (typeof option == 'string') data[option]()
|
102
91
|
})
|
103
92
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: scrollspy.js v3.3.
|
2
|
+
* Bootstrap: scrollspy.js v3.3.4
|
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.3.
|
31
|
+
ScrollSpy.VERSION = '3.3.4'
|
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
|
|
@@ -99,7 +96,7 @@
|
|
99
96
|
for (i = offsets.length; i--;) {
|
100
97
|
activeTarget != targets[i]
|
101
98
|
&& scrollTop >= offsets[i]
|
102
|
-
&& (
|
99
|
+
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
|
103
100
|
&& this.activate(targets[i])
|
104
101
|
}
|
105
102
|
}
|
@@ -110,8 +107,8 @@
|
|
110
107
|
this.clear()
|
111
108
|
|
112
109
|
var selector = this.selector +
|
113
|
-
|
114
|
-
|
110
|
+
'[data-target="' + target + '"],' +
|
111
|
+
this.selector + '[href="' + target + '"]'
|
115
112
|
|
116
113
|
var active = $(selector)
|
117
114
|
.parents('li')
|