paint-rails 0.6.7 → 0.7.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/paint-rails/version.rb +1 -1
- data/paint-rails.gemspec +2 -2
- data/vendor/assets/stylesheets/Brocfile.js +3 -0
- data/vendor/assets/stylesheets/Gemfile +3 -0
- data/vendor/assets/stylesheets/Gemfile.lock +14 -0
- data/vendor/assets/stylesheets/bin/ci +6 -0
- data/vendor/assets/stylesheets/bin/lint +5 -0
- data/vendor/assets/stylesheets/bin/setup +7 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/.bower.json +5 -5
- data/vendor/assets/stylesheets/bower_components/fontawesome/.gitignore +1 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/bower.json +1 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.css +133 -4
- data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.css.map +7 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/css/font-awesome.min.css +2 -2
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.svg +53 -8
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/{spinning.less → animated.less} +6 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/core.less +3 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/font-awesome.less +2 -2
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/icons.less +45 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/mixins.less +3 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/path.less +1 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/variables.less +47 -2
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/{_spinning.scss → _animated.scss} +5 -0
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_core.scss +3 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_icons.scss +45 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_mixins.scss +3 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_path.scss +2 -1
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_variables.scss +47 -2
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/font-awesome.scss +2 -2
- data/vendor/assets/stylesheets/bower_components/foundation/.bower.json +5 -5
- data/vendor/assets/stylesheets/bower_components/foundation/bower.json +1 -1
- data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css +1855 -1667
- data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.css.map +7 -0
- data/vendor/assets/stylesheets/bower_components/foundation/css/foundation.min.css +1 -0
- data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.css +11 -12
- data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.css.map +7 -0
- data/vendor/assets/stylesheets/bower_components/foundation/css/normalize.min.css +1 -0
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.abide.js +156 -62
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.accordion.js +35 -13
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.alert.js +8 -8
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.clearing.js +93 -65
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.dropdown.js +203 -66
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.equalizer.js +57 -27
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.interchange.js +61 -46
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.joyride.js +93 -78
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.js +177 -77
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.magellan.js +81 -55
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.offcanvas.js +28 -28
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.orbit.js +135 -131
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.reveal.js +119 -65
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.slider.js +113 -71
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tab.js +67 -35
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.tooltip.js +76 -37
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.topbar.js +71 -58
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.js +1570 -919
- data/vendor/assets/stylesheets/bower_components/foundation/js/foundation.min.js +5 -4
- data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/fastclick.js +8 -9
- data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/jquery.js +10 -9
- data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/modernizr.js +1 -1
- data/vendor/assets/stylesheets/bower_components/foundation/js/vendor/placeholder.js +2 -2
- data/vendor/assets/stylesheets/bower_components/foundation/package.json +53 -0
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_functions.scss +76 -22
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/_settings.scss +152 -107
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_accordion.scss +8 -8
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +12 -12
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_block-grid.scss +14 -13
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +18 -19
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_button-groups.scss +35 -25
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_buttons.scss +16 -19
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_clearing.scss +60 -47
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +15 -15
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_dropdown.scss +42 -36
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_flex-video.scss +7 -7
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_forms.scss +103 -79
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_global.scss +95 -53
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_grid.scss +42 -25
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_icon-bar.scss +371 -204
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_inline-lists.scss +8 -8
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_joyride.scss +40 -42
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_keystrokes.scss +2 -3
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_labels.scss +7 -7
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_magellan.scss +2 -2
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_offcanvas.scss +184 -179
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_orbit.scss +90 -70
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_pagination.scss +15 -15
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_panels.scss +27 -15
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +16 -16
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_progress-bars.scss +4 -4
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_range-slider.scss +28 -19
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_reveal.scss +37 -50
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_side-nav.scss +15 -11
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_split-buttons.scss +26 -14
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_sub-nav.scss +14 -12
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_switches.scss +32 -21
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tables.scss +8 -8
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tabs.scss +50 -31
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_thumbs.scss +8 -8
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_tooltips.scss +25 -25
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_top-bar.scss +197 -145
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_type.scss +20 -81
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_visibility.scss +99 -15
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation.scss +37 -38
- data/vendor/assets/stylesheets/bower_components/foundation/scss/normalize.scss +8 -11
- data/vendor/assets/stylesheets/bower_components/jquery/.bower.json +5 -4
- data/vendor/assets/stylesheets/bower_components/jquery/bower.json +2 -1
- data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.js +9 -4
- data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.js +4 -4
- data/vendor/assets/stylesheets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/vendor/assets/stylesheets/bower_components/jquery/src/core.js +6 -1
- data/vendor/assets/stylesheets/circle.yml +17 -0
- data/vendor/assets/stylesheets/components/_button.scss +120 -21
- data/vendor/assets/stylesheets/components/_dropdown.scss +316 -14
- data/vendor/assets/stylesheets/components/_flip-panel.scss +191 -0
- data/vendor/assets/stylesheets/components/_form.scss +346 -0
- data/vendor/assets/stylesheets/components/_layout.scss +261 -121
- data/vendor/assets/stylesheets/components/_panel.scss +91 -0
- data/vendor/assets/stylesheets/components/_quick-jump.scss +267 -0
- data/vendor/assets/stylesheets/components/_side-panel.scss +154 -0
- data/vendor/assets/stylesheets/components/_table.scss +105 -0
- data/vendor/assets/stylesheets/components/_typography.scss +34 -3
- data/vendor/assets/stylesheets/components/_vertical-align.scss +9 -0
- data/vendor/assets/stylesheets/globals/_functions.scss +69 -0
- data/vendor/assets/stylesheets/globals/_mixins.scss +23 -1
- data/vendor/assets/stylesheets/globals/_settings.scss +35 -36
- data/vendor/assets/stylesheets/paint.scss +22 -14
- metadata +29 -8
- data/vendor/assets/stylesheets/bower_components/fontawesome/less/extras.less +0 -2
- data/vendor/assets/stylesheets/bower_components/fontawesome/scss/_extras.scss +0 -44
- data/vendor/assets/stylesheets/bower_components/foundation/scss/foundation/components/_toolbar.scss +0 -70
@@ -14,7 +14,7 @@
|
|
14
14
|
var head = $('head');
|
15
15
|
|
16
16
|
while (i--) {
|
17
|
-
if(head.has('.' + class_array[i]).length === 0) {
|
17
|
+
if (head.has('.' + class_array[i]).length === 0) {
|
18
18
|
head.append('<meta class="' + class_array[i] + '" />');
|
19
19
|
}
|
20
20
|
}
|
@@ -22,15 +22,19 @@
|
|
22
22
|
|
23
23
|
header_helpers([
|
24
24
|
'foundation-mq-small',
|
25
|
+
'foundation-mq-small-only',
|
25
26
|
'foundation-mq-medium',
|
27
|
+
'foundation-mq-medium-only',
|
26
28
|
'foundation-mq-large',
|
29
|
+
'foundation-mq-large-only',
|
27
30
|
'foundation-mq-xlarge',
|
31
|
+
'foundation-mq-xlarge-only',
|
28
32
|
'foundation-mq-xxlarge',
|
29
33
|
'foundation-data-attribute-namespace']);
|
30
34
|
|
31
35
|
// Enable FastClick if present
|
32
36
|
|
33
|
-
$(function() {
|
37
|
+
$(function () {
|
34
38
|
if (typeof FastClick !== 'undefined') {
|
35
39
|
// Don't attach to body if undefined
|
36
40
|
if (typeof document.body !== 'undefined') {
|
@@ -48,7 +52,9 @@
|
|
48
52
|
var cont;
|
49
53
|
if (context.jquery) {
|
50
54
|
cont = context[0];
|
51
|
-
if (!cont)
|
55
|
+
if (!cont) {
|
56
|
+
return context;
|
57
|
+
}
|
52
58
|
} else {
|
53
59
|
cont = context;
|
54
60
|
}
|
@@ -65,8 +71,12 @@
|
|
65
71
|
|
66
72
|
var attr_name = function (init) {
|
67
73
|
var arr = [];
|
68
|
-
if (!init)
|
69
|
-
|
74
|
+
if (!init) {
|
75
|
+
arr.push('data');
|
76
|
+
}
|
77
|
+
if (this.namespace.length > 0) {
|
78
|
+
arr.push(this.namespace);
|
79
|
+
}
|
70
80
|
arr.push(this.name);
|
71
81
|
|
72
82
|
return arr.join('-');
|
@@ -96,25 +106,20 @@
|
|
96
106
|
|
97
107
|
var bindings = function (method, options) {
|
98
108
|
var self = this,
|
99
|
-
|
109
|
+
bind = function(){
|
110
|
+
var $this = S(this),
|
111
|
+
should_bind_events = !$this.data(self.attr_name(true) + '-init');
|
112
|
+
$this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this)));
|
100
113
|
|
114
|
+
if (should_bind_events) {
|
115
|
+
self.events(this);
|
116
|
+
}
|
117
|
+
};
|
101
118
|
|
102
119
|
if (S(this.scope).is('[' + this.attr_name() +']')) {
|
103
|
-
|
104
|
-
|
105
|
-
if (should_bind_events) {
|
106
|
-
this.events(this.scope);
|
107
|
-
}
|
108
|
-
|
120
|
+
bind.call(this.scope);
|
109
121
|
} else {
|
110
|
-
S('[' + this.attr_name() +']', this.scope).each(
|
111
|
-
var should_bind_events = !S(this).data(self.attr_name(true) + '-init');
|
112
|
-
S(this).data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options(S(this))));
|
113
|
-
|
114
|
-
if (should_bind_events) {
|
115
|
-
self.events(this);
|
116
|
-
}
|
117
|
-
});
|
122
|
+
S('[' + this.attr_name() +']', this.scope).each(bind);
|
118
123
|
}
|
119
124
|
// # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating.
|
120
125
|
if (typeof method === 'string') {
|
@@ -152,42 +157,52 @@
|
|
152
157
|
}
|
153
158
|
};
|
154
159
|
|
155
|
-
|
156
|
-
https://github.com/paulirish/matchMedia.js
|
157
|
-
*/
|
160
|
+
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
|
158
161
|
|
159
|
-
window.matchMedia
|
162
|
+
window.matchMedia || (window.matchMedia = function() {
|
163
|
+
"use strict";
|
160
164
|
|
161
|
-
|
165
|
+
// For browsers that support matchMedium api such as IE 9 and webkit
|
166
|
+
var styleMedia = (window.styleMedia || window.media);
|
162
167
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
div = doc.createElement( "div" );
|
168
|
+
// For those that don't support matchMedium
|
169
|
+
if (!styleMedia) {
|
170
|
+
var style = document.createElement('style'),
|
171
|
+
script = document.getElementsByTagName('script')[0],
|
172
|
+
info = null;
|
169
173
|
|
170
|
-
|
171
|
-
|
172
|
-
fakeBody.style.background = "none";
|
173
|
-
fakeBody.appendChild(div);
|
174
|
+
style.type = 'text/css';
|
175
|
+
style.id = 'matchmediajs-test';
|
174
176
|
|
175
|
-
|
177
|
+
script.parentNode.insertBefore(style, script);
|
176
178
|
|
177
|
-
|
179
|
+
// 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
|
180
|
+
info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
|
178
181
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
+
styleMedia = {
|
183
|
+
matchMedium: function(media) {
|
184
|
+
var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
|
182
185
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
186
|
+
// 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
|
187
|
+
if (style.styleSheet) {
|
188
|
+
style.styleSheet.cssText = text;
|
189
|
+
} else {
|
190
|
+
style.textContent = text;
|
191
|
+
}
|
187
192
|
|
188
|
-
|
193
|
+
// Test if media query is true or false
|
194
|
+
return info.width === '1px';
|
195
|
+
}
|
196
|
+
};
|
197
|
+
}
|
189
198
|
|
190
|
-
|
199
|
+
return function(media) {
|
200
|
+
return {
|
201
|
+
matches: styleMedia.matchMedium(media || 'all'),
|
202
|
+
media: media || 'all'
|
203
|
+
};
|
204
|
+
};
|
205
|
+
}());
|
191
206
|
|
192
207
|
/*
|
193
208
|
* jquery.requestAnimationFrame
|
@@ -198,7 +213,8 @@
|
|
198
213
|
* Licensed under the MIT license.
|
199
214
|
*/
|
200
215
|
|
201
|
-
(function(
|
216
|
+
(function(jQuery) {
|
217
|
+
|
202
218
|
|
203
219
|
// requestAnimationFrame polyfill adapted from Erik Möller
|
204
220
|
// fixes from Paul Irish and Tino Zijdel
|
@@ -213,10 +229,10 @@
|
|
213
229
|
jqueryFxAvailable = 'undefined' !== typeof jQuery.fx;
|
214
230
|
|
215
231
|
for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
|
216
|
-
requestAnimationFrame = window[ vendors[lastTime] +
|
232
|
+
requestAnimationFrame = window[ vendors[lastTime] + 'RequestAnimationFrame' ];
|
217
233
|
cancelAnimationFrame = cancelAnimationFrame ||
|
218
|
-
window[ vendors[lastTime] +
|
219
|
-
window[ vendors[lastTime] +
|
234
|
+
window[ vendors[lastTime] + 'CancelAnimationFrame' ] ||
|
235
|
+
window[ vendors[lastTime] + 'CancelRequestAnimationFrame' ];
|
220
236
|
}
|
221
237
|
|
222
238
|
function raf() {
|
@@ -264,8 +280,7 @@
|
|
264
280
|
|
265
281
|
}
|
266
282
|
|
267
|
-
}(
|
268
|
-
|
283
|
+
}( $ ));
|
269
284
|
|
270
285
|
function removeQuotes (string) {
|
271
286
|
if (typeof string === 'string' || string instanceof String) {
|
@@ -278,20 +293,24 @@
|
|
278
293
|
window.Foundation = {
|
279
294
|
name : 'Foundation',
|
280
295
|
|
281
|
-
version : '5.
|
296
|
+
version : '5.5.2',
|
282
297
|
|
283
298
|
media_queries : {
|
284
|
-
small
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
299
|
+
'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
300
|
+
'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
301
|
+
'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
302
|
+
'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
303
|
+
'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
304
|
+
'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
305
|
+
'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
306
|
+
'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
|
307
|
+
'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
|
289
308
|
},
|
290
309
|
|
291
310
|
stylesheet : $('<style></style>').appendTo('head')[0].sheet,
|
292
311
|
|
293
|
-
global: {
|
294
|
-
namespace: undefined
|
312
|
+
global : {
|
313
|
+
namespace : undefined
|
295
314
|
},
|
296
315
|
|
297
316
|
init : function (scope, libraries, method, options, response) {
|
@@ -316,7 +335,7 @@
|
|
316
335
|
}
|
317
336
|
}
|
318
337
|
|
319
|
-
S(window).load(function(){
|
338
|
+
S(window).load(function () {
|
320
339
|
S(window)
|
321
340
|
.trigger('resize.fndtn.clearing')
|
322
341
|
.trigger('resize.fndtn.dropdown')
|
@@ -337,15 +356,14 @@
|
|
337
356
|
|
338
357
|
if (args && args.hasOwnProperty(lib)) {
|
339
358
|
if (typeof this.libs[lib].settings !== 'undefined') {
|
340
|
-
|
341
|
-
}
|
342
|
-
|
343
|
-
$.extend(true, this.libs[lib].defaults, args[lib]);
|
359
|
+
$.extend(true, this.libs[lib].settings, args[lib]);
|
360
|
+
} else if (typeof this.libs[lib].defaults !== 'undefined') {
|
361
|
+
$.extend(true, this.libs[lib].defaults, args[lib]);
|
344
362
|
}
|
345
363
|
return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
|
346
364
|
}
|
347
365
|
|
348
|
-
args = args instanceof Array ? args : new Array(args);
|
366
|
+
args = args instanceof Array ? args : new Array(args);
|
349
367
|
return this.libs[lib].init.apply(this.libs[lib], args);
|
350
368
|
}
|
351
369
|
|
@@ -374,7 +392,7 @@
|
|
374
392
|
}
|
375
393
|
},
|
376
394
|
|
377
|
-
set_namespace: function () {
|
395
|
+
set_namespace : function () {
|
378
396
|
|
379
397
|
// Description:
|
380
398
|
// Don't bother reading the namespace out of the meta tag
|
@@ -462,12 +480,16 @@
|
|
462
480
|
var context = this, args = arguments;
|
463
481
|
var later = function () {
|
464
482
|
timeout = null;
|
465
|
-
if (!immediate)
|
483
|
+
if (!immediate) {
|
484
|
+
result = func.apply(context, args);
|
485
|
+
}
|
466
486
|
};
|
467
487
|
var callNow = immediate && !timeout;
|
468
488
|
clearTimeout(timeout);
|
469
489
|
timeout = setTimeout(later, delay);
|
470
|
-
if (callNow)
|
490
|
+
if (callNow) {
|
491
|
+
result = func.apply(context, args);
|
492
|
+
}
|
471
493
|
return result;
|
472
494
|
};
|
473
495
|
},
|
@@ -504,11 +526,13 @@
|
|
504
526
|
ii = opts_arr.length;
|
505
527
|
|
506
528
|
function isNumber (o) {
|
507
|
-
return !
|
529
|
+
return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true;
|
508
530
|
}
|
509
531
|
|
510
532
|
function trim (str) {
|
511
|
-
if (typeof str === 'string')
|
533
|
+
if (typeof str === 'string') {
|
534
|
+
return $.trim(str);
|
535
|
+
}
|
512
536
|
return str;
|
513
537
|
}
|
514
538
|
|
@@ -516,8 +540,12 @@
|
|
516
540
|
p = opts_arr[ii].split(':');
|
517
541
|
p = [p[0], p.slice(1).join(':')];
|
518
542
|
|
519
|
-
if (/true/i.test(p[1]))
|
520
|
-
|
543
|
+
if (/true/i.test(p[1])) {
|
544
|
+
p[1] = true;
|
545
|
+
}
|
546
|
+
if (/false/i.test(p[1])) {
|
547
|
+
p[1] = false;
|
548
|
+
}
|
521
549
|
if (isNumber(p[1])) {
|
522
550
|
if (p[1].indexOf('.') === -1) {
|
523
551
|
p[1] = parseInt(p[1], 10);
|
@@ -543,7 +571,7 @@
|
|
543
571
|
//
|
544
572
|
// Class (String): Class name for the generated <meta> tag
|
545
573
|
register_media : function (media, media_class) {
|
546
|
-
if(Foundation.media_queries[media] === undefined) {
|
574
|
+
if (Foundation.media_queries[media] === undefined) {
|
547
575
|
$('head').append('<meta class="' + media_class + '"/>');
|
548
576
|
Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
|
549
577
|
}
|
@@ -565,7 +593,7 @@
|
|
565
593
|
|
566
594
|
if (query !== undefined) {
|
567
595
|
Foundation.stylesheet.insertRule('@media ' +
|
568
|
-
Foundation.media_queries[media] + '{ ' + rule + ' }');
|
596
|
+
Foundation.media_queries[media] + '{ ' + rule + ' }', Foundation.stylesheet.cssRules.length);
|
569
597
|
}
|
570
598
|
}
|
571
599
|
},
|
@@ -581,7 +609,19 @@
|
|
581
609
|
var self = this,
|
582
610
|
unloaded = images.length;
|
583
611
|
|
584
|
-
|
612
|
+
function pictures_has_height(images) {
|
613
|
+
var pictures_number = images.length;
|
614
|
+
|
615
|
+
for (var i = pictures_number - 1; i >= 0; i--) {
|
616
|
+
if(images.attr('height') === undefined) {
|
617
|
+
return false;
|
618
|
+
};
|
619
|
+
};
|
620
|
+
|
621
|
+
return true;
|
622
|
+
}
|
623
|
+
|
624
|
+
if (unloaded === 0 || pictures_has_height(images)) {
|
585
625
|
callback(images);
|
586
626
|
}
|
587
627
|
|
@@ -605,10 +645,70 @@
|
|
605
645
|
// Returns:
|
606
646
|
// Rand (String): Pseudo-random, alphanumeric string.
|
607
647
|
random_str : function () {
|
608
|
-
if (!this.fidx)
|
648
|
+
if (!this.fidx) {
|
649
|
+
this.fidx = 0;
|
650
|
+
}
|
609
651
|
this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-');
|
610
652
|
|
611
653
|
return this.prefix + (this.fidx++).toString(36);
|
654
|
+
},
|
655
|
+
|
656
|
+
// Description:
|
657
|
+
// Helper for window.matchMedia
|
658
|
+
//
|
659
|
+
// Arguments:
|
660
|
+
// mq (String): Media query
|
661
|
+
//
|
662
|
+
// Returns:
|
663
|
+
// (Boolean): Whether the media query passes or not
|
664
|
+
match : function (mq) {
|
665
|
+
return window.matchMedia(mq).matches;
|
666
|
+
},
|
667
|
+
|
668
|
+
// Description:
|
669
|
+
// Helpers for checking Foundation default media queries with JS
|
670
|
+
//
|
671
|
+
// Returns:
|
672
|
+
// (Boolean): Whether the media query passes or not
|
673
|
+
|
674
|
+
is_small_up : function () {
|
675
|
+
return this.match(Foundation.media_queries.small);
|
676
|
+
},
|
677
|
+
|
678
|
+
is_medium_up : function () {
|
679
|
+
return this.match(Foundation.media_queries.medium);
|
680
|
+
},
|
681
|
+
|
682
|
+
is_large_up : function () {
|
683
|
+
return this.match(Foundation.media_queries.large);
|
684
|
+
},
|
685
|
+
|
686
|
+
is_xlarge_up : function () {
|
687
|
+
return this.match(Foundation.media_queries.xlarge);
|
688
|
+
},
|
689
|
+
|
690
|
+
is_xxlarge_up : function () {
|
691
|
+
return this.match(Foundation.media_queries.xxlarge);
|
692
|
+
},
|
693
|
+
|
694
|
+
is_small_only : function () {
|
695
|
+
return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
|
696
|
+
},
|
697
|
+
|
698
|
+
is_medium_only : function () {
|
699
|
+
return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
|
700
|
+
},
|
701
|
+
|
702
|
+
is_large_only : function () {
|
703
|
+
return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up();
|
704
|
+
},
|
705
|
+
|
706
|
+
is_xlarge_only : function () {
|
707
|
+
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up();
|
708
|
+
},
|
709
|
+
|
710
|
+
is_xxlarge_only : function () {
|
711
|
+
return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up();
|
612
712
|
}
|
613
713
|
}
|
614
714
|
};
|
data/vendor/assets/stylesheets/bower_components/foundation/js/foundation/foundation.magellan.js
CHANGED
@@ -4,14 +4,17 @@
|
|
4
4
|
Foundation.libs['magellan-expedition'] = {
|
5
5
|
name : 'magellan-expedition',
|
6
6
|
|
7
|
-
version : '5.
|
7
|
+
version : '5.5.2',
|
8
8
|
|
9
9
|
settings : {
|
10
|
-
active_class: 'active',
|
11
|
-
threshold: 0, // pixels from the top of the expedition for it to become fixes
|
12
|
-
destination_threshold: 20, // pixels from the top of destination for it to be considered active
|
13
|
-
throttle_delay: 30, // calculation throttling to increase framerate
|
14
|
-
fixed_top: 0 // top distance in pixels assigend to the fixed element on scroll
|
10
|
+
active_class : 'active',
|
11
|
+
threshold : 0, // pixels from the top of the expedition for it to become fixes
|
12
|
+
destination_threshold : 20, // pixels from the top of destination for it to be considered active
|
13
|
+
throttle_delay : 30, // calculation throttling to increase framerate
|
14
|
+
fixed_top : 0, // top distance in pixels assigend to the fixed element on scroll
|
15
|
+
offset_by_height : true, // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
|
16
|
+
duration : 700, // animation duration time
|
17
|
+
easing : 'swing' // animation easing
|
15
18
|
},
|
16
19
|
|
17
20
|
init : function (scope, method, options) {
|
@@ -29,49 +32,53 @@
|
|
29
32
|
|
30
33
|
S(self.scope)
|
31
34
|
.off('.magellan')
|
32
|
-
.on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
.on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href*=#]', function (e) {
|
36
|
+
var sameHost = ((this.hostname === location.hostname) || !this.hostname),
|
37
|
+
samePath = self.filterPathname(location.pathname) === self.filterPathname(this.pathname),
|
38
|
+
testHash = this.hash.replace(/(:|\.|\/)/g, '\\$1'),
|
39
|
+
anchor = this;
|
40
|
+
|
41
|
+
if (sameHost && samePath && testHash) {
|
42
|
+
e.preventDefault();
|
43
|
+
var expedition = $(this).closest('[' + self.attr_name() + ']'),
|
44
|
+
settings = expedition.data('magellan-expedition-init'),
|
45
|
+
hash = this.hash.split('#').join(''),
|
46
|
+
target = $('a[name="' + hash + '"]');
|
47
|
+
|
48
|
+
if (target.length === 0) {
|
49
|
+
target = $('#' + hash);
|
38
50
|
|
39
|
-
if (target.length === 0) {
|
40
|
-
target = $('#'+hash);
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
// Account for expedition height if fixed position
|
46
|
-
var scroll_top = target.offset().top - settings.destination_threshold + 1;
|
47
|
-
scroll_top = scroll_top - expedition.outerHeight();
|
48
|
-
|
49
|
-
$('html, body').stop().animate({
|
50
|
-
'scrollTop': scroll_top
|
51
|
-
}, 700, 'swing', function () {
|
52
|
-
if(history.pushState) {
|
53
|
-
history.pushState(null, null, '#'+hash);
|
54
51
|
}
|
55
|
-
|
56
|
-
|
52
|
+
|
53
|
+
// Account for expedition height if fixed position
|
54
|
+
var scroll_top = target.offset().top - settings.destination_threshold + 1;
|
55
|
+
if (settings.offset_by_height) {
|
56
|
+
scroll_top = scroll_top - expedition.outerHeight();
|
57
57
|
}
|
58
|
-
|
58
|
+
$('html, body').stop().animate({
|
59
|
+
'scrollTop' : scroll_top
|
60
|
+
}, settings.duration, settings.easing, function () {
|
61
|
+
if (history.pushState) {
|
62
|
+
history.pushState(null, null, anchor.pathname + '#' + hash);
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
location.hash = anchor.pathname + '#' + hash;
|
66
|
+
}
|
67
|
+
});
|
68
|
+
}
|
59
69
|
})
|
60
70
|
.on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
|
61
|
-
|
62
|
-
$(window)
|
63
|
-
.on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
|
64
71
|
},
|
65
72
|
|
66
|
-
check_for_arrivals : function() {
|
73
|
+
check_for_arrivals : function () {
|
67
74
|
var self = this;
|
68
75
|
self.update_arrivals();
|
69
76
|
self.update_expedition_positions();
|
70
77
|
},
|
71
78
|
|
72
|
-
set_expedition_position : function() {
|
79
|
+
set_expedition_position : function () {
|
73
80
|
var self = this;
|
74
|
-
$('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
|
81
|
+
$('[' + this.attr_name() + '=fixed]', self.scope).each(function (idx, el) {
|
75
82
|
var expedition = $(this),
|
76
83
|
settings = expedition.data('magellan-expedition-init'),
|
77
84
|
styles = expedition.attr('styles'), // save styles
|
@@ -82,54 +89,55 @@
|
|
82
89
|
|
83
90
|
//set fixed-top by attribute
|
84
91
|
fixed_top = parseInt(expedition.data('magellan-fixed-top'));
|
85
|
-
if(!isNaN(fixed_top))
|
86
|
-
|
92
|
+
if (!isNaN(fixed_top)) {
|
93
|
+
self.settings.fixed_top = fixed_top;
|
94
|
+
}
|
87
95
|
|
88
96
|
expedition.data(self.data_attr('magellan-top-offset'), top_offset);
|
89
97
|
expedition.attr('style', styles);
|
90
98
|
});
|
91
99
|
},
|
92
100
|
|
93
|
-
update_expedition_positions : function() {
|
101
|
+
update_expedition_positions : function () {
|
94
102
|
var self = this,
|
95
103
|
window_top_offset = $(window).scrollTop();
|
96
104
|
|
97
|
-
$('[' + this.attr_name() + '=fixed]', self.scope).each(function() {
|
105
|
+
$('[' + this.attr_name() + '=fixed]', self.scope).each(function () {
|
98
106
|
var expedition = $(this),
|
99
107
|
settings = expedition.data('magellan-expedition-init'),
|
100
108
|
styles = expedition.attr('style'), // save styles
|
101
109
|
top_offset = expedition.data('magellan-top-offset');
|
102
110
|
|
103
111
|
//scroll to the top distance
|
104
|
-
if (window_top_offset+self.settings.fixed_top >= top_offset) {
|
112
|
+
if (window_top_offset + self.settings.fixed_top >= top_offset) {
|
105
113
|
// Placeholder allows height calculations to be consistent even when
|
106
114
|
// appearing to switch between fixed/non-fixed placement
|
107
115
|
var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
|
108
116
|
if (placeholder.length === 0) {
|
109
117
|
placeholder = expedition.clone();
|
110
118
|
placeholder.removeAttr(self.attr_name());
|
111
|
-
placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
|
119
|
+
placeholder.attr(self.add_namespace('data-magellan-expedition-clone'), '');
|
112
120
|
expedition.before(placeholder);
|
113
121
|
}
|
114
|
-
expedition.css({position:'fixed', top: settings.fixed_top}).addClass('fixed');
|
122
|
+
expedition.css({position :'fixed', top : settings.fixed_top}).addClass('fixed');
|
115
123
|
} else {
|
116
124
|
expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
|
117
|
-
expedition.attr('style',styles).css('position','').css('top','').removeClass('fixed');
|
125
|
+
expedition.attr('style', styles).css('position', '').css('top', '').removeClass('fixed');
|
118
126
|
}
|
119
127
|
});
|
120
128
|
},
|
121
129
|
|
122
|
-
update_arrivals : function() {
|
130
|
+
update_arrivals : function () {
|
123
131
|
var self = this,
|
124
132
|
window_top_offset = $(window).scrollTop();
|
125
133
|
|
126
|
-
$('[' + this.attr_name() + ']', self.scope).each(function() {
|
134
|
+
$('[' + this.attr_name() + ']', self.scope).each(function () {
|
127
135
|
var expedition = $(this),
|
128
136
|
settings = expedition.data(self.attr_name(true) + '-init'),
|
129
137
|
offsets = self.offsets(expedition, window_top_offset),
|
130
138
|
arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
|
131
139
|
active_item = false;
|
132
|
-
offsets.each(function(idx, item) {
|
140
|
+
offsets.each(function (idx, item) {
|
133
141
|
if (item.viewport_offset >= item.top_offset) {
|
134
142
|
var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
|
135
143
|
arrivals.not(item.arrival).removeClass(settings.active_class);
|
@@ -139,20 +147,26 @@
|
|
139
147
|
}
|
140
148
|
});
|
141
149
|
|
142
|
-
if (!active_item)
|
150
|
+
if (!active_item) {
|
151
|
+
arrivals.removeClass(settings.active_class);
|
152
|
+
}
|
143
153
|
});
|
144
154
|
},
|
145
155
|
|
146
|
-
offsets : function(expedition, window_offset) {
|
156
|
+
offsets : function (expedition, window_offset) {
|
147
157
|
var self = this,
|
148
158
|
settings = expedition.data(self.attr_name(true) + '-init'),
|
149
159
|
viewport_offset = window_offset;
|
150
160
|
|
151
|
-
return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function(idx, el) {
|
161
|
+
return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function (idx, el) {
|
152
162
|
var name = $(this).data(self.data_attr('magellan-arrival')),
|
153
163
|
dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
|
154
164
|
if (dest.length > 0) {
|
155
|
-
var top_offset =
|
165
|
+
var top_offset = dest.offset().top - settings.destination_threshold;
|
166
|
+
if (settings.offset_by_height) {
|
167
|
+
top_offset = top_offset - expedition.outerHeight();
|
168
|
+
}
|
169
|
+
top_offset = Math.floor(top_offset);
|
156
170
|
return {
|
157
171
|
destination : dest,
|
158
172
|
arrival : $(this),
|
@@ -160,14 +174,18 @@
|
|
160
174
|
viewport_offset : viewport_offset
|
161
175
|
}
|
162
176
|
}
|
163
|
-
}).sort(function(a, b) {
|
164
|
-
if (a.top_offset < b.top_offset)
|
165
|
-
|
177
|
+
}).sort(function (a, b) {
|
178
|
+
if (a.top_offset < b.top_offset) {
|
179
|
+
return -1;
|
180
|
+
}
|
181
|
+
if (a.top_offset > b.top_offset) {
|
182
|
+
return 1;
|
183
|
+
}
|
166
184
|
return 0;
|
167
185
|
});
|
168
186
|
},
|
169
187
|
|
170
|
-
data_attr: function (str) {
|
188
|
+
data_attr : function (str) {
|
171
189
|
if (this.namespace.length > 0) {
|
172
190
|
return this.namespace + '-' + str;
|
173
191
|
}
|
@@ -180,6 +198,14 @@
|
|
180
198
|
this.S(window).off('.magellan');
|
181
199
|
},
|
182
200
|
|
201
|
+
filterPathname : function (pathname) {
|
202
|
+
pathname = pathname || '';
|
203
|
+
return pathname
|
204
|
+
.replace(/^\//,'')
|
205
|
+
.replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
|
206
|
+
.replace(/\/$/,'');
|
207
|
+
},
|
208
|
+
|
183
209
|
reflow : function () {
|
184
210
|
var self = this;
|
185
211
|
// remove placeholder expeditions used for height calculation purposes
|