entreprise7pro-bootstrap-sass 3.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.travis.yml +19 -0
- data/CHANGELOG.md +233 -0
- data/CONTRIBUTING.md +86 -0
- data/Gemfile +7 -0
- data/LICENSE +22 -0
- data/README.md +376 -0
- data/Rakefile +98 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/images/.keep +0 -0
- data/assets/javascripts/bootstrap/affix.js +166 -0
- data/assets/javascripts/bootstrap/alert.js +97 -0
- data/assets/javascripts/bootstrap/button.js +136 -0
- data/assets/javascripts/bootstrap/carousel.js +248 -0
- data/assets/javascripts/bootstrap/collapse.js +214 -0
- data/assets/javascripts/bootstrap/dropdown.js +167 -0
- data/assets/javascripts/bootstrap/modal.js +356 -0
- data/assets/javascripts/bootstrap/popover.js +123 -0
- data/assets/javascripts/bootstrap/scrollspy.js +174 -0
- data/assets/javascripts/bootstrap/tab.js +157 -0
- data/assets/javascripts/bootstrap/tooltip.js +679 -0
- data/assets/javascripts/bootstrap/transition.js +61 -0
- data/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/assets/javascripts/bootstrap.js +2611 -0
- data/assets/javascripts/bootstrap.min.js +7 -0
- data/assets/javascripts/jquery.min.js +2 -0
- data/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/assets/stylesheets/_bootstrap.scss +56 -0
- data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/assets/stylesheets/bootstrap/_badges.scss +68 -0
- data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
- data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
- data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/assets/stylesheets/bootstrap/_carousel.scss +263 -0
- data/assets/stylesheets/bootstrap/_close.scss +37 -0
- data/assets/stylesheets/bootstrap/_code.scss +70 -0
- data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/assets/stylesheets/bootstrap/_dropdowns.scss +212 -0
- data/assets/stylesheets/bootstrap/_forms.scss +602 -0
- data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/assets/stylesheets/bootstrap/_input-groups.scss +166 -0
- data/assets/stylesheets/bootstrap/_jumbotron.scss +55 -0
- data/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
- data/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +39 -0
- data/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +657 -0
- data/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/assets/stylesheets/bootstrap/_normalize.scss +422 -0
- data/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/assets/stylesheets/bootstrap/_panels.scss +271 -0
- data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
- data/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/assets/stylesheets/bootstrap/_responsive-utilities.scss +157 -0
- data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
- data/assets/stylesheets/bootstrap/_tables.scss +233 -0
- data/assets/stylesheets/bootstrap/_theme.scss +293 -0
- data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
- data/assets/stylesheets/bootstrap/_type.scss +299 -0
- data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/assets/stylesheets/bootstrap/_variables.scss +875 -0
- data/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
- data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +50 -0
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +82 -0
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +123 -0
- data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +210 -0
- data/bower.json +38 -0
- data/composer.json +21 -0
- data/entreprise7pro-bootstrap-sass.gemspec +37 -0
- data/eyeglass-exports.js +7 -0
- data/lib/entreprise7pro-bootstrap-sass/engine.rb +17 -0
- data/lib/entreprise7pro-bootstrap-sass/version.rb +4 -0
- data/lib/entreprise7pro-bootstrap-sass.rb +91 -0
- data/package-lock.json +1011 -0
- data/package.json +48 -0
- data/sache.json +5 -0
- data/tasks/bower.rake +31 -0
- data/tasks/converter/char_string_scanner.rb +38 -0
- data/tasks/converter/fonts_conversion.rb +16 -0
- data/tasks/converter/js_conversion.rb +47 -0
- data/tasks/converter/less_conversion.rb +752 -0
- data/tasks/converter/logger.rb +57 -0
- data/tasks/converter/network.rb +97 -0
- data/tasks/converter.rb +80 -0
- data/templates/project/_bootstrap-variables.sass +876 -0
- data/templates/project/manifest.rb +20 -0
- data/templates/project/styles.sass +6 -0
- data/test/compilation_test.rb +30 -0
- data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
- data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
- data/test/dummy_node_mincer/manifest.js +87 -0
- data/test/dummy_rails/README.rdoc +3 -0
- data/test/dummy_rails/Rakefile +6 -0
- data/test/dummy_rails/app/assets/images/.keep +0 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
- data/test/dummy_rails/app/assets/stylesheets/application.sass +2 -0
- data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
- data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
- data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
- data/test/dummy_rails/config/application.rb +31 -0
- data/test/dummy_rails/config/boot.rb +5 -0
- data/test/dummy_rails/config/environment.rb +5 -0
- data/test/dummy_rails/config/environments/development.rb +23 -0
- data/test/dummy_rails/config/environments/production.rb +82 -0
- data/test/dummy_rails/config/environments/test.rb +38 -0
- data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy_rails/config/initializers/inflections.rb +16 -0
- data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
- data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
- data/test/dummy_rails/config/initializers/session_store.rb +3 -0
- data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_rails/config/locales/en.yml +3 -0
- data/test/dummy_rails/config/locales/es.yml +3 -0
- data/test/dummy_rails/config/routes.rb +3 -0
- data/test/dummy_rails/config.ru +4 -0
- data/test/dummy_rails/log/.keep +0 -0
- data/test/dummy_sass_only/Gemfile +4 -0
- data/test/dummy_sass_only/compile.rb +20 -0
- data/test/dummy_sass_only/import_all.scss +2 -0
- data/test/gemfiles/default.gemfile +3 -0
- data/test/node_mincer_test.rb +35 -0
- data/test/node_sass_compile_test.sh +9 -0
- data/test/pages_test.rb +14 -0
- data/test/sass_test.rb +29 -0
- data/test/sprockets_rails_test.rb +31 -0
- data/test/support/dummy_rails_integration.rb +22 -0
- data/test/support/reporting.rb +27 -0
- data/test/test_helper.rb +36 -0
- data/test/test_helper_rails.rb +6 -0
- metadata +467 -0
@@ -0,0 +1,166 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: affix.js v3.4.3
|
3
|
+
* https://bootstrap.7pro.ca/docs/3.4/javascript/#affix
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2024 Entreprise 7pro.ca Inc.
|
6
|
+
* Licensed under MIT (https://github.com/entreprise7pro/bootstrap/blob/v3-dev/LICENSE)
|
7
|
+
* Copyright 2011-2019 Twitter, Inc.
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE)
|
9
|
+
* ======================================================================== */
|
10
|
+
|
11
|
+
|
12
|
+
+function ($) {
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
// AFFIX CLASS DEFINITION
|
16
|
+
// ======================
|
17
|
+
|
18
|
+
var Affix = function (element, options) {
|
19
|
+
this.options = $.extend({}, Affix.DEFAULTS, options)
|
20
|
+
|
21
|
+
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
|
22
|
+
|
23
|
+
this.$target = target
|
24
|
+
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
25
|
+
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
26
|
+
|
27
|
+
this.$element = $(element)
|
28
|
+
this.affixed = null
|
29
|
+
this.unpin = null
|
30
|
+
this.pinnedOffset = null
|
31
|
+
|
32
|
+
this.checkPosition()
|
33
|
+
}
|
34
|
+
|
35
|
+
Affix.VERSION = '3.4.3'
|
36
|
+
|
37
|
+
Affix.RESET = 'affix affix-top affix-bottom'
|
38
|
+
|
39
|
+
Affix.DEFAULTS = {
|
40
|
+
offset: 0,
|
41
|
+
target: window
|
42
|
+
}
|
43
|
+
|
44
|
+
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
|
45
|
+
var scrollTop = this.$target.scrollTop()
|
46
|
+
var position = this.$element.offset()
|
47
|
+
var targetHeight = this.$target.height()
|
48
|
+
|
49
|
+
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
|
50
|
+
|
51
|
+
if (this.affixed == 'bottom') {
|
52
|
+
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
|
53
|
+
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
|
54
|
+
}
|
55
|
+
|
56
|
+
var initializing = this.affixed == null
|
57
|
+
var colliderTop = initializing ? scrollTop : position.top
|
58
|
+
var colliderHeight = initializing ? targetHeight : height
|
59
|
+
|
60
|
+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
61
|
+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
62
|
+
|
63
|
+
return false
|
64
|
+
}
|
65
|
+
|
66
|
+
Affix.prototype.getPinnedOffset = function () {
|
67
|
+
if (this.pinnedOffset) return this.pinnedOffset
|
68
|
+
this.$element.removeClass(Affix.RESET).addClass('affix')
|
69
|
+
var scrollTop = this.$target.scrollTop()
|
70
|
+
var position = this.$element.offset()
|
71
|
+
return (this.pinnedOffset = position.top - scrollTop)
|
72
|
+
}
|
73
|
+
|
74
|
+
Affix.prototype.checkPositionWithEventLoop = function () {
|
75
|
+
setTimeout($.proxy(this.checkPosition, this), 1)
|
76
|
+
}
|
77
|
+
|
78
|
+
Affix.prototype.checkPosition = function () {
|
79
|
+
if (!this.$element.is(':visible')) return
|
80
|
+
|
81
|
+
var height = this.$element.height()
|
82
|
+
var offset = this.options.offset
|
83
|
+
var offsetTop = offset.top
|
84
|
+
var offsetBottom = offset.bottom
|
85
|
+
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
86
|
+
|
87
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
88
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
89
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
90
|
+
|
91
|
+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
92
|
+
|
93
|
+
if (this.affixed != affix) {
|
94
|
+
if (this.unpin != null) this.$element.css('top', '')
|
95
|
+
|
96
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
97
|
+
var e = $.Event(affixType + '.bs.affix')
|
98
|
+
|
99
|
+
this.$element.trigger(e)
|
100
|
+
|
101
|
+
if (e.isDefaultPrevented()) return
|
102
|
+
|
103
|
+
this.affixed = affix
|
104
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
105
|
+
|
106
|
+
this.$element
|
107
|
+
.removeClass(Affix.RESET)
|
108
|
+
.addClass(affixType)
|
109
|
+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
110
|
+
}
|
111
|
+
|
112
|
+
if (affix == 'bottom') {
|
113
|
+
this.$element.offset({
|
114
|
+
top: scrollHeight - height - offsetBottom
|
115
|
+
})
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
// AFFIX PLUGIN DEFINITION
|
121
|
+
// =======================
|
122
|
+
|
123
|
+
function Plugin(option) {
|
124
|
+
return this.each(function () {
|
125
|
+
var $this = $(this)
|
126
|
+
var data = $this.data('bs.affix')
|
127
|
+
var options = typeof option == 'object' && option
|
128
|
+
|
129
|
+
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
130
|
+
if (typeof option == 'string') data[option]()
|
131
|
+
})
|
132
|
+
}
|
133
|
+
|
134
|
+
var old = $.fn.affix
|
135
|
+
|
136
|
+
$.fn.affix = Plugin
|
137
|
+
$.fn.affix.Constructor = Affix
|
138
|
+
|
139
|
+
|
140
|
+
// AFFIX NO CONFLICT
|
141
|
+
// =================
|
142
|
+
|
143
|
+
$.fn.affix.noConflict = function () {
|
144
|
+
$.fn.affix = old
|
145
|
+
return this
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
// AFFIX DATA-API
|
150
|
+
// ==============
|
151
|
+
|
152
|
+
$(window).on('load', function () {
|
153
|
+
$('[data-spy="affix"]').each(function () {
|
154
|
+
var $spy = $(this)
|
155
|
+
var data = $spy.data()
|
156
|
+
|
157
|
+
data.offset = data.offset || {}
|
158
|
+
|
159
|
+
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
160
|
+
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
161
|
+
|
162
|
+
Plugin.call($spy, data)
|
163
|
+
})
|
164
|
+
})
|
165
|
+
|
166
|
+
}(jQuery);
|
@@ -0,0 +1,97 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: alert.js v3.4.3
|
3
|
+
* https://bootstrap.7pro.ca/docs/3.4/javascript/#alerts
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2024 Entreprise 7pro.ca Inc.
|
6
|
+
* Licensed under MIT (https://github.com/entreprise7pro/bootstrap/blob/v3-dev/LICENSE)
|
7
|
+
* Copyright 2011-2019 Twitter, Inc.
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE)
|
9
|
+
* ======================================================================== */
|
10
|
+
|
11
|
+
|
12
|
+
+function ($) {
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
// ALERT CLASS DEFINITION
|
16
|
+
// ======================
|
17
|
+
|
18
|
+
var dismiss = '[data-dismiss="alert"]'
|
19
|
+
var Alert = function (el) {
|
20
|
+
$(el).on('click', dismiss, this.close)
|
21
|
+
}
|
22
|
+
|
23
|
+
Alert.VERSION = '3.4.3'
|
24
|
+
|
25
|
+
Alert.TRANSITION_DURATION = 150
|
26
|
+
|
27
|
+
Alert.prototype.close = function (e) {
|
28
|
+
var $this = $(this)
|
29
|
+
var selector = $this.attr('data-target')
|
30
|
+
|
31
|
+
if (!selector) {
|
32
|
+
selector = $this.attr('href')
|
33
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
34
|
+
}
|
35
|
+
|
36
|
+
selector = selector === '#' ? [] : selector
|
37
|
+
var $parent = $(document).find(selector)
|
38
|
+
|
39
|
+
if (e) e.preventDefault()
|
40
|
+
|
41
|
+
if (!$parent.length) {
|
42
|
+
$parent = $this.closest('.alert')
|
43
|
+
}
|
44
|
+
|
45
|
+
$parent.trigger(e = $.Event('close.bs.alert'))
|
46
|
+
|
47
|
+
if (e.isDefaultPrevented()) return
|
48
|
+
|
49
|
+
$parent.removeClass('in')
|
50
|
+
|
51
|
+
function removeElement() {
|
52
|
+
// detach from parent, fire event then clean up data
|
53
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
54
|
+
}
|
55
|
+
|
56
|
+
$.support.transition && $parent.hasClass('fade') ?
|
57
|
+
$parent
|
58
|
+
.one('bsTransitionEnd', removeElement)
|
59
|
+
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
|
60
|
+
removeElement()
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
// ALERT PLUGIN DEFINITION
|
65
|
+
// =======================
|
66
|
+
|
67
|
+
function Plugin(option) {
|
68
|
+
return this.each(function () {
|
69
|
+
var $this = $(this)
|
70
|
+
var data = $this.data('bs.alert')
|
71
|
+
|
72
|
+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
73
|
+
if (typeof option == 'string') data[option].call($this)
|
74
|
+
})
|
75
|
+
}
|
76
|
+
|
77
|
+
var old = $.fn.alert
|
78
|
+
|
79
|
+
$.fn.alert = Plugin
|
80
|
+
$.fn.alert.Constructor = Alert
|
81
|
+
|
82
|
+
|
83
|
+
// ALERT NO CONFLICT
|
84
|
+
// =================
|
85
|
+
|
86
|
+
$.fn.alert.noConflict = function () {
|
87
|
+
$.fn.alert = old
|
88
|
+
return this
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
// ALERT DATA-API
|
93
|
+
// ==============
|
94
|
+
|
95
|
+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
96
|
+
|
97
|
+
}(jQuery);
|
@@ -0,0 +1,136 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: button.js v3.4.3
|
3
|
+
* https://bootstrap.7pro.ca/docs/3.4/javascript/#buttons
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2024 Entreprise 7pro.ca Inc.
|
6
|
+
* Licensed under MIT (https://github.com/entreprise7pro/bootstrap/blob/v3-dev/LICENSE)
|
7
|
+
* Copyright 2011-2019 Twitter, Inc.
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE)
|
9
|
+
* ======================================================================== */
|
10
|
+
|
11
|
+
|
12
|
+
+function ($) {
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
// BUTTON PUBLIC CLASS DEFINITION
|
16
|
+
// ==============================
|
17
|
+
|
18
|
+
var Button = function (element, options) {
|
19
|
+
this.$element = $(element)
|
20
|
+
this.options = $.extend({}, Button.DEFAULTS, options)
|
21
|
+
this.isLoading = false
|
22
|
+
}
|
23
|
+
|
24
|
+
Button.VERSION = '3.4.3'
|
25
|
+
|
26
|
+
Button.DEFAULTS = {
|
27
|
+
loadingText: 'loading...'
|
28
|
+
}
|
29
|
+
|
30
|
+
Button.prototype.sanitize = function (unsafeText) {
|
31
|
+
return unsafeText
|
32
|
+
.replace(/&/g, '&')
|
33
|
+
.replace(/</g, '<')
|
34
|
+
.replace(/>/g, '>')
|
35
|
+
.replace(/"/g, '"')
|
36
|
+
.replace(/'/g, ''');
|
37
|
+
}
|
38
|
+
|
39
|
+
Button.prototype.setState = function (state) {
|
40
|
+
var d = 'disabled'
|
41
|
+
var $el = this.$element
|
42
|
+
var val = $el.is('input') ? 'val' : 'html'
|
43
|
+
var data = $el.data()
|
44
|
+
|
45
|
+
state += 'Text'
|
46
|
+
|
47
|
+
if (data.resetText == null) $el.data('resetText', $el[val]())
|
48
|
+
|
49
|
+
// push to event loop to allow forms to submit
|
50
|
+
setTimeout($.proxy(function () {
|
51
|
+
$el[val](data[state] == null ? this.options[state] : this.sanitize(data[state]))
|
52
|
+
|
53
|
+
if (state == 'loadingText') {
|
54
|
+
this.isLoading = true
|
55
|
+
$el.addClass(d).attr(d, d).prop(d, true)
|
56
|
+
} else if (this.isLoading) {
|
57
|
+
this.isLoading = false
|
58
|
+
$el.removeClass(d).removeAttr(d).prop(d, false)
|
59
|
+
}
|
60
|
+
}, this), 0)
|
61
|
+
}
|
62
|
+
|
63
|
+
Button.prototype.toggle = function () {
|
64
|
+
var changed = true
|
65
|
+
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
66
|
+
|
67
|
+
if ($parent.length) {
|
68
|
+
var $input = this.$element.find('input')
|
69
|
+
if ($input.prop('type') == 'radio') {
|
70
|
+
if ($input.prop('checked')) changed = false
|
71
|
+
$parent.find('.active').removeClass('active')
|
72
|
+
this.$element.addClass('active')
|
73
|
+
} else if ($input.prop('type') == 'checkbox') {
|
74
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
75
|
+
this.$element.toggleClass('active')
|
76
|
+
}
|
77
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
78
|
+
if (changed) $input.trigger('change')
|
79
|
+
} else {
|
80
|
+
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
81
|
+
this.$element.toggleClass('active')
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
// BUTTON PLUGIN DEFINITION
|
87
|
+
// ========================
|
88
|
+
|
89
|
+
function Plugin(option) {
|
90
|
+
return this.each(function () {
|
91
|
+
var $this = $(this)
|
92
|
+
var data = $this.data('bs.button')
|
93
|
+
var options = typeof option == 'object' && option
|
94
|
+
|
95
|
+
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
96
|
+
|
97
|
+
if (option == 'toggle') data.toggle()
|
98
|
+
else if (option) data.setState(option)
|
99
|
+
})
|
100
|
+
}
|
101
|
+
|
102
|
+
var old = $.fn.button
|
103
|
+
|
104
|
+
$.fn.button = Plugin
|
105
|
+
$.fn.button.Constructor = Button
|
106
|
+
|
107
|
+
|
108
|
+
// BUTTON NO CONFLICT
|
109
|
+
// ==================
|
110
|
+
|
111
|
+
$.fn.button.noConflict = function () {
|
112
|
+
$.fn.button = old
|
113
|
+
return this
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
// BUTTON DATA-API
|
118
|
+
// ===============
|
119
|
+
|
120
|
+
$(document)
|
121
|
+
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
122
|
+
var $btn = $(e.target).closest('.btn')
|
123
|
+
Plugin.call($btn, 'toggle')
|
124
|
+
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
125
|
+
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
126
|
+
e.preventDefault()
|
127
|
+
// The target component still receive the focus
|
128
|
+
if ($btn.is('input,button')) $btn.trigger('focus')
|
129
|
+
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
130
|
+
}
|
131
|
+
})
|
132
|
+
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
133
|
+
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
134
|
+
})
|
135
|
+
|
136
|
+
}(jQuery);
|
@@ -0,0 +1,248 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: carousel.js v3.4.3
|
3
|
+
* https://bootstrap.7pro.ca/docs/3.4/javascript/#carousel
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2024 Entreprise 7pro.ca Inc.
|
6
|
+
* Licensed under MIT (https://github.com/entreprise7pro/bootstrap/blob/v3-dev/LICENSE)
|
7
|
+
* Copyright 2011-2019 Twitter, Inc.
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE)
|
9
|
+
* ======================================================================== */
|
10
|
+
|
11
|
+
|
12
|
+
+function ($) {
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
// CAROUSEL CLASS DEFINITION
|
16
|
+
// =========================
|
17
|
+
|
18
|
+
var Carousel = function (element, options) {
|
19
|
+
this.$element = $(element)
|
20
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
21
|
+
this.options = options
|
22
|
+
this.paused = null
|
23
|
+
this.sliding = null
|
24
|
+
this.interval = null
|
25
|
+
this.$active = null
|
26
|
+
this.$items = null
|
27
|
+
|
28
|
+
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
29
|
+
|
30
|
+
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
31
|
+
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
32
|
+
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
33
|
+
}
|
34
|
+
|
35
|
+
Carousel.VERSION = '3.4.3'
|
36
|
+
|
37
|
+
Carousel.TRANSITION_DURATION = 600
|
38
|
+
|
39
|
+
Carousel.DEFAULTS = {
|
40
|
+
interval: 5000,
|
41
|
+
pause: 'hover',
|
42
|
+
wrap: true,
|
43
|
+
keyboard: true
|
44
|
+
}
|
45
|
+
|
46
|
+
Carousel.prototype.keydown = function (e) {
|
47
|
+
if (/input|textarea/i.test(e.target.tagName)) return
|
48
|
+
switch (e.which) {
|
49
|
+
case 37: this.prev(); break
|
50
|
+
case 39: this.next(); break
|
51
|
+
default: return
|
52
|
+
}
|
53
|
+
|
54
|
+
e.preventDefault()
|
55
|
+
}
|
56
|
+
|
57
|
+
Carousel.prototype.cycle = function (e) {
|
58
|
+
e || (this.paused = false)
|
59
|
+
|
60
|
+
this.interval && clearInterval(this.interval)
|
61
|
+
|
62
|
+
this.options.interval
|
63
|
+
&& !this.paused
|
64
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
65
|
+
|
66
|
+
return this
|
67
|
+
}
|
68
|
+
|
69
|
+
Carousel.prototype.getItemIndex = function (item) {
|
70
|
+
this.$items = item.parent().children('.item')
|
71
|
+
return this.$items.index(item || this.$active)
|
72
|
+
}
|
73
|
+
|
74
|
+
Carousel.prototype.getItemForDirection = function (direction, active) {
|
75
|
+
var activeIndex = this.getItemIndex(active)
|
76
|
+
var willWrap = (direction == 'prev' && activeIndex === 0)
|
77
|
+
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
|
78
|
+
if (willWrap && !this.options.wrap) return active
|
79
|
+
var delta = direction == 'prev' ? -1 : 1
|
80
|
+
var itemIndex = (activeIndex + delta) % this.$items.length
|
81
|
+
return this.$items.eq(itemIndex)
|
82
|
+
}
|
83
|
+
|
84
|
+
Carousel.prototype.to = function (pos) {
|
85
|
+
var that = this
|
86
|
+
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
|
87
|
+
|
88
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
89
|
+
|
90
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
91
|
+
if (activeIndex == pos) return this.pause().cycle()
|
92
|
+
|
93
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
|
94
|
+
}
|
95
|
+
|
96
|
+
Carousel.prototype.pause = function (e) {
|
97
|
+
e || (this.paused = true)
|
98
|
+
|
99
|
+
if (this.$element.find('.next, .prev').length && $.support.transition) {
|
100
|
+
this.$element.trigger($.support.transition.end)
|
101
|
+
this.cycle(true)
|
102
|
+
}
|
103
|
+
|
104
|
+
this.interval = clearInterval(this.interval)
|
105
|
+
|
106
|
+
return this
|
107
|
+
}
|
108
|
+
|
109
|
+
Carousel.prototype.next = function () {
|
110
|
+
if (this.sliding) return
|
111
|
+
return this.slide('next')
|
112
|
+
}
|
113
|
+
|
114
|
+
Carousel.prototype.prev = function () {
|
115
|
+
if (this.sliding) return
|
116
|
+
return this.slide('prev')
|
117
|
+
}
|
118
|
+
|
119
|
+
Carousel.prototype.slide = function (type, next) {
|
120
|
+
var $active = this.$element.find('.item.active')
|
121
|
+
var $next = next || this.getItemForDirection(type, $active)
|
122
|
+
var isCycling = this.interval
|
123
|
+
var direction = type == 'next' ? 'left' : 'right'
|
124
|
+
var that = this
|
125
|
+
|
126
|
+
if ($next.hasClass('active')) return (this.sliding = false)
|
127
|
+
|
128
|
+
var relatedTarget = $next[0]
|
129
|
+
var slideEvent = $.Event('slide.bs.carousel', {
|
130
|
+
relatedTarget: relatedTarget,
|
131
|
+
direction: direction
|
132
|
+
})
|
133
|
+
this.$element.trigger(slideEvent)
|
134
|
+
if (slideEvent.isDefaultPrevented()) return
|
135
|
+
|
136
|
+
this.sliding = true
|
137
|
+
|
138
|
+
isCycling && this.pause()
|
139
|
+
|
140
|
+
if (this.$indicators.length) {
|
141
|
+
this.$indicators.find('.active').removeClass('active')
|
142
|
+
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
|
143
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
144
|
+
}
|
145
|
+
|
146
|
+
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
147
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
148
|
+
$next.addClass(type)
|
149
|
+
if (typeof $next === 'object' && $next.length) {
|
150
|
+
$next[0].offsetWidth // force reflow
|
151
|
+
}
|
152
|
+
$active.addClass(direction)
|
153
|
+
$next.addClass(direction)
|
154
|
+
$active
|
155
|
+
.one('bsTransitionEnd', function () {
|
156
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
157
|
+
$active.removeClass(['active', direction].join(' '))
|
158
|
+
that.sliding = false
|
159
|
+
setTimeout(function () {
|
160
|
+
that.$element.trigger(slidEvent)
|
161
|
+
}, 0)
|
162
|
+
})
|
163
|
+
.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
|
164
|
+
} else {
|
165
|
+
$active.removeClass('active')
|
166
|
+
$next.addClass('active')
|
167
|
+
this.sliding = false
|
168
|
+
this.$element.trigger(slidEvent)
|
169
|
+
}
|
170
|
+
|
171
|
+
isCycling && this.cycle()
|
172
|
+
|
173
|
+
return this
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
// CAROUSEL PLUGIN DEFINITION
|
178
|
+
// ==========================
|
179
|
+
|
180
|
+
function Plugin(option) {
|
181
|
+
return this.each(function () {
|
182
|
+
var $this = $(this)
|
183
|
+
var data = $this.data('bs.carousel')
|
184
|
+
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
185
|
+
var action = typeof option == 'string' ? option : options.slide
|
186
|
+
|
187
|
+
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
188
|
+
if (typeof option == 'number') data.to(option)
|
189
|
+
else if (action) data[action]()
|
190
|
+
else if (options.interval) data.pause().cycle()
|
191
|
+
})
|
192
|
+
}
|
193
|
+
|
194
|
+
var old = $.fn.carousel
|
195
|
+
|
196
|
+
$.fn.carousel = Plugin
|
197
|
+
$.fn.carousel.Constructor = Carousel
|
198
|
+
|
199
|
+
|
200
|
+
// CAROUSEL NO CONFLICT
|
201
|
+
// ====================
|
202
|
+
|
203
|
+
$.fn.carousel.noConflict = function () {
|
204
|
+
$.fn.carousel = old
|
205
|
+
return this
|
206
|
+
}
|
207
|
+
|
208
|
+
|
209
|
+
// CAROUSEL DATA-API
|
210
|
+
// =================
|
211
|
+
|
212
|
+
var clickHandler = function (e) {
|
213
|
+
var $this = $(this)
|
214
|
+
var href = $this.attr('href')
|
215
|
+
if (href) {
|
216
|
+
href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
217
|
+
}
|
218
|
+
|
219
|
+
var target = $this.attr('data-target') || href
|
220
|
+
var $target = $(document).find(target)
|
221
|
+
|
222
|
+
if (!$target.hasClass('carousel')) return
|
223
|
+
|
224
|
+
var options = $.extend({}, $target.data(), $this.data())
|
225
|
+
var slideIndex = $this.attr('data-slide-to')
|
226
|
+
if (slideIndex) options.interval = false
|
227
|
+
|
228
|
+
Plugin.call($target, options)
|
229
|
+
|
230
|
+
if (slideIndex) {
|
231
|
+
$target.data('bs.carousel').to(slideIndex)
|
232
|
+
}
|
233
|
+
|
234
|
+
e.preventDefault()
|
235
|
+
}
|
236
|
+
|
237
|
+
$(document)
|
238
|
+
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
|
239
|
+
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
|
240
|
+
|
241
|
+
$(window).on('load', function () {
|
242
|
+
$('[data-ride="carousel"]').each(function () {
|
243
|
+
var $carousel = $(this)
|
244
|
+
Plugin.call($carousel, $carousel.data())
|
245
|
+
})
|
246
|
+
})
|
247
|
+
|
248
|
+
}(jQuery);
|