twitter-bootstrap-rails 1.3.1 → 1.4.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.
- data/.gitignore +1 -0
- data/README.md +2 -1
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alerts.js +112 -103
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-buttons.js +62 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +55 -50
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +260 -238
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +85 -76
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +106 -104
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tabs.js +80 -62
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-twipsy.js +309 -306
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -27
- data/vendor/toolkit/twitter/bootstrap/forms.less +479 -466
- data/vendor/toolkit/twitter/bootstrap/mixins.less +223 -218
- data/vendor/toolkit/twitter/bootstrap/patterns.less +1058 -1007
- data/vendor/toolkit/twitter/bootstrap/reset.less +141 -142
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +137 -136
- data/vendor/toolkit/twitter/bootstrap/tables.less +224 -171
- data/vendor/toolkit/twitter/bootstrap/type.less +187 -188
- data/vendor/toolkit/twitter/bootstrap/variables.less +60 -61
- metadata +15 -14
@@ -1,307 +1,310 @@
|
|
1
|
-
/* ==========================================================
|
2
|
-
* bootstrap-twipsy.js v1.
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#twipsy
|
4
|
-
* Adapted from the original jQuery.tipsy by Jason Frame
|
5
|
-
* ==========================================================
|
6
|
-
* Copyright 2011 Twitter, Inc.
|
7
|
-
*
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
-
* you may not use this file except in compliance with the License.
|
10
|
-
* You may obtain a copy of the License at
|
11
|
-
*
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
-
*
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
-
* See the License for the specific language governing permissions and
|
18
|
-
* limitations under the License.
|
19
|
-
* ========================================================== */
|
20
|
-
|
21
|
-
|
22
|
-
!function( $ ) {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
transitionEnd = "
|
45
|
-
} else if ( $.browser.
|
46
|
-
transitionEnd = "
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
this
|
60
|
-
this.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
,
|
70
|
-
,
|
71
|
-
,
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
.
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
case '
|
100
|
-
tp = {top: pos.top
|
101
|
-
break
|
102
|
-
case '
|
103
|
-
tp = {top: pos.top
|
104
|
-
break
|
105
|
-
case '
|
106
|
-
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left
|
107
|
-
break
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
}
|
169
|
-
|
170
|
-
,
|
171
|
-
if (!this.$
|
172
|
-
this.
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
,
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
twipsy.
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
$.fn.twipsy.
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
,
|
295
|
-
,
|
296
|
-
,
|
297
|
-
,
|
298
|
-
,
|
299
|
-
,
|
300
|
-
,
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
1
|
+
/* ==========================================================
|
2
|
+
* bootstrap-twipsy.js v1.4.0
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#twipsy
|
4
|
+
* Adapted from the original jQuery.tipsy by Jason Frame
|
5
|
+
* ==========================================================
|
6
|
+
* Copyright 2011 Twitter, Inc.
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
* ========================================================== */
|
20
|
+
|
21
|
+
|
22
|
+
!function( $ ) {
|
23
|
+
|
24
|
+
"use strict"
|
25
|
+
|
26
|
+
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
27
|
+
* ======================================================= */
|
28
|
+
|
29
|
+
var transitionEnd
|
30
|
+
|
31
|
+
$(document).ready(function () {
|
32
|
+
|
33
|
+
$.support.transition = (function () {
|
34
|
+
var thisBody = document.body || document.documentElement
|
35
|
+
, thisStyle = thisBody.style
|
36
|
+
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
37
|
+
return support
|
38
|
+
})()
|
39
|
+
|
40
|
+
// set CSS transition event type
|
41
|
+
if ( $.support.transition ) {
|
42
|
+
transitionEnd = "TransitionEnd"
|
43
|
+
if ( $.browser.webkit ) {
|
44
|
+
transitionEnd = "webkitTransitionEnd"
|
45
|
+
} else if ( $.browser.mozilla ) {
|
46
|
+
transitionEnd = "transitionend"
|
47
|
+
} else if ( $.browser.opera ) {
|
48
|
+
transitionEnd = "oTransitionEnd"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
})
|
53
|
+
|
54
|
+
|
55
|
+
/* TWIPSY PUBLIC CLASS DEFINITION
|
56
|
+
* ============================== */
|
57
|
+
|
58
|
+
var Twipsy = function ( element, options ) {
|
59
|
+
this.$element = $(element)
|
60
|
+
this.options = options
|
61
|
+
this.enabled = true
|
62
|
+
this.fixTitle()
|
63
|
+
}
|
64
|
+
|
65
|
+
Twipsy.prototype = {
|
66
|
+
|
67
|
+
show: function() {
|
68
|
+
var pos
|
69
|
+
, actualWidth
|
70
|
+
, actualHeight
|
71
|
+
, placement
|
72
|
+
, $tip
|
73
|
+
, tp
|
74
|
+
|
75
|
+
if (this.hasContent() && this.enabled) {
|
76
|
+
$tip = this.tip()
|
77
|
+
this.setContent()
|
78
|
+
|
79
|
+
if (this.options.animate) {
|
80
|
+
$tip.addClass('fade')
|
81
|
+
}
|
82
|
+
|
83
|
+
$tip
|
84
|
+
.remove()
|
85
|
+
.css({ top: 0, left: 0, display: 'block' })
|
86
|
+
.prependTo(document.body)
|
87
|
+
|
88
|
+
pos = $.extend({}, this.$element.offset(), {
|
89
|
+
width: this.$element[0].offsetWidth
|
90
|
+
, height: this.$element[0].offsetHeight
|
91
|
+
})
|
92
|
+
|
93
|
+
actualWidth = $tip[0].offsetWidth
|
94
|
+
actualHeight = $tip[0].offsetHeight
|
95
|
+
|
96
|
+
placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
|
97
|
+
|
98
|
+
switch (placement) {
|
99
|
+
case 'below':
|
100
|
+
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
|
101
|
+
break
|
102
|
+
case 'above':
|
103
|
+
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
|
104
|
+
break
|
105
|
+
case 'left':
|
106
|
+
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}
|
107
|
+
break
|
108
|
+
case 'right':
|
109
|
+
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}
|
110
|
+
break
|
111
|
+
}
|
112
|
+
|
113
|
+
$tip
|
114
|
+
.css(tp)
|
115
|
+
.addClass(placement)
|
116
|
+
.addClass('in')
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
, setContent: function () {
|
121
|
+
var $tip = this.tip()
|
122
|
+
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
|
123
|
+
$tip[0].className = 'twipsy'
|
124
|
+
}
|
125
|
+
|
126
|
+
, hide: function() {
|
127
|
+
var that = this
|
128
|
+
, $tip = this.tip()
|
129
|
+
|
130
|
+
$tip.removeClass('in')
|
131
|
+
|
132
|
+
function removeElement () {
|
133
|
+
$tip.remove()
|
134
|
+
}
|
135
|
+
|
136
|
+
$.support.transition && this.$tip.hasClass('fade') ?
|
137
|
+
$tip.bind(transitionEnd, removeElement) :
|
138
|
+
removeElement()
|
139
|
+
}
|
140
|
+
|
141
|
+
, fixTitle: function() {
|
142
|
+
var $e = this.$element
|
143
|
+
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
144
|
+
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
, hasContent: function () {
|
149
|
+
return this.getTitle()
|
150
|
+
}
|
151
|
+
|
152
|
+
, getTitle: function() {
|
153
|
+
var title
|
154
|
+
, $e = this.$element
|
155
|
+
, o = this.options
|
156
|
+
|
157
|
+
this.fixTitle()
|
158
|
+
|
159
|
+
if (typeof o.title == 'string') {
|
160
|
+
title = $e.attr(o.title == 'title' ? 'data-original-title' : o.title)
|
161
|
+
} else if (typeof o.title == 'function') {
|
162
|
+
title = o.title.call($e[0])
|
163
|
+
}
|
164
|
+
|
165
|
+
title = ('' + title).replace(/(^\s*|\s*$)/, "")
|
166
|
+
|
167
|
+
return title || o.fallback
|
168
|
+
}
|
169
|
+
|
170
|
+
, tip: function() {
|
171
|
+
if (!this.$tip) {
|
172
|
+
this.$tip = $('<div class="twipsy" />').html(this.options.template)
|
173
|
+
}
|
174
|
+
return this.$tip
|
175
|
+
}
|
176
|
+
|
177
|
+
, validate: function() {
|
178
|
+
if (!this.$element[0].parentNode) {
|
179
|
+
this.hide()
|
180
|
+
this.$element = null
|
181
|
+
this.options = null
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
, enable: function() {
|
186
|
+
this.enabled = true
|
187
|
+
}
|
188
|
+
|
189
|
+
, disable: function() {
|
190
|
+
this.enabled = false
|
191
|
+
}
|
192
|
+
|
193
|
+
, toggleEnabled: function() {
|
194
|
+
this.enabled = !this.enabled
|
195
|
+
}
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
/* TWIPSY PRIVATE METHODS
|
201
|
+
* ====================== */
|
202
|
+
|
203
|
+
function maybeCall ( thing, ctx, args ) {
|
204
|
+
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
|
205
|
+
}
|
206
|
+
|
207
|
+
/* TWIPSY PLUGIN DEFINITION
|
208
|
+
* ======================== */
|
209
|
+
|
210
|
+
$.fn.twipsy = function (options) {
|
211
|
+
$.fn.twipsy.initWith.call(this, options, Twipsy, 'twipsy')
|
212
|
+
return this
|
213
|
+
}
|
214
|
+
|
215
|
+
$.fn.twipsy.initWith = function (options, Constructor, name) {
|
216
|
+
var twipsy
|
217
|
+
, binder
|
218
|
+
, eventIn
|
219
|
+
, eventOut
|
220
|
+
|
221
|
+
if (options === true) {
|
222
|
+
return this.data(name)
|
223
|
+
} else if (typeof options == 'string') {
|
224
|
+
twipsy = this.data(name)
|
225
|
+
if (twipsy) {
|
226
|
+
twipsy[options]()
|
227
|
+
}
|
228
|
+
return this
|
229
|
+
}
|
230
|
+
|
231
|
+
options = $.extend({}, $.fn[name].defaults, options)
|
232
|
+
|
233
|
+
function get(ele) {
|
234
|
+
var twipsy = $.data(ele, name)
|
235
|
+
|
236
|
+
if (!twipsy) {
|
237
|
+
twipsy = new Constructor(ele, $.fn.twipsy.elementOptions(ele, options))
|
238
|
+
$.data(ele, name, twipsy)
|
239
|
+
}
|
240
|
+
|
241
|
+
return twipsy
|
242
|
+
}
|
243
|
+
|
244
|
+
function enter() {
|
245
|
+
var twipsy = get(this)
|
246
|
+
twipsy.hoverState = 'in'
|
247
|
+
|
248
|
+
if (options.delayIn == 0) {
|
249
|
+
twipsy.show()
|
250
|
+
} else {
|
251
|
+
twipsy.fixTitle()
|
252
|
+
setTimeout(function() {
|
253
|
+
if (twipsy.hoverState == 'in') {
|
254
|
+
twipsy.show()
|
255
|
+
}
|
256
|
+
}, options.delayIn)
|
257
|
+
}
|
258
|
+
}
|
259
|
+
|
260
|
+
function leave() {
|
261
|
+
var twipsy = get(this)
|
262
|
+
twipsy.hoverState = 'out'
|
263
|
+
if (options.delayOut == 0) {
|
264
|
+
twipsy.hide()
|
265
|
+
} else {
|
266
|
+
setTimeout(function() {
|
267
|
+
if (twipsy.hoverState == 'out') {
|
268
|
+
twipsy.hide()
|
269
|
+
}
|
270
|
+
}, options.delayOut)
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
274
|
+
if (!options.live) {
|
275
|
+
this.each(function() {
|
276
|
+
get(this)
|
277
|
+
})
|
278
|
+
}
|
279
|
+
|
280
|
+
if (options.trigger != 'manual') {
|
281
|
+
binder = options.live ? 'live' : 'bind'
|
282
|
+
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus'
|
283
|
+
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'
|
284
|
+
this[binder](eventIn, enter)[binder](eventOut, leave)
|
285
|
+
}
|
286
|
+
|
287
|
+
return this
|
288
|
+
}
|
289
|
+
|
290
|
+
$.fn.twipsy.Twipsy = Twipsy
|
291
|
+
|
292
|
+
$.fn.twipsy.defaults = {
|
293
|
+
animate: true
|
294
|
+
, delayIn: 0
|
295
|
+
, delayOut: 0
|
296
|
+
, fallback: ''
|
297
|
+
, placement: 'above'
|
298
|
+
, html: false
|
299
|
+
, live: false
|
300
|
+
, offset: 0
|
301
|
+
, title: 'title'
|
302
|
+
, trigger: 'hover'
|
303
|
+
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
|
304
|
+
}
|
305
|
+
|
306
|
+
$.fn.twipsy.elementOptions = function(ele, options) {
|
307
|
+
return $.extend({}, options, $(ele).data())
|
308
|
+
}
|
309
|
+
|
307
310
|
}( window.jQuery || window.ender );
|