flashgrid 3.1.0 → 3.1.1
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/carousel.js +6 -3
- data/vendor/assets/javascripts/dropdown.js +4 -4
- data/vendor/assets/javascripts/file_input.js +30 -55
- data/vendor/assets/javascripts/map.js +18 -1
- data/vendor/assets/javascripts/modal.js +7 -8
- data/vendor/assets/stylesheets/button.css.scss +6 -9
- data/vendor/assets/stylesheets/form.css.scss +45 -6
- 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: cd3ec69037f078c806099265f08b726c4766efeb
|
4
|
+
data.tar.gz: d9e3590033a4b4f4e909c575ac9eb05a9cfcb96a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fb17d8e10229a9516035e230c321a9b59a5a4c45dc2ff332f1c7fe848ed500a921ae5ecd5a4b71464ef5ea9cc30707a7f46d1d3cba6f260ef4af948b70fbbb0
|
7
|
+
data.tar.gz: 90e019644e24b3f892068fed043f9f78b7e6e30448c4a21b716b8c1243be7f7caf69c370c5a28006b1d9c578def9ebc34ff8cfd99a0819b15ad583f4d7f6fa97
|
data/lib/flashgrid/version.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
// =========================
|
6
6
|
|
7
7
|
var Carousel = function (element, options) {
|
8
|
-
this.$element = $(element)
|
8
|
+
this.$element = $(element)
|
9
9
|
this.$indicators = this.$element.find('.carousel-indicators')
|
10
10
|
this.options = options
|
11
11
|
this.paused =
|
@@ -14,7 +14,9 @@
|
|
14
14
|
this.$active =
|
15
15
|
this.$items = null
|
16
16
|
|
17
|
-
this.options.
|
17
|
+
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
18
|
+
|
19
|
+
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
18
20
|
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
19
21
|
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
20
22
|
}
|
@@ -26,7 +28,8 @@
|
|
26
28
|
Carousel.DEFAULTS = {
|
27
29
|
interval: 5000,
|
28
30
|
pause: 'hover',
|
29
|
-
wrap: true
|
31
|
+
wrap: true,
|
32
|
+
keyboard: true
|
30
33
|
}
|
31
34
|
|
32
35
|
Carousel.prototype.keydown = function (e) {
|
@@ -46,7 +46,7 @@
|
|
46
46
|
}
|
47
47
|
|
48
48
|
Dropdown.prototype.keydown = function (e) {
|
49
|
-
if (!/(38|40|27)/.test(e.
|
49
|
+
if (!/(38|40|27|32)/.test(e.which)) return
|
50
50
|
|
51
51
|
var $this = $(this)
|
52
52
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
var $parent = getParent($this)
|
59
59
|
var isActive = $parent.hasClass('open')
|
60
60
|
|
61
|
-
if (!isActive || (isActive && e.
|
61
|
+
if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
|
62
62
|
if (e.which == 27) $parent.find(toggle).trigger('focus')
|
63
63
|
return $this.trigger('click')
|
64
64
|
}
|
@@ -70,8 +70,8 @@
|
|
70
70
|
|
71
71
|
var index = $items.index($items.filter(':focus'))
|
72
72
|
|
73
|
-
if (e.
|
74
|
-
if (e.
|
73
|
+
if (e.which == 38 && index > 0) index-- // up
|
74
|
+
if (e.which == 40 && index < $items.length - 1) index++ // down
|
75
75
|
if (!~index) index = 0
|
76
76
|
|
77
77
|
$items.eq(index).trigger('focus')
|
@@ -1,94 +1,69 @@
|
|
1
1
|
$(function() {
|
2
2
|
|
3
3
|
$("input[type=file].file-input").each(function(i,el){
|
4
|
-
|
5
|
-
// Maybe some fields don't need to be standardized.
|
6
4
|
if (typeof $(this).attr("data-vendor-style") != 'undefined') {
|
7
5
|
return;
|
8
|
-
}
|
6
|
+
};
|
9
7
|
|
10
|
-
// Set the word to be displayed on the button
|
11
8
|
var buttonWord = "Browse";
|
12
9
|
if (typeof $(this).attr("title") != "undefined") {
|
13
10
|
buttonWord = $(this).attr("title");
|
14
|
-
}
|
11
|
+
};
|
15
12
|
|
16
13
|
var input = $("<div>").append( $(el).eq(0).clone() ).html();
|
17
14
|
|
18
|
-
// Set class used to style the input
|
19
15
|
var view = "btn";
|
20
16
|
if (typeof $(this).attr("data-view") != "undefined") {
|
21
17
|
view = $(this).attr("data-view");
|
22
|
-
}
|
18
|
+
};
|
23
19
|
|
24
20
|
$(el).replaceWith("<a class='"+view+" file-input'>"+buttonWord+input+"</a>");
|
25
21
|
|
26
|
-
// Set class when input has changed change
|
27
22
|
var viewChanged = null;
|
28
23
|
if (typeof $(this).attr("data-view-changed") != "undefined") {
|
29
24
|
viewChanged = $(this).attr("data-view-changed");
|
30
|
-
}
|
25
|
+
};
|
31
26
|
|
32
|
-
// Updated button on change to show add a class which can show an indicator
|
33
27
|
$(".file-input input[type=file]").change(function(){
|
34
28
|
$("a.file-input").addClass(viewChanged);
|
35
29
|
});
|
36
|
-
})
|
37
|
-
|
38
|
-
// After we have found all of the file inputs let's apply a listener for tracking the mouse movement.
|
39
|
-
// This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh.
|
40
|
-
.promise().done( function(){
|
41
|
-
|
42
|
-
// As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor.
|
43
|
-
// This gives us the pointer cursor that FF denies us
|
44
|
-
$(".file-input").mousemove(function(cursor) {
|
45
|
-
|
46
|
-
var input, wrapper, wrapperX, wrapperY, inputWidth, inputHeight, cursorX, cursorY;
|
47
|
-
|
48
|
-
// This wrapper elent (the button surround this file input)
|
49
|
-
wrapper = $(this);
|
50
30
|
|
51
|
-
|
52
|
-
|
31
|
+
var cssHtml = "<style>"+
|
32
|
+
".file-input { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }"+
|
33
|
+
".file-input input[type=file], .btn-file input[type=file]:focus, .btn-file input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; z-index: 99; outline: 0; }"+
|
34
|
+
"</style>";
|
53
35
|
|
54
|
-
|
55
|
-
wrapperX = wrapper.offset().left;
|
36
|
+
$("link[rel=stylesheet]").eq(0).before(cssHtml);
|
56
37
|
|
57
|
-
|
58
|
-
wrapperY = wrapper.offset().top;
|
38
|
+
}).promise().done( function(){
|
59
39
|
|
60
|
-
|
61
|
-
inputWidth
|
62
|
-
|
63
|
-
// The height of the browsers input field
|
64
|
-
inputHeight= input.height();
|
65
|
-
|
66
|
-
//The position of the cursor in the wrapper
|
67
|
-
cursorX = cursor.pageX;
|
68
|
-
cursorY = cursor.pageY;
|
69
|
-
|
70
|
-
//The positions we are to move the invisible file input
|
71
|
-
// The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle
|
72
|
-
moveInputX = cursorX - wrapperX - inputWidth + 20;
|
40
|
+
$(".file-input").mousemove(function(cursor) {
|
41
|
+
var input, wrapper, wrapperX, wrapperY, inputWidth, inputHeight, cursorX, cursorY;
|
73
42
|
|
74
|
-
|
75
|
-
|
43
|
+
wrapper = $(this);
|
44
|
+
input = wrapper.find("input");
|
45
|
+
wrapperX = wrapper.offset().left;
|
46
|
+
wrapperY = wrapper.offset().top;
|
47
|
+
inputWidth = input.width();
|
48
|
+
inputHeight = input.height();
|
49
|
+
cursorX = cursor.pageX;
|
50
|
+
cursorY = cursor.pageY;
|
51
|
+
moveInputX = cursorX - wrapperX - inputWidth + 20;
|
52
|
+
moveInputY = cursorY- wrapperY - (inputHeight/2);
|
76
53
|
|
77
|
-
// Apply the positioning styles to actually move the invisible file input
|
78
54
|
input.css({
|
79
55
|
left:moveInputX,
|
80
56
|
top:moveInputY
|
81
57
|
});
|
82
58
|
});
|
83
|
-
});
|
59
|
+
});
|
84
60
|
|
85
|
-
|
86
|
-
// This ensures they can be easily overridden with developer styles
|
87
|
-
var cssHtml = "<style>"+
|
88
|
-
".file-input { overflow: hidden; position: relative; cursor: pointer; z-index: 1; }"+
|
89
|
-
".file-input input[type=file], .btn-file input[type=file]:focus, .btn-file input[type=file]:hover { position: absolute; top: 0; left: 0; cursor: pointer; opacity: 0; z-index: 99; outline: 0; }"+
|
90
|
-
"</style>";
|
61
|
+
});
|
91
62
|
|
92
|
-
|
63
|
+
function formFileGroup() { "use strict";
|
64
|
+
$('.form-file-input').click();
|
93
65
|
|
94
|
-
|
66
|
+
$('.form-file-input').change(function(){
|
67
|
+
$('.form-file-text').val($('.form-file-input').val());
|
68
|
+
});
|
69
|
+
};
|
@@ -497,7 +497,12 @@ GMaps.prototype.createControl = function(options) {
|
|
497
497
|
}
|
498
498
|
|
499
499
|
if (options.content) {
|
500
|
-
|
500
|
+
if (typeof options.content === 'string') {
|
501
|
+
control.innerHTML = options.content;
|
502
|
+
}
|
503
|
+
else if (options.content instanceof HTMLElement) {
|
504
|
+
control.appendChild(options.content);
|
505
|
+
}
|
501
506
|
}
|
502
507
|
|
503
508
|
if (options.position) {
|
@@ -788,6 +793,7 @@ GMaps.prototype.drawOverlay = function(options) {
|
|
788
793
|
}
|
789
794
|
|
790
795
|
if (options.click) {
|
796
|
+
panes.overlayMouseTarget.appendChild(overlay.el);
|
791
797
|
google.maps.event.addDomListener(overlay.el, 'click', function() {
|
792
798
|
options.click.apply(overlay, [overlay]);
|
793
799
|
});
|
@@ -2051,6 +2057,17 @@ if (!google.maps.Polygon.prototype.containsLatLng) {
|
|
2051
2057
|
};
|
2052
2058
|
}
|
2053
2059
|
|
2060
|
+
if (!google.maps.Circle.prototype.containsLatLng) {
|
2061
|
+
google.maps.Circle.prototype.containsLatLng = function(latLng) {
|
2062
|
+
if (google.maps.geometry) {
|
2063
|
+
return google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(), latLng) <= this.getRadius();
|
2064
|
+
}
|
2065
|
+
else {
|
2066
|
+
return true;
|
2067
|
+
}
|
2068
|
+
};
|
2069
|
+
}
|
2070
|
+
|
2054
2071
|
google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {
|
2055
2072
|
return this.contains(latLng);
|
2056
2073
|
};
|
@@ -157,14 +157,13 @@
|
|
157
157
|
var doAnimate = $.support.transition && animate
|
158
158
|
|
159
159
|
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
160
|
-
.
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
}, this))
|
160
|
+
.prependTo(this.$element)
|
161
|
+
.on('click.dismiss.bs.modal', $.proxy(function (e) {
|
162
|
+
if (e.target !== e.currentTarget) return
|
163
|
+
this.options.backdrop == 'static'
|
164
|
+
? this.$element[0].focus.call(this.$element[0])
|
165
|
+
: this.hide.call(this)
|
166
|
+
}, this))
|
168
167
|
|
169
168
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
170
169
|
|
@@ -225,26 +225,31 @@ input.btn-block {
|
|
225
225
|
.btn-icon {
|
226
226
|
font-size: 17px;
|
227
227
|
line-height: 17px;
|
228
|
+
min-width: 42px;
|
228
229
|
padding: 10px 13px;
|
229
230
|
}
|
230
231
|
.btn-large.btn-icon {
|
231
232
|
font-size: 23px;
|
232
233
|
line-height: 22px;
|
234
|
+
min-width: 50px;
|
233
235
|
padding: 11px 13px;
|
234
236
|
}
|
235
237
|
.btn-medium.btn-icon {
|
236
238
|
font-size: 15px;
|
237
239
|
line-height: 15px;
|
240
|
+
min-width: 34px;
|
238
241
|
padding: 7px 10px 8px 10px;
|
239
242
|
}
|
240
243
|
.btn-small.btn-icon {
|
241
244
|
font-size: 14px;
|
242
245
|
line-height: 14px;
|
243
|
-
|
246
|
+
min-width: 28px;
|
247
|
+
padding: 6px 7px;
|
244
248
|
}
|
245
249
|
.btn-mini.btn-icon {
|
246
250
|
font-size: 11px;
|
247
251
|
line-height: 11px;
|
252
|
+
min-width: 25px;
|
248
253
|
padding: 5px 6px;
|
249
254
|
}
|
250
255
|
|
@@ -311,10 +316,6 @@ input.btn-block {
|
|
311
316
|
border-color: rgba(252,146,35,1);
|
312
317
|
color: rgba(252,146,35,1);
|
313
318
|
}
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
319
|
.btn-outline.btn-purple {
|
319
320
|
border-color: rgba(117,73,170,1);
|
320
321
|
color: rgba(117,73,170,1);
|
@@ -326,10 +327,6 @@ input.btn-block {
|
|
326
327
|
border-color: rgba(137,93,190,1);
|
327
328
|
color: rgba(137,93,190,1);
|
328
329
|
}
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
330
|
.btn-outline.btn-red {
|
334
331
|
border-color: rgba(218,79,46,1);
|
335
332
|
color: rgba(218,79,46,1);
|
@@ -207,19 +207,32 @@ select.form-input-initial-width {
|
|
207
207
|
.form-error-messages li:last-child { padding-bottom: 10px; }
|
208
208
|
.form-textarea-small { height: 80px; }
|
209
209
|
.form-textarea-large { height: 200px; }
|
210
|
-
.form-input
|
210
|
+
.form-file-input {
|
211
|
+
height: 0;
|
212
|
+
margin: 0;
|
213
|
+
padding: 0;
|
214
|
+
position: fixed;
|
215
|
+
visibility: hidden;
|
216
|
+
width: 0;
|
217
|
+
}
|
218
|
+
.form-input-group,
|
219
|
+
.form-file-group {
|
211
220
|
border-collapse: separate;
|
212
221
|
display: table;
|
213
222
|
margin-bottom: 5px;
|
214
223
|
position: relative;
|
215
224
|
}
|
216
|
-
.form-input-group[class*="col-"]
|
225
|
+
.form-input-group[class*="col-"],
|
226
|
+
.form-file-group[class*="col-"] {
|
217
227
|
float: none;
|
218
228
|
padding: 0;
|
219
229
|
}
|
220
230
|
.form-input-group input,
|
221
|
-
.form-input-group-addon
|
222
|
-
.form-
|
231
|
+
.form-input-group-addon,
|
232
|
+
.form-file-group input,
|
233
|
+
.form-file-group-addon { display: table-cell; }
|
234
|
+
.form-input-group input,
|
235
|
+
.form-file-group input { margin: 0; }
|
223
236
|
.form-input-group-addon {
|
224
237
|
background: rgba(245,248,250,1);
|
225
238
|
border: 1px solid rgba(225,232,237,1);
|
@@ -234,8 +247,34 @@ select.form-input-initial-width {
|
|
234
247
|
white-space: nowrap;
|
235
248
|
vertical-align: middle;
|
236
249
|
}
|
237
|
-
.form-
|
238
|
-
|
250
|
+
.form-file-group-addon {
|
251
|
+
-moz-box-sizing: border-box;
|
252
|
+
box-sizing: border-box;
|
253
|
+
line-height: 0;
|
254
|
+
padding: 0;
|
255
|
+
text-align: center;
|
256
|
+
width: 1%;
|
257
|
+
white-space: nowrap;
|
258
|
+
vertical-align: middle;
|
259
|
+
}
|
260
|
+
.form-file-group-button {
|
261
|
+
padding-bottom: 12px;
|
262
|
+
padding-top: 12px;
|
263
|
+
}
|
264
|
+
.form-file-group-addon:first-child .form-file-group-button {
|
265
|
+
border-bottom-right-radius: 0;
|
266
|
+
border-top-right-radius: 0;
|
267
|
+
}
|
268
|
+
.form-file-group-addon:last-child .form-file-group-button {
|
269
|
+
border-bottom-left-radius: 0;
|
270
|
+
border-top-left-radius: 0;
|
271
|
+
}
|
272
|
+
.form-input-group-addon:first-child,
|
273
|
+
.form-file-group-addon:first-child,
|
274
|
+
.form-file-group-addon:first-child .form-file-group-button { border-right: 0; }
|
275
|
+
.form-input-group-addon:last-child,
|
276
|
+
.form-file-group-addon:last-child,
|
277
|
+
.form-file-group-addon:last-child .form-file-group-button { border-left: 0; }
|
239
278
|
.form-input-group-addon input[type="radio"],
|
240
279
|
.form-input-group-addon input[type="checkbox"] { margin: 0; }
|
241
280
|
.form-input-inline {
|
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: 3.1.
|
4
|
+
version: 3.1.1
|
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-10-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.4.
|
154
|
+
rubygems_version: 2.4.2
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Flashgrid Responsive Web Framework
|