flashgrid 2.2.0 → 2.2.5
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 +4 -4
- data/README.md +2 -0
- data/lib/flashgrid/version.rb +1 -1
- data/vendor/assets/javascripts/affix.js +39 -19
- data/vendor/assets/javascripts/button.js +2 -14
- data/vendor/assets/javascripts/dropdown.js +10 -2
- data/vendor/assets/javascripts/map.js +10 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fa409298b9ff2f1550bf3c88bdcc1e8d34bd3c3
|
4
|
+
data.tar.gz: 6a68a204df538e79dc2538fe8e957dbf999ad3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e868721a756c764680f21e62274d0a8ae08a04e811ad5bd9b0cfab2efdb3471d0e912554de1c77d627578a356e47d05763c6a1f9eb256b0c4cdb49b5c9c14804
|
7
|
+
data.tar.gz: 4287c6a541dffd69415801bc3b2603782088916777614b021122500da9b951c1115dbe843905beac94357c12516359bfde44ca20e9d9f57b93e638f241266438
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Flashgrid
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/flashgrid)
|
4
|
+
|
3
5
|
[Flashgrid](http://flashgrid.drexed.com) is a refreshingly modern responsive web framework for beautiful and faster project development.
|
4
6
|
|
5
7
|
To get started, check out [http://flashgrid.drexed.com](http://flashgrid.drexed.com)!
|
data/lib/flashgrid/version.rb
CHANGED
@@ -28,6 +28,28 @@
|
|
28
28
|
target: window
|
29
29
|
}
|
30
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 && colliderTop <= offsetTop) return 'top'
|
48
|
+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
49
|
+
|
50
|
+
return false
|
51
|
+
}
|
52
|
+
|
31
53
|
Affix.prototype.getPinnedOffset = function () {
|
32
54
|
if (this.pinnedOffset) return this.pinnedOffset
|
33
55
|
this.$element.removeClass(Affix.RESET).addClass('affix')
|
@@ -43,42 +65,40 @@
|
|
43
65
|
Affix.prototype.checkPosition = function () {
|
44
66
|
if (!this.$element.is(':visible')) return
|
45
67
|
|
46
|
-
var
|
47
|
-
var scrollTop = this.$target.scrollTop()
|
48
|
-
var position = this.$element.offset()
|
68
|
+
var height = this.$element.height()
|
49
69
|
var offset = this.options.offset
|
50
70
|
var offsetTop = offset.top
|
51
71
|
var offsetBottom = offset.bottom
|
72
|
+
var scrollHeight = $('body').height()
|
52
73
|
|
53
74
|
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
54
75
|
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
55
76
|
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
56
77
|
|
57
|
-
var affix = this.
|
58
|
-
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
|
59
|
-
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
|
78
|
+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
60
79
|
|
61
|
-
if (this.affixed
|
62
|
-
|
80
|
+
if (this.affixed != affix) {
|
81
|
+
if (this.unpin != null) this.$element.css('top', '')
|
63
82
|
|
64
|
-
|
65
|
-
|
83
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
84
|
+
var e = $.Event(affixType + '.bs.affix')
|
66
85
|
|
67
|
-
|
86
|
+
this.$element.trigger(e)
|
68
87
|
|
69
|
-
|
88
|
+
if (e.isDefaultPrevented()) return
|
70
89
|
|
71
|
-
|
72
|
-
|
90
|
+
this.affixed = affix
|
91
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
73
92
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
93
|
+
this.$element
|
94
|
+
.removeClass(Affix.RESET)
|
95
|
+
.addClass(affixType)
|
96
|
+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
97
|
+
}
|
78
98
|
|
79
99
|
if (affix == 'bottom') {
|
80
100
|
this.$element.offset({
|
81
|
-
top: scrollHeight -
|
101
|
+
top: scrollHeight - height - offsetBottom
|
82
102
|
})
|
83
103
|
}
|
84
104
|
}
|
@@ -88,15 +88,6 @@
|
|
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
|
-
|
100
91
|
// BUTTON DATA-API
|
101
92
|
// ===============
|
102
93
|
|
@@ -107,11 +98,8 @@
|
|
107
98
|
Plugin.call($btn, 'toggle')
|
108
99
|
e.preventDefault()
|
109
100
|
})
|
110
|
-
.on('focus.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
111
|
-
|
112
|
-
})
|
113
|
-
.on('blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
114
|
-
getBtnTarget(e.target).removeClass('focus')
|
101
|
+
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
102
|
+
$(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
|
115
103
|
})
|
116
104
|
|
117
105
|
}(jQuery);
|
@@ -33,7 +33,9 @@
|
|
33
33
|
|
34
34
|
if (e.isDefaultPrevented()) return
|
35
35
|
|
36
|
-
$this
|
36
|
+
$this
|
37
|
+
.trigger('focus')
|
38
|
+
.attr('aria-expanded', 'true')
|
37
39
|
|
38
40
|
$parent
|
39
41
|
.toggleClass('open')
|
@@ -79,11 +81,17 @@
|
|
79
81
|
if (e && e.which === 3) return
|
80
82
|
$(backdrop).remove()
|
81
83
|
$(toggle).each(function () {
|
82
|
-
var $
|
84
|
+
var $this = $(this)
|
85
|
+
var $parent = getParent($this)
|
83
86
|
var relatedTarget = { relatedTarget: this }
|
87
|
+
|
84
88
|
if (!$parent.hasClass('open')) return
|
89
|
+
|
85
90
|
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
|
91
|
+
|
86
92
|
if (e.isDefaultPrevented()) return
|
93
|
+
|
94
|
+
$this.attr('aria-expanded', 'false')
|
87
95
|
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
|
88
96
|
})
|
89
97
|
}
|
@@ -96,11 +96,13 @@ var arrayToLatLng = function(coords, useGeoJSON) {
|
|
96
96
|
var i;
|
97
97
|
|
98
98
|
for (i = 0; i < coords.length; i++) {
|
99
|
-
if (
|
100
|
-
coords[i]
|
101
|
-
|
102
|
-
|
103
|
-
|
99
|
+
if (!(coords[i] instanceof google.maps.LatLng)) {
|
100
|
+
if (coords[i].length > 0 && typeof(coords[i][0]) == "object") {
|
101
|
+
coords[i] = arrayToLatLng(coords[i], useGeoJSON);
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
coords[i] = coordsToLatLngs(coords[i], useGeoJSON);
|
105
|
+
}
|
104
106
|
}
|
105
107
|
}
|
106
108
|
|
@@ -366,6 +368,9 @@ var GMaps = (function(global) {
|
|
366
368
|
});
|
367
369
|
};
|
368
370
|
|
371
|
+
//google.maps.event.addListener(this.map, 'idle', this.hideContextMenu);
|
372
|
+
google.maps.event.addListener(this.map, 'zoom_changed', this.hideContextMenu);
|
373
|
+
|
369
374
|
for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) {
|
370
375
|
var name = events_that_hide_context_menu[ev];
|
371
376
|
|
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.2.
|
4
|
+
version: 2.2.5
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.4.1
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Flashgrid Responsive Web Framework
|