flashgrid 1.3.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/lib/flashgrid/version.rb +1 -1
- data/vendor/assets/javascripts/alert.js +2 -1
- data/vendor/assets/javascripts/animation.js +82 -0
- data/vendor/assets/javascripts/button.js +99 -0
- data/vendor/assets/javascripts/carousel.js +199 -0
- data/vendor/assets/javascripts/date_picker.js +1645 -1645
- data/vendor/assets/javascripts/hoverdown.js +93 -0
- data/vendor/assets/javascripts/scrollspy.js +146 -0
- data/vendor/assets/stylesheets/alert.css.scss +3 -3
- data/vendor/assets/stylesheets/animation.css.scss +2319 -0
- data/vendor/assets/stylesheets/breadcrumb.css.scss +2 -5
- data/vendor/assets/stylesheets/button.css.scss +106 -113
- data/vendor/assets/stylesheets/carousel.css.scss +148 -0
- data/vendor/assets/stylesheets/collapse.css.scss +2 -2
- data/vendor/assets/stylesheets/datepicker.css.scss +2 -4
- data/vendor/assets/stylesheets/dropdown.css.scss +6 -6
- data/vendor/assets/stylesheets/footer.css.scss +31 -4
- data/vendor/assets/stylesheets/form.css.scss +55 -24
- data/vendor/assets/stylesheets/header.css.scss +11 -4
- data/vendor/assets/stylesheets/icon.css.scss +10 -10
- data/vendor/assets/stylesheets/label_and_badge.css.scss +1 -1
- data/vendor/assets/stylesheets/list.css.scss +34 -15
- data/vendor/assets/stylesheets/modal.css.scss +12 -14
- data/vendor/assets/stylesheets/{tab.css.scss → nav_and_tab.css.scss} +20 -16
- data/vendor/assets/stylesheets/pagination.css.scss +1 -1
- data/vendor/assets/stylesheets/popover.css.scss +3 -3
- data/vendor/assets/stylesheets/progress.css.scss +1 -1
- data/vendor/assets/stylesheets/reset.css.scss +5 -8
- data/vendor/assets/stylesheets/switch.css.scss +24 -13
- data/vendor/assets/stylesheets/table.css.scss +10 -10
- data/vendor/assets/stylesheets/timepicker.css.scss +11 -11
- data/vendor/assets/stylesheets/trunk.css.scss +9 -23
- metadata +10 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 383e3f0560bb9164b92e6a772ef9db039b4a8c59
|
4
|
+
data.tar.gz: a6f7ad0da921dd17243e62619837131f15391a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bebe56ddc186155f2044d832e0ccfef91376049d341a6ee81b9a0acff35a02c18f978b59e439a809552e9d493fc5c4b03d79ed5a30ed808c8ac3ee122e97efd
|
7
|
+
data.tar.gz: 91a445e7e47ef0694495825764557cc4dd11d135bccc7fa4d8eac1f9f52006801cf7423058cef29b8dc52aa259eb3c5c13f9419888862c812738067f850ef7b3
|
data/README.md
CHANGED
@@ -26,8 +26,10 @@ Add the CSS files you want to include:
|
|
26
26
|
*= require ad.css
|
27
27
|
*= require affix.css
|
28
28
|
*= require alert.css
|
29
|
+
*= require animation.css
|
29
30
|
*= require breadcrumb.css
|
30
31
|
*= require button.css
|
32
|
+
*= require carousel.css
|
31
33
|
*= require code.css
|
32
34
|
*= require collapse.css
|
33
35
|
*= require datepicker.css
|
@@ -43,6 +45,7 @@ Add the CSS files you want to include:
|
|
43
45
|
*= require list.css
|
44
46
|
*= require map.css
|
45
47
|
*= require modal.css
|
48
|
+
*= require nav_and_tab.css
|
46
49
|
*= require pagination.css
|
47
50
|
*= require panel.css
|
48
51
|
*= require placeholder.css
|
@@ -50,7 +53,6 @@ Add the CSS files you want to include:
|
|
50
53
|
*= require progress.css
|
51
54
|
*= require reset.css (place before any files)
|
52
55
|
*= require switch.css
|
53
|
-
*= require tab.css
|
54
56
|
*= require table.css
|
55
57
|
*= require timepicker.css
|
56
58
|
*= require tooltip.css
|
@@ -64,16 +66,21 @@ Add the JS files you want to include:
|
|
64
66
|
```ruby
|
65
67
|
//= require affix.js
|
66
68
|
//= require alert.js
|
69
|
+
//= require animation.js
|
70
|
+
//= require button.js
|
71
|
+
//= require carousel.js
|
67
72
|
//= require collapse.js
|
68
73
|
//= require date_picker.js
|
69
74
|
//= require dropdown.js
|
70
75
|
//= require file_input.js
|
76
|
+
//= require hoverdown.js
|
71
77
|
//= require map.js
|
72
78
|
//= require modal.js
|
79
|
+
//= require popover.js (place after tooltip)
|
80
|
+
//= require scrollspy.js
|
73
81
|
//= require switch.js
|
74
82
|
//= require tab.js
|
75
83
|
//= require time_picker.js
|
76
84
|
//= require tooltip.js
|
77
|
-
//= require popover.js
|
78
85
|
//= require transition.js
|
79
86
|
```
|
data/lib/flashgrid/version.rb
CHANGED
@@ -33,7 +33,8 @@
|
|
33
33
|
$parent.removeClass('in')
|
34
34
|
|
35
35
|
function removeElement() {
|
36
|
-
|
36
|
+
// detach from parent, fire event then clean up data
|
37
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
37
38
|
}
|
38
39
|
|
39
40
|
$.support.transition && $parent.hasClass('fade') ?
|
@@ -0,0 +1,82 @@
|
|
1
|
+
(function ($, window, document, undefined) {
|
2
|
+
|
3
|
+
// Function-level strict mode syntax
|
4
|
+
'use strict';
|
5
|
+
|
6
|
+
$.fn.animateCSS = function (effect, delay, callback) {
|
7
|
+
|
8
|
+
// Return this to maintain chainability
|
9
|
+
return this.each(function () {
|
10
|
+
|
11
|
+
// Cache $(this) for speed and compression
|
12
|
+
var $this = $(this),
|
13
|
+
transitionEnd = "webkitAnimationEnd oanimationend msAnimationEnd animationend",
|
14
|
+
animated = "animated",
|
15
|
+
visibility = "visibility",
|
16
|
+
visible = "visible",
|
17
|
+
hidden = "hidden";
|
18
|
+
|
19
|
+
// Create a function we can call later
|
20
|
+
function run() {
|
21
|
+
|
22
|
+
// Add the animation effect with classes
|
23
|
+
$this.addClass( animated + " " + effect);
|
24
|
+
|
25
|
+
// Check if the elemenr has been hidden to start with
|
26
|
+
if ($this.css( visibility ) === hidden) {
|
27
|
+
|
28
|
+
// If it has, show it (after the class has been added)
|
29
|
+
$this.css( visibility, visible);
|
30
|
+
|
31
|
+
}
|
32
|
+
|
33
|
+
// If the element is hidden
|
34
|
+
if ($this.is(":" + hidden)) {
|
35
|
+
|
36
|
+
// Show it
|
37
|
+
$this.show();
|
38
|
+
|
39
|
+
}
|
40
|
+
|
41
|
+
// Event triggered when the animation has finished
|
42
|
+
$this.bind( transitionEnd, function () {
|
43
|
+
|
44
|
+
// Remove the classes so they can be added again later
|
45
|
+
$this.removeClass(animated + " " + effect);
|
46
|
+
|
47
|
+
// Add a callback event
|
48
|
+
if (typeof callback === "function") {
|
49
|
+
|
50
|
+
// Execute the callback
|
51
|
+
callback.call(this);
|
52
|
+
|
53
|
+
// Unbind the event handlers
|
54
|
+
$this.unbind( transitionEnd );
|
55
|
+
|
56
|
+
}
|
57
|
+
|
58
|
+
});
|
59
|
+
|
60
|
+
}
|
61
|
+
|
62
|
+
// Check if delay exists or if it"s a callback
|
63
|
+
if (!delay || typeof delay === "function") {
|
64
|
+
|
65
|
+
// If it"s a callback, move it to callback so we can call it later
|
66
|
+
callback = delay;
|
67
|
+
|
68
|
+
// Run the animation (without delay)
|
69
|
+
run();
|
70
|
+
|
71
|
+
} else {
|
72
|
+
|
73
|
+
// Start a counter so we can delay the animation if required
|
74
|
+
setTimeout( run, delay );
|
75
|
+
|
76
|
+
}
|
77
|
+
|
78
|
+
});
|
79
|
+
|
80
|
+
};
|
81
|
+
|
82
|
+
})(jQuery, window, document);
|
@@ -0,0 +1,99 @@
|
|
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.DEFAULTS = {
|
14
|
+
loadingText: 'loading...'
|
15
|
+
}
|
16
|
+
|
17
|
+
Button.prototype.setState = function (state) {
|
18
|
+
var d = 'disabled'
|
19
|
+
var $el = this.$element
|
20
|
+
var val = $el.is('input') ? 'val' : 'html'
|
21
|
+
var data = $el.data()
|
22
|
+
|
23
|
+
state = state + 'Text'
|
24
|
+
|
25
|
+
if (data.resetText == null) $el.data('resetText', $el[val]())
|
26
|
+
|
27
|
+
$el[val](data[state] == null ? this.options[state] : data[state])
|
28
|
+
|
29
|
+
// push to event loop to allow forms to submit
|
30
|
+
setTimeout($.proxy(function () {
|
31
|
+
if (state == 'loadingText') {
|
32
|
+
this.isLoading = true
|
33
|
+
$el.addClass(d).attr(d, d)
|
34
|
+
} else if (this.isLoading) {
|
35
|
+
this.isLoading = false
|
36
|
+
$el.removeClass(d).removeAttr(d)
|
37
|
+
}
|
38
|
+
}, this), 0)
|
39
|
+
}
|
40
|
+
|
41
|
+
Button.prototype.toggle = function () {
|
42
|
+
var changed = true
|
43
|
+
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
44
|
+
|
45
|
+
if ($parent.length) {
|
46
|
+
var $input = this.$element.find('input')
|
47
|
+
if ($input.prop('type') == 'radio') {
|
48
|
+
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
|
49
|
+
else $parent.find('.active').removeClass('active')
|
50
|
+
}
|
51
|
+
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
|
52
|
+
}
|
53
|
+
|
54
|
+
if (changed) this.$element.toggleClass('active')
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
// BUTTON PLUGIN DEFINITION
|
59
|
+
// ========================
|
60
|
+
|
61
|
+
function Plugin(option) {
|
62
|
+
return this.each(function () {
|
63
|
+
var $this = $(this)
|
64
|
+
var data = $this.data('bs.button')
|
65
|
+
var options = typeof option == 'object' && option
|
66
|
+
|
67
|
+
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
68
|
+
|
69
|
+
if (option == 'toggle') data.toggle()
|
70
|
+
else if (option) data.setState(option)
|
71
|
+
})
|
72
|
+
}
|
73
|
+
|
74
|
+
var old = $.fn.button
|
75
|
+
|
76
|
+
$.fn.button = Plugin
|
77
|
+
$.fn.button.Constructor = Button
|
78
|
+
|
79
|
+
|
80
|
+
// BUTTON NO CONFLICT
|
81
|
+
// ==================
|
82
|
+
|
83
|
+
$.fn.button.noConflict = function () {
|
84
|
+
$.fn.button = old
|
85
|
+
return this
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
// BUTTON DATA-API
|
90
|
+
// ===============
|
91
|
+
|
92
|
+
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
93
|
+
var $btn = $(e.target)
|
94
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
95
|
+
Plugin.call($btn, 'toggle')
|
96
|
+
e.preventDefault()
|
97
|
+
})
|
98
|
+
|
99
|
+
}(jQuery);
|
@@ -0,0 +1,199 @@
|
|
1
|
+
+function ($) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
// CAROUSEL CLASS DEFINITION
|
5
|
+
// =========================
|
6
|
+
|
7
|
+
var Carousel = function (element, options) {
|
8
|
+
this.$element = $(element)
|
9
|
+
this.$indicators = this.$element.find('.carousel-indicators')
|
10
|
+
this.options = options
|
11
|
+
this.paused =
|
12
|
+
this.sliding =
|
13
|
+
this.interval =
|
14
|
+
this.$active =
|
15
|
+
this.$items = null
|
16
|
+
|
17
|
+
this.options.pause == 'hover' && this.$element
|
18
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
19
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
20
|
+
}
|
21
|
+
|
22
|
+
Carousel.DEFAULTS = {
|
23
|
+
interval: 5000,
|
24
|
+
pause: 'hover',
|
25
|
+
wrap: true
|
26
|
+
}
|
27
|
+
|
28
|
+
Carousel.prototype.cycle = function (e) {
|
29
|
+
e || (this.paused = false)
|
30
|
+
|
31
|
+
this.interval && clearInterval(this.interval)
|
32
|
+
|
33
|
+
this.options.interval
|
34
|
+
&& !this.paused
|
35
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
36
|
+
|
37
|
+
return this
|
38
|
+
}
|
39
|
+
|
40
|
+
Carousel.prototype.getActiveIndex = function () {
|
41
|
+
this.$active = this.$element.find('.item.active')
|
42
|
+
this.$items = this.$active.parent().children('.item')
|
43
|
+
|
44
|
+
return this.$items.index(this.$active)
|
45
|
+
}
|
46
|
+
|
47
|
+
Carousel.prototype.to = function (pos) {
|
48
|
+
var that = this
|
49
|
+
var activeIndex = this.getActiveIndex()
|
50
|
+
|
51
|
+
if (pos > (this.$items.length - 1) || pos < 0) return
|
52
|
+
|
53
|
+
if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
|
54
|
+
if (activeIndex == pos) return this.pause().cycle()
|
55
|
+
|
56
|
+
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
|
57
|
+
}
|
58
|
+
|
59
|
+
Carousel.prototype.pause = function (e) {
|
60
|
+
e || (this.paused = true)
|
61
|
+
|
62
|
+
if (this.$element.find('.next, .prev').length && $.support.transition) {
|
63
|
+
this.$element.trigger($.support.transition.end)
|
64
|
+
this.cycle(true)
|
65
|
+
}
|
66
|
+
|
67
|
+
this.interval = clearInterval(this.interval)
|
68
|
+
|
69
|
+
return this
|
70
|
+
}
|
71
|
+
|
72
|
+
Carousel.prototype.next = function () {
|
73
|
+
if (this.sliding) return
|
74
|
+
return this.slide('next')
|
75
|
+
}
|
76
|
+
|
77
|
+
Carousel.prototype.prev = function () {
|
78
|
+
if (this.sliding) return
|
79
|
+
return this.slide('prev')
|
80
|
+
}
|
81
|
+
|
82
|
+
Carousel.prototype.slide = function (type, next) {
|
83
|
+
var $active = this.$element.find('.item.active')
|
84
|
+
var $next = next || $active[type]()
|
85
|
+
var isCycling = this.interval
|
86
|
+
var direction = type == 'next' ? 'left' : 'right'
|
87
|
+
var fallback = type == 'next' ? 'first' : 'last'
|
88
|
+
var that = this
|
89
|
+
|
90
|
+
if (!$next.length) {
|
91
|
+
if (!this.options.wrap) return
|
92
|
+
$next = this.$element.find('.item')[fallback]()
|
93
|
+
}
|
94
|
+
|
95
|
+
if ($next.hasClass('active')) return this.sliding = false
|
96
|
+
|
97
|
+
var relatedTarget = $next[0]
|
98
|
+
var slideEvent = $.Event('slide.bs.carousel', { relatedTarget: relatedTarget, direction: direction })
|
99
|
+
this.$element.trigger(slideEvent)
|
100
|
+
if (slideEvent.isDefaultPrevented()) return
|
101
|
+
|
102
|
+
this.sliding = true
|
103
|
+
|
104
|
+
isCycling && this.pause()
|
105
|
+
|
106
|
+
if (this.$indicators.length) {
|
107
|
+
this.$indicators.find('.active').removeClass('active')
|
108
|
+
this.$element.one('slid.bs.carousel', function () { // yes, "slid"
|
109
|
+
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
|
110
|
+
$nextIndicator && $nextIndicator.addClass('active')
|
111
|
+
})
|
112
|
+
}
|
113
|
+
|
114
|
+
var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
|
115
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
116
|
+
$next.addClass(type)
|
117
|
+
$next[0].offsetWidth // force reflow
|
118
|
+
$active.addClass(direction)
|
119
|
+
$next.addClass(direction)
|
120
|
+
$active
|
121
|
+
.one($.support.transition.end, function () {
|
122
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
123
|
+
$active.removeClass(['active', direction].join(' '))
|
124
|
+
that.sliding = false
|
125
|
+
setTimeout(function () { that.$element.trigger(slidEvent) }, 0)
|
126
|
+
})
|
127
|
+
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
|
128
|
+
} else {
|
129
|
+
$active.removeClass('active')
|
130
|
+
$next.addClass('active')
|
131
|
+
this.sliding = false
|
132
|
+
this.$element.trigger(slidEvent)
|
133
|
+
}
|
134
|
+
|
135
|
+
isCycling && this.cycle()
|
136
|
+
|
137
|
+
return this
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
// CAROUSEL PLUGIN DEFINITION
|
142
|
+
// ==========================
|
143
|
+
|
144
|
+
function Plugin(option) {
|
145
|
+
return this.each(function () {
|
146
|
+
var $this = $(this)
|
147
|
+
var data = $this.data('bs.carousel')
|
148
|
+
var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
149
|
+
var action = typeof option == 'string' ? option : options.slide
|
150
|
+
|
151
|
+
if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
|
152
|
+
if (typeof option == 'number') data.to(option)
|
153
|
+
else if (action) data[action]()
|
154
|
+
else if (options.interval) data.pause().cycle()
|
155
|
+
})
|
156
|
+
}
|
157
|
+
|
158
|
+
var old = $.fn.carousel
|
159
|
+
|
160
|
+
$.fn.carousel = Plugin
|
161
|
+
$.fn.carousel.Constructor = Carousel
|
162
|
+
|
163
|
+
|
164
|
+
// CAROUSEL NO CONFLICT
|
165
|
+
// ====================
|
166
|
+
|
167
|
+
$.fn.carousel.noConflict = function () {
|
168
|
+
$.fn.carousel = old
|
169
|
+
return this
|
170
|
+
}
|
171
|
+
|
172
|
+
|
173
|
+
// CAROUSEL DATA-API
|
174
|
+
// =================
|
175
|
+
|
176
|
+
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
|
177
|
+
var $this = $(this), href
|
178
|
+
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
179
|
+
var options = $.extend({}, $target.data(), $this.data())
|
180
|
+
var slideIndex = $this.attr('data-slide-to')
|
181
|
+
if (slideIndex) options.interval = false
|
182
|
+
|
183
|
+
Plugin.call($target, options)
|
184
|
+
|
185
|
+
if (slideIndex = $this.attr('data-slide-to')) {
|
186
|
+
$target.data('bs.carousel').to(slideIndex)
|
187
|
+
}
|
188
|
+
|
189
|
+
e.preventDefault()
|
190
|
+
})
|
191
|
+
|
192
|
+
$(window).on('load', function () {
|
193
|
+
$('[data-ride="carousel"]').each(function () {
|
194
|
+
var $carousel = $(this)
|
195
|
+
Plugin.call($carousel, $carousel.data())
|
196
|
+
})
|
197
|
+
})
|
198
|
+
|
199
|
+
}(jQuery);
|