spiderfw 0.6.39 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +2 -0
- data/Rakefile +4 -3
- data/VERSION +1 -1
- data/apps/core/admin/public/css/sass/admin.css +61 -12
- data/apps/core/admin/public/sass/admin.scss +51 -0
- data/apps/core/admin/views/login.layout.shtml +1 -1
- data/apps/core/components/assets.rb +34 -2
- data/apps/core/components/po/it/spider_components.po +2 -2
- data/apps/core/components/public/bootstrap/scss/_aggiunte_bootstrap_3.scss +54 -0
- data/apps/core/components/public/bootstrap/scss/_pagination.scss +1 -1
- data/apps/core/components/public/bootstrap/scss/_variables.scss +2 -0
- data/apps/core/components/public/bootstrap/scss/bootstrap.css +48 -2
- data/apps/core/components/public/bootstrap/scss/bootstrap.scss +4 -1
- data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.eot +0 -0
- data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.svg +272 -213
- data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.ttf +0 -0
- data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.woff +0 -0
- data/apps/core/components/public/bootstrap_3/img/glyphicons-halflings-regular.woff2 +0 -0
- data/apps/core/components/public/bootstrap_3/js/affix.js +48 -26
- data/apps/core/components/public/bootstrap_3/js/alert.js +8 -6
- data/apps/core/components/public/bootstrap_3/js/button.js +27 -17
- data/apps/core/components/public/bootstrap_3/js/carousel.js +66 -39
- data/apps/core/components/public/bootstrap_3/js/collapse.js +73 -42
- data/apps/core/components/public/bootstrap_3/js/dropdown.js +54 -40
- data/apps/core/components/public/bootstrap_3/js/modal.js +102 -42
- data/apps/core/components/public/bootstrap_3/js/popover.js +6 -11
- data/apps/core/components/public/bootstrap_3/js/scrollspy.js +47 -33
- data/apps/core/components/public/bootstrap_3/js/tab.js +48 -21
- data/apps/core/components/public/bootstrap_3/js/tooltip.js +118 -60
- data/apps/core/components/public/bootstrap_3/js/transition.js +15 -4
- data/apps/core/components/public/bootstrap_3/scss/_alerts.scss +8 -2
- data/apps/core/components/public/bootstrap_3/scss/_badges.scss +14 -3
- data/apps/core/components/public/bootstrap_3/scss/_button-groups.scss +23 -19
- data/apps/core/components/public/bootstrap_3/scss/_buttons.scss +22 -13
- data/apps/core/components/public/bootstrap_3/scss/_carousel.scss +28 -2
- data/apps/core/components/public/bootstrap_3/scss/_close.scss +1 -0
- data/apps/core/components/public/bootstrap_3/scss/_code.scss +7 -0
- data/apps/core/components/public/bootstrap_3/scss/_component-animations.scss +3 -1
- data/apps/core/components/public/bootstrap_3/scss/_dropdowns.scss +11 -9
- data/apps/core/components/public/bootstrap_3/scss/_forms.scss +190 -68
- data/apps/core/components/public/bootstrap_3/scss/_glyphicons.scss +83 -13
- data/apps/core/components/public/bootstrap_3/scss/_grid.scss +4 -4
- data/apps/core/components/public/bootstrap_3/scss/_input-groups.scss +1 -0
- data/apps/core/components/public/bootstrap_3/scss/_jumbotron.scss +8 -4
- data/apps/core/components/public/bootstrap_3/scss/_list-group.scss +13 -12
- data/apps/core/components/public/bootstrap_3/scss/_media.scss +40 -30
- data/apps/core/components/public/bootstrap_3/scss/_mixins.scss +1 -0
- data/apps/core/components/public/bootstrap_3/scss/_modals.scss +7 -4
- data/apps/core/components/public/bootstrap_3/scss/_navbar.scss +36 -32
- data/apps/core/components/public/bootstrap_3/scss/_navs.scss +3 -3
- data/apps/core/components/public/bootstrap_3/scss/_normalize.scss +12 -13
- data/apps/core/components/public/bootstrap_3/scss/_pager.scss +2 -3
- data/apps/core/components/public/bootstrap_3/scss/_pagination.scss +4 -3
- data/apps/core/components/public/bootstrap_3/scss/_panels.scss +38 -7
- data/apps/core/components/public/bootstrap_3/scss/_popovers.scss +5 -7
- data/apps/core/components/public/bootstrap_3/scss/_print.scss +96 -96
- data/apps/core/components/public/bootstrap_3/scss/_progress-bars.scss +20 -22
- data/apps/core/components/public/bootstrap_3/scss/_responsive-embed.scss +10 -9
- data/apps/core/components/public/bootstrap_3/scss/_responsive-utilities.scss +8 -3
- data/apps/core/components/public/bootstrap_3/scss/_scaffolding.scss +15 -4
- data/apps/core/components/public/bootstrap_3/scss/_tables.scss +15 -14
- data/apps/core/components/public/bootstrap_3/scss/_theme.scss +57 -13
- data/apps/core/components/public/bootstrap_3/scss/_thumbnails.scss +2 -2
- data/apps/core/components/public/bootstrap_3/scss/_tooltip.scss +13 -7
- data/apps/core/components/public/bootstrap_3/scss/_type.scss +21 -21
- data/apps/core/components/public/bootstrap_3/scss/_utilities.scss +3 -4
- data/apps/core/components/public/bootstrap_3/scss/_variables.scss +54 -32
- data/apps/core/components/public/bootstrap_3/scss/bootstrap.css +8772 -0
- data/apps/core/components/public/bootstrap_3/scss/bootstrap.scss +6 -0
- data/apps/core/components/public/bootstrap_3/scss/mixins/_background-variant.scss +2 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_buttons.scss +19 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_forms.scss +5 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_gradients.scss +1 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_grid-framework.scss +4 -10
- data/apps/core/components/public/bootstrap_3/scss/mixins/_grid.scss +7 -7
- data/apps/core/components/public/bootstrap_3/scss/mixins/_hide-text.scss +3 -3
- data/apps/core/components/public/bootstrap_3/scss/mixins/_labels.scss +1 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_list-group.scss +3 -2
- data/apps/core/components/public/bootstrap_3/scss/mixins/_opacity.scss +1 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_pagination.scss +2 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_panels.scss +4 -0
- data/apps/core/components/public/bootstrap_3/scss/mixins/_progress-bar.scss +3 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_reset-text.scss +18 -0
- data/apps/core/components/public/bootstrap_3/scss/mixins/_responsive-visibility.scss +1 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_text-emphasis.scss +2 -1
- data/apps/core/components/public/bootstrap_3/scss/mixins/_vendor-prefixes.scss +11 -13
- data/apps/core/components/public/css/table_base.css +46 -1
- data/apps/core/components/public/fontawesome_4/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/apps/core/components/public/fontawesome_4/fonts/font-awesome/fontawesome-webfont.svg +565 -0
- data/apps/core/components/public/fontawesome_4/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/apps/core/components/public/fontawesome_4/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/apps/core/components/public/fontawesome_4/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome.css +2893 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_animated.scss +34 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_bordered-pulled.scss +16 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_core.scss +12 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_extras.scss +44 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_fixed-width.scss +6 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_icons.scss +596 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_larger.scss +13 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_list.scss +19 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_mixins.scss +26 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_path.scss +14 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_rotated-flipped.scss +20 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_stacked.scss +20 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font-awesome/_variables.scss +608 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font_awesome.css +2893 -0
- data/apps/core/components/public/fontawesome_4/stylesheets/font_awesome.scss +17 -0
- data/apps/core/components/public/js/paginatore.js +307 -0
- data/apps/core/components/public/js/spin.js +399 -0
- data/apps/core/components/public/mmenu/js/jquery.mmenu.js +133 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.borderstyle.scss +33 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.effects.scss +199 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.fullscreen.scss +24 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.iconbar.scss +26 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.multiline.scss +15 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.pagedim.scss +36 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.pageshadow.scss +36 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.positioning.scss +87 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.themes.scss +76 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.tileview.scss +98 -0
- data/apps/core/components/public/mmenu/scss/extensions/_jquery.mmenu.widescreen.scss +61 -0
- data/apps/core/components/public/mmenu/scss/inc/_colors.scss +175 -0
- data/apps/core/components/public/mmenu/scss/inc/_mixins.scss +135 -0
- data/apps/core/components/public/mmenu/scss/inc/_sizing.scss +86 -0
- data/apps/core/components/public/mmenu/scss/inc/_variables.scss +61 -0
- data/apps/core/components/public/mmenu/scss/jquery.mmenu.scss +478 -0
- data/apps/core/components/widgets/table/table.rb +7 -0
- data/apps/core/components/widgets/table/table.shtml +50 -17
- data/apps/core/forms/tags/row.erb +1 -1
- data/lib/spiderfw/cmd/cmd.rb +2 -0
- data/lib/spiderfw/cmd/commands/assets.rb +12 -0
- data/lib/spiderfw/controller/mixins/visual.rb +1 -0
- data/lib/spiderfw/create.rb +0 -1
- data/lib/spiderfw/i18n/gettext.rb +33 -0
- data/lib/spiderfw/i18n/javascript_parser.rb +2 -2
- data/lib/spiderfw/i18n/shtml_parser.rb +2 -2
- data/lib/spiderfw/model/model.rb +2 -1
- data/lib/spiderfw/setup/app_manager.rb +8 -0
- data/lib/spiderfw/spider.rb +9 -1
- data/lib/spiderfw/templates/layout.rb +47 -39
- data/lib/spiderfw/templates/template.rb +12 -4
- metadata +46 -1
Binary file
|
Binary file
|
Binary file
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: affix.js v3.
|
2
|
+
* Bootstrap: affix.js v3.3.5
|
3
3
|
* http://getbootstrap.com/javascript/#affix
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -21,14 +21,14 @@
|
|
21
21
|
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
22
22
|
|
23
23
|
this.$element = $(element)
|
24
|
-
this.affixed =
|
25
|
-
this.unpin =
|
24
|
+
this.affixed = null
|
25
|
+
this.unpin = null
|
26
26
|
this.pinnedOffset = null
|
27
27
|
|
28
28
|
this.checkPosition()
|
29
29
|
}
|
30
30
|
|
31
|
-
Affix.VERSION = '3.
|
31
|
+
Affix.VERSION = '3.3.5'
|
32
32
|
|
33
33
|
Affix.RESET = 'affix affix-top affix-bottom'
|
34
34
|
|
@@ -37,6 +37,28 @@
|
|
37
37
|
target: window
|
38
38
|
}
|
39
39
|
|
40
|
+
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
|
41
|
+
var scrollTop = this.$target.scrollTop()
|
42
|
+
var position = this.$element.offset()
|
43
|
+
var targetHeight = this.$target.height()
|
44
|
+
|
45
|
+
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
|
46
|
+
|
47
|
+
if (this.affixed == 'bottom') {
|
48
|
+
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
|
49
|
+
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
|
50
|
+
}
|
51
|
+
|
52
|
+
var initializing = this.affixed == null
|
53
|
+
var colliderTop = initializing ? scrollTop : position.top
|
54
|
+
var colliderHeight = initializing ? targetHeight : height
|
55
|
+
|
56
|
+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
57
|
+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
58
|
+
|
59
|
+
return false
|
60
|
+
}
|
61
|
+
|
40
62
|
Affix.prototype.getPinnedOffset = function () {
|
41
63
|
if (this.pinnedOffset) return this.pinnedOffset
|
42
64
|
this.$element.removeClass(Affix.RESET).addClass('affix')
|
@@ -52,41 +74,41 @@
|
|
52
74
|
Affix.prototype.checkPosition = function () {
|
53
75
|
if (!this.$element.is(':visible')) return
|
54
76
|
|
55
|
-
var
|
56
|
-
var scrollTop = this.$target.scrollTop()
|
57
|
-
var position = this.$element.offset()
|
77
|
+
var height = this.$element.height()
|
58
78
|
var offset = this.options.offset
|
59
79
|
var offsetTop = offset.top
|
60
80
|
var offsetBottom = offset.bottom
|
81
|
+
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
61
82
|
|
62
83
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
63
84
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
64
85
|
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
65
86
|
|
66
|
-
var affix = this.
|
67
|
-
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
|
68
|
-
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
|
87
|
+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
69
88
|
|
70
|
-
if (this.affixed
|
71
|
-
|
89
|
+
if (this.affixed != affix) {
|
90
|
+
if (this.unpin != null) this.$element.css('top', '')
|
72
91
|
|
73
|
-
|
74
|
-
|
92
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
93
|
+
var e = $.Event(affixType + '.bs.affix')
|
75
94
|
|
76
|
-
|
95
|
+
this.$element.trigger(e)
|
77
96
|
|
78
|
-
|
97
|
+
if (e.isDefaultPrevented()) return
|
79
98
|
|
80
|
-
|
81
|
-
|
99
|
+
this.affixed = affix
|
100
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
82
101
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
102
|
+
this.$element
|
103
|
+
.removeClass(Affix.RESET)
|
104
|
+
.addClass(affixType)
|
105
|
+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
106
|
+
}
|
87
107
|
|
88
108
|
if (affix == 'bottom') {
|
89
|
-
this.$element.offset({
|
109
|
+
this.$element.offset({
|
110
|
+
top: scrollHeight - height - offsetBottom
|
111
|
+
})
|
90
112
|
}
|
91
113
|
}
|
92
114
|
|
@@ -130,8 +152,8 @@
|
|
130
152
|
|
131
153
|
data.offset = data.offset || {}
|
132
154
|
|
133
|
-
if (data.offsetBottom) data.offset.bottom = data.offsetBottom
|
134
|
-
if (data.offsetTop)
|
155
|
+
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
156
|
+
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
135
157
|
|
136
158
|
Plugin.call($spy, data)
|
137
159
|
})
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: alert.js v3.
|
2
|
+
* Bootstrap: alert.js v3.3.5
|
3
3
|
* http://getbootstrap.com/javascript/#alerts
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -18,7 +18,9 @@
|
|
18
18
|
$(el).on('click', dismiss, this.close)
|
19
19
|
}
|
20
20
|
|
21
|
-
Alert.VERSION = '3.
|
21
|
+
Alert.VERSION = '3.3.5'
|
22
|
+
|
23
|
+
Alert.TRANSITION_DURATION = 150
|
22
24
|
|
23
25
|
Alert.prototype.close = function (e) {
|
24
26
|
var $this = $(this)
|
@@ -34,7 +36,7 @@
|
|
34
36
|
if (e) e.preventDefault()
|
35
37
|
|
36
38
|
if (!$parent.length) {
|
37
|
-
$parent = $this.
|
39
|
+
$parent = $this.closest('.alert')
|
38
40
|
}
|
39
41
|
|
40
42
|
$parent.trigger(e = $.Event('close.bs.alert'))
|
@@ -50,8 +52,8 @@
|
|
50
52
|
|
51
53
|
$.support.transition && $parent.hasClass('fade') ?
|
52
54
|
$parent
|
53
|
-
.one(
|
54
|
-
.emulateTransitionEnd(
|
55
|
+
.one('bsTransitionEnd', removeElement)
|
56
|
+
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
|
55
57
|
removeElement()
|
56
58
|
}
|
57
59
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: button.js v3.
|
2
|
+
* Bootstrap: button.js v3.3.5
|
3
3
|
* http://getbootstrap.com/javascript/#buttons
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
this.isLoading = false
|
20
20
|
}
|
21
21
|
|
22
|
-
Button.VERSION = '3.
|
22
|
+
Button.VERSION = '3.3.5'
|
23
23
|
|
24
24
|
Button.DEFAULTS = {
|
25
25
|
loadingText: 'loading...'
|
@@ -31,14 +31,14 @@
|
|
31
31
|
var val = $el.is('input') ? 'val' : 'html'
|
32
32
|
var data = $el.data()
|
33
33
|
|
34
|
-
state
|
34
|
+
state += 'Text'
|
35
35
|
|
36
36
|
if (data.resetText == null) $el.data('resetText', $el[val]())
|
37
37
|
|
38
|
-
$el[val](data[state] == null ? this.options[state] : data[state])
|
39
|
-
|
40
38
|
// push to event loop to allow forms to submit
|
41
39
|
setTimeout($.proxy(function () {
|
40
|
+
$el[val](data[state] == null ? this.options[state] : data[state])
|
41
|
+
|
42
42
|
if (state == 'loadingText') {
|
43
43
|
this.isLoading = true
|
44
44
|
$el.addClass(d).attr(d, d)
|
@@ -56,13 +56,19 @@
|
|
56
56
|
if ($parent.length) {
|
57
57
|
var $input = this.$element.find('input')
|
58
58
|
if ($input.prop('type') == 'radio') {
|
59
|
-
if ($input.prop('checked')
|
60
|
-
|
59
|
+
if ($input.prop('checked')) changed = false
|
60
|
+
$parent.find('.active').removeClass('active')
|
61
|
+
this.$element.addClass('active')
|
62
|
+
} else if ($input.prop('type') == 'checkbox') {
|
63
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
64
|
+
this.$element.toggleClass('active')
|
61
65
|
}
|
62
|
-
|
66
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
67
|
+
if (changed) $input.trigger('change')
|
68
|
+
} else {
|
69
|
+
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
70
|
+
this.$element.toggleClass('active')
|
63
71
|
}
|
64
|
-
|
65
|
-
if (changed) this.$element.toggleClass('active')
|
66
72
|
}
|
67
73
|
|
68
74
|
|
@@ -100,11 +106,15 @@
|
|
100
106
|
// BUTTON DATA-API
|
101
107
|
// ===============
|
102
108
|
|
103
|
-
$(document)
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
+
$(document)
|
110
|
+
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
111
|
+
var $btn = $(e.target)
|
112
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
113
|
+
Plugin.call($btn, 'toggle')
|
114
|
+
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
|
115
|
+
})
|
116
|
+
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
117
|
+
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
118
|
+
})
|
109
119
|
|
110
120
|
}(jQuery);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/* ========================================================================
|
2
|
-
* Bootstrap: carousel.js v3.
|
2
|
+
* Bootstrap: carousel.js v3.3.5
|
3
3
|
* http://getbootstrap.com/javascript/#carousel
|
4
4
|
* ========================================================================
|
5
|
-
* Copyright 2011-
|
5
|
+
* Copyright 2011-2015 Twitter, Inc.
|
6
6
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
7
|
* ======================================================================== */
|
8
8
|
|
@@ -17,26 +17,42 @@
|
|
17
17
|
this.$element = $(element)
|
18
18
|
this.$indicators = this.$element.find('.carousel-indicators')
|
19
19
|
this.options = options
|
20
|
-
this.paused =
|
21
|
-
this.sliding =
|
22
|
-
this.interval =
|
23
|
-
this.$active =
|
20
|
+
this.paused = null
|
21
|
+
this.sliding = null
|
22
|
+
this.interval = null
|
23
|
+
this.$active = null
|
24
24
|
this.$items = null
|
25
25
|
|
26
|
-
this.options.
|
27
|
-
|
28
|
-
|
26
|
+
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
27
|
+
|
28
|
+
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
29
|
+
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
30
|
+
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
29
31
|
}
|
30
32
|
|
31
|
-
Carousel.VERSION = '3.
|
33
|
+
Carousel.VERSION = '3.3.5'
|
34
|
+
|
35
|
+
Carousel.TRANSITION_DURATION = 600
|
32
36
|
|
33
37
|
Carousel.DEFAULTS = {
|
34
38
|
interval: 5000,
|
35
39
|
pause: 'hover',
|
36
|
-
wrap: true
|
40
|
+
wrap: true,
|
41
|
+
keyboard: true
|
42
|
+
}
|
43
|
+
|
44
|
+
Carousel.prototype.keydown = function (e) {
|
45
|
+
if (/input|textarea/i.test(e.target.tagName)) return
|
46
|
+
switch (e.which) {
|
47
|
+
case 37: this.prev(); break
|
48
|
+
case 39: this.next(); break
|
49
|
+
default: return
|
50
|
+
}
|
51
|
+
|
52
|
+
e.preventDefault()
|
37
53
|
}
|
38
54
|
|
39
|
-
Carousel.prototype.cycle =
|
55
|
+
Carousel.prototype.cycle = function (e) {
|
40
56
|
e || (this.paused = false)
|
41
57
|
|
42
58
|
this.interval && clearInterval(this.interval)
|
@@ -48,23 +64,31 @@
|
|
48
64
|
return this
|
49
65
|
}
|
50
66
|
|
51
|
-
Carousel.prototype.
|
52
|
-
this.$
|
53
|
-
this.$items
|
67
|
+
Carousel.prototype.getItemIndex = function (item) {
|
68
|
+
this.$items = item.parent().children('.item')
|
69
|
+
return this.$items.index(item || this.$active)
|
70
|
+
}
|
54
71
|
|
55
|
-
|
72
|
+
Carousel.prototype.getItemForDirection = function (direction, active) {
|
73
|
+
var activeIndex = this.getItemIndex(active)
|
74
|
+
var willWrap = (direction == 'prev' && activeIndex === 0)
|
75
|
+
|| (direction == 'next' && activeIndex == (this.$items.length - 1))
|
76
|
+
if (willWrap && !this.options.wrap) return active
|
77
|
+
var delta = direction == 'prev' ? -1 : 1
|
78
|
+
var itemIndex = (activeIndex + delta) % this.$items.length
|
79
|
+
return this.$items.eq(itemIndex)
|
56
80
|
}
|
57
81
|
|
58
82
|
Carousel.prototype.to = function (pos) {
|
59
83
|
var that = this
|
60
|
-
var activeIndex = this.
|
84
|
+
var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
|
61
85
|
|
62
86
|
if (pos > (this.$items.length - 1) || pos < 0) return
|
63
87
|
|
64
88
|
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
65
89
|
if (activeIndex == pos) return this.pause().cycle()
|
66
90
|
|
67
|
-
return this.slide(pos > activeIndex ? 'next' : 'prev',
|
91
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
|
68
92
|
}
|
69
93
|
|
70
94
|
Carousel.prototype.pause = function (e) {
|
@@ -92,21 +116,18 @@
|
|
92
116
|
|
93
117
|
Carousel.prototype.slide = function (type, next) {
|
94
118
|
var $active = this.$element.find('.item.active')
|
95
|
-
var $next = next || $active
|
119
|
+
var $next = next || this.getItemForDirection(type, $active)
|
96
120
|
var isCycling = this.interval
|
97
121
|
var direction = type == 'next' ? 'left' : 'right'
|
98
|
-
var fallback = type == 'next' ? 'first' : 'last'
|
99
122
|
var that = this
|
100
123
|
|
101
|
-
if (
|
102
|
-
if (!this.options.wrap) return
|
103
|
-
$next = this.$element.find('.item')[fallback]()
|
104
|
-
}
|
105
|
-
|
106
|
-
if ($next.hasClass('active')) return this.sliding = false
|
124
|
+
if ($next.hasClass('active')) return (this.sliding = false)
|
107
125
|
|
108
126
|
var relatedTarget = $next[0]
|
109
|
-
var slideEvent = $.Event('slide.bs.carousel', {
|
127
|
+
var slideEvent = $.Event('slide.bs.carousel', {
|
128
|
+
relatedTarget: relatedTarget,
|
129
|
+
direction: direction
|
130
|
+
})
|
110
131
|
this.$element.trigger(slideEvent)
|
111
132
|
if (slideEvent.isDefaultPrevented()) return
|
112
133
|
|
@@ -116,10 +137,8 @@
|
|
116
137
|
|
117
138
|
if (this.$indicators.length) {
|
118
139
|
this.$indicators.find('.active').removeClass('active')
|
119
|
-
this.$
|
120
|
-
|
121
|
-
$nextIndicator && $nextIndicator.addClass('active')
|
122
|
-
})
|
140
|
+
var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
|
141
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
123
142
|
}
|
124
143
|
|
125
144
|
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
@@ -129,13 +148,15 @@
|
|
129
148
|
$active.addClass(direction)
|
130
149
|
$next.addClass(direction)
|
131
150
|
$active
|
132
|
-
.one(
|
151
|
+
.one('bsTransitionEnd', function () {
|
133
152
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
134
153
|
$active.removeClass(['active', direction].join(' '))
|
135
154
|
that.sliding = false
|
136
|
-
setTimeout(function () {
|
155
|
+
setTimeout(function () {
|
156
|
+
that.$element.trigger(slidEvent)
|
157
|
+
}, 0)
|
137
158
|
})
|
138
|
-
.emulateTransitionEnd(
|
159
|
+
.emulateTransitionEnd(Carousel.TRANSITION_DURATION)
|
139
160
|
} else {
|
140
161
|
$active.removeClass('active')
|
141
162
|
$next.addClass('active')
|
@@ -184,21 +205,27 @@
|
|
184
205
|
// CAROUSEL DATA-API
|
185
206
|
// =================
|
186
207
|
|
187
|
-
|
188
|
-
var
|
189
|
-
var $
|
208
|
+
var clickHandler = function (e) {
|
209
|
+
var href
|
210
|
+
var $this = $(this)
|
211
|
+
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
|
212
|
+
if (!$target.hasClass('carousel')) return
|
190
213
|
var options = $.extend({}, $target.data(), $this.data())
|
191
214
|
var slideIndex = $this.attr('data-slide-to')
|
192
215
|
if (slideIndex) options.interval = false
|
193
216
|
|
194
217
|
Plugin.call($target, options)
|
195
218
|
|
196
|
-
if (slideIndex
|
219
|
+
if (slideIndex) {
|
197
220
|
$target.data('bs.carousel').to(slideIndex)
|
198
221
|
}
|
199
222
|
|
200
223
|
e.preventDefault()
|
201
|
-
}
|
224
|
+
}
|
225
|
+
|
226
|
+
$(document)
|
227
|
+
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
|
228
|
+
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
|
202
229
|
|
203
230
|
$(window).on('load', function () {
|
204
231
|
$('[data-ride="carousel"]').each(function () {
|