bootstrap-sass 3.3.1.0 → 3.3.6
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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -8
- data/CHANGELOG.md +44 -0
- data/CONTRIBUTING.md +8 -1
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.md +69 -49
- data/Rakefile +46 -4
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/javascripts/bootstrap/affix.js +7 -7
- data/assets/javascripts/bootstrap/alert.js +3 -3
- data/assets/javascripts/bootstrap/button.js +14 -10
- data/assets/javascripts/bootstrap/carousel.js +11 -14
- data/assets/javascripts/bootstrap/collapse.js +9 -9
- data/assets/javascripts/bootstrap/dropdown.js +49 -45
- data/assets/javascripts/bootstrap/modal.js +45 -32
- data/assets/javascripts/bootstrap/popover.js +9 -20
- data/assets/javascripts/bootstrap/scrollspy.js +18 -21
- data/assets/javascripts/bootstrap/tab.js +7 -5
- data/assets/javascripts/bootstrap/tooltip.js +82 -46
- data/assets/javascripts/bootstrap/transition.js +2 -2
- data/assets/javascripts/bootstrap-sprockets.js +2 -2
- data/assets/javascripts/bootstrap.js +1210 -1151
- data/assets/javascripts/bootstrap.min.js +7 -0
- data/assets/stylesheets/_bootstrap-compass.scss +2 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +4 -2
- data/assets/stylesheets/_bootstrap-sprockets.scss +2 -0
- data/assets/stylesheets/_bootstrap.scss +6 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +5 -0
- data/assets/stylesheets/bootstrap/_badges.scss +7 -2
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
- data/assets/stylesheets/bootstrap/_button-groups.scss +5 -4
- data/assets/stylesheets/bootstrap/_buttons.scss +14 -6
- data/assets/stylesheets/bootstrap/_carousel.scss +16 -13
- data/assets/stylesheets/bootstrap/_close.scss +1 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +1 -2
- data/assets/stylesheets/bootstrap/_dropdowns.scss +6 -3
- data/assets/stylesheets/bootstrap/_forms.scss +98 -29
- data/assets/stylesheets/bootstrap/_glyphicons.scss +83 -10
- data/assets/stylesheets/bootstrap/_input-groups.scss +8 -3
- data/assets/stylesheets/bootstrap/_jumbotron.scss +8 -3
- data/assets/stylesheets/bootstrap/_list-group.scss +9 -3
- data/assets/stylesheets/bootstrap/_media.scss +19 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
- data/assets/stylesheets/bootstrap/_modals.scss +4 -2
- data/assets/stylesheets/bootstrap/_navbar.scss +1 -1
- data/assets/stylesheets/bootstrap/_navs.scss +0 -2
- data/assets/stylesheets/bootstrap/_normalize.scss +8 -11
- data/assets/stylesheets/bootstrap/_pagination.scss +4 -3
- data/assets/stylesheets/bootstrap/_panels.scss +11 -1
- data/assets/stylesheets/bootstrap/_popovers.scss +4 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -6
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +8 -8
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +8 -3
- data/assets/stylesheets/bootstrap/_scaffolding.scss +11 -0
- data/assets/stylesheets/bootstrap/_tables.scss +3 -3
- data/assets/stylesheets/bootstrap/_theme.scss +26 -7
- data/assets/stylesheets/bootstrap/_tooltip.scss +4 -6
- data/assets/stylesheets/bootstrap/_type.scss +2 -2
- data/assets/stylesheets/bootstrap/_utilities.scss +0 -1
- data/assets/stylesheets/bootstrap/_variables.scss +20 -10
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +19 -6
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +3 -3
- data/bootstrap-sass.gemspec +9 -9
- data/bower.json +5 -19
- data/composer.json +1 -1
- data/lib/bootstrap-sass/engine.rb +6 -1
- data/lib/bootstrap-sass/version.rb +2 -2
- data/lib/bootstrap-sass.rb +27 -5
- data/package.json +6 -6
- data/sache.json +1 -1
- data/tasks/bower.rake +2 -5
- data/tasks/converter/fonts_conversion.rb +1 -1
- data/tasks/converter/js_conversion.rb +7 -5
- data/tasks/converter/less_conversion.rb +41 -29
- data/tasks/converter/network.rb +10 -5
- data/tasks/converter.rb +1 -1
- data/templates/project/_bootstrap-variables.sass +20 -11
- data/templates/project/styles.sass +3 -0
- data/test/dummy_rails/app/assets/stylesheets/{application.css.sass → application.sass} +0 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +43 -0
- data/test/dummy_rails/config/application.rb +1 -1
- data/test/dummy_rails/config/environments/development.rb +0 -3
- data/test/dummy_rails/config/environments/production.rb +7 -1
- data/test/dummy_rails/config/environments/test.rb +9 -1
- data/test/dummy_sass_only/Gemfile +1 -1
- data/test/gemfiles/rails_head.gemfile +17 -0
- data/test/node_mincer_test.rb +2 -3
- data/test/node_sass_compile_test.sh +2 -2
- data/test/sprockets_rails_test.rb +1 -1
- data/test/support/reporting.rb +10 -0
- data/test/test_helper.rb +1 -1
- metadata +36 -34
- data/test/dummy_rails/log/development.log +0 -0
- data/test/gemfiles/sass_3_2.gemfile +0 -6
Binary file
|
Binary file
|
Binary file
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: affix.js v3.3.
|
2
|
+
* Bootstrap: affix.js v3.3.6
|
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.6'
|
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 = Math.max($(document).height(), $(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.6
|
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.6'
|
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.6
|
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.6'
|
23
23
|
|
24
24
|
Button.DEFAULTS = {
|
25
25
|
loadingText: 'loading...'
|
@@ -31,7 +31,7 @@
|
|
31
31
|
var val = $el.is('input') ? 'val' : 'html'
|
32
32
|
var data = $el.data()
|
33
33
|
|
34
|
-
state
|
34
|
+
state += 'Text'
|
35
35
|
|
36
36
|
if (data.resetText == null) $el.data('resetText', $el[val]())
|
37
37
|
|
@@ -56,15 +56,19 @@
|
|
56
56
|
if ($parent.length) {
|
57
57
|
var $input = this.$element.find('input')
|
58
58
|
if ($input.prop('type') == 'radio') {
|
59
|
-
if ($input.prop('checked')
|
60
|
-
|
59
|
+
if ($input.prop('checked')) changed = false
|
60
|
+
$parent.find('.active').removeClass('active')
|
61
|
+
this.$element.addClass('active')
|
62
|
+
} else if ($input.prop('type') == 'checkbox') {
|
63
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
64
|
+
this.$element.toggleClass('active')
|
61
65
|
}
|
62
|
-
|
66
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
67
|
+
if (changed) $input.trigger('change')
|
63
68
|
} else {
|
64
69
|
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
70
|
+
this.$element.toggleClass('active')
|
65
71
|
}
|
66
|
-
|
67
|
-
if (changed) this.$element.toggleClass('active')
|
68
72
|
}
|
69
73
|
|
70
74
|
|
@@ -107,7 +111,7 @@
|
|
107
111
|
var $btn = $(e.target)
|
108
112
|
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
109
113
|
Plugin.call($btn, 'toggle')
|
110
|
-
e.preventDefault()
|
114
|
+
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
|
111
115
|
})
|
112
116
|
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
113
117
|
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: carousel.js v3.3.
|
2
|
+
* Bootstrap: carousel.js v3.3.6
|
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.6'
|
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.6
|
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.6'
|
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.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.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 }
|
@@ -48,7 +85,7 @@
|
|
48
85
|
|
49
86
|
$parent
|
50
87
|
.toggleClass('open')
|
51
|
-
.trigger('shown.bs.dropdown', relatedTarget)
|
88
|
+
.trigger($.Event('shown.bs.dropdown', relatedTarget))
|
52
89
|
}
|
53
90
|
|
54
91
|
return false
|
@@ -67,57 +104,25 @@
|
|
67
104
|
var $parent = getParent($this)
|
68
105
|
var isActive = $parent.hasClass('open')
|
69
106
|
|
70
|
-
if (
|
107
|
+
if (!isActive && e.which != 27 || isActive && e.which == 27) {
|
71
108
|
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
72
109
|
return $this.trigger('click')
|
73
110
|
}
|
74
111
|
|
75
|
-
var desc = ' li:not(.
|
76
|
-
var $items = $parent.find('
|
112
|
+
var desc = ' li:not(.disabled):visible a'
|
113
|
+
var $items = $parent.find('.dropdown-menu' + desc)
|
77
114
|
|
78
115
|
if (!$items.length) return
|
79
116
|
|
80
117
|
var index = $items.index(e.target)
|
81
118
|
|
82
|
-
if (e.which == 38 && index > 0) index--
|
83
|
-
if (e.which == 40 && index < $items.length - 1) index++
|
84
|
-
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
|
85
122
|
|
86
123
|
$items.eq(index).trigger('focus')
|
87
124
|
}
|
88
125
|
|
89
|
-
function clearMenus(e) {
|
90
|
-
if (e && e.which === 3) return
|
91
|
-
$(backdrop).remove()
|
92
|
-
$(toggle).each(function () {
|
93
|
-
var $this = $(this)
|
94
|
-
var $parent = getParent($this)
|
95
|
-
var relatedTarget = { relatedTarget: this }
|
96
|
-
|
97
|
-
if (!$parent.hasClass('open')) return
|
98
|
-
|
99
|
-
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
100
|
-
|
101
|
-
if (e.isDefaultPrevented()) return
|
102
|
-
|
103
|
-
$this.attr('aria-expanded', 'false')
|
104
|
-
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
105
|
-
})
|
106
|
-
}
|
107
|
-
|
108
|
-
function getParent($this) {
|
109
|
-
var selector = $this.attr('data-target')
|
110
|
-
|
111
|
-
if (!selector) {
|
112
|
-
selector = $this.attr('href')
|
113
|
-
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
114
|
-
}
|
115
|
-
|
116
|
-
var $parent = selector && $(selector)
|
117
|
-
|
118
|
-
return $parent && $parent.length ? $parent : $this.parent()
|
119
|
-
}
|
120
|
-
|
121
126
|
|
122
127
|
// DROPDOWN PLUGIN DEFINITION
|
123
128
|
// ==========================
|
@@ -155,7 +160,6 @@
|
|
155
160
|
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
156
161
|
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
157
162
|
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
|
158
|
-
.on('keydown.bs.dropdown.data-api', '
|
159
|
-
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
|
163
|
+
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
|
160
164
|
|
161
165
|
}(jQuery);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: modal.js v3.3.
|
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,7 @@
|
|
30
33
|
}
|
31
34
|
}
|
32
35
|
|
33
|
-
Modal.VERSION = '3.3.
|
36
|
+
Modal.VERSION = '3.3.6'
|
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,23 +84,20 @@
|
|
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) {
|
82
90
|
that.$element[0].offsetWidth // force reflow
|
83
91
|
}
|
84
92
|
|
85
|
-
that.$element
|
86
|
-
.addClass('in')
|
87
|
-
.attr('aria-hidden', false)
|
93
|
+
that.$element.addClass('in')
|
88
94
|
|
89
95
|
that.enforceFocus()
|
90
96
|
|
91
97
|
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
|
92
98
|
|
93
99
|
transition ?
|
94
|
-
that.$
|
100
|
+
that.$dialog // wait for modal to slide in
|
95
101
|
.one('bsTransitionEnd', function () {
|
96
102
|
that.$element.trigger('focus').trigger(e)
|
97
103
|
})
|
@@ -118,8 +124,10 @@
|
|
118
124
|
|
119
125
|
this.$element
|
120
126
|
.removeClass('in')
|
121
|
-
.attr('aria-hidden', true)
|
122
127
|
.off('click.dismiss.bs.modal')
|
128
|
+
.off('mouseup.dismiss.bs.modal')
|
129
|
+
|
130
|
+
this.$dialog.off('mousedown.dismiss.bs.modal')
|
123
131
|
|
124
132
|
$.support.transition && this.$element.hasClass('fade') ?
|
125
133
|
this.$element
|
@@ -179,14 +187,20 @@
|
|
179
187
|
if (this.isShown && this.options.backdrop) {
|
180
188
|
var doAnimate = $.support.transition && animate
|
181
189
|
|
182
|
-
this.$backdrop = $('
|
183
|
-
.
|
184
|
-
.
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
+
this.$backdrop = $(document.createElement('div'))
|
191
|
+
.addClass('modal-backdrop ' + animate)
|
192
|
+
.appendTo(this.$body)
|
193
|
+
|
194
|
+
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
195
|
+
if (this.ignoreBackdropClick) {
|
196
|
+
this.ignoreBackdropClick = false
|
197
|
+
return
|
198
|
+
}
|
199
|
+
if (e.target !== e.currentTarget) return
|
200
|
+
this.options.backdrop == 'static'
|
201
|
+
? this.$element[0].focus()
|
202
|
+
: this.hide()
|
203
|
+
}, this))
|
190
204
|
|
191
205
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
192
206
|
|
@@ -221,16 +235,9 @@
|
|
221
235
|
// these following methods are used to handle overflowing modals
|
222
236
|
|
223
237
|
Modal.prototype.handleUpdate = function () {
|
224
|
-
if (this.options.backdrop) this.adjustBackdrop()
|
225
238
|
this.adjustDialog()
|
226
239
|
}
|
227
240
|
|
228
|
-
Modal.prototype.adjustBackdrop = function () {
|
229
|
-
this.$backdrop
|
230
|
-
.css('height', 0)
|
231
|
-
.css('height', this.$element[0].scrollHeight)
|
232
|
-
}
|
233
|
-
|
234
241
|
Modal.prototype.adjustDialog = function () {
|
235
242
|
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
236
243
|
|
@@ -248,17 +255,23 @@
|
|
248
255
|
}
|
249
256
|
|
250
257
|
Modal.prototype.checkScrollbar = function () {
|
251
|
-
|
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
|
252
264
|
this.scrollbarWidth = this.measureScrollbar()
|
253
265
|
}
|
254
266
|
|
255
267
|
Modal.prototype.setScrollbar = function () {
|
256
268
|
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
|
269
|
+
this.originalBodyPad = document.body.style.paddingRight || ''
|
257
270
|
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
|
258
271
|
}
|
259
272
|
|
260
273
|
Modal.prototype.resetScrollbar = function () {
|
261
|
-
this.$body.css('padding-right',
|
274
|
+
this.$body.css('padding-right', this.originalBodyPad)
|
262
275
|
}
|
263
276
|
|
264
277
|
Modal.prototype.measureScrollbar = function () { // thx walsh
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: popover.js v3.3.
|
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.3.
|
22
|
+
Popover.VERSION = '3.3.6'
|
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
|
}
|