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,15 +4,17 @@
|
|
4
4
|
Foundation.libs.tooltip = {
|
5
5
|
name : 'tooltip',
|
6
6
|
|
7
|
-
version : '5.5.
|
7
|
+
version : '5.5.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
additional_inheritable_classes : [],
|
11
11
|
tooltip_class : '.tooltip',
|
12
|
-
append_to: 'body',
|
13
|
-
touch_close_text: 'Tap To Close',
|
14
|
-
disable_for_touch: false,
|
15
|
-
hover_delay: 200,
|
12
|
+
append_to : 'body',
|
13
|
+
touch_close_text : 'Tap To Close',
|
14
|
+
disable_for_touch : false,
|
15
|
+
hover_delay : 200,
|
16
|
+
fade_in_duration : 150,
|
17
|
+
fade_out_duration : 150,
|
16
18
|
show_on : 'all',
|
17
19
|
tip_template : function (selector, content) {
|
18
20
|
return '<span data-selector="' + selector + '" id="' + selector + '" class="'
|
@@ -28,7 +30,7 @@
|
|
28
30
|
this.bindings(method, options);
|
29
31
|
},
|
30
32
|
|
31
|
-
should_show: function (target, tip) {
|
33
|
+
should_show : function (target, tip) {
|
32
34
|
var settings = $.extend({}, this.settings, this.data_options(target));
|
33
35
|
|
34
36
|
if (settings.show_on === 'all') {
|
@@ -57,6 +59,31 @@
|
|
57
59
|
|
58
60
|
self.create(this.S(instance));
|
59
61
|
|
62
|
+
function _startShow(elt, $this, immediate) {
|
63
|
+
if (elt.timer) {
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
|
67
|
+
if (immediate) {
|
68
|
+
elt.timer = null;
|
69
|
+
self.showTip($this);
|
70
|
+
} else {
|
71
|
+
elt.timer = setTimeout(function () {
|
72
|
+
elt.timer = null;
|
73
|
+
self.showTip($this);
|
74
|
+
}.bind(elt), self.settings.hover_delay);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
function _startHide(elt, $this) {
|
79
|
+
if (elt.timer) {
|
80
|
+
clearTimeout(elt.timer);
|
81
|
+
elt.timer = null;
|
82
|
+
}
|
83
|
+
|
84
|
+
self.hide($this);
|
85
|
+
}
|
86
|
+
|
60
87
|
$(this.scope)
|
61
88
|
.off('.tooltip')
|
62
89
|
.on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
|
@@ -69,46 +96,54 @@
|
|
69
96
|
return false;
|
70
97
|
}
|
71
98
|
|
72
|
-
if (/mouse/i.test(e.type) && self.ie_touch(e))
|
73
|
-
|
99
|
+
if (/mouse/i.test(e.type) && self.ie_touch(e)) {
|
100
|
+
return false;
|
101
|
+
}
|
102
|
+
|
74
103
|
if ($this.hasClass('open')) {
|
75
|
-
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type))
|
104
|
+
if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
105
|
+
e.preventDefault();
|
106
|
+
}
|
76
107
|
self.hide($this);
|
77
108
|
} else {
|
78
109
|
if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
79
110
|
return;
|
80
|
-
} else if(!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
111
|
+
} else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
|
81
112
|
e.preventDefault();
|
82
113
|
S(settings.tooltip_class + '.open').hide();
|
83
114
|
is_touch = true;
|
115
|
+
// close other open tooltips on touch
|
116
|
+
if ($('.open[' + self.attr_name() + ']').length > 0) {
|
117
|
+
var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
|
118
|
+
self.hide(prevOpen);
|
119
|
+
}
|
84
120
|
}
|
85
121
|
|
86
122
|
if (/enter|over/i.test(e.type)) {
|
87
|
-
this
|
88
|
-
|
89
|
-
}.bind(this), self.settings.hover_delay);
|
123
|
+
_startShow(this, $this);
|
124
|
+
|
90
125
|
} else if (e.type === 'mouseout' || e.type === 'mouseleave') {
|
91
|
-
|
92
|
-
self.hide($this);
|
126
|
+
_startHide(this, $this);
|
93
127
|
} else {
|
94
|
-
|
128
|
+
_startShow(this, $this, true);
|
95
129
|
}
|
96
130
|
}
|
97
131
|
})
|
98
132
|
.on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
|
99
|
-
if (/mouse/i.test(e.type) && self.ie_touch(e))
|
133
|
+
if (/mouse/i.test(e.type) && self.ie_touch(e)) {
|
134
|
+
return false;
|
135
|
+
}
|
100
136
|
|
101
|
-
if($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
|
137
|
+
if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
|
102
138
|
return;
|
103
|
-
}
|
104
|
-
else if($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
|
139
|
+
} else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
|
105
140
|
self.convert_to_touch($(this));
|
106
141
|
} else {
|
107
|
-
|
142
|
+
_startHide(this, $(this));
|
108
143
|
}
|
109
144
|
})
|
110
145
|
.on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
|
111
|
-
|
146
|
+
_startHide(this, S(this));
|
112
147
|
});
|
113
148
|
},
|
114
149
|
|
@@ -119,7 +154,7 @@
|
|
119
154
|
|
120
155
|
showTip : function ($target) {
|
121
156
|
var $tip = this.getTip($target);
|
122
|
-
if (this.should_show($target, $tip)){
|
157
|
+
if (this.should_show($target, $tip)) {
|
123
158
|
return this.show($target);
|
124
159
|
}
|
125
160
|
return;
|
@@ -138,17 +173,16 @@
|
|
138
173
|
},
|
139
174
|
|
140
175
|
selector : function ($target) {
|
141
|
-
var
|
142
|
-
dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
|
176
|
+
var dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
|
143
177
|
|
144
|
-
if (
|
178
|
+
if (typeof dataSelector != 'string') {
|
145
179
|
dataSelector = this.random_str(6);
|
146
180
|
$target
|
147
181
|
.attr('data-selector', dataSelector)
|
148
182
|
.attr('aria-describedby', dataSelector);
|
149
183
|
}
|
150
184
|
|
151
|
-
return
|
185
|
+
return dataSelector;
|
152
186
|
},
|
153
187
|
|
154
188
|
create : function ($target) {
|
@@ -166,27 +200,27 @@
|
|
166
200
|
$tip.addClass(classes).appendTo(settings.append_to);
|
167
201
|
|
168
202
|
if (Modernizr.touch) {
|
169
|
-
$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
|
170
|
-
$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function(e) {
|
203
|
+
$tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
|
204
|
+
$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
|
171
205
|
self.hide($target);
|
172
206
|
});
|
173
207
|
}
|
174
208
|
|
175
|
-
$target.removeAttr('title').attr('title','');
|
209
|
+
$target.removeAttr('title').attr('title', '');
|
176
210
|
},
|
177
211
|
|
178
212
|
reposition : function (target, tip, classes) {
|
179
|
-
var width, nub, nubHeight, nubWidth,
|
213
|
+
var width, nub, nubHeight, nubWidth, objPos;
|
180
214
|
|
181
215
|
tip.css('visibility', 'hidden').show();
|
182
216
|
|
183
217
|
width = target.data('width');
|
184
218
|
nub = tip.children('.nub');
|
185
219
|
nubHeight = nub.outerHeight();
|
186
|
-
nubWidth = nub.
|
220
|
+
nubWidth = nub.outerWidth();
|
187
221
|
|
188
222
|
if (this.small()) {
|
189
|
-
tip.css({'width' : '100%'
|
223
|
+
tip.css({'width' : '100%'});
|
190
224
|
} else {
|
191
225
|
tip.css({'width' : (width) ? width : 'auto'});
|
192
226
|
}
|
@@ -199,31 +233,46 @@
|
|
199
233
|
'right' : (right) ? right : 'auto'
|
200
234
|
}).end();
|
201
235
|
};
|
236
|
+
|
237
|
+
var o_top = target.offset().top;
|
238
|
+
var o_left = target.offset().left;
|
239
|
+
var outerHeight = target.outerHeight();
|
202
240
|
|
203
|
-
objPos(tip, (
|
241
|
+
objPos(tip, (o_top + outerHeight + 10), 'auto', 'auto', o_left);
|
204
242
|
|
205
243
|
if (this.small()) {
|
206
|
-
objPos(tip, (
|
244
|
+
objPos(tip, (o_top + outerHeight + 10), 'auto', 'auto', 12.5, $(this.scope).width());
|
207
245
|
tip.addClass('tip-override');
|
208
|
-
objPos(nub, -nubHeight, 'auto', 'auto',
|
246
|
+
objPos(nub, -nubHeight, 'auto', 'auto', o_left);
|
209
247
|
} else {
|
210
|
-
|
248
|
+
|
211
249
|
if (Foundation.rtl) {
|
212
250
|
nub.addClass('rtl');
|
213
|
-
|
251
|
+
o_left = o_left + target.outerWidth() - tip.outerWidth();
|
252
|
+
}
|
253
|
+
|
254
|
+
objPos(tip, (o_top + outerHeight + 10), 'auto', 'auto', o_left);
|
255
|
+
// reset nub from small styles, if they've been applied
|
256
|
+
if (nub.attr('style')) {
|
257
|
+
nub.removeAttr('style');
|
214
258
|
}
|
215
|
-
|
259
|
+
|
216
260
|
tip.removeClass('tip-override');
|
261
|
+
|
262
|
+
var tip_outerHeight = tip.outerHeight();
|
263
|
+
|
217
264
|
if (classes && classes.indexOf('tip-top') > -1) {
|
218
|
-
if (Foundation.rtl)
|
219
|
-
|
265
|
+
if (Foundation.rtl) {
|
266
|
+
nub.addClass('rtl');
|
267
|
+
}
|
268
|
+
objPos(tip, (o_top - tip_outerHeight), 'auto', 'auto', o_left)
|
220
269
|
.removeClass('tip-override');
|
221
270
|
} else if (classes && classes.indexOf('tip-left') > -1) {
|
222
|
-
objPos(tip, (
|
271
|
+
objPos(tip, (o_top + (outerHeight / 2) - (tip_outerHeight / 2)), 'auto', 'auto', (o_left - tip.outerWidth() - nubHeight))
|
223
272
|
.removeClass('tip-override');
|
224
273
|
nub.removeClass('rtl');
|
225
274
|
} else if (classes && classes.indexOf('tip-right') > -1) {
|
226
|
-
objPos(tip, (
|
275
|
+
objPos(tip, (o_top + (outerHeight / 2) - (tip_outerHeight / 2)), 'auto', 'auto', (o_left + target.outerWidth() + nubHeight))
|
227
276
|
.removeClass('tip-override');
|
228
277
|
nub.removeClass('rtl');
|
229
278
|
}
|
@@ -250,14 +299,14 @@
|
|
250
299
|
return $.trim(filtered);
|
251
300
|
},
|
252
301
|
|
253
|
-
convert_to_touch : function($target) {
|
302
|
+
convert_to_touch : function ($target) {
|
254
303
|
var self = this,
|
255
304
|
$tip = self.getTip($target),
|
256
305
|
settings = $.extend({}, self.settings, self.data_options($target));
|
257
306
|
|
258
307
|
if ($tip.find('.tap-to-close').length === 0) {
|
259
|
-
$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');
|
260
|
-
$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function(e) {
|
308
|
+
$tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
|
309
|
+
$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
|
261
310
|
self.hide($target);
|
262
311
|
});
|
263
312
|
}
|
@@ -267,20 +316,19 @@
|
|
267
316
|
|
268
317
|
show : function ($target) {
|
269
318
|
var $tip = this.getTip($target);
|
270
|
-
|
271
319
|
if ($target.data('tooltip-open-event-type') == 'touch') {
|
272
320
|
this.convert_to_touch($target);
|
273
321
|
}
|
274
322
|
|
275
323
|
this.reposition($target, $tip, $target.attr('class'));
|
276
324
|
$target.addClass('open');
|
277
|
-
$tip.fadeIn(
|
325
|
+
$tip.fadeIn(this.settings.fade_in_duration);
|
278
326
|
},
|
279
327
|
|
280
328
|
hide : function ($target) {
|
281
329
|
var $tip = this.getTip($target);
|
282
330
|
|
283
|
-
$tip.fadeOut(
|
331
|
+
$tip.fadeOut(this.settings.fade_out_duration, function () {
|
284
332
|
$tip.find('.tap-to-close').remove();
|
285
333
|
$tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
|
286
334
|
$target.removeClass('open');
|
@@ -4,17 +4,19 @@
|
|
4
4
|
Foundation.libs.topbar = {
|
5
5
|
name : 'topbar',
|
6
6
|
|
7
|
-
version: '5.5.
|
7
|
+
version : '5.5.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
index : 0,
|
11
|
+
start_offset : 0,
|
11
12
|
sticky_class : 'sticky',
|
12
|
-
custom_back_text: true,
|
13
|
-
back_text: 'Back',
|
14
|
-
mobile_show_parent_link: true,
|
15
|
-
is_hover: true,
|
13
|
+
custom_back_text : true,
|
14
|
+
back_text : 'Back',
|
15
|
+
mobile_show_parent_link : true,
|
16
|
+
is_hover : true,
|
16
17
|
scrolltop : true, // jump to top when sticky nav menu toggle is clicked
|
17
|
-
sticky_on : 'all'
|
18
|
+
sticky_on : 'all',
|
19
|
+
dropdown_autoclose: true
|
18
20
|
},
|
19
21
|
|
20
22
|
init : function (section, method, options) {
|
@@ -60,29 +62,29 @@
|
|
60
62
|
|
61
63
|
},
|
62
64
|
|
63
|
-
is_sticky: function (topbar, topbarContainer, settings) {
|
64
|
-
var sticky
|
65
|
+
is_sticky : function (topbar, topbarContainer, settings) {
|
66
|
+
var sticky = topbarContainer.hasClass(settings.sticky_class);
|
67
|
+
var smallMatch = matchMedia(Foundation.media_queries.small).matches;
|
68
|
+
var medMatch = matchMedia(Foundation.media_queries.medium).matches;
|
69
|
+
var lrgMatch = matchMedia(Foundation.media_queries.large).matches;
|
65
70
|
|
66
71
|
if (sticky && settings.sticky_on === 'all') {
|
67
72
|
return true;
|
68
|
-
}
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
return (matchMedia(Foundation.media_queries.small).matches && matchMedia(Foundation.media_queries.medium).matches &&
|
78
|
-
matchMedia(Foundation.media_queries.large).matches);
|
79
|
-
//return true;
|
73
|
+
}
|
74
|
+
if (sticky && this.small() && settings.sticky_on.indexOf('small') !== -1) {
|
75
|
+
if (smallMatch && !medMatch && !lrgMatch) { return true; }
|
76
|
+
}
|
77
|
+
if (sticky && this.medium() && settings.sticky_on.indexOf('medium') !== -1) {
|
78
|
+
if (smallMatch && medMatch && !lrgMatch) { return true; }
|
79
|
+
}
|
80
|
+
if (sticky && this.large() && settings.sticky_on.indexOf('large') !== -1) {
|
81
|
+
if (smallMatch && medMatch && lrgMatch) { return true; }
|
80
82
|
}
|
81
83
|
|
82
|
-
|
84
|
+
return false;
|
83
85
|
},
|
84
86
|
|
85
|
-
toggle: function (toggleEl) {
|
87
|
+
toggle : function (toggleEl) {
|
86
88
|
var self = this,
|
87
89
|
topbar;
|
88
90
|
|
@@ -98,11 +100,11 @@
|
|
98
100
|
|
99
101
|
if (self.breakpoint()) {
|
100
102
|
if (!self.rtl) {
|
101
|
-
section.css({left: '0%'});
|
102
|
-
$('>.name', section).css({left: '100%'});
|
103
|
+
section.css({left : '0%'});
|
104
|
+
$('>.name', section).css({left : '100%'});
|
103
105
|
} else {
|
104
|
-
section.css({right: '0%'});
|
105
|
-
$('>.name', section).css({right: '100%'});
|
106
|
+
section.css({right : '0%'});
|
107
|
+
$('>.name', section).css({right : '100%'});
|
106
108
|
}
|
107
109
|
|
108
110
|
self.S('li.moved', section).removeClass('moved');
|
@@ -126,7 +128,7 @@
|
|
126
128
|
topbar.addClass('fixed');
|
127
129
|
self.S('body').removeClass('f-topbar-fixed');
|
128
130
|
|
129
|
-
window.scrollTo(0,0);
|
131
|
+
window.scrollTo(0, 0);
|
130
132
|
} else {
|
131
133
|
topbar.parent().removeClass('expanded');
|
132
134
|
}
|
@@ -162,12 +164,19 @@
|
|
162
164
|
e.preventDefault();
|
163
165
|
self.toggle(this);
|
164
166
|
})
|
165
|
-
.on('click.fndtn.topbar','.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]',function (e) {
|
166
|
-
|
167
|
-
|
168
|
-
|
167
|
+
.on('click.fndtn.topbar contextmenu.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) {
|
168
|
+
var li = $(this).closest('li'),
|
169
|
+
topbar = li.closest('[' + self.attr_name() + ']'),
|
170
|
+
settings = topbar.data(self.attr_name(true) + '-init');
|
171
|
+
|
172
|
+
if (settings.dropdown_autoclose && settings.is_hover) {
|
173
|
+
var hoverLi = $(this).closest('.hover');
|
174
|
+
hoverLi.removeClass('hover');
|
175
|
+
}
|
176
|
+
if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) {
|
169
177
|
self.toggle();
|
170
|
-
|
178
|
+
}
|
179
|
+
|
171
180
|
})
|
172
181
|
.on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
|
173
182
|
var li = S(this),
|
@@ -175,13 +184,18 @@
|
|
175
184
|
topbar = li.closest('[' + self.attr_name() + ']'),
|
176
185
|
settings = topbar.data(self.attr_name(true) + '-init');
|
177
186
|
|
178
|
-
if(target.data('revealId')) {
|
187
|
+
if (target.data('revealId')) {
|
179
188
|
self.toggle();
|
180
189
|
return;
|
181
190
|
}
|
182
191
|
|
183
|
-
if (self.breakpoint())
|
184
|
-
|
192
|
+
if (self.breakpoint()) {
|
193
|
+
return;
|
194
|
+
}
|
195
|
+
|
196
|
+
if (settings.is_hover && !Modernizr.touch) {
|
197
|
+
return;
|
198
|
+
}
|
185
199
|
|
186
200
|
e.stopImmediatePropagation();
|
187
201
|
|
@@ -218,20 +232,20 @@
|
|
218
232
|
$selectedLi.addClass('moved');
|
219
233
|
|
220
234
|
if (!self.rtl) {
|
221
|
-
section.css({left: -(100 * topbar.data('index')) + '%'});
|
222
|
-
section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
|
235
|
+
section.css({left : -(100 * topbar.data('index')) + '%'});
|
236
|
+
section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
|
223
237
|
} else {
|
224
|
-
section.css({right: -(100 * topbar.data('index')) + '%'});
|
225
|
-
section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
|
238
|
+
section.css({right : -(100 * topbar.data('index')) + '%'});
|
239
|
+
section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
|
226
240
|
}
|
227
241
|
|
228
242
|
topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
|
229
243
|
}
|
230
244
|
});
|
231
245
|
|
232
|
-
S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function() {
|
246
|
+
S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
|
233
247
|
self.resize.call(self);
|
234
|
-
}, 50)).trigger('resize
|
248
|
+
}, 50)).trigger('resize.fndtn.topbar').load(function () {
|
235
249
|
// Ensure that the offset is calculated after all of the pages resources have loaded
|
236
250
|
S(this).trigger('resize.fndtn.topbar');
|
237
251
|
});
|
@@ -260,11 +274,11 @@
|
|
260
274
|
topbar.data('index', topbar.data('index') - 1);
|
261
275
|
|
262
276
|
if (!self.rtl) {
|
263
|
-
section.css({left: -(100 * topbar.data('index')) + '%'});
|
264
|
-
section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
|
277
|
+
section.css({left : -(100 * topbar.data('index')) + '%'});
|
278
|
+
section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
|
265
279
|
} else {
|
266
|
-
section.css({right: -(100 * topbar.data('index')) + '%'});
|
267
|
-
section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
|
280
|
+
section.css({right : -(100 * topbar.data('index')) + '%'});
|
281
|
+
section.find('>.name').css({right : 100 * topbar.data('index') + '%'});
|
268
282
|
}
|
269
283
|
|
270
284
|
if (topbar.data('index') === 0) {
|
@@ -280,10 +294,10 @@
|
|
280
294
|
|
281
295
|
// Show dropdown menus when their items are focused
|
282
296
|
S(this.scope).find('.dropdown a')
|
283
|
-
.focus(function() {
|
297
|
+
.focus(function () {
|
284
298
|
$(this).parents('.has-dropdown').addClass('hover');
|
285
299
|
})
|
286
|
-
.blur(function() {
|
300
|
+
.blur(function () {
|
287
301
|
$(this).parents('.has-dropdown').removeClass('hover');
|
288
302
|
});
|
289
303
|
},
|
@@ -305,18 +319,18 @@
|
|
305
319
|
.find('li')
|
306
320
|
.removeClass('hover');
|
307
321
|
|
308
|
-
if(doToggle) {
|
322
|
+
if (doToggle) {
|
309
323
|
self.toggle(topbar);
|
310
324
|
}
|
311
325
|
}
|
312
326
|
|
313
|
-
if(self.is_sticky(topbar, stickyContainer, settings)) {
|
314
|
-
if(stickyContainer.hasClass('fixed')) {
|
327
|
+
if (self.is_sticky(topbar, stickyContainer, settings)) {
|
328
|
+
if (stickyContainer.hasClass('fixed')) {
|
315
329
|
// Remove the fixed to allow for correct calculation of the offset.
|
316
330
|
stickyContainer.removeClass('fixed');
|
317
331
|
|
318
332
|
stickyOffset = stickyContainer.offset().top;
|
319
|
-
if(self.S(document.body).hasClass('f-topbar-fixed')) {
|
333
|
+
if (self.S(document.body).hasClass('f-topbar-fixed')) {
|
320
334
|
stickyOffset -= topbar.data('height');
|
321
335
|
}
|
322
336
|
|
@@ -361,11 +375,10 @@
|
|
361
375
|
url = $link.attr('href'),
|
362
376
|
$titleLi;
|
363
377
|
|
364
|
-
|
365
378
|
if (!$dropdown.find('.title.back').length) {
|
366
379
|
|
367
380
|
if (settings.mobile_show_parent_link == true && url) {
|
368
|
-
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link
|
381
|
+
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
|
369
382
|
} else {
|
370
383
|
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
|
371
384
|
}
|
@@ -390,7 +403,7 @@
|
|
390
403
|
},
|
391
404
|
|
392
405
|
assembled : function (topbar) {
|
393
|
-
topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled: true}));
|
406
|
+
topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled : true}));
|
394
407
|
},
|
395
408
|
|
396
409
|
height : function (ul) {
|
@@ -407,18 +420,18 @@
|
|
407
420
|
sticky : function () {
|
408
421
|
var self = this;
|
409
422
|
|
410
|
-
this.S(window).on('scroll', function() {
|
423
|
+
this.S(window).on('scroll', function () {
|
411
424
|
self.update_sticky_positioning();
|
412
425
|
});
|
413
426
|
},
|
414
427
|
|
415
|
-
update_sticky_positioning: function() {
|
428
|
+
update_sticky_positioning : function () {
|
416
429
|
var klass = '.' + this.settings.sticky_class,
|
417
430
|
$window = this.S(window),
|
418
431
|
self = this;
|
419
432
|
|
420
433
|
if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(), this.settings)) {
|
421
|
-
var distance = this.settings.sticky_topbar.data('stickyoffset');
|
434
|
+
var distance = this.settings.sticky_topbar.data('stickyoffset') + this.settings.start_offset;
|
422
435
|
if (!self.S(klass).hasClass('expanded')) {
|
423
436
|
if ($window.scrollTop() > (distance)) {
|
424
437
|
if (!self.S(klass).hasClass('fixed')) {
|