flashgrid 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flashgrid/version.rb +1 -1
- data/vendor/assets/javascripts/button.js +22 -6
- data/vendor/assets/javascripts/collapse.js +2 -3
- data/vendor/assets/javascripts/hoverdown.js +13 -2
- data/vendor/assets/javascripts/modal.js +3 -3
- data/vendor/assets/javascripts/tab.js +2 -2
- data/vendor/assets/javascripts/tooltip.js +10 -3
- data/vendor/assets/stylesheets/button.css.scss +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f020b15cb62610660cd889ed7d332b4b246fc94
|
4
|
+
data.tar.gz: 494aaf1f28142d0534044d217d9731586743af71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1281ea481aacd8425721f69ee0650da7b4653566a37ad542ae0990f63672690db64b3904713604c0d6ab80b5e7527d0d57a0bed683e159698b8d6de0c07ccd8f
|
7
|
+
data.tar.gz: 0bdc9a57d1735079889c122bc47a733721316aa37b83356e5462584effeb6e911168688d84e9c4ad7002dd747a40bce410a8ce6f06eb9e3787af68c4ebc7a8b7
|
data/lib/flashgrid/version.rb
CHANGED
@@ -88,14 +88,30 @@
|
|
88
88
|
}
|
89
89
|
|
90
90
|
|
91
|
+
// FOCUS SHIM (FOR BUTTON GROUPS)
|
92
|
+
// ==============================
|
93
|
+
|
94
|
+
function getBtnTarget(target) {
|
95
|
+
var $target = $(target)
|
96
|
+
return $target.hasClass('btn') ? $target : $target.parent('.btn')
|
97
|
+
}
|
98
|
+
|
99
|
+
|
91
100
|
// BUTTON DATA-API
|
92
101
|
// ===============
|
93
102
|
|
94
|
-
$(document)
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
103
|
+
$(document)
|
104
|
+
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
105
|
+
var $btn = $(e.target)
|
106
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
107
|
+
Plugin.call($btn, 'toggle')
|
108
|
+
e.preventDefault()
|
109
|
+
})
|
110
|
+
.on('focus.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
111
|
+
getBtnTarget(e.target).addClass('focus')
|
112
|
+
})
|
113
|
+
.on('blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
114
|
+
getBtnTarget(e.target).removeClass('focus')
|
115
|
+
})
|
100
116
|
|
101
117
|
}(jQuery);
|
@@ -79,8 +79,7 @@
|
|
79
79
|
|
80
80
|
this.$element
|
81
81
|
.addClass('collapsing')
|
82
|
-
.removeClass('collapse')
|
83
|
-
.removeClass('in')
|
82
|
+
.removeClass('collapse in')
|
84
83
|
|
85
84
|
this.transitioning = 1
|
86
85
|
|
@@ -152,7 +151,7 @@
|
|
152
151
|
|
153
152
|
if (!data || !data.transitioning) {
|
154
153
|
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
|
155
|
-
$this
|
154
|
+
$this.toggleClass('collapsed', $target.hasClass('in'))
|
156
155
|
}
|
157
156
|
|
158
157
|
Plugin.call($target, option)
|
@@ -34,12 +34,13 @@
|
|
34
34
|
|
35
35
|
$parent.hover(function (event) {
|
36
36
|
// so a neighbor can't open the dropdown
|
37
|
-
if(
|
37
|
+
if($parent.hasClass('open') && !$this.is(event.target)) {
|
38
38
|
// stop this event, stop executing any code
|
39
39
|
// in this callback but continue to propagate
|
40
40
|
return true;
|
41
41
|
}
|
42
42
|
|
43
|
+
window.clearTimeout(timeout);
|
43
44
|
openDropdown(event);
|
44
45
|
}, function () {
|
45
46
|
timeout = window.setTimeout(function () {
|
@@ -48,11 +49,21 @@
|
|
48
49
|
}, settings.delay);
|
49
50
|
});
|
50
51
|
|
52
|
+
// clear timeout if hovering submenu
|
53
|
+
$allDropdowns.find('.dropdown-menu').hover(function(){
|
54
|
+
window.clearTimeout(timeout);
|
55
|
+
}, function(){
|
56
|
+
timeout = window.setTimeout(function () {
|
57
|
+
$parent.removeClass('open');
|
58
|
+
$this.trigger(hideEvent);
|
59
|
+
}, settings.delay);
|
60
|
+
});
|
61
|
+
|
51
62
|
// this helps with button groups!
|
52
63
|
$this.hover(function (event) {
|
53
64
|
// this helps prevent a double event from firing.
|
54
65
|
// see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
|
55
|
-
if(
|
66
|
+
if($parent.hasClass('open') && !$parent.is(event.target)) {
|
56
67
|
// stop this event, stop executing any code
|
57
68
|
// in this callback but continue to propagate
|
58
69
|
return true;
|
@@ -126,11 +126,11 @@
|
|
126
126
|
|
127
127
|
Modal.prototype.escape = function () {
|
128
128
|
if (this.isShown && this.options.keyboard) {
|
129
|
-
this.$element.on('
|
129
|
+
this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
|
130
130
|
e.which == 27 && this.hide()
|
131
131
|
}, this))
|
132
132
|
} else if (!this.isShown) {
|
133
|
-
this.$element.off('
|
133
|
+
this.$element.off('keydown.dismiss.bs.modal')
|
134
134
|
}
|
135
135
|
}
|
136
136
|
|
@@ -157,7 +157,7 @@
|
|
157
157
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
158
158
|
.appendTo(this.$body)
|
159
159
|
|
160
|
-
this.$element.on('
|
160
|
+
this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
|
161
161
|
if (e.target !== e.currentTarget) return
|
162
162
|
this.options.backdrop == 'static'
|
163
163
|
? this.$element[0].focus.call(this.$element[0])
|
@@ -46,7 +46,7 @@
|
|
46
46
|
var $active = container.find('> .active')
|
47
47
|
var transition = callback
|
48
48
|
&& $.support.transition
|
49
|
-
&& $active.hasClass('fade')
|
49
|
+
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
|
50
50
|
|
51
51
|
function next() {
|
52
52
|
$active
|
@@ -70,7 +70,7 @@
|
|
70
70
|
callback && callback()
|
71
71
|
}
|
72
72
|
|
73
|
-
transition ?
|
73
|
+
$active.length && transition ?
|
74
74
|
$active
|
75
75
|
.one('bsTransitionEnd', next)
|
76
76
|
.emulateTransitionEnd(150) :
|
@@ -306,13 +306,20 @@
|
|
306
306
|
|
307
307
|
Tooltip.prototype.getPosition = function ($element) {
|
308
308
|
$element = $element || this.$element
|
309
|
+
|
309
310
|
var el = $element[0]
|
310
311
|
var isBody = el.tagName == 'BODY'
|
311
|
-
|
312
|
-
|
312
|
+
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
313
|
+
|
314
|
+
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
|
315
|
+
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
316
|
+
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
317
|
+
var outerDims = isSvg ? {} : {
|
313
318
|
width: isBody ? $(window).width() : $element.outerWidth(),
|
314
319
|
height: isBody ? $(window).height() : $element.outerHeight()
|
315
|
-
}
|
320
|
+
}
|
321
|
+
|
322
|
+
return $.extend({}, elRect, scroll, outerDims, elOffset)
|
316
323
|
}
|
317
324
|
|
318
325
|
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flashgrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|