bootstrapped 1.0.1 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/README.rdoc +7 -1
- data/bootstrapped.gemspec +1 -1
- data/lib/bootstrapped/engine.rb +1 -1
- data/lib/bootstrapped/version.rb +2 -1
- data/vendor/assets/javascripts/bootstrap-alert.js +28 -29
- data/vendor/assets/javascripts/bootstrap-button.js +32 -34
- data/vendor/assets/javascripts/bootstrap-carousel.js +34 -19
- data/vendor/assets/javascripts/bootstrap-collapse.js +47 -26
- data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
- data/vendor/assets/javascripts/bootstrap-modal.js +26 -18
- data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +43 -17
- data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
- data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
- data/vendor/assets/javascripts/bootstrap-transition.js +31 -21
- data/vendor/assets/javascripts/bootstrap-typeahead.js +30 -16
- data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap-responsive.css +808 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap.css +2314 -850
- data/vendor/less/twitter/bootstrap/less/accordion.less +5 -0
- data/vendor/less/twitter/bootstrap/less/alerts.less +2 -14
- data/vendor/less/twitter/bootstrap/less/bootstrap.less +2 -2
- data/vendor/less/twitter/bootstrap/less/breadcrumbs.less +3 -1
- data/vendor/less/twitter/bootstrap/less/button-groups.less +78 -34
- data/vendor/less/twitter/bootstrap/less/buttons.less +53 -27
- data/vendor/less/twitter/bootstrap/less/carousel.less +0 -0
- data/vendor/less/twitter/bootstrap/less/close.less +12 -1
- data/vendor/less/twitter/bootstrap/less/code.less +18 -5
- data/vendor/less/twitter/bootstrap/less/component-animations.less +9 -7
- data/vendor/less/twitter/bootstrap/less/dropdowns.less +59 -47
- data/vendor/less/twitter/bootstrap/less/forms.less +167 -98
- data/vendor/less/twitter/bootstrap/less/grid.less +2 -5
- data/vendor/less/twitter/bootstrap/less/hero-unit.less +3 -1
- data/vendor/less/twitter/bootstrap/less/labels-badges.less +55 -0
- data/vendor/less/twitter/bootstrap/less/layouts.less +1 -1
- data/vendor/less/twitter/bootstrap/less/mixins.less +261 -167
- data/vendor/less/twitter/bootstrap/less/modals.less +22 -4
- data/vendor/less/twitter/bootstrap/less/navbar.less +147 -75
- data/vendor/less/twitter/bootstrap/less/navs.less +72 -53
- data/vendor/less/twitter/bootstrap/less/pager.less +6 -0
- data/vendor/less/twitter/bootstrap/less/pagination.less +1 -0
- data/vendor/less/twitter/bootstrap/less/popovers.less +0 -0
- data/vendor/less/twitter/bootstrap/less/progress-bars.less +27 -5
- data/vendor/less/twitter/bootstrap/less/reset.less +4 -4
- data/vendor/less/twitter/bootstrap/less/responsive-1200px-min.less +26 -0
- data/vendor/less/twitter/bootstrap/less/responsive-767px-max.less +149 -0
- data/vendor/less/twitter/bootstrap/less/responsive-768px-979px.less +17 -0
- data/vendor/less/twitter/bootstrap/less/responsive-navbar.less +146 -0
- data/vendor/less/twitter/bootstrap/less/responsive-utilities.less +41 -0
- data/vendor/less/twitter/bootstrap/less/responsive.less +14 -289
- data/vendor/less/twitter/bootstrap/less/scaffolding.less +4 -4
- data/vendor/less/twitter/bootstrap/less/sprites.less +47 -12
- data/vendor/less/twitter/bootstrap/less/tables.less +59 -22
- data/vendor/less/twitter/bootstrap/less/thumbnails.less +15 -3
- data/vendor/less/twitter/bootstrap/less/tooltip.less +0 -0
- data/vendor/less/twitter/bootstrap/less/type.less +30 -12
- data/vendor/less/twitter/bootstrap/less/utilities.less +0 -0
- data/vendor/less/twitter/bootstrap/less/variables.less +119 -13
- data/vendor/less/twitter/bootstrap/less/wells.less +10 -0
- metadata +30 -22
data/.gitmodules
ADDED
data/README.rdoc
CHANGED
@@ -47,7 +47,7 @@ You can change the name of the layout by specifying the layout name. For example
|
|
47
47
|
|
48
48
|
You can also specify if you want a fixed for fluid layout. If you choose to specify the layout, you must specify the layout name as well. The options are fluid and fixed
|
49
49
|
|
50
|
-
rails g
|
50
|
+
rails g bootstrapped:layout [layout_name] [fixed or fluid]
|
51
51
|
|
52
52
|
An example command:
|
53
53
|
|
@@ -72,6 +72,12 @@ http://github.com/entropillc/bootstrapped/issues
|
|
72
72
|
|
73
73
|
== Change Log
|
74
74
|
|
75
|
+
=== Version 2.0.3
|
76
|
+
|
77
|
+
* Updated Twitter Bootstrap to 2.0.3
|
78
|
+
* Updated versioning to match Bootstrap for better tracking
|
79
|
+
* Updated version file to contain variable for Bootstrap Version
|
80
|
+
|
75
81
|
=== Version 1.0.1
|
76
82
|
|
77
83
|
* Added HAML support in scaffolding
|
data/bootstrapped.gemspec
CHANGED
@@ -4,7 +4,7 @@ require "bootstrapped/version"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "bootstrapped"
|
7
|
-
s.version =
|
7
|
+
s.version = Bootstrapped::VERSION
|
8
8
|
s.authors = ["Nicholas Watson"]
|
9
9
|
s.email = ["nwwatson@gmail.com"]
|
10
10
|
s.homepage = "http://github.com/entropillc/bootstrapped"
|
data/lib/bootstrapped/engine.rb
CHANGED
@@ -7,7 +7,7 @@ module Bootstrapped
|
|
7
7
|
initializer 'twitter-bootstrap-rails.setup',
|
8
8
|
:after => 'less-rails.after.load_config_initializers',
|
9
9
|
:group => :all do |app|
|
10
|
-
app.config.less.paths << File.join(config.root, 'vendor', 'less'
|
10
|
+
app.config.less.paths << File.join(config.root, 'vendor', 'less')
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/bootstrapped/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-alert.js v2.0.
|
2
|
+
* bootstrap-alert.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,58 +18,57 @@
|
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* ALERT CLASS DEFINITION
|
26
27
|
* ====================== */
|
27
28
|
|
28
29
|
var dismiss = '[data-dismiss="alert"]'
|
29
|
-
, Alert = function (
|
30
|
+
, Alert = function (el) {
|
30
31
|
$(el).on('click', dismiss, this.close)
|
31
32
|
}
|
32
33
|
|
33
|
-
Alert.prototype = {
|
34
|
-
|
35
|
-
|
34
|
+
Alert.prototype.close = function (e) {
|
35
|
+
var $this = $(this)
|
36
|
+
, selector = $this.attr('data-target')
|
37
|
+
, $parent
|
36
38
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
if (!selector) {
|
40
|
+
selector = $this.attr('href')
|
41
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
42
|
+
}
|
41
43
|
|
42
|
-
|
43
|
-
selector = $this.attr('href')
|
44
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
45
|
-
}
|
44
|
+
$parent = $(selector)
|
46
45
|
|
47
|
-
|
48
|
-
$parent.trigger('close')
|
46
|
+
e && e.preventDefault()
|
49
47
|
|
50
|
-
|
48
|
+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
51
49
|
|
52
|
-
|
50
|
+
$parent.trigger(e = $.Event('close'))
|
53
51
|
|
54
|
-
|
52
|
+
if (e.isDefaultPrevented()) return
|
55
53
|
|
56
|
-
|
57
|
-
$parent.remove()
|
58
|
-
$parent.trigger('closed')
|
59
|
-
}
|
54
|
+
$parent.removeClass('in')
|
60
55
|
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
function removeElement() {
|
57
|
+
$parent
|
58
|
+
.trigger('closed')
|
59
|
+
.remove()
|
64
60
|
}
|
65
61
|
|
62
|
+
$.support.transition && $parent.hasClass('fade') ?
|
63
|
+
$parent.on($.support.transition.end, removeElement) :
|
64
|
+
removeElement()
|
66
65
|
}
|
67
66
|
|
68
67
|
|
69
68
|
/* ALERT PLUGIN DEFINITION
|
70
69
|
* ======================= */
|
71
70
|
|
72
|
-
$.fn.alert = function (
|
71
|
+
$.fn.alert = function (option) {
|
73
72
|
return this.each(function () {
|
74
73
|
var $this = $(this)
|
75
74
|
, data = $this.data('alert')
|
@@ -88,4 +87,4 @@
|
|
88
87
|
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
89
88
|
})
|
90
89
|
|
91
|
-
}(
|
90
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-button.js v2.0.
|
2
|
+
* bootstrap-button.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,58 +17,54 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ============================================================ */
|
19
19
|
|
20
|
-
!function( $ ){
|
21
20
|
|
22
|
-
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
24
|
+
|
23
25
|
|
24
26
|
/* BUTTON PUBLIC CLASS DEFINITION
|
25
27
|
* ============================== */
|
26
28
|
|
27
|
-
var Button = function (
|
29
|
+
var Button = function (element, options) {
|
28
30
|
this.$element = $(element)
|
29
31
|
this.options = $.extend({}, $.fn.button.defaults, options)
|
30
32
|
}
|
31
33
|
|
32
|
-
Button.prototype = {
|
33
|
-
|
34
|
-
|
34
|
+
Button.prototype.setState = function (state) {
|
35
|
+
var d = 'disabled'
|
36
|
+
, $el = this.$element
|
37
|
+
, data = $el.data()
|
38
|
+
, val = $el.is('input') ? 'val' : 'html'
|
35
39
|
|
36
|
-
|
37
|
-
|
38
|
-
, $el = this.$element
|
39
|
-
, data = $el.data()
|
40
|
-
, val = $el.is('input') ? 'val' : 'html'
|
40
|
+
state = state + 'Text'
|
41
|
+
data.resetText || $el.data('resetText', $el[val]())
|
41
42
|
|
42
|
-
|
43
|
-
data.resetText || $el.data('resetText', $el[val]())
|
43
|
+
$el[val](data[state] || this.options[state])
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}, 0)
|
53
|
-
}
|
54
|
-
|
55
|
-
, toggle: function () {
|
56
|
-
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
45
|
+
// push to event loop to allow forms to submit
|
46
|
+
setTimeout(function () {
|
47
|
+
state == 'loadingText' ?
|
48
|
+
$el.addClass(d).attr(d, d) :
|
49
|
+
$el.removeClass(d).removeAttr(d)
|
50
|
+
}, 0)
|
51
|
+
}
|
57
52
|
|
58
|
-
|
59
|
-
|
60
|
-
.removeClass('active')
|
53
|
+
Button.prototype.toggle = function () {
|
54
|
+
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
|
61
55
|
|
62
|
-
|
63
|
-
|
56
|
+
$parent && $parent
|
57
|
+
.find('.active')
|
58
|
+
.removeClass('active')
|
64
59
|
|
60
|
+
this.$element.toggleClass('active')
|
65
61
|
}
|
66
62
|
|
67
63
|
|
68
64
|
/* BUTTON PLUGIN DEFINITION
|
69
65
|
* ======================== */
|
70
66
|
|
71
|
-
$.fn.button = function (
|
67
|
+
$.fn.button = function (option) {
|
72
68
|
return this.each(function () {
|
73
69
|
var $this = $(this)
|
74
70
|
, data = $this.data('button')
|
@@ -91,8 +87,10 @@
|
|
91
87
|
|
92
88
|
$(function () {
|
93
89
|
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
94
|
-
$(e.target)
|
90
|
+
var $btn = $(e.target)
|
91
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
92
|
+
$btn.button('toggle')
|
95
93
|
})
|
96
94
|
})
|
97
95
|
|
98
|
-
}(
|
96
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ==========================================================
|
2
|
-
* bootstrap-carousel.js v2.0.
|
2
|
+
* bootstrap-carousel.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
4
4
|
* ==========================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,23 +18,30 @@
|
|
18
18
|
* ========================================================== */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* CAROUSEL CLASS DEFINITION
|
26
27
|
* ========================= */
|
27
28
|
|
28
29
|
var Carousel = function (element, options) {
|
29
30
|
this.$element = $(element)
|
30
|
-
this.options =
|
31
|
+
this.options = options
|
31
32
|
this.options.slide && this.slide(this.options.slide)
|
33
|
+
this.options.pause == 'hover' && this.$element
|
34
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
35
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
32
36
|
}
|
33
37
|
|
34
38
|
Carousel.prototype = {
|
35
39
|
|
36
|
-
cycle: function () {
|
37
|
-
|
40
|
+
cycle: function (e) {
|
41
|
+
if (!e) this.paused = false
|
42
|
+
this.options.interval
|
43
|
+
&& !this.paused
|
44
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
38
45
|
return this
|
39
46
|
}
|
40
47
|
|
@@ -59,8 +66,10 @@
|
|
59
66
|
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
60
67
|
}
|
61
68
|
|
62
|
-
, pause: function () {
|
69
|
+
, pause: function (e) {
|
70
|
+
if (!e) this.paused = true
|
63
71
|
clearInterval(this.interval)
|
72
|
+
this.interval = null
|
64
73
|
return this
|
65
74
|
}
|
66
75
|
|
@@ -81,6 +90,7 @@
|
|
81
90
|
, direction = type == 'next' ? 'left' : 'right'
|
82
91
|
, fallback = type == 'next' ? 'first' : 'last'
|
83
92
|
, that = this
|
93
|
+
, e = $.Event('slide')
|
84
94
|
|
85
95
|
this.sliding = true
|
86
96
|
|
@@ -88,24 +98,28 @@
|
|
88
98
|
|
89
99
|
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
90
100
|
|
91
|
-
if (
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
this.$element.trigger('slid')
|
97
|
-
} else {
|
101
|
+
if ($next.hasClass('active')) return
|
102
|
+
|
103
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
104
|
+
this.$element.trigger(e)
|
105
|
+
if (e.isDefaultPrevented()) return
|
98
106
|
$next.addClass(type)
|
99
107
|
$next[0].offsetWidth // force reflow
|
100
108
|
$active.addClass(direction)
|
101
109
|
$next.addClass(direction)
|
102
|
-
this.$element.trigger('slide')
|
103
110
|
this.$element.one($.support.transition.end, function () {
|
104
111
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
105
112
|
$active.removeClass(['active', direction].join(' '))
|
106
113
|
that.sliding = false
|
107
114
|
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
108
115
|
})
|
116
|
+
} else {
|
117
|
+
this.$element.trigger(e)
|
118
|
+
if (e.isDefaultPrevented()) return
|
119
|
+
$active.removeClass('active')
|
120
|
+
$next.addClass('active')
|
121
|
+
this.sliding = false
|
122
|
+
this.$element.trigger('slid')
|
109
123
|
}
|
110
124
|
|
111
125
|
isCycling && this.cycle()
|
@@ -119,20 +133,21 @@
|
|
119
133
|
/* CAROUSEL PLUGIN DEFINITION
|
120
134
|
* ========================== */
|
121
135
|
|
122
|
-
$.fn.carousel = function (
|
136
|
+
$.fn.carousel = function (option) {
|
123
137
|
return this.each(function () {
|
124
138
|
var $this = $(this)
|
125
139
|
, data = $this.data('carousel')
|
126
|
-
, options = typeof option == 'object' && option
|
140
|
+
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
127
141
|
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
128
142
|
if (typeof option == 'number') data.to(option)
|
129
143
|
else if (typeof option == 'string' || (option = options.slide)) data[option]()
|
130
|
-
else data.cycle()
|
144
|
+
else if (options.interval) data.cycle()
|
131
145
|
})
|
132
146
|
}
|
133
147
|
|
134
148
|
$.fn.carousel.defaults = {
|
135
149
|
interval: 5000
|
150
|
+
, pause: 'hover'
|
136
151
|
}
|
137
152
|
|
138
153
|
$.fn.carousel.Constructor = Carousel
|
@@ -151,4 +166,4 @@
|
|
151
166
|
})
|
152
167
|
})
|
153
168
|
|
154
|
-
}(
|
169
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-collapse.js v2.0.
|
2
|
+
* bootstrap-collapse.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
4
4
|
* =============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -17,16 +17,21 @@
|
|
17
17
|
* limitations under the License.
|
18
18
|
* ============================================================ */
|
19
19
|
|
20
|
-
!function( $ ){
|
21
20
|
|
22
|
-
|
21
|
+
!function ($) {
|
23
22
|
|
24
|
-
|
25
|
-
|
23
|
+
"use strict"; // jshint ;_;
|
24
|
+
|
25
|
+
|
26
|
+
/* COLLAPSE PUBLIC CLASS DEFINITION
|
27
|
+
* ================================ */
|
28
|
+
|
29
|
+
var Collapse = function (element, options) {
|
30
|
+
this.$element = $(element)
|
26
31
|
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
27
32
|
|
28
|
-
if (this.options
|
29
|
-
this.$parent = $(this.options
|
33
|
+
if (this.options.parent) {
|
34
|
+
this.$parent = $(this.options.parent)
|
30
35
|
}
|
31
36
|
|
32
37
|
this.options.toggle && this.toggle()
|
@@ -42,31 +47,39 @@
|
|
42
47
|
}
|
43
48
|
|
44
49
|
, show: function () {
|
45
|
-
var dimension
|
46
|
-
, scroll
|
47
|
-
, actives
|
50
|
+
var dimension
|
51
|
+
, scroll
|
52
|
+
, actives
|
48
53
|
, hasData
|
49
54
|
|
55
|
+
if (this.transitioning) return
|
56
|
+
|
57
|
+
dimension = this.dimension()
|
58
|
+
scroll = $.camelCase(['scroll', dimension].join('-'))
|
59
|
+
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
60
|
+
|
50
61
|
if (actives && actives.length) {
|
51
62
|
hasData = actives.data('collapse')
|
63
|
+
if (hasData && hasData.transitioning) return
|
52
64
|
actives.collapse('hide')
|
53
65
|
hasData || actives.data('collapse', null)
|
54
66
|
}
|
55
67
|
|
56
68
|
this.$element[dimension](0)
|
57
|
-
this.transition('addClass', 'show', 'shown')
|
69
|
+
this.transition('addClass', $.Event('show'), 'shown')
|
58
70
|
this.$element[dimension](this.$element[0][scroll])
|
59
|
-
|
60
71
|
}
|
61
72
|
|
62
73
|
, hide: function () {
|
63
|
-
var dimension
|
74
|
+
var dimension
|
75
|
+
if (this.transitioning) return
|
76
|
+
dimension = this.dimension()
|
64
77
|
this.reset(this.$element[dimension]())
|
65
|
-
this.transition('removeClass', 'hide', 'hidden')
|
78
|
+
this.transition('removeClass', $.Event('hide'), 'hidden')
|
66
79
|
this.$element[dimension](0)
|
67
80
|
}
|
68
81
|
|
69
|
-
, reset: function (
|
82
|
+
, reset: function (size) {
|
70
83
|
var dimension = this.dimension()
|
71
84
|
|
72
85
|
this.$element
|
@@ -74,35 +87,43 @@
|
|
74
87
|
[dimension](size || 'auto')
|
75
88
|
[0].offsetWidth
|
76
89
|
|
77
|
-
this.$element
|
90
|
+
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
|
91
|
+
|
92
|
+
return this
|
78
93
|
}
|
79
94
|
|
80
|
-
, transition: function (
|
95
|
+
, transition: function (method, startEvent, completeEvent) {
|
81
96
|
var that = this
|
82
97
|
, complete = function () {
|
83
|
-
if (startEvent == 'show') that.reset()
|
98
|
+
if (startEvent.type == 'show') that.reset()
|
99
|
+
that.transitioning = 0
|
84
100
|
that.$element.trigger(completeEvent)
|
85
101
|
}
|
86
102
|
|
87
|
-
this.$element
|
88
|
-
|
89
|
-
|
103
|
+
this.$element.trigger(startEvent)
|
104
|
+
|
105
|
+
if (startEvent.isDefaultPrevented()) return
|
106
|
+
|
107
|
+
this.transitioning = 1
|
108
|
+
|
109
|
+
this.$element[method]('in')
|
90
110
|
|
91
111
|
$.support.transition && this.$element.hasClass('collapse') ?
|
92
112
|
this.$element.one($.support.transition.end, complete) :
|
93
113
|
complete()
|
94
|
-
|
114
|
+
}
|
95
115
|
|
96
116
|
, toggle: function () {
|
97
117
|
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
98
|
-
|
118
|
+
}
|
99
119
|
|
100
120
|
}
|
101
121
|
|
102
|
-
|
122
|
+
|
123
|
+
/* COLLAPSIBLE PLUGIN DEFINITION
|
103
124
|
* ============================== */
|
104
125
|
|
105
|
-
$.fn.collapse = function (
|
126
|
+
$.fn.collapse = function (option) {
|
106
127
|
return this.each(function () {
|
107
128
|
var $this = $(this)
|
108
129
|
, data = $this.data('collapse')
|
@@ -133,4 +154,4 @@
|
|
133
154
|
})
|
134
155
|
})
|
135
156
|
|
136
|
-
}(
|
157
|
+
}(window.jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrap-dropdown.js v2.0.
|
2
|
+
* bootstrap-dropdown.js v2.0.3
|
3
3
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
4
4
|
* ============================================================
|
5
5
|
* Copyright 2012 Twitter, Inc.
|
@@ -18,15 +18,16 @@
|
|
18
18
|
* ============================================================ */
|
19
19
|
|
20
20
|
|
21
|
-
!function(
|
21
|
+
!function ($) {
|
22
|
+
|
23
|
+
"use strict"; // jshint ;_;
|
22
24
|
|
23
|
-
"use strict"
|
24
25
|
|
25
26
|
/* DROPDOWN CLASS DEFINITION
|
26
27
|
* ========================= */
|
27
28
|
|
28
29
|
var toggle = '[data-toggle="dropdown"]'
|
29
|
-
, Dropdown = function (
|
30
|
+
, Dropdown = function (element) {
|
30
31
|
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
31
32
|
$('html').on('click.dropdown.data-api', function () {
|
32
33
|
$el.parent().removeClass('open')
|
@@ -37,12 +38,16 @@
|
|
37
38
|
|
38
39
|
constructor: Dropdown
|
39
40
|
|
40
|
-
, toggle: function (
|
41
|
+
, toggle: function (e) {
|
41
42
|
var $this = $(this)
|
42
|
-
, selector = $this.attr('data-target')
|
43
43
|
, $parent
|
44
|
+
, selector
|
44
45
|
, isActive
|
45
46
|
|
47
|
+
if ($this.is('.disabled, :disabled')) return
|
48
|
+
|
49
|
+
selector = $this.attr('data-target')
|
50
|
+
|
46
51
|
if (!selector) {
|
47
52
|
selector = $this.attr('href')
|
48
53
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
@@ -54,7 +59,8 @@
|
|
54
59
|
isActive = $parent.hasClass('open')
|
55
60
|
|
56
61
|
clearMenus()
|
57
|
-
|
62
|
+
|
63
|
+
if (!isActive) $parent.toggleClass('open')
|
58
64
|
|
59
65
|
return false
|
60
66
|
}
|
@@ -69,7 +75,7 @@
|
|
69
75
|
/* DROPDOWN PLUGIN DEFINITION
|
70
76
|
* ========================== */
|
71
77
|
|
72
|
-
$.fn.dropdown = function (
|
78
|
+
$.fn.dropdown = function (option) {
|
73
79
|
return this.each(function () {
|
74
80
|
var $this = $(this)
|
75
81
|
, data = $this.data('dropdown')
|
@@ -86,7 +92,9 @@
|
|
86
92
|
|
87
93
|
$(function () {
|
88
94
|
$('html').on('click.dropdown.data-api', clearMenus)
|
89
|
-
$('body')
|
95
|
+
$('body')
|
96
|
+
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
|
97
|
+
.on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
90
98
|
})
|
91
99
|
|
92
|
-
}(
|
100
|
+
}(window.jQuery);
|