Skip to content

Commit e5b35b6

Browse files
committed
update bootstrap to v3.3.2
bootstrap v3.3.2 works with both less 1.x and 2.x
1 parent f12b784 commit e5b35b6

File tree

141 files changed

+9447
-12696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+9447
-12696
lines changed

examples/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
cache/
22
public/
33
node_modules/
4+
.DS_Store

examples/assets/javascripts/app.js.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###
22
= require jquery/jquery
3-
= require bootstrap/js/bootstrap-modal
3+
= require bootstrap/js/modal
44
= require_tree ./templates
55
###
66

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.modal
2-
.modal-header
3-
h3 Modal header
4-
.modal-body
5-
p Hello, world!
2+
.modal-dialog
3+
.modal-content
4+
.modal-header
5+
h3 Modal header
6+
.modal-body
7+
p Hello, world!

examples/vendor/bootstrap/js/.jscsrc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"disallowEmptyBlocks": true,
3+
"disallowKeywords": ["with"],
4+
"disallowMixedSpacesAndTabs": true,
5+
"disallowMultipleLineStrings": true,
6+
"disallowMultipleVarDecl": true,
7+
"disallowQuotedKeysInObjects": "allButReserved",
8+
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
9+
"disallowSpaceBeforeBinaryOperators": [","],
10+
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
11+
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
12+
"disallowSpacesInsideArrayBrackets": true,
13+
"disallowSpacesInsideParentheses": true,
14+
"disallowTrailingComma": true,
15+
"disallowTrailingWhitespace": true,
16+
"requireCamelCaseOrUpperCaseIdentifiers": true,
17+
"requireCapitalizedConstructors": true,
18+
"requireCommaBeforeLineBreak": true,
19+
"requireDotNotation": true,
20+
"requireLineFeedAtFileEnd": true,
21+
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
22+
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
23+
"requireSpaceAfterLineComment": true,
24+
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
25+
"requireSpaceBetweenArguments": true,
26+
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
27+
"requireSpacesInConditionalExpression": true,
28+
"requireSpacesInForStatement": true,
29+
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
30+
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
31+
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
32+
"requireSpacesInsideObjectBrackets": "allButNested",
33+
"validateIndentation": 2,
34+
"validateLineBreaks": "LF",
35+
"validateQuoteMarks": "'"
36+
}

examples/vendor/bootstrap/js/.jshintrc

100644100755
+14-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
2-
"validthis": true,
3-
"laxcomma" : true,
4-
"laxbreak" : true,
5-
"browser" : true,
6-
"eqnull" : true,
7-
"debug" : true,
8-
"devel" : true,
9-
"boss" : true,
10-
"expr" : true,
11-
"asi" : true
12-
}
2+
"asi" : true,
3+
"browser" : true,
4+
"eqeqeq" : false,
5+
"eqnull" : true,
6+
"es3" : true,
7+
"expr" : true,
8+
"jquery" : true,
9+
"latedef" : true,
10+
"laxbreak" : true,
11+
"nonbsp" : true,
12+
"strict" : true,
13+
"undef" : true,
14+
"unused" : true
15+
}

examples/vendor/bootstrap/js/affix.js

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
/* ========================================================================
2+
* Bootstrap: affix.js v3.3.2
3+
* http://getbootstrap.com/javascript/#affix
4+
* ========================================================================
5+
* Copyright 2011-2015 Twitter, Inc.
6+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7+
* ======================================================================== */
8+
9+
10+
+function ($) {
11+
'use strict';
12+
13+
// AFFIX CLASS DEFINITION
14+
// ======================
15+
16+
var Affix = function (element, options) {
17+
this.options = $.extend({}, Affix.DEFAULTS, options)
18+
19+
this.$target = $(this.options.target)
20+
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
21+
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
22+
23+
this.$element = $(element)
24+
this.affixed =
25+
this.unpin =
26+
this.pinnedOffset = null
27+
28+
this.checkPosition()
29+
}
30+
31+
Affix.VERSION = '3.3.2'
32+
33+
Affix.RESET = 'affix affix-top affix-bottom'
34+
35+
Affix.DEFAULTS = {
36+
offset: 0,
37+
target: window
38+
}
39+
40+
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
41+
var scrollTop = this.$target.scrollTop()
42+
var position = this.$element.offset()
43+
var targetHeight = this.$target.height()
44+
45+
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
46+
47+
if (this.affixed == 'bottom') {
48+
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
49+
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
50+
}
51+
52+
var initializing = this.affixed == null
53+
var colliderTop = initializing ? scrollTop : position.top
54+
var colliderHeight = initializing ? targetHeight : height
55+
56+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
57+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
58+
59+
return false
60+
}
61+
62+
Affix.prototype.getPinnedOffset = function () {
63+
if (this.pinnedOffset) return this.pinnedOffset
64+
this.$element.removeClass(Affix.RESET).addClass('affix')
65+
var scrollTop = this.$target.scrollTop()
66+
var position = this.$element.offset()
67+
return (this.pinnedOffset = position.top - scrollTop)
68+
}
69+
70+
Affix.prototype.checkPositionWithEventLoop = function () {
71+
setTimeout($.proxy(this.checkPosition, this), 1)
72+
}
73+
74+
Affix.prototype.checkPosition = function () {
75+
if (!this.$element.is(':visible')) return
76+
77+
var height = this.$element.height()
78+
var offset = this.options.offset
79+
var offsetTop = offset.top
80+
var offsetBottom = offset.bottom
81+
var scrollHeight = $('body').height()
82+
83+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
84+
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
85+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
86+
87+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
88+
89+
if (this.affixed != affix) {
90+
if (this.unpin != null) this.$element.css('top', '')
91+
92+
var affixType = 'affix' + (affix ? '-' + affix : '')
93+
var e = $.Event(affixType + '.bs.affix')
94+
95+
this.$element.trigger(e)
96+
97+
if (e.isDefaultPrevented()) return
98+
99+
this.affixed = affix
100+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
101+
102+
this.$element
103+
.removeClass(Affix.RESET)
104+
.addClass(affixType)
105+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
106+
}
107+
108+
if (affix == 'bottom') {
109+
this.$element.offset({
110+
top: scrollHeight - height - offsetBottom
111+
})
112+
}
113+
}
114+
115+
116+
// AFFIX PLUGIN DEFINITION
117+
// =======================
118+
119+
function Plugin(option) {
120+
return this.each(function () {
121+
var $this = $(this)
122+
var data = $this.data('bs.affix')
123+
var options = typeof option == 'object' && option
124+
125+
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
126+
if (typeof option == 'string') data[option]()
127+
})
128+
}
129+
130+
var old = $.fn.affix
131+
132+
$.fn.affix = Plugin
133+
$.fn.affix.Constructor = Affix
134+
135+
136+
// AFFIX NO CONFLICT
137+
// =================
138+
139+
$.fn.affix.noConflict = function () {
140+
$.fn.affix = old
141+
return this
142+
}
143+
144+
145+
// AFFIX DATA-API
146+
// ==============
147+
148+
$(window).on('load', function () {
149+
$('[data-spy="affix"]').each(function () {
150+
var $spy = $(this)
151+
var data = $spy.data()
152+
153+
data.offset = data.offset || {}
154+
155+
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
156+
if (data.offsetTop != null) data.offset.top = data.offsetTop
157+
158+
Plugin.call($spy, data)
159+
})
160+
})
161+
162+
}(jQuery);

examples/vendor/bootstrap/js/alert.js

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* ========================================================================
2+
* Bootstrap: alert.js v3.3.2
3+
* http://getbootstrap.com/javascript/#alerts
4+
* ========================================================================
5+
* Copyright 2011-2015 Twitter, Inc.
6+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7+
* ======================================================================== */
8+
9+
10+
+function ($) {
11+
'use strict';
12+
13+
// ALERT CLASS DEFINITION
14+
// ======================
15+
16+
var dismiss = '[data-dismiss="alert"]'
17+
var Alert = function (el) {
18+
$(el).on('click', dismiss, this.close)
19+
}
20+
21+
Alert.VERSION = '3.3.2'
22+
23+
Alert.TRANSITION_DURATION = 150
24+
25+
Alert.prototype.close = function (e) {
26+
var $this = $(this)
27+
var selector = $this.attr('data-target')
28+
29+
if (!selector) {
30+
selector = $this.attr('href')
31+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32+
}
33+
34+
var $parent = $(selector)
35+
36+
if (e) e.preventDefault()
37+
38+
if (!$parent.length) {
39+
$parent = $this.closest('.alert')
40+
}
41+
42+
$parent.trigger(e = $.Event('close.bs.alert'))
43+
44+
if (e.isDefaultPrevented()) return
45+
46+
$parent.removeClass('in')
47+
48+
function removeElement() {
49+
// detach from parent, fire event then clean up data
50+
$parent.detach().trigger('closed.bs.alert').remove()
51+
}
52+
53+
$.support.transition && $parent.hasClass('fade') ?
54+
$parent
55+
.one('bsTransitionEnd', removeElement)
56+
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
57+
removeElement()
58+
}
59+
60+
61+
// ALERT PLUGIN DEFINITION
62+
// =======================
63+
64+
function Plugin(option) {
65+
return this.each(function () {
66+
var $this = $(this)
67+
var data = $this.data('bs.alert')
68+
69+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
70+
if (typeof option == 'string') data[option].call($this)
71+
})
72+
}
73+
74+
var old = $.fn.alert
75+
76+
$.fn.alert = Plugin
77+
$.fn.alert.Constructor = Alert
78+
79+
80+
// ALERT NO CONFLICT
81+
// =================
82+
83+
$.fn.alert.noConflict = function () {
84+
$.fn.alert = old
85+
return this
86+
}
87+
88+
89+
// ALERT DATA-API
90+
// ==============
91+
92+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
93+
94+
}(jQuery);

0 commit comments

Comments
 (0)