catscope 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/bower.json +1 -0
- data/assets/bower_components/foundation/LICENSE +22 -0
- data/assets/bower_components/foundation/README.md +46 -0
- data/assets/bower_components/foundation/bower.json +2 -4
- data/assets/bower_components/foundation/css/foundation.css +1695 -1230
- data/assets/bower_components/foundation/css/foundation.css.map +1 -1
- data/assets/bower_components/foundation/css/foundation.min.css +1 -0
- data/assets/bower_components/foundation/css/normalize.css +9 -12
- data/assets/bower_components/foundation/css/normalize.css.map +1 -1
- data/assets/bower_components/foundation/css/normalize.min.css +1 -0
- data/assets/bower_components/foundation/js/foundation/foundation.abide.js +171 -75
- data/assets/bower_components/foundation/js/foundation/foundation.accordion.js +70 -12
- data/assets/bower_components/foundation/js/foundation/foundation.alert.js +5 -5
- data/assets/bower_components/foundation/js/foundation/foundation.clearing.js +84 -40
- data/assets/bower_components/foundation/js/foundation/foundation.dropdown.js +104 -79
- data/assets/bower_components/foundation/js/foundation/foundation.equalizer.js +57 -26
- data/assets/bower_components/foundation/js/foundation/foundation.interchange.js +50 -38
- data/assets/bower_components/foundation/js/foundation/foundation.joyride.js +121 -110
- data/assets/bower_components/foundation/js/foundation/foundation.js +121 -79
- data/assets/bower_components/foundation/js/foundation/foundation.magellan.js +75 -59
- data/assets/bower_components/foundation/js/foundation/foundation.offcanvas.js +95 -22
- data/assets/bower_components/foundation/js/foundation/foundation.orbit.js +127 -123
- data/assets/bower_components/foundation/js/foundation/foundation.reveal.js +147 -69
- data/assets/bower_components/foundation/js/foundation/foundation.slider.js +101 -72
- data/assets/bower_components/foundation/js/foundation/foundation.tab.js +52 -39
- data/assets/bower_components/foundation/js/foundation/foundation.tooltip.js +97 -49
- data/assets/bower_components/foundation/js/foundation/foundation.topbar.js +70 -57
- data/assets/bower_components/foundation/js/foundation.js +1544 -951
- data/assets/bower_components/foundation/js/foundation.min.js +5 -4
- data/assets/bower_components/foundation/js/vendor/fastclick.js +8 -9
- data/assets/bower_components/foundation/js/vendor/jquery.js +6 -6
- data/assets/bower_components/foundation/js/vendor/modernizr.js +1 -1
- data/assets/bower_components/foundation/package.json +57 -0
- data/assets/bower_components/foundation/scss/foundation/_functions.scss +53 -43
- data/assets/bower_components/foundation/scss/foundation/_settings.scss +59 -37
- data/assets/bower_components/foundation/scss/foundation/components/_accordion.scss +12 -8
- data/assets/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +12 -12
- data/assets/bower_components/foundation/scss/foundation/components/_block-grid.scss +14 -13
- data/assets/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +19 -19
- data/assets/bower_components/foundation/scss/foundation/components/_button-groups.scss +33 -25
- data/assets/bower_components/foundation/scss/foundation/components/_buttons.scss +30 -28
- data/assets/bower_components/foundation/scss/foundation/components/_clearing.scss +51 -47
- data/assets/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +10 -11
- data/assets/bower_components/foundation/scss/foundation/components/_dropdown.scss +45 -38
- data/assets/bower_components/foundation/scss/foundation/components/_flex-video.scss +7 -7
- data/assets/bower_components/foundation/scss/foundation/components/_forms.scss +99 -62
- data/assets/bower_components/foundation/scss/foundation/components/_global.scss +152 -67
- data/assets/bower_components/foundation/scss/foundation/components/_grid.scss +39 -36
- data/assets/bower_components/foundation/scss/foundation/components/_icon-bar.scss +337 -235
- data/assets/bower_components/foundation/scss/foundation/components/_inline-lists.scss +9 -8
- data/assets/bower_components/foundation/scss/foundation/components/_joyride.scss +40 -42
- data/assets/bower_components/foundation/scss/foundation/components/_keystrokes.scss +2 -3
- data/assets/bower_components/foundation/scss/foundation/components/_labels.scss +6 -6
- data/assets/bower_components/foundation/scss/foundation/components/_magellan.scss +2 -2
- data/assets/bower_components/foundation/scss/foundation/components/_offcanvas.scss +259 -168
- data/assets/bower_components/foundation/scss/foundation/components/_orbit.scss +82 -62
- data/assets/bower_components/foundation/scss/foundation/components/_pagination.scss +16 -15
- data/assets/bower_components/foundation/scss/foundation/components/_panels.scss +21 -15
- data/assets/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +16 -16
- data/assets/bower_components/foundation/scss/foundation/components/_progress-bars.scss +10 -4
- data/assets/bower_components/foundation/scss/foundation/components/_range-slider.scss +28 -20
- data/assets/bower_components/foundation/scss/foundation/components/_reveal.scss +38 -28
- data/assets/bower_components/foundation/scss/foundation/components/_side-nav.scss +15 -11
- data/assets/bower_components/foundation/scss/foundation/components/_split-buttons.scss +22 -18
- data/assets/bower_components/foundation/scss/foundation/components/_sub-nav.scss +14 -12
- data/assets/bower_components/foundation/scss/foundation/components/_switches.scss +22 -19
- data/assets/bower_components/foundation/scss/foundation/components/_tables.scss +8 -8
- data/assets/bower_components/foundation/scss/foundation/components/_tabs.scss +50 -31
- data/assets/bower_components/foundation/scss/foundation/components/_thumbs.scss +8 -8
- data/assets/bower_components/foundation/scss/foundation/components/_tooltips.scss +25 -25
- data/assets/bower_components/foundation/scss/foundation/components/_top-bar.scss +176 -122
- data/assets/bower_components/foundation/scss/foundation/components/_type.scss +38 -38
- data/assets/bower_components/foundation/scss/foundation/components/_visibility.scss +33 -16
- data/assets/bower_components/foundation/scss/foundation.scss +37 -40
- data/assets/bower_components/foundation/scss/normalize.scss +8 -11
- data/assets/bower_components/jquery/bower.json +2 -1
- data/assets/bower_components/jquery/dist/jquery.js +9 -4
- data/assets/bower_components/jquery/dist/jquery.min.js +4 -4
- data/assets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/assets/bower_components/jquery/src/core.js +6 -1
- data/assets/scss/_settings.scss +2 -0
- data/assets/stylesheets/app.css +3066 -2429
- data/lib/catscope/version.rb +1 -1
- data/lib/catscope/views/layout.erb +6 -2
- metadata +8 -4
- data/assets/bower_components/foundation/scss/foundation/components/_toolbar.scss +0 -70
@@ -4,13 +4,14 @@
|
|
4
4
|
Foundation.libs.equalizer = {
|
5
5
|
name : 'equalizer',
|
6
6
|
|
7
|
-
version : '5.5.
|
7
|
+
version : '5.5.3',
|
8
8
|
|
9
9
|
settings : {
|
10
|
-
use_tallest: true,
|
11
|
-
before_height_change: $.noop,
|
12
|
-
after_height_change: $.noop,
|
13
|
-
equalize_on_stack: false
|
10
|
+
use_tallest : true,
|
11
|
+
before_height_change : $.noop,
|
12
|
+
after_height_change : $.noop,
|
13
|
+
equalize_on_stack : false,
|
14
|
+
act_on_hidden_el: false
|
14
15
|
},
|
15
16
|
|
16
17
|
init : function (scope, method, options) {
|
@@ -20,33 +21,47 @@
|
|
20
21
|
},
|
21
22
|
|
22
23
|
events : function () {
|
23
|
-
this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function(e){
|
24
|
+
this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function (e) {
|
24
25
|
this.reflow();
|
25
26
|
}.bind(this));
|
26
27
|
},
|
27
28
|
|
28
|
-
equalize: function(equalizer) {
|
29
|
+
equalize : function (equalizer) {
|
29
30
|
var isStacked = false,
|
30
|
-
|
31
|
-
settings = equalizer.data(this.attr_name(true)+'-init')
|
31
|
+
group = equalizer.data('equalizer'),
|
32
|
+
settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
|
33
|
+
vals,
|
34
|
+
firstTopOffset;
|
35
|
+
|
36
|
+
if (settings.act_on_hidden_el) {
|
37
|
+
vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]') : equalizer.find('['+this.attr_name()+'-watch]');
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
vals = group ? equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible') : equalizer.find('['+this.attr_name()+'-watch]:visible');
|
41
|
+
}
|
42
|
+
|
43
|
+
if (vals.length === 0) {
|
44
|
+
return;
|
45
|
+
}
|
32
46
|
|
33
|
-
if (vals.length === 0) return;
|
34
|
-
var firstTopOffset = vals.first().offset().top;
|
35
47
|
settings.before_height_change();
|
36
|
-
equalizer.trigger('before-height-change
|
48
|
+
equalizer.trigger('before-height-change.fndth.equalizer');
|
37
49
|
vals.height('inherit');
|
38
|
-
vals.each(function(){
|
39
|
-
var el = $(this);
|
40
|
-
if (el.offset().top !== firstTopOffset) {
|
41
|
-
isStacked = true;
|
42
|
-
}
|
43
|
-
});
|
44
50
|
|
45
51
|
if (settings.equalize_on_stack === false) {
|
46
|
-
|
47
|
-
|
52
|
+
firstTopOffset = vals.first().offset().top;
|
53
|
+
vals.each(function () {
|
54
|
+
if ($(this).offset().top !== firstTopOffset) {
|
55
|
+
isStacked = true;
|
56
|
+
return false;
|
57
|
+
}
|
58
|
+
});
|
59
|
+
if (isStacked) {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
}
|
48
63
|
|
49
|
-
var heights = vals.map(function(){ return $(this).outerHeight(false) }).get();
|
64
|
+
var heights = vals.map(function () { return $(this).outerHeight(false) }).get();
|
50
65
|
|
51
66
|
if (settings.use_tallest) {
|
52
67
|
var max = Math.max.apply(null, heights);
|
@@ -55,17 +70,33 @@
|
|
55
70
|
var min = Math.min.apply(null, heights);
|
56
71
|
vals.css('height', min);
|
57
72
|
}
|
73
|
+
|
58
74
|
settings.after_height_change();
|
59
|
-
equalizer.trigger('after-height-change
|
75
|
+
equalizer.trigger('after-height-change.fndtn.equalizer');
|
60
76
|
},
|
61
77
|
|
62
78
|
reflow : function () {
|
63
79
|
var self = this;
|
64
80
|
|
65
|
-
this.S('[' + this.attr_name() + ']', this.scope).each(function(){
|
66
|
-
var $eq_target = $(this)
|
67
|
-
|
68
|
-
|
81
|
+
this.S('[' + this.attr_name() + ']', this.scope).each(function () {
|
82
|
+
var $eq_target = $(this),
|
83
|
+
media_query = $eq_target.data('equalizer-mq'),
|
84
|
+
ignore_media_query = true;
|
85
|
+
|
86
|
+
if (media_query) {
|
87
|
+
media_query = 'is_' + media_query.replace(/-/g, '_');
|
88
|
+
if (Foundation.utils.hasOwnProperty(media_query)) {
|
89
|
+
ignore_media_query = false;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
self.image_loaded(self.S('img', this), function () {
|
94
|
+
if (ignore_media_query || Foundation.utils[media_query]()) {
|
95
|
+
self.equalize($eq_target)
|
96
|
+
} else {
|
97
|
+
var vals = $eq_target.find('[' + self.attr_name() + '-watch]:visible');
|
98
|
+
vals.css('height', 'auto');
|
99
|
+
}
|
69
100
|
});
|
70
101
|
});
|
71
102
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.interchange = {
|
5
5
|
name : 'interchange',
|
6
6
|
|
7
|
-
version : '5.5.
|
7
|
+
version : '5.5.3',
|
8
8
|
|
9
9
|
cache : {},
|
10
10
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
},
|
37
37
|
|
38
38
|
directives : {
|
39
|
-
replace: function (el, path, trigger) {
|
39
|
+
replace : function (el, path, trigger) {
|
40
40
|
// The trigger argument, if called within the directive, fires
|
41
41
|
// an event named after the directive on the element, passing
|
42
42
|
// any parameters along to the event that you pass to trigger.
|
@@ -48,22 +48,27 @@
|
|
48
48
|
// console.log($(this).html(), a, b, c);
|
49
49
|
// });
|
50
50
|
|
51
|
-
if (/IMG/.test(el[0].nodeName)) {
|
52
|
-
var orig_path = el
|
51
|
+
if (el !== null && /IMG/.test(el[0].nodeName)) {
|
52
|
+
var orig_path = $.each(el, function(){this.src = path;});
|
53
|
+
// var orig_path = el[0].src;
|
53
54
|
|
54
|
-
if (new RegExp(path, 'i').test(orig_path))
|
55
|
+
if (new RegExp(path, 'i').test(orig_path)) {
|
56
|
+
return;
|
57
|
+
}
|
55
58
|
|
56
|
-
el
|
59
|
+
el.attr("src", path);
|
57
60
|
|
58
61
|
return trigger(el[0].src);
|
59
62
|
}
|
60
63
|
var last_path = el.data(this.data_attr + '-last-path'),
|
61
64
|
self = this;
|
62
65
|
|
63
|
-
if (last_path == path)
|
66
|
+
if (last_path == path) {
|
67
|
+
return;
|
68
|
+
}
|
64
69
|
|
65
70
|
if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i.test(path)) {
|
66
|
-
$(el).css('background-image', 'url('+path+')');
|
71
|
+
$(el).css('background-image', 'url(' + path + ')');
|
67
72
|
el.data('interchange-last-path', path);
|
68
73
|
return trigger(path);
|
69
74
|
}
|
@@ -84,12 +89,11 @@
|
|
84
89
|
this.data_attr = this.set_data_attr();
|
85
90
|
$.extend(true, this.settings, method, options);
|
86
91
|
this.bindings(method, options);
|
87
|
-
this.
|
88
|
-
this.load('nodes');
|
92
|
+
this.reflow();
|
89
93
|
},
|
90
94
|
|
91
|
-
get_media_hash : function() {
|
92
|
-
var mediaHash='';
|
95
|
+
get_media_hash : function () {
|
96
|
+
var mediaHash = '';
|
93
97
|
for (var queryName in this.settings.named_queries ) {
|
94
98
|
mediaHash += matchMedia(this.settings.named_queries[queryName]).matches.toString();
|
95
99
|
}
|
@@ -115,7 +119,7 @@
|
|
115
119
|
resize : function () {
|
116
120
|
var cache = this.cache;
|
117
121
|
|
118
|
-
if(!this.images_loaded || !this.nodes_loaded) {
|
122
|
+
if (!this.images_loaded || !this.nodes_loaded) {
|
119
123
|
setTimeout($.proxy(this.resize, this), 50);
|
120
124
|
return;
|
121
125
|
}
|
@@ -123,18 +127,19 @@
|
|
123
127
|
for (var uuid in cache) {
|
124
128
|
if (cache.hasOwnProperty(uuid)) {
|
125
129
|
var passed = this.results(uuid, cache[uuid]);
|
126
|
-
|
127
130
|
if (passed) {
|
128
131
|
this.settings.directives[passed
|
129
|
-
.scenario[1]].call(this, passed.el, passed.scenario[0], function () {
|
130
|
-
if (arguments[0] instanceof Array) {
|
132
|
+
.scenario[1]].call(this, passed.el, passed.scenario[0], (function (passed) {
|
133
|
+
if (arguments[0] instanceof Array) {
|
131
134
|
var args = arguments[0];
|
132
|
-
} else {
|
135
|
+
} else {
|
133
136
|
var args = Array.prototype.slice.call(arguments, 0);
|
134
137
|
}
|
135
138
|
|
136
|
-
|
137
|
-
|
139
|
+
return function() {
|
140
|
+
passed.el.trigger(passed.scenario[1], args);
|
141
|
+
}
|
142
|
+
}(passed)));
|
138
143
|
}
|
139
144
|
}
|
140
145
|
}
|
@@ -155,7 +160,7 @@
|
|
155
160
|
mq = matchMedia(rule);
|
156
161
|
}
|
157
162
|
if (mq.matches) {
|
158
|
-
return {el: el, scenario: scenarios[count]};
|
163
|
+
return {el : el, scenario : scenarios[count]};
|
159
164
|
}
|
160
165
|
}
|
161
166
|
}
|
@@ -211,7 +216,6 @@
|
|
211
216
|
this.cached_nodes = [];
|
212
217
|
this.nodes_loaded = (count === 0);
|
213
218
|
|
214
|
-
|
215
219
|
while (i--) {
|
216
220
|
loaded_count++;
|
217
221
|
var str = nodes[i].getAttribute(data_attr) || '';
|
@@ -220,7 +224,7 @@
|
|
220
224
|
this.cached_nodes.push(nodes[i]);
|
221
225
|
}
|
222
226
|
|
223
|
-
if(loaded_count === count) {
|
227
|
+
if (loaded_count === count) {
|
224
228
|
this.nodes_loaded = true;
|
225
229
|
this.enhance('nodes');
|
226
230
|
}
|
@@ -236,7 +240,7 @@
|
|
236
240
|
this.object($(this['cached_' + type][i]));
|
237
241
|
}
|
238
242
|
|
239
|
-
return $(window).trigger('resize
|
243
|
+
return $(window).trigger('resize.fndtn.interchange');
|
240
244
|
},
|
241
245
|
|
242
246
|
convert_directive : function (directive) {
|
@@ -253,33 +257,40 @@
|
|
253
257
|
parse_scenario : function (scenario) {
|
254
258
|
// This logic had to be made more complex since some users were using commas in the url path
|
255
259
|
// So we cannot simply just split on a comma
|
260
|
+
|
256
261
|
var directive_match = scenario[0].match(/(.+),\s*(\w+)\s*$/),
|
257
|
-
|
262
|
+
// getting the mq has gotten a bit complicated since we started accounting for several use cases
|
263
|
+
// of URLs. For now we'll continue to match these scenarios, but we may consider having these scenarios
|
264
|
+
// as nested objects or arrays in F6.
|
265
|
+
// regex: match everything before close parenthesis for mq
|
266
|
+
media_query = scenario[1].match(/(.*)\)/);
|
258
267
|
|
259
268
|
if (directive_match) {
|
260
269
|
var path = directive_match[1],
|
261
270
|
directive = directive_match[2];
|
262
|
-
|
263
|
-
else {
|
271
|
+
|
272
|
+
} else {
|
264
273
|
var cached_split = scenario[0].split(/,\s*$/),
|
265
274
|
path = cached_split[0],
|
266
|
-
directive = '';
|
275
|
+
directive = '';
|
267
276
|
}
|
268
277
|
|
269
|
-
return [this.trim(path), this.convert_directive(directive), this.trim(media_query)];
|
278
|
+
return [this.trim(path), this.convert_directive(directive), this.trim(media_query[1])];
|
270
279
|
},
|
271
280
|
|
272
|
-
object : function(el) {
|
281
|
+
object : function (el) {
|
273
282
|
var raw_arr = this.parse_data_attr(el),
|
274
|
-
scenarios = [],
|
283
|
+
scenarios = [],
|
275
284
|
i = raw_arr.length;
|
276
285
|
|
277
286
|
if (i > 0) {
|
278
287
|
while (i--) {
|
279
|
-
|
288
|
+
// split array between comma delimited content and mq
|
289
|
+
// regex: comma, optional space, open parenthesis
|
290
|
+
var scenario = raw_arr[i].split(/,\s?\(/);
|
280
291
|
|
281
|
-
if (
|
282
|
-
var params = this.parse_scenario(
|
292
|
+
if (scenario.length > 1) {
|
293
|
+
var params = this.parse_scenario(scenario);
|
283
294
|
scenarios.push(params);
|
284
295
|
}
|
285
296
|
}
|
@@ -292,14 +303,15 @@
|
|
292
303
|
var uuid = this.random_str(),
|
293
304
|
current_uuid = el.data(this.add_namespace('uuid', true));
|
294
305
|
|
295
|
-
if (this.cache[current_uuid])
|
306
|
+
if (this.cache[current_uuid]) {
|
307
|
+
return this.cache[current_uuid];
|
308
|
+
}
|
296
309
|
|
297
310
|
el.attr(this.add_namespace('data-uuid'), uuid);
|
298
|
-
|
299
311
|
return this.cache[uuid] = scenarios;
|
300
312
|
},
|
301
313
|
|
302
|
-
trim : function(str) {
|
314
|
+
trim : function (str) {
|
303
315
|
|
304
316
|
if (typeof str === 'string') {
|
305
317
|
return $.trim(str);
|
@@ -308,7 +320,7 @@
|
|
308
320
|
return str;
|
309
321
|
},
|
310
322
|
|
311
|
-
set_data_attr: function (init) {
|
323
|
+
set_data_attr : function (init) {
|
312
324
|
if (init) {
|
313
325
|
if (this.namespace.length > 0) {
|
314
326
|
return this.namespace + '-' + this.settings.load_attr;
|
@@ -326,7 +338,7 @@
|
|
326
338
|
|
327
339
|
parse_data_attr : function (el) {
|
328
340
|
var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
|
329
|
-
i = raw.length,
|
341
|
+
i = raw.length,
|
330
342
|
output = [];
|
331
343
|
|
332
344
|
while (i--) {
|