bootstrapped-rails 2.0.8.2 → 2.0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bootstrapped-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrapped.js +1824 -12
- metadata +7 -22
- data/vendor/assets/javascripts/bootstrapped/README.md +0 -106
- data/vendor/assets/javascripts/bootstrapped/bootstrap-alert.js +0 -94
- data/vendor/assets/javascripts/bootstrapped/bootstrap-button.js +0 -100
- data/vendor/assets/javascripts/bootstrapped/bootstrap-carousel.js +0 -161
- data/vendor/assets/javascripts/bootstrapped/bootstrap-collapse.js +0 -138
- data/vendor/assets/javascripts/bootstrapped/bootstrap-dropdown.js +0 -92
- data/vendor/assets/javascripts/bootstrapped/bootstrap-modal.js +0 -210
- data/vendor/assets/javascripts/bootstrapped/bootstrap-popover.js +0 -95
- data/vendor/assets/javascripts/bootstrapped/bootstrap-scrollspy.js +0 -125
- data/vendor/assets/javascripts/bootstrapped/bootstrap-tab.js +0 -130
- data/vendor/assets/javascripts/bootstrapped/bootstrap-tooltip.js +0 -270
- data/vendor/assets/javascripts/bootstrapped/bootstrap-transition.js +0 -51
- data/vendor/assets/javascripts/bootstrapped/bootstrap-typeahead.js +0 -271
- data/vendor/assets/javascripts/bootstrapped/jquery-cookie.js +0 -41
@@ -1,51 +0,0 @@
|
|
1
|
-
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.0.2
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
|
-
* ===================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ========================================================== */
|
19
|
-
|
20
|
-
!function( $ ) {
|
21
|
-
|
22
|
-
$(function () {
|
23
|
-
|
24
|
-
"use strict"
|
25
|
-
|
26
|
-
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
27
|
-
* ======================================================= */
|
28
|
-
|
29
|
-
$.support.transition = (function () {
|
30
|
-
var thisBody = document.body || document.documentElement
|
31
|
-
, thisStyle = thisBody.style
|
32
|
-
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
33
|
-
|
34
|
-
return support && {
|
35
|
-
end: (function () {
|
36
|
-
var transitionEnd = "TransitionEnd"
|
37
|
-
if ( $.browser.webkit ) {
|
38
|
-
transitionEnd = "webkitTransitionEnd"
|
39
|
-
} else if ( $.browser.mozilla ) {
|
40
|
-
transitionEnd = "transitionend"
|
41
|
-
} else if ( $.browser.opera ) {
|
42
|
-
transitionEnd = "oTransitionEnd"
|
43
|
-
}
|
44
|
-
return transitionEnd
|
45
|
-
}())
|
46
|
-
}
|
47
|
-
})()
|
48
|
-
|
49
|
-
})
|
50
|
-
|
51
|
-
}( window.jQuery );
|
@@ -1,271 +0,0 @@
|
|
1
|
-
/* =============================================================
|
2
|
-
* bootstrap-typeahead.js v2.0.2
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
4
|
-
* =============================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ============================================================ */
|
19
|
-
|
20
|
-
!function( $ ){
|
21
|
-
|
22
|
-
"use strict"
|
23
|
-
|
24
|
-
var Typeahead = function ( element, options ) {
|
25
|
-
this.$element = $(element)
|
26
|
-
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
27
|
-
this.matcher = this.options.matcher || this.matcher
|
28
|
-
this.sorter = this.options.sorter || this.sorter
|
29
|
-
this.highlighter = this.options.highlighter || this.highlighter
|
30
|
-
this.$menu = $(this.options.menu).appendTo('body')
|
31
|
-
this.source = this.options.source
|
32
|
-
this.shown = false
|
33
|
-
this.listen()
|
34
|
-
}
|
35
|
-
|
36
|
-
Typeahead.prototype = {
|
37
|
-
|
38
|
-
constructor: Typeahead
|
39
|
-
|
40
|
-
, select: function () {
|
41
|
-
var val = this.$menu.find('.active').attr('data-value')
|
42
|
-
this.$element.val(val)
|
43
|
-
this.$element.change();
|
44
|
-
return this.hide()
|
45
|
-
}
|
46
|
-
|
47
|
-
, show: function () {
|
48
|
-
var pos = $.extend({}, this.$element.offset(), {
|
49
|
-
height: this.$element[0].offsetHeight
|
50
|
-
})
|
51
|
-
|
52
|
-
this.$menu.css({
|
53
|
-
top: pos.top + pos.height
|
54
|
-
, left: pos.left
|
55
|
-
})
|
56
|
-
|
57
|
-
this.$menu.show()
|
58
|
-
this.shown = true
|
59
|
-
return this
|
60
|
-
}
|
61
|
-
|
62
|
-
, hide: function () {
|
63
|
-
this.$menu.hide()
|
64
|
-
this.shown = false
|
65
|
-
return this
|
66
|
-
}
|
67
|
-
|
68
|
-
, lookup: function (event) {
|
69
|
-
var that = this
|
70
|
-
, items
|
71
|
-
, q
|
72
|
-
|
73
|
-
this.query = this.$element.val()
|
74
|
-
|
75
|
-
if (!this.query) {
|
76
|
-
return this.shown ? this.hide() : this
|
77
|
-
}
|
78
|
-
|
79
|
-
items = $.grep(this.source, function (item) {
|
80
|
-
if (that.matcher(item)) return item
|
81
|
-
})
|
82
|
-
|
83
|
-
items = this.sorter(items)
|
84
|
-
|
85
|
-
if (!items.length) {
|
86
|
-
return this.shown ? this.hide() : this
|
87
|
-
}
|
88
|
-
|
89
|
-
return this.render(items.slice(0, this.options.items)).show()
|
90
|
-
}
|
91
|
-
|
92
|
-
, matcher: function (item) {
|
93
|
-
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
94
|
-
}
|
95
|
-
|
96
|
-
, sorter: function (items) {
|
97
|
-
var beginswith = []
|
98
|
-
, caseSensitive = []
|
99
|
-
, caseInsensitive = []
|
100
|
-
, item
|
101
|
-
|
102
|
-
while (item = items.shift()) {
|
103
|
-
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
|
104
|
-
else if (~item.indexOf(this.query)) caseSensitive.push(item)
|
105
|
-
else caseInsensitive.push(item)
|
106
|
-
}
|
107
|
-
|
108
|
-
return beginswith.concat(caseSensitive, caseInsensitive)
|
109
|
-
}
|
110
|
-
|
111
|
-
, highlighter: function (item) {
|
112
|
-
return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
|
113
|
-
return '<strong>' + match + '</strong>'
|
114
|
-
})
|
115
|
-
}
|
116
|
-
|
117
|
-
, render: function (items) {
|
118
|
-
var that = this
|
119
|
-
|
120
|
-
items = $(items).map(function (i, item) {
|
121
|
-
i = $(that.options.item).attr('data-value', item)
|
122
|
-
i.find('a').html(that.highlighter(item))
|
123
|
-
return i[0]
|
124
|
-
})
|
125
|
-
|
126
|
-
items.first().addClass('active')
|
127
|
-
this.$menu.html(items)
|
128
|
-
return this
|
129
|
-
}
|
130
|
-
|
131
|
-
, next: function (event) {
|
132
|
-
var active = this.$menu.find('.active').removeClass('active')
|
133
|
-
, next = active.next()
|
134
|
-
|
135
|
-
if (!next.length) {
|
136
|
-
next = $(this.$menu.find('li')[0])
|
137
|
-
}
|
138
|
-
|
139
|
-
next.addClass('active')
|
140
|
-
}
|
141
|
-
|
142
|
-
, prev: function (event) {
|
143
|
-
var active = this.$menu.find('.active').removeClass('active')
|
144
|
-
, prev = active.prev()
|
145
|
-
|
146
|
-
if (!prev.length) {
|
147
|
-
prev = this.$menu.find('li').last()
|
148
|
-
}
|
149
|
-
|
150
|
-
prev.addClass('active')
|
151
|
-
}
|
152
|
-
|
153
|
-
, listen: function () {
|
154
|
-
this.$element
|
155
|
-
.on('blur', $.proxy(this.blur, this))
|
156
|
-
.on('keypress', $.proxy(this.keypress, this))
|
157
|
-
.on('keyup', $.proxy(this.keyup, this))
|
158
|
-
|
159
|
-
if ($.browser.webkit || $.browser.msie) {
|
160
|
-
this.$element.on('keydown', $.proxy(this.keypress, this))
|
161
|
-
}
|
162
|
-
|
163
|
-
this.$menu
|
164
|
-
.on('click', $.proxy(this.click, this))
|
165
|
-
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
166
|
-
}
|
167
|
-
|
168
|
-
, keyup: function (e) {
|
169
|
-
switch(e.keyCode) {
|
170
|
-
case 40: // down arrow
|
171
|
-
case 38: // up arrow
|
172
|
-
break
|
173
|
-
|
174
|
-
case 9: // tab
|
175
|
-
case 13: // enter
|
176
|
-
if (!this.shown) return
|
177
|
-
this.select()
|
178
|
-
break
|
179
|
-
|
180
|
-
case 27: // escape
|
181
|
-
if (!this.shown) return
|
182
|
-
this.hide()
|
183
|
-
break
|
184
|
-
|
185
|
-
default:
|
186
|
-
this.lookup()
|
187
|
-
}
|
188
|
-
|
189
|
-
e.stopPropagation()
|
190
|
-
e.preventDefault()
|
191
|
-
}
|
192
|
-
|
193
|
-
, keypress: function (e) {
|
194
|
-
if (!this.shown) return
|
195
|
-
|
196
|
-
switch(e.keyCode) {
|
197
|
-
case 9: // tab
|
198
|
-
case 13: // enter
|
199
|
-
case 27: // escape
|
200
|
-
e.preventDefault()
|
201
|
-
break
|
202
|
-
|
203
|
-
case 38: // up arrow
|
204
|
-
e.preventDefault()
|
205
|
-
this.prev()
|
206
|
-
break
|
207
|
-
|
208
|
-
case 40: // down arrow
|
209
|
-
e.preventDefault()
|
210
|
-
this.next()
|
211
|
-
break
|
212
|
-
}
|
213
|
-
|
214
|
-
e.stopPropagation()
|
215
|
-
}
|
216
|
-
|
217
|
-
, blur: function (e) {
|
218
|
-
var that = this
|
219
|
-
setTimeout(function () { that.hide() }, 150)
|
220
|
-
}
|
221
|
-
|
222
|
-
, click: function (e) {
|
223
|
-
e.stopPropagation()
|
224
|
-
e.preventDefault()
|
225
|
-
this.select()
|
226
|
-
}
|
227
|
-
|
228
|
-
, mouseenter: function (e) {
|
229
|
-
this.$menu.find('.active').removeClass('active')
|
230
|
-
$(e.currentTarget).addClass('active')
|
231
|
-
}
|
232
|
-
|
233
|
-
}
|
234
|
-
|
235
|
-
|
236
|
-
/* TYPEAHEAD PLUGIN DEFINITION
|
237
|
-
* =========================== */
|
238
|
-
|
239
|
-
$.fn.typeahead = function ( option ) {
|
240
|
-
return this.each(function () {
|
241
|
-
var $this = $(this)
|
242
|
-
, data = $this.data('typeahead')
|
243
|
-
, options = typeof option == 'object' && option
|
244
|
-
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
|
245
|
-
if (typeof option == 'string') data[option]()
|
246
|
-
})
|
247
|
-
}
|
248
|
-
|
249
|
-
$.fn.typeahead.defaults = {
|
250
|
-
source: []
|
251
|
-
, items: 8
|
252
|
-
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
253
|
-
, item: '<li><a href="#"></a></li>'
|
254
|
-
}
|
255
|
-
|
256
|
-
$.fn.typeahead.Constructor = Typeahead
|
257
|
-
|
258
|
-
|
259
|
-
/* TYPEAHEAD DATA-API
|
260
|
-
* ================== */
|
261
|
-
|
262
|
-
$(function () {
|
263
|
-
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
264
|
-
var $this = $(this)
|
265
|
-
if ($this.data('typeahead')) return
|
266
|
-
e.preventDefault()
|
267
|
-
$this.typeahead($this.data())
|
268
|
-
})
|
269
|
-
})
|
270
|
-
|
271
|
-
}( window.jQuery );
|
@@ -1,41 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* jQuery Cookie plugin
|
3
|
-
*
|
4
|
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
5
|
-
* Dual licensed under the MIT and GPL licenses:
|
6
|
-
* http://www.opensource.org/licenses/mit-license.php
|
7
|
-
* http://www.gnu.org/licenses/gpl.html
|
8
|
-
*
|
9
|
-
*/
|
10
|
-
jQuery.cookie = function (key, value, options) {
|
11
|
-
|
12
|
-
// key and at least value given, set cookie...
|
13
|
-
if (arguments.length > 1 && String(value) !== "[object Object]") {
|
14
|
-
options = jQuery.extend({}, options);
|
15
|
-
|
16
|
-
if (value === null || value === undefined) {
|
17
|
-
options.expires = -1;
|
18
|
-
}
|
19
|
-
|
20
|
-
if (typeof options.expires === 'number') {
|
21
|
-
var days = options.expires, t = options.expires = new Date();
|
22
|
-
t.setDate(t.getDate() + days);
|
23
|
-
}
|
24
|
-
|
25
|
-
value = String(value);
|
26
|
-
|
27
|
-
return (document.cookie = [
|
28
|
-
encodeURIComponent(key), '=',
|
29
|
-
options.raw ? value : encodeURIComponent(value),
|
30
|
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
31
|
-
options.path ? '; path=' + options.path : '',
|
32
|
-
options.domain ? '; domain=' + options.domain : '',
|
33
|
-
options.secure ? '; secure' : ''
|
34
|
-
].join(''));
|
35
|
-
}
|
36
|
-
|
37
|
-
// key and possibly options given, get cookie...
|
38
|
-
options = value || {};
|
39
|
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
40
|
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
41
|
-
};
|