active_frontend 13.3.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.fasterer.yml +19 -0
- data/.reek +27 -0
- data/.rubocop.yml +38 -0
- data/.scss-lint.yml +27 -0
- data/Rakefile +1 -1
- data/active_frontend.gemspec +21 -18
- data/app/.DS_Store +0 -0
- data/app/assets/.DS_Store +0 -0
- data/app/assets/fonts/.DS_Store +0 -0
- data/app/assets/fonts/dripicons/.DS_Store +0 -0
- data/app/assets/fonts/dripicons/dripicons.woff +0 -0
- data/app/assets/fonts/fakt-pro/.DS_Store +0 -0
- data/app/assets/fonts/fakt-pro/fakt-pro-bold.woff +0 -0
- data/app/assets/fonts/fakt-pro/fakt-pro-normal.woff +0 -0
- data/app/assets/fonts/fakt-pro/fakt-pro-semibold.woff +0 -0
- data/app/assets/fonts/fakt-pro/fakt-pro-semilight.woff +0 -0
- data/app/assets/fonts/fakt-soft-pro/.DS_Store +0 -0
- data/app/assets/fonts/fakt-soft-pro/fakt-soft-pro-bold.woff +0 -0
- data/app/assets/fonts/fakt-soft-pro/fakt-soft-pro-normal.woff +0 -0
- data/app/assets/fonts/fakt-soft-pro/fakt-soft-pro-semibold.woff +0 -0
- data/app/assets/fonts/fakt-soft-pro/fakt-soft-pro-semilight.woff +0 -0
- data/app/assets/images/.DS_Store +0 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/placeholders/.DS_Store +0 -0
- data/app/assets/images/placeholders/camera-large.png +0 -0
- data/app/assets/images/placeholders/camera-small.png +0 -0
- data/app/assets/images/placeholders/camera.png +0 -0
- data/app/assets/images/placeholders/document-large.png +0 -0
- data/app/assets/images/placeholders/document-small.png +0 -0
- data/app/assets/images/placeholders/document.png +0 -0
- data/app/assets/images/placeholders/photo-large.png +0 -0
- data/app/assets/images/placeholders/{picture-small.png → photo-small.png} +0 -0
- data/app/assets/images/placeholders/photo.png +0 -0
- data/app/assets/images/placeholders/store-large.png +0 -0
- data/app/assets/images/placeholders/store-small.png +0 -0
- data/app/assets/images/placeholders/store.png +0 -0
- data/app/assets/images/placeholders/user-large.png +0 -0
- data/app/assets/images/placeholders/user-small.png +0 -0
- data/app/assets/images/placeholders/user.png +0 -0
- data/app/helpers/active_frontend_helper.rb +22 -37
- data/lib/.DS_Store +0 -0
- data/lib/active_frontend.rb +3 -4
- data/lib/active_frontend/.DS_Store +0 -0
- data/lib/active_frontend/version.rb +1 -1
- data/lib/generators/active_frontend/install_generator.rb +3 -3
- data/lib/generators/active_frontend/templates/install.js +35 -30
- data/lib/generators/active_frontend/templates/install.scss +55 -58
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/active_frontend.js +35 -30
- data/vendor/assets/javascripts/base/_affix.js +170 -0
- data/vendor/assets/javascripts/base/_alert.js +80 -0
- data/vendor/assets/javascripts/base/_animation.js +106 -0
- data/vendor/assets/javascripts/base/_button.js +123 -0
- data/vendor/assets/javascripts/base/_carousel.js +237 -0
- data/vendor/assets/javascripts/base/_collapse.js +200 -0
- data/vendor/assets/javascripts/base/_colorpicker.js +147 -0
- data/vendor/assets/javascripts/base/_datepicker.js +1411 -0
- data/vendor/assets/javascripts/base/_dropdown.js +154 -0
- data/vendor/assets/javascripts/base/_filepicker.js +235 -0
- data/vendor/assets/javascripts/base/_hoverdown.js +116 -0
- data/vendor/assets/javascripts/base/_layout.js +126 -0
- data/vendor/assets/javascripts/base/_list.js +103 -0
- data/vendor/assets/javascripts/{_modal.js → base/_modal.js} +170 -167
- data/vendor/assets/javascripts/base/_popover.js +101 -0
- data/vendor/assets/javascripts/base/_scrollspy.js +161 -0
- data/vendor/assets/javascripts/base/_switch.js +160 -0
- data/vendor/assets/javascripts/base/_tab.js +139 -0
- data/vendor/assets/javascripts/base/_table.js +224 -0
- data/vendor/assets/javascripts/base/_timeago.js +270 -0
- data/vendor/assets/javascripts/base/_timepicker.js +541 -0
- data/vendor/assets/javascripts/base/_tooltip.js +525 -0
- data/vendor/assets/javascripts/base/_tour.js +268 -0
- data/vendor/assets/javascripts/base/_transition.js +52 -0
- data/vendor/assets/javascripts/base/_typeahead.js +362 -0
- data/vendor/assets/javascripts/extensions/_calendar.js +4709 -0
- data/vendor/assets/javascripts/extensions/_chart.js +9371 -0
- data/vendor/assets/javascripts/extensions/_map.js +2153 -0
- data/vendor/assets/stylesheets/.DS_Store +0 -0
- data/vendor/assets/stylesheets/{_mixin.scss → _utility.scss} +96 -10
- data/vendor/assets/stylesheets/_variable.scss +201 -19
- data/vendor/assets/stylesheets/active_frontend.scss +55 -58
- data/vendor/assets/stylesheets/blocks/_anchor.scss +15 -0
- data/vendor/assets/stylesheets/blocks/_button.scss +278 -0
- data/vendor/assets/stylesheets/blocks/_code.scss +144 -0
- data/vendor/assets/stylesheets/blocks/_common.scss +127 -0
- data/vendor/assets/stylesheets/blocks/_form.scss +508 -0
- data/vendor/assets/stylesheets/blocks/_icon.scss +359 -0
- data/vendor/assets/stylesheets/blocks/_list.scss +76 -0
- data/vendor/assets/stylesheets/blocks/_multimedia.scss +62 -0
- data/vendor/assets/stylesheets/blocks/_reset.scss +179 -0
- data/vendor/assets/stylesheets/blocks/_table.scss +211 -0
- data/vendor/assets/stylesheets/blocks/_typography.scss +204 -0
- data/vendor/assets/stylesheets/components/_ad.scss +78 -0
- data/vendor/assets/stylesheets/components/_affix.scss +14 -0
- data/vendor/assets/stylesheets/components/_alert.scss +50 -0
- data/vendor/assets/stylesheets/components/_animation.scss +1670 -0
- data/vendor/assets/stylesheets/components/_breadcrumb.scss +17 -0
- data/vendor/assets/stylesheets/components/_calendar.scss +213 -0
- data/vendor/assets/stylesheets/components/_card.scss +30 -0
- data/vendor/assets/stylesheets/components/_carousel.scss +135 -0
- data/vendor/assets/stylesheets/components/_chart.scss +10 -0
- data/vendor/assets/stylesheets/components/_collapse.scss +17 -0
- data/vendor/assets/stylesheets/components/_colorpicker.scss +38 -0
- data/vendor/assets/stylesheets/components/_datepicker.scss +80 -0
- data/vendor/assets/stylesheets/components/_dropmenu.scss +151 -0
- data/vendor/assets/stylesheets/components/_footer.scss +11 -0
- data/vendor/assets/stylesheets/components/_grid.scss +144 -0
- data/vendor/assets/stylesheets/components/_header.scss +99 -0
- data/vendor/assets/stylesheets/components/_label_and_badge.scss +57 -0
- data/vendor/assets/stylesheets/components/_layout.scss +63 -0
- data/vendor/assets/stylesheets/components/_map.scss +14 -0
- data/vendor/assets/stylesheets/components/_milestone.scss +49 -0
- data/vendor/assets/stylesheets/components/_missive.scss +40 -0
- data/vendor/assets/stylesheets/components/_modal.scss +126 -0
- data/vendor/assets/stylesheets/components/_nav_and_tab.scss +202 -0
- data/vendor/assets/stylesheets/components/_navbar.scss +66 -0
- data/vendor/assets/stylesheets/components/_pagination.scss +79 -0
- data/vendor/assets/stylesheets/components/_placeholder.scss +23 -0
- data/vendor/assets/stylesheets/components/_popover.scss +167 -0
- data/vendor/assets/stylesheets/components/_progress.scss +62 -0
- data/vendor/assets/stylesheets/components/_sidebar.scss +74 -0
- data/vendor/assets/stylesheets/components/_spinner.scss +83 -0
- data/vendor/assets/stylesheets/components/_switch.scss +150 -0
- data/vendor/assets/stylesheets/components/_timepicker.scss +30 -0
- data/vendor/assets/stylesheets/components/_tooltip.scss +93 -0
- data/vendor/assets/stylesheets/components/_transition.scss +12 -0
- data/vendor/assets/stylesheets/components/_typeahead.scss +18 -0
- metadata +150 -94
- data/app/assets/fonts/gotham/gotham-bold.woff +0 -0
- data/app/assets/fonts/gotham/gotham-book.woff +0 -0
- data/app/assets/fonts/gotham/gotham-light.woff +0 -0
- data/app/assets/fonts/gotham/gotham-medium.woff +0 -0
- data/app/assets/fonts/gotham/gotham-rounded-bold.woff +0 -0
- data/app/assets/fonts/gotham/gotham-rounded-book.woff +0 -0
- data/app/assets/fonts/gotham/gotham-rounded-light.woff +0 -0
- data/app/assets/fonts/gotham/gotham-rounded-medium.woff +0 -0
- data/app/assets/images/placeholders/archive-large.png +0 -0
- data/app/assets/images/placeholders/archive-small.png +0 -0
- data/app/assets/images/placeholders/archive.png +0 -0
- data/app/assets/images/placeholders/picture-large.png +0 -0
- data/app/assets/images/placeholders/picture.png +0 -0
- data/vendor/assets/javascripts/_affix.js +0 -153
- data/vendor/assets/javascripts/_alert.js +0 -85
- data/vendor/assets/javascripts/_animation.js +0 -103
- data/vendor/assets/javascripts/_button.js +0 -107
- data/vendor/assets/javascripts/_carousel.js +0 -228
- data/vendor/assets/javascripts/_chart.js +0 -3742
- data/vendor/assets/javascripts/_collapse.js +0 -202
- data/vendor/assets/javascripts/_color_picker.js +0 -108
- data/vendor/assets/javascripts/_date_picker.js +0 -1650
- data/vendor/assets/javascripts/_dropdown.js +0 -156
- data/vendor/assets/javascripts/_file_input.js +0 -71
- data/vendor/assets/javascripts/_hoverdown.js +0 -109
- data/vendor/assets/javascripts/_inputmask.js +0 -341
- data/vendor/assets/javascripts/_loader.js +0 -361
- data/vendor/assets/javascripts/_map.js +0 -2401
- data/vendor/assets/javascripts/_popover.js +0 -99
- data/vendor/assets/javascripts/_scrollspy.js +0 -163
- data/vendor/assets/javascripts/_slider.js +0 -1572
- data/vendor/assets/javascripts/_sort.js +0 -1432
- data/vendor/assets/javascripts/_swoggle.js +0 -415
- data/vendor/assets/javascripts/_tab.js +0 -146
- data/vendor/assets/javascripts/_tablespy.js +0 -1883
- data/vendor/assets/javascripts/_time_ago.js +0 -206
- data/vendor/assets/javascripts/_time_picker.js +0 -1088
- data/vendor/assets/javascripts/_tooltip.js +0 -504
- data/vendor/assets/javascripts/_transition.js +0 -50
- data/vendor/assets/javascripts/_typeahead.js +0 -366
- data/vendor/assets/stylesheets/_ad.scss +0 -63
- data/vendor/assets/stylesheets/_affix.scss +0 -14
- data/vendor/assets/stylesheets/_alert.scss +0 -114
- data/vendor/assets/stylesheets/_animation.scss +0 -1370
- data/vendor/assets/stylesheets/_breadcrumb.scss +0 -100
- data/vendor/assets/stylesheets/_button.scss +0 -386
- data/vendor/assets/stylesheets/_canvas.scss +0 -182
- data/vendor/assets/stylesheets/_carousel.scss +0 -158
- data/vendor/assets/stylesheets/_chart.scss +0 -15
- data/vendor/assets/stylesheets/_code.scss +0 -150
- data/vendor/assets/stylesheets/_collapse.scss +0 -14
- data/vendor/assets/stylesheets/_color.scss +0 -55
- data/vendor/assets/stylesheets/_colorpicker.scss +0 -63
- data/vendor/assets/stylesheets/_datepicker.scss +0 -122
- data/vendor/assets/stylesheets/_dropdown.scss +0 -248
- data/vendor/assets/stylesheets/_footer.scss +0 -71
- data/vendor/assets/stylesheets/_form.scss +0 -661
- data/vendor/assets/stylesheets/_grid.scss +0 -184
- data/vendor/assets/stylesheets/_header.scss +0 -156
- data/vendor/assets/stylesheets/_icon.scss +0 -362
- data/vendor/assets/stylesheets/_image.scss +0 -33
- data/vendor/assets/stylesheets/_label_and_badge.scss +0 -104
- data/vendor/assets/stylesheets/_link.scss +0 -55
- data/vendor/assets/stylesheets/_list.scss +0 -122
- data/vendor/assets/stylesheets/_loader.scss +0 -71
- data/vendor/assets/stylesheets/_map.scss +0 -44
- data/vendor/assets/stylesheets/_missive.scss +0 -74
- data/vendor/assets/stylesheets/_modal.scss +0 -204
- data/vendor/assets/stylesheets/_nav_and_tab.scss +0 -230
- data/vendor/assets/stylesheets/_navbar.scss +0 -73
- data/vendor/assets/stylesheets/_pagination.scss +0 -79
- data/vendor/assets/stylesheets/_panel.scss +0 -80
- data/vendor/assets/stylesheets/_placeholder.scss +0 -63
- data/vendor/assets/stylesheets/_popover.scss +0 -128
- data/vendor/assets/stylesheets/_progress.scss +0 -86
- data/vendor/assets/stylesheets/_reset.scss +0 -140
- data/vendor/assets/stylesheets/_sidebar.scss +0 -148
- data/vendor/assets/stylesheets/_slider.scss +0 -151
- data/vendor/assets/stylesheets/_spinner.scss +0 -572
- data/vendor/assets/stylesheets/_subheader.scss +0 -112
- data/vendor/assets/stylesheets/_swoggle.scss +0 -120
- data/vendor/assets/stylesheets/_table.scss +0 -210
- data/vendor/assets/stylesheets/_timepicker.scss +0 -77
- data/vendor/assets/stylesheets/_toolbar.scss +0 -130
- data/vendor/assets/stylesheets/_tooltip.scss +0 -105
- data/vendor/assets/stylesheets/_transition.scss +0 -11
- data/vendor/assets/stylesheets/_trunk.scss +0 -147
- data/vendor/assets/stylesheets/_typeahead.scss +0 -18
- data/vendor/assets/stylesheets/_typography.scss +0 -233
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,153 +0,0 @@
|
|
1
|
-
+function ($) {
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
// AFFIX CLASS DEFINITION
|
5
|
-
// ======================
|
6
|
-
|
7
|
-
var Affix = function (element, options) {
|
8
|
-
this.options = $.extend({}, Affix.DEFAULTS, options)
|
9
|
-
|
10
|
-
this.$target = $(this.options.target)
|
11
|
-
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
12
|
-
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
13
|
-
|
14
|
-
this.$element = $(element)
|
15
|
-
this.affixed = null
|
16
|
-
this.unpin = null
|
17
|
-
this.pinnedOffset = null
|
18
|
-
|
19
|
-
this.checkPosition()
|
20
|
-
}
|
21
|
-
|
22
|
-
Affix.VERSION = '3.3.6'
|
23
|
-
|
24
|
-
Affix.RESET = 'affix affix-top affix-bottom'
|
25
|
-
|
26
|
-
Affix.DEFAULTS = {
|
27
|
-
offset: 0,
|
28
|
-
target: window
|
29
|
-
}
|
30
|
-
|
31
|
-
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
|
32
|
-
var scrollTop = this.$target.scrollTop()
|
33
|
-
var position = this.$element.offset()
|
34
|
-
var targetHeight = this.$target.height()
|
35
|
-
|
36
|
-
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
|
37
|
-
|
38
|
-
if (this.affixed == 'bottom') {
|
39
|
-
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
|
40
|
-
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
|
41
|
-
}
|
42
|
-
|
43
|
-
var initializing = this.affixed == null
|
44
|
-
var colliderTop = initializing ? scrollTop : position.top
|
45
|
-
var colliderHeight = initializing ? targetHeight : height
|
46
|
-
|
47
|
-
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
48
|
-
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
49
|
-
|
50
|
-
return false
|
51
|
-
}
|
52
|
-
|
53
|
-
Affix.prototype.getPinnedOffset = function () {
|
54
|
-
if (this.pinnedOffset) return this.pinnedOffset
|
55
|
-
this.$element.removeClass(Affix.RESET).addClass('affix')
|
56
|
-
var scrollTop = this.$target.scrollTop()
|
57
|
-
var position = this.$element.offset()
|
58
|
-
return (this.pinnedOffset = position.top - scrollTop)
|
59
|
-
}
|
60
|
-
|
61
|
-
Affix.prototype.checkPositionWithEventLoop = function () {
|
62
|
-
setTimeout($.proxy(this.checkPosition, this), 1)
|
63
|
-
}
|
64
|
-
|
65
|
-
Affix.prototype.checkPosition = function () {
|
66
|
-
if (!this.$element.is(':visible')) return
|
67
|
-
|
68
|
-
var height = this.$element.height()
|
69
|
-
var offset = this.options.offset
|
70
|
-
var offsetTop = offset.top
|
71
|
-
var offsetBottom = offset.bottom
|
72
|
-
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
73
|
-
|
74
|
-
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
75
|
-
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
76
|
-
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
77
|
-
|
78
|
-
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
79
|
-
|
80
|
-
if (this.affixed != affix) {
|
81
|
-
if (this.unpin != null) this.$element.css('top', '')
|
82
|
-
|
83
|
-
var affixType = 'affix' + (affix ? '-' + affix : '')
|
84
|
-
var e = $.Event(affixType + '.bs.affix')
|
85
|
-
|
86
|
-
this.$element.trigger(e)
|
87
|
-
|
88
|
-
if (e.isDefaultPrevented()) return
|
89
|
-
|
90
|
-
this.affixed = affix
|
91
|
-
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
92
|
-
|
93
|
-
this.$element
|
94
|
-
.removeClass(Affix.RESET)
|
95
|
-
.addClass(affixType)
|
96
|
-
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
97
|
-
}
|
98
|
-
|
99
|
-
if (affix == 'bottom') {
|
100
|
-
this.$element.offset({
|
101
|
-
top: scrollHeight - height - offsetBottom
|
102
|
-
})
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
// AFFIX PLUGIN DEFINITION
|
108
|
-
// =======================
|
109
|
-
|
110
|
-
function Plugin(option) {
|
111
|
-
return this.each(function () {
|
112
|
-
var $this = $(this)
|
113
|
-
var data = $this.data('bs.affix')
|
114
|
-
var options = typeof option == 'object' && option
|
115
|
-
|
116
|
-
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
117
|
-
if (typeof option == 'string') data[option]()
|
118
|
-
})
|
119
|
-
}
|
120
|
-
|
121
|
-
var old = $.fn.affix
|
122
|
-
|
123
|
-
$.fn.affix = Plugin
|
124
|
-
$.fn.affix.Constructor = Affix
|
125
|
-
|
126
|
-
|
127
|
-
// AFFIX NO CONFLICT
|
128
|
-
// =================
|
129
|
-
|
130
|
-
$.fn.affix.noConflict = function () {
|
131
|
-
$.fn.affix = old
|
132
|
-
return this
|
133
|
-
}
|
134
|
-
|
135
|
-
|
136
|
-
// AFFIX DATA-API
|
137
|
-
// ==============
|
138
|
-
|
139
|
-
$(window).on('load', function () {
|
140
|
-
$('[data-spy="affix"]').each(function () {
|
141
|
-
var $spy = $(this)
|
142
|
-
var data = $spy.data()
|
143
|
-
|
144
|
-
data.offset = data.offset || {}
|
145
|
-
|
146
|
-
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
147
|
-
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
148
|
-
|
149
|
-
Plugin.call($spy, data)
|
150
|
-
})
|
151
|
-
})
|
152
|
-
|
153
|
-
}(jQuery);
|
@@ -1,85 +0,0 @@
|
|
1
|
-
+function ($) {
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
// ALERT CLASS DEFINITION
|
5
|
-
// ======================
|
6
|
-
|
7
|
-
var dismiss = '[data-dismiss="alert"]'
|
8
|
-
var Alert = function (el) {
|
9
|
-
$(el).on('click', dismiss, this.close)
|
10
|
-
}
|
11
|
-
|
12
|
-
Alert.VERSION = '3.3.6'
|
13
|
-
|
14
|
-
Alert.TRANSITION_DURATION = 150
|
15
|
-
|
16
|
-
Alert.prototype.close = function (e) {
|
17
|
-
var $this = $(this)
|
18
|
-
var selector = $this.attr('data-target')
|
19
|
-
|
20
|
-
if (!selector) {
|
21
|
-
selector = $this.attr('href')
|
22
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
23
|
-
}
|
24
|
-
|
25
|
-
var $parent = $(selector)
|
26
|
-
|
27
|
-
if (e) e.preventDefault()
|
28
|
-
|
29
|
-
if (!$parent.length) {
|
30
|
-
$parent = $this.closest('.alert')
|
31
|
-
}
|
32
|
-
|
33
|
-
$parent.trigger(e = $.Event('close.bs.alert'))
|
34
|
-
|
35
|
-
if (e.isDefaultPrevented()) return
|
36
|
-
|
37
|
-
$parent.removeClass('in')
|
38
|
-
|
39
|
-
function removeElement() {
|
40
|
-
// detach from parent, fire event then clean up data
|
41
|
-
$parent.detach().trigger('closed.bs.alert').remove()
|
42
|
-
}
|
43
|
-
|
44
|
-
$.support.transition && $parent.hasClass('fade') ?
|
45
|
-
$parent
|
46
|
-
.one('bsTransitionEnd', removeElement)
|
47
|
-
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
|
48
|
-
removeElement()
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
|
-
// ALERT PLUGIN DEFINITION
|
53
|
-
// =======================
|
54
|
-
|
55
|
-
function Plugin(option) {
|
56
|
-
return this.each(function () {
|
57
|
-
var $this = $(this)
|
58
|
-
var data = $this.data('bs.alert')
|
59
|
-
|
60
|
-
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
61
|
-
if (typeof option == 'string') data[option].call($this)
|
62
|
-
})
|
63
|
-
}
|
64
|
-
|
65
|
-
var old = $.fn.alert
|
66
|
-
|
67
|
-
$.fn.alert = Plugin
|
68
|
-
$.fn.alert.Constructor = Alert
|
69
|
-
|
70
|
-
|
71
|
-
// ALERT NO CONFLICT
|
72
|
-
// =================
|
73
|
-
|
74
|
-
$.fn.alert.noConflict = function () {
|
75
|
-
$.fn.alert = old
|
76
|
-
return this
|
77
|
-
}
|
78
|
-
|
79
|
-
|
80
|
-
// ALERT DATA-API
|
81
|
-
// ==============
|
82
|
-
|
83
|
-
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
84
|
-
|
85
|
-
}(jQuery);
|
@@ -1,103 +0,0 @@
|
|
1
|
-
+function ($) {
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
// ANIMATION CLASS DEFINITION
|
5
|
-
// ==========================
|
6
|
-
|
7
|
-
var Animation = function (element, options) {
|
8
|
-
this.options = $.extend({}, options)
|
9
|
-
this.$element = $(element)
|
10
|
-
};
|
11
|
-
|
12
|
-
Animation.VERSION = '3.3.6'
|
13
|
-
|
14
|
-
Animation.TRANSITION_END = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'
|
15
|
-
|
16
|
-
$.fn.extend({
|
17
|
-
animation: function(effect, options) {
|
18
|
-
var addClass, animation, callback, complete, init, removeClass, setDelay, setDuration, settings, unhide;
|
19
|
-
|
20
|
-
settings = {
|
21
|
-
effect: effect,
|
22
|
-
delay: '0s',
|
23
|
-
klass: 'animation animation-',
|
24
|
-
infinite: false,
|
25
|
-
callback: options,
|
26
|
-
duration: '1s',
|
27
|
-
debug: false
|
28
|
-
};
|
29
|
-
|
30
|
-
settings = $.extend(settings, options);
|
31
|
-
init = function(element) {
|
32
|
-
return animation(element);
|
33
|
-
};
|
34
|
-
|
35
|
-
animation = function(element) {
|
36
|
-
if (settings.infinite === true) {
|
37
|
-
settings.klass += ' infinite';
|
38
|
-
};
|
39
|
-
|
40
|
-
setDelay(element);
|
41
|
-
setDuration(element);
|
42
|
-
unhide(element);
|
43
|
-
addClass(element);
|
44
|
-
return complete(element);
|
45
|
-
};
|
46
|
-
|
47
|
-
addClass = function(element) {
|
48
|
-
return element.addClass(settings.klass + settings.effect);
|
49
|
-
};
|
50
|
-
|
51
|
-
unhide = function(element) {
|
52
|
-
if (element.css('visibility') === 'hidden') {
|
53
|
-
element.css('visibility', 'visible');
|
54
|
-
};
|
55
|
-
if (element.is(':hidden')) {
|
56
|
-
return element.show();
|
57
|
-
};
|
58
|
-
};
|
59
|
-
|
60
|
-
removeClass = function(element) {
|
61
|
-
return element.removeClass(settings.klass + settings.effect);
|
62
|
-
};
|
63
|
-
|
64
|
-
setDelay = function(element) {
|
65
|
-
return element.css({
|
66
|
-
'-webkit-animation-delay' : settings.delay,
|
67
|
-
'-moz-animation-delay' : settings.delay,
|
68
|
-
'-o-animation-delay' : settings.delay,
|
69
|
-
'animation-delay' : settings.delay
|
70
|
-
});
|
71
|
-
};
|
72
|
-
|
73
|
-
setDuration = function(element) {
|
74
|
-
return element.css({
|
75
|
-
'-webkit-animation-duration' : settings.duration,
|
76
|
-
'-moz-animation-duration' : settings.duration,
|
77
|
-
'-o-animation-duration' : settings.duration,
|
78
|
-
'animation-duration' : settings.duration
|
79
|
-
});
|
80
|
-
};
|
81
|
-
|
82
|
-
callback = function(element) {
|
83
|
-
if (settings.infinite === false) {
|
84
|
-
removeClass(element);
|
85
|
-
};
|
86
|
-
if (typeof settings.callback === 'function') {
|
87
|
-
return settings.callback.call(element);
|
88
|
-
};
|
89
|
-
};
|
90
|
-
|
91
|
-
complete = function(element) {
|
92
|
-
return element.one(Animation.TRANSITION_END, function() {
|
93
|
-
return callback(element);
|
94
|
-
});
|
95
|
-
};
|
96
|
-
|
97
|
-
return this.each(function() {
|
98
|
-
return init($(this));
|
99
|
-
});
|
100
|
-
}
|
101
|
-
});
|
102
|
-
|
103
|
-
}(jQuery);
|
@@ -1,107 +0,0 @@
|
|
1
|
-
+function ($) {
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
// BUTTON PUBLIC CLASS DEFINITION
|
5
|
-
// ==============================
|
6
|
-
|
7
|
-
var Button = function (element, options) {
|
8
|
-
this.$element = $(element)
|
9
|
-
this.options = $.extend({}, Button.DEFAULTS, options)
|
10
|
-
this.isLoading = false
|
11
|
-
}
|
12
|
-
|
13
|
-
Button.VERSION = '3.3.6'
|
14
|
-
|
15
|
-
Button.DEFAULTS = {
|
16
|
-
loadingText: 'loading...'
|
17
|
-
}
|
18
|
-
|
19
|
-
Button.prototype.setState = function (state) {
|
20
|
-
var d = 'disabled'
|
21
|
-
var $el = this.$element
|
22
|
-
var val = $el.is('input') ? 'val' : 'html'
|
23
|
-
var data = $el.data()
|
24
|
-
|
25
|
-
state = state + 'Text'
|
26
|
-
|
27
|
-
if (data.resetText == null) $el.data('resetText', $el[val]())
|
28
|
-
|
29
|
-
// push to event loop to allow forms to submit
|
30
|
-
setTimeout($.proxy(function () {
|
31
|
-
$el[val](data[state] == null ? this.options[state] : data[state])
|
32
|
-
|
33
|
-
if (state == 'loadingText') {
|
34
|
-
this.isLoading = true
|
35
|
-
$el.addClass(d).attr(d, d)
|
36
|
-
} else if (this.isLoading) {
|
37
|
-
this.isLoading = false
|
38
|
-
$el.removeClass(d).removeAttr(d)
|
39
|
-
}
|
40
|
-
}, this), 0)
|
41
|
-
}
|
42
|
-
|
43
|
-
Button.prototype.toggle = function () {
|
44
|
-
var changed = true
|
45
|
-
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
46
|
-
|
47
|
-
if ($parent.length) {
|
48
|
-
var $input = this.$element.find('input')
|
49
|
-
if ($input.prop('type') == 'radio') {
|
50
|
-
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
51
|
-
else $parent.find('.active').removeClass('active')
|
52
|
-
}
|
53
|
-
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
54
|
-
} else {
|
55
|
-
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
56
|
-
}
|
57
|
-
|
58
|
-
if (changed) this.$element.toggleClass('active')
|
59
|
-
}
|
60
|
-
|
61
|
-
|
62
|
-
// BUTTON PLUGIN DEFINITION
|
63
|
-
// ========================
|
64
|
-
|
65
|
-
function Plugin(option) {
|
66
|
-
return this.each(function () {
|
67
|
-
var $this = $(this)
|
68
|
-
var data = $this.data('bs.button')
|
69
|
-
var options = typeof option == 'object' && option
|
70
|
-
|
71
|
-
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
72
|
-
|
73
|
-
if (option == 'toggle') data.toggle()
|
74
|
-
else if (option) data.setState(option)
|
75
|
-
})
|
76
|
-
}
|
77
|
-
|
78
|
-
var old = $.fn.button
|
79
|
-
|
80
|
-
$.fn.button = Plugin
|
81
|
-
$.fn.button.Constructor = Button
|
82
|
-
|
83
|
-
|
84
|
-
// BUTTON NO CONFLICT
|
85
|
-
// ==================
|
86
|
-
|
87
|
-
$.fn.button.noConflict = function () {
|
88
|
-
$.fn.button = old
|
89
|
-
return this
|
90
|
-
}
|
91
|
-
|
92
|
-
|
93
|
-
// BUTTON DATA-API
|
94
|
-
// ===============
|
95
|
-
|
96
|
-
$(document)
|
97
|
-
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
98
|
-
var $btn = $(e.target)
|
99
|
-
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
100
|
-
Plugin.call($btn, 'toggle')
|
101
|
-
e.preventDefault()
|
102
|
-
})
|
103
|
-
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
104
|
-
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
105
|
-
})
|
106
|
-
|
107
|
-
}(jQuery);
|