rails_admin 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails_admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +99 -74
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +48 -55
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +70 -65
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +163 -147
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +117 -114
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +89 -107
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +208 -175
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +77 -78
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +137 -129
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +85 -101
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +364 -268
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +51 -52
- data/app/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +1782 -335
- data/app/assets/javascripts/rails_admin/ra.filter-box.js +1 -1
- data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +3 -3
- data/app/assets/javascripts/rails_admin/ra.filtering-select.js +1 -1
- data/app/assets/javascripts/rails_admin/ra.remote-form.js +6 -2
- data/app/assets/stylesheets/rails_admin/base/theming.scss +34 -14
- data/app/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +47 -58
- data/app/assets/stylesheets/rails_admin/bootstrap/_badges.scss +57 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +12 -10
- data/app/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +163 -152
- data/app/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +98 -169
- data/app/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +151 -66
- data/app/assets/stylesheets/rails_admin/bootstrap/_close.scss +11 -8
- data/app/assets/stylesheets/rails_admin/bootstrap/_code.scss +36 -29
- data/app/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +16 -3
- data/app/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +115 -148
- data/app/assets/stylesheets/rails_admin/bootstrap/_forms.scss +396 -547
- data/app/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +237 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_grid.scss +74 -11
- data/app/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +166 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +48 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +131 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_media.scss +8 -7
- data/app/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +36 -693
- data/app/assets/stylesheets/rails_admin/bootstrap/_modals.scss +108 -53
- data/app/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +545 -383
- data/app/assets/stylesheets/rails_admin/bootstrap/_navs.scss +191 -358
- data/app/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +425 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_pager.scss +45 -33
- data/app/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +70 -105
- data/app/assets/stylesheets/rails_admin/bootstrap/_panels.scss +243 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +61 -61
- data/app/assets/stylesheets/rails_admin/bootstrap/_print.scss +101 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +56 -73
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +34 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +150 -50
- data/app/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +120 -23
- data/app/assets/stylesheets/rails_admin/bootstrap/_tables.scss +168 -170
- data/app/assets/stylesheets/rails_admin/bootstrap/_theme.scss +258 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +27 -42
- data/app/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +49 -24
- data/app/assets/stylesheets/rails_admin/bootstrap/_type.scss +200 -143
- data/app/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +33 -21
- data/app/assets/stylesheets/rails_admin/bootstrap/_variables.scss +764 -215
- data/app/assets/stylesheets/rails_admin/bootstrap/_wells.scss +7 -7
- data/app/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +47 -60
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +14 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +11 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +50 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +84 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +58 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +34 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +31 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +23 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +24 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +11 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +219 -0
- data/app/assets/stylesheets/rails_admin/ra.calendar-additions.scss +17 -0
- data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +9 -5
- data/app/helpers/rails_admin/application_helper.rb +20 -19
- data/app/helpers/rails_admin/form_builder.rb +14 -11
- data/app/views/kaminari/twitter-bootstrap/_paginator.html.haml +8 -9
- data/app/views/layouts/rails_admin/_navigation.html.haml +5 -5
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +1 -1
- data/app/views/layouts/rails_admin/application.html.haml +9 -8
- data/app/views/layouts/rails_admin/pjax.html.haml +4 -3
- data/app/views/rails_admin/main/_form_datetime.html.haml +2 -1
- data/app/views/rails_admin/main/_form_field.html.haml +1 -1
- data/app/views/rails_admin/main/_form_text.html.haml +1 -1
- data/app/views/rails_admin/main/_submit_buttons.html.haml +1 -0
- data/app/views/rails_admin/main/dashboard.html.haml +1 -1
- data/app/views/rails_admin/main/export.html.haml +19 -16
- data/app/views/rails_admin/main/index.html.haml +11 -7
- data/app/views/rails_admin/main/show.html.haml +1 -1
- data/lib/rails_admin/adapters/active_record.rb +2 -2
- data/lib/rails_admin/adapters/mongoid/property.rb +1 -1
- data/lib/rails_admin/config/actions/bulk_delete.rb +0 -1
- data/lib/rails_admin/config/actions/edit.rb +0 -2
- data/lib/rails_admin/config/actions/export.rb +0 -2
- data/lib/rails_admin/config/actions/index.rb +0 -3
- data/lib/rails_admin/config/actions/new.rb +0 -2
- data/lib/rails_admin/config/configurable.rb +1 -1
- data/lib/rails_admin/config/fields/base.rb +9 -0
- data/lib/rails_admin/config/fields/factories/enum.rb +2 -3
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +4 -0
- data/lib/rails_admin/config/model.rb +2 -1
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +2 -2
- data/lib/rails_admin/support/csv_converter.rb +22 -42
- data/lib/rails_admin/version.rb +1 -1
- metadata +59 -18
- data/app/assets/stylesheets/rails_admin/bootstrap/_accordion.scss +0 -34
- data/app/assets/stylesheets/rails_admin/bootstrap/_hero-unit.scss +0 -25
- data/app/assets/stylesheets/rails_admin/bootstrap/_labels-badges.scss +0 -83
- data/app/assets/stylesheets/rails_admin/bootstrap/_layouts.scss +0 -16
- data/app/assets/stylesheets/rails_admin/bootstrap/_reset.scss +0 -216
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-1200px-min.scss +0 -28
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-767px-max.scss +0 -193
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-768px-979px.scss +0 -19
- data/app/assets/stylesheets/rails_admin/bootstrap/_responsive-navbar.scss +0 -189
- data/app/assets/stylesheets/rails_admin/bootstrap/_sprites.scss +0 -197
- data/app/assets/stylesheets/rails_admin/bootstrap/responsive.scss +0 -48
@@ -1,207 +1,223 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* http://getbootstrap.com/
|
4
|
-
*
|
5
|
-
* Copyright
|
6
|
-
*
|
7
|
-
*
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* CAROUSEL CLASS DEFINITION
|
27
|
-
* ========================= */
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: carousel.js v3.2.0
|
3
|
+
* http://getbootstrap.com/javascript/#carousel
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// CAROUSEL CLASS DEFINITION
|
14
|
+
// =========================
|
28
15
|
|
29
16
|
var Carousel = function (element, options) {
|
30
|
-
this.$element
|
17
|
+
this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
31
18
|
this.$indicators = this.$element.find('.carousel-indicators')
|
32
|
-
this.options
|
19
|
+
this.options = options
|
20
|
+
this.paused =
|
21
|
+
this.sliding =
|
22
|
+
this.interval =
|
23
|
+
this.$active =
|
24
|
+
this.$items = null
|
25
|
+
|
33
26
|
this.options.pause == 'hover' && this.$element
|
34
|
-
.on('mouseenter', $.proxy(this.pause, this))
|
35
|
-
.on('mouseleave', $.proxy(this.cycle, this))
|
27
|
+
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
28
|
+
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
36
29
|
}
|
37
30
|
|
38
|
-
Carousel.
|
31
|
+
Carousel.VERSION = '3.2.0'
|
39
32
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
46
|
-
return this
|
47
|
-
}
|
33
|
+
Carousel.DEFAULTS = {
|
34
|
+
interval: 5000,
|
35
|
+
pause: 'hover',
|
36
|
+
wrap: true
|
37
|
+
}
|
48
38
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
39
|
+
Carousel.prototype.keydown = function (e) {
|
40
|
+
switch (e.which) {
|
41
|
+
case 37: this.prev(); break
|
42
|
+
case 39: this.next(); break
|
43
|
+
default: return
|
53
44
|
}
|
54
45
|
|
55
|
-
|
56
|
-
|
57
|
-
, that = this
|
46
|
+
e.preventDefault()
|
47
|
+
}
|
58
48
|
|
59
|
-
|
49
|
+
Carousel.prototype.cycle = function (e) {
|
50
|
+
e || (this.paused = false)
|
60
51
|
|
61
|
-
|
62
|
-
return this.$element.one('slid', function () {
|
63
|
-
that.to(pos)
|
64
|
-
})
|
65
|
-
}
|
52
|
+
this.interval && clearInterval(this.interval)
|
66
53
|
|
67
|
-
|
68
|
-
|
69
|
-
|
54
|
+
this.options.interval
|
55
|
+
&& !this.paused
|
56
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
70
57
|
|
71
|
-
|
72
|
-
|
58
|
+
return this
|
59
|
+
}
|
73
60
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
this.cycle(true)
|
79
|
-
}
|
80
|
-
clearInterval(this.interval)
|
81
|
-
this.interval = null
|
82
|
-
return this
|
83
|
-
}
|
61
|
+
Carousel.prototype.getItemIndex = function (item) {
|
62
|
+
this.$items = item.parent().children('.item')
|
63
|
+
return this.$items.index(item || this.$active)
|
64
|
+
}
|
84
65
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
66
|
+
Carousel.prototype.to = function (pos) {
|
67
|
+
var that = this
|
68
|
+
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
|
69
|
+
|
70
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
71
|
+
|
72
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
73
|
+
if (activeIndex == pos) return this.pause().cycle()
|
89
74
|
|
90
|
-
|
91
|
-
|
92
|
-
|
75
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
76
|
+
}
|
77
|
+
|
78
|
+
Carousel.prototype.pause = function (e) {
|
79
|
+
e || (this.paused = true)
|
80
|
+
|
81
|
+
if (this.$element.find('.next, .prev').length && $.support.transition) {
|
82
|
+
this.$element.trigger($.support.transition.end)
|
83
|
+
this.cycle(true)
|
93
84
|
}
|
94
85
|
|
95
|
-
|
96
|
-
var $active = this.$element.find('.item.active')
|
97
|
-
, $next = next || $active[type]()
|
98
|
-
, isCycling = this.interval
|
99
|
-
, direction = type == 'next' ? 'left' : 'right'
|
100
|
-
, fallback = type == 'next' ? 'first' : 'last'
|
101
|
-
, that = this
|
102
|
-
, e
|
86
|
+
this.interval = clearInterval(this.interval)
|
103
87
|
|
104
|
-
|
88
|
+
return this
|
89
|
+
}
|
105
90
|
|
106
|
-
|
91
|
+
Carousel.prototype.next = function () {
|
92
|
+
if (this.sliding) return
|
93
|
+
return this.slide('next')
|
94
|
+
}
|
95
|
+
|
96
|
+
Carousel.prototype.prev = function () {
|
97
|
+
if (this.sliding) return
|
98
|
+
return this.slide('prev')
|
99
|
+
}
|
107
100
|
|
108
|
-
|
101
|
+
Carousel.prototype.slide = function (type, next) {
|
102
|
+
var $active = this.$element.find('.item.active')
|
103
|
+
var $next = next || $active[type]()
|
104
|
+
var isCycling = this.interval
|
105
|
+
var direction = type == 'next' ? 'left' : 'right'
|
106
|
+
var fallback = type == 'next' ? 'first' : 'last'
|
107
|
+
var that = this
|
108
|
+
|
109
|
+
if (!$next.length) {
|
110
|
+
if (!this.options.wrap) return
|
111
|
+
$next = this.$element.find('.item')[fallback]()
|
112
|
+
}
|
109
113
|
|
110
|
-
|
111
|
-
relatedTarget: $next[0]
|
112
|
-
, direction: direction
|
113
|
-
})
|
114
|
+
if ($next.hasClass('active')) return (this.sliding = false)
|
114
115
|
|
115
|
-
|
116
|
+
var relatedTarget = $next[0]
|
117
|
+
var slideEvent = $.Event('slide.bs.carousel', {
|
118
|
+
relatedTarget: relatedTarget,
|
119
|
+
direction: direction
|
120
|
+
})
|
121
|
+
this.$element.trigger(slideEvent)
|
122
|
+
if (slideEvent.isDefaultPrevented()) return
|
116
123
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
124
|
+
this.sliding = true
|
125
|
+
|
126
|
+
isCycling && this.pause()
|
127
|
+
|
128
|
+
if (this.$indicators.length) {
|
129
|
+
this.$indicators.find('.active').removeClass('active')
|
130
|
+
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
|
131
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
132
|
+
}
|
133
|
+
|
134
|
+
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
135
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
136
|
+
$next.addClass(type)
|
137
|
+
$next[0].offsetWidth // force reflow
|
138
|
+
$active.addClass(direction)
|
139
|
+
$next.addClass(direction)
|
140
|
+
$active
|
141
|
+
.one('bsTransitionEnd', function () {
|
133
142
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
134
143
|
$active.removeClass(['active', direction].join(' '))
|
135
144
|
that.sliding = false
|
136
|
-
setTimeout(function () {
|
145
|
+
setTimeout(function () {
|
146
|
+
that.$element.trigger(slidEvent)
|
147
|
+
}, 0)
|
137
148
|
})
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
this.$element.trigger('slid')
|
145
|
-
}
|
146
|
-
|
147
|
-
isCycling && this.cycle()
|
148
|
-
|
149
|
-
return this
|
149
|
+
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
|
150
|
+
} else {
|
151
|
+
$active.removeClass('active')
|
152
|
+
$next.addClass('active')
|
153
|
+
this.sliding = false
|
154
|
+
this.$element.trigger(slidEvent)
|
150
155
|
}
|
151
156
|
|
152
|
-
|
157
|
+
isCycling && this.cycle()
|
153
158
|
|
159
|
+
return this
|
160
|
+
}
|
154
161
|
|
155
|
-
/* CAROUSEL PLUGIN DEFINITION
|
156
|
-
* ========================== */
|
157
162
|
|
158
|
-
|
163
|
+
// CAROUSEL PLUGIN DEFINITION
|
164
|
+
// ==========================
|
159
165
|
|
160
|
-
|
166
|
+
function Plugin(option) {
|
161
167
|
return this.each(function () {
|
162
|
-
var $this
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
168
|
+
var $this = $(this)
|
169
|
+
var data = $this.data('bs.carousel')
|
170
|
+
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
171
|
+
var action = typeof option == 'string' ? option : options.slide
|
172
|
+
|
173
|
+
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
167
174
|
if (typeof option == 'number') data.to(option)
|
168
175
|
else if (action) data[action]()
|
169
176
|
else if (options.interval) data.pause().cycle()
|
170
177
|
})
|
171
178
|
}
|
172
179
|
|
173
|
-
$.fn.carousel
|
174
|
-
interval: 5000
|
175
|
-
, pause: 'hover'
|
176
|
-
}
|
180
|
+
var old = $.fn.carousel
|
177
181
|
|
182
|
+
$.fn.carousel = Plugin
|
178
183
|
$.fn.carousel.Constructor = Carousel
|
179
184
|
|
180
185
|
|
181
|
-
|
182
|
-
|
186
|
+
// CAROUSEL NO CONFLICT
|
187
|
+
// ====================
|
183
188
|
|
184
189
|
$.fn.carousel.noConflict = function () {
|
185
190
|
$.fn.carousel = old
|
186
191
|
return this
|
187
192
|
}
|
188
193
|
|
189
|
-
/* CAROUSEL DATA-API
|
190
|
-
* ================= */
|
191
194
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
195
|
+
// CAROUSEL DATA-API
|
196
|
+
// =================
|
197
|
+
|
198
|
+
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
199
|
+
var href
|
200
|
+
var $this = $(this)
|
201
|
+
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
202
|
+
if (!$target.hasClass('carousel')) return
|
203
|
+
var options = $.extend({}, $target.data(), $this.data())
|
204
|
+
var slideIndex = $this.attr('data-slide-to')
|
205
|
+
if (slideIndex) options.interval = false
|
197
206
|
|
198
|
-
$target
|
207
|
+
Plugin.call($target, options)
|
199
208
|
|
200
|
-
if (slideIndex
|
201
|
-
$target.data('carousel').
|
209
|
+
if (slideIndex) {
|
210
|
+
$target.data('bs.carousel').to(slideIndex)
|
202
211
|
}
|
203
212
|
|
204
213
|
e.preventDefault()
|
205
214
|
})
|
206
215
|
|
207
|
-
|
216
|
+
$(window).on('load', function () {
|
217
|
+
$('[data-ride="carousel"]').each(function () {
|
218
|
+
var $carousel = $(this)
|
219
|
+
Plugin.call($carousel, $carousel.data())
|
220
|
+
})
|
221
|
+
})
|
222
|
+
|
223
|
+
}(jQuery);
|
@@ -1,149 +1,142 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* http://getbootstrap.com/
|
4
|
-
*
|
5
|
-
* Copyright
|
6
|
-
*
|
7
|
-
*
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* COLLAPSE PUBLIC CLASS DEFINITION
|
27
|
-
* ================================ */
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: collapse.js v3.2.0
|
3
|
+
* http://getbootstrap.com/javascript/#collapse
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// COLLAPSE PUBLIC CLASS DEFINITION
|
14
|
+
// ================================
|
28
15
|
|
29
16
|
var Collapse = function (element, options) {
|
30
|
-
this.$element
|
31
|
-
this.options
|
17
|
+
this.$element = $(element)
|
18
|
+
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
19
|
+
this.transitioning = null
|
32
20
|
|
33
|
-
if (this.options.parent)
|
34
|
-
|
35
|
-
|
21
|
+
if (this.options.parent) this.$parent = $(this.options.parent)
|
22
|
+
if (this.options.toggle) this.toggle()
|
23
|
+
}
|
24
|
+
|
25
|
+
Collapse.VERSION = '3.2.0'
|
36
26
|
|
37
|
-
|
27
|
+
Collapse.DEFAULTS = {
|
28
|
+
toggle: true
|
38
29
|
}
|
39
30
|
|
40
|
-
Collapse.prototype = {
|
31
|
+
Collapse.prototype.dimension = function () {
|
32
|
+
var hasWidth = this.$element.hasClass('width')
|
33
|
+
return hasWidth ? 'width' : 'height'
|
34
|
+
}
|
41
35
|
|
42
|
-
|
36
|
+
Collapse.prototype.show = function () {
|
37
|
+
if (this.transitioning || this.$element.hasClass('in')) return
|
43
38
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
39
|
+
var startEvent = $.Event('show.bs.collapse')
|
40
|
+
this.$element.trigger(startEvent)
|
41
|
+
if (startEvent.isDefaultPrevented()) return
|
48
42
|
|
49
|
-
|
50
|
-
var dimension
|
51
|
-
, scroll
|
52
|
-
, actives
|
53
|
-
, hasData
|
43
|
+
var actives = this.$parent && this.$parent.find('> .panel > .in')
|
54
44
|
|
55
|
-
|
45
|
+
if (actives && actives.length) {
|
46
|
+
var hasData = actives.data('bs.collapse')
|
47
|
+
if (hasData && hasData.transitioning) return
|
48
|
+
Plugin.call(actives, 'hide')
|
49
|
+
hasData || actives.data('bs.collapse', null)
|
50
|
+
}
|
56
51
|
|
57
|
-
|
58
|
-
scroll = $.camelCase(['scroll', dimension].join('-'))
|
59
|
-
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
52
|
+
var dimension = this.dimension()
|
60
53
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
actives.collapse('hide')
|
65
|
-
hasData || actives.data('collapse', null)
|
66
|
-
}
|
54
|
+
this.$element
|
55
|
+
.removeClass('collapse')
|
56
|
+
.addClass('collapsing')[dimension](0)
|
67
57
|
|
68
|
-
|
69
|
-
this.transition('addClass', $.Event('show'), 'shown')
|
70
|
-
$.support.transition && this.$element[dimension](this.$element[0][scroll])
|
71
|
-
}
|
58
|
+
this.transitioning = 1
|
72
59
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
this.
|
78
|
-
this
|
79
|
-
|
60
|
+
var complete = function () {
|
61
|
+
this.$element
|
62
|
+
.removeClass('collapsing')
|
63
|
+
.addClass('collapse in')[dimension]('')
|
64
|
+
this.transitioning = 0
|
65
|
+
this.$element
|
66
|
+
.trigger('shown.bs.collapse')
|
80
67
|
}
|
81
68
|
|
82
|
-
|
83
|
-
var dimension = this.dimension()
|
69
|
+
if (!$.support.transition) return complete.call(this)
|
84
70
|
|
85
|
-
|
86
|
-
.removeClass('collapse')
|
87
|
-
[dimension](size || 'auto')
|
88
|
-
[0].offsetWidth
|
71
|
+
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
89
72
|
|
90
|
-
|
73
|
+
this.$element
|
74
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
75
|
+
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
|
76
|
+
}
|
91
77
|
|
92
|
-
|
93
|
-
|
78
|
+
Collapse.prototype.hide = function () {
|
79
|
+
if (this.transitioning || !this.$element.hasClass('in')) return
|
94
80
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
if (startEvent.type == 'show') that.reset()
|
99
|
-
that.transitioning = 0
|
100
|
-
that.$element.trigger(completeEvent)
|
101
|
-
}
|
81
|
+
var startEvent = $.Event('hide.bs.collapse')
|
82
|
+
this.$element.trigger(startEvent)
|
83
|
+
if (startEvent.isDefaultPrevented()) return
|
102
84
|
|
103
|
-
|
85
|
+
var dimension = this.dimension()
|
104
86
|
|
105
|
-
|
87
|
+
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
106
88
|
|
107
|
-
|
89
|
+
this.$element
|
90
|
+
.addClass('collapsing')
|
91
|
+
.removeClass('collapse')
|
92
|
+
.removeClass('in')
|
108
93
|
|
109
|
-
|
94
|
+
this.transitioning = 1
|
110
95
|
|
111
|
-
|
112
|
-
|
113
|
-
|
96
|
+
var complete = function () {
|
97
|
+
this.transitioning = 0
|
98
|
+
this.$element
|
99
|
+
.trigger('hidden.bs.collapse')
|
100
|
+
.removeClass('collapsing')
|
101
|
+
.addClass('collapse')
|
114
102
|
}
|
115
103
|
|
116
|
-
|
117
|
-
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
118
|
-
}
|
104
|
+
if (!$.support.transition) return complete.call(this)
|
119
105
|
|
106
|
+
this.$element
|
107
|
+
[dimension](0)
|
108
|
+
.one('bsTransitionEnd', $.proxy(complete, this))
|
109
|
+
.emulateTransitionEnd(350)
|
120
110
|
}
|
121
111
|
|
112
|
+
Collapse.prototype.toggle = function () {
|
113
|
+
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
114
|
+
}
|
122
115
|
|
123
|
-
/* COLLAPSE PLUGIN DEFINITION
|
124
|
-
* ========================== */
|
125
116
|
|
126
|
-
|
117
|
+
// COLLAPSE PLUGIN DEFINITION
|
118
|
+
// ==========================
|
127
119
|
|
128
|
-
|
120
|
+
function Plugin(option) {
|
129
121
|
return this.each(function () {
|
130
|
-
var $this
|
131
|
-
|
132
|
-
|
133
|
-
|
122
|
+
var $this = $(this)
|
123
|
+
var data = $this.data('bs.collapse')
|
124
|
+
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
125
|
+
|
126
|
+
if (!data && options.toggle && option == 'show') option = !option
|
127
|
+
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
134
128
|
if (typeof option == 'string') data[option]()
|
135
129
|
})
|
136
130
|
}
|
137
131
|
|
138
|
-
$.fn.collapse
|
139
|
-
toggle: true
|
140
|
-
}
|
132
|
+
var old = $.fn.collapse
|
141
133
|
|
134
|
+
$.fn.collapse = Plugin
|
142
135
|
$.fn.collapse.Constructor = Collapse
|
143
136
|
|
144
137
|
|
145
|
-
|
146
|
-
|
138
|
+
// COLLAPSE NO CONFLICT
|
139
|
+
// ====================
|
147
140
|
|
148
141
|
$.fn.collapse.noConflict = function () {
|
149
142
|
$.fn.collapse = old
|
@@ -151,17 +144,27 @@
|
|
151
144
|
}
|
152
145
|
|
153
146
|
|
154
|
-
|
155
|
-
|
147
|
+
// COLLAPSE DATA-API
|
148
|
+
// =================
|
156
149
|
|
157
|
-
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
158
|
-
var
|
159
|
-
|
150
|
+
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
151
|
+
var href
|
152
|
+
var $this = $(this)
|
153
|
+
var target = $this.attr('data-target')
|
160
154
|
|| e.preventDefault()
|
161
|
-
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
162
|
-
|
163
|
-
$
|
164
|
-
$
|
155
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
156
|
+
var $target = $(target)
|
157
|
+
var data = $target.data('bs.collapse')
|
158
|
+
var option = data ? 'toggle' : $this.data()
|
159
|
+
var parent = $this.attr('data-parent')
|
160
|
+
var $parent = parent && $(parent)
|
161
|
+
|
162
|
+
if (!data || !data.transitioning) {
|
163
|
+
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
164
|
+
$this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
165
|
+
}
|
166
|
+
|
167
|
+
Plugin.call($target, option)
|
165
168
|
})
|
166
169
|
|
167
|
-
}(
|
170
|
+
}(jQuery);
|