locomotivecms_wagon 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -3
- data/generators/blank/config/site.yml.tt +20 -6
- data/generators/bootstrap/config/site.yml.tt +20 -6
- data/generators/{bootstrap → bootstrap2}/Gemfile.tt +0 -0
- data/generators/{bootstrap → bootstrap2}/app/content_types/.empty_directory +0 -0
- data/generators/{bootstrap → bootstrap2}/app/views/pages/404.liquid +0 -0
- data/generators/{bootstrap → bootstrap2}/app/views/pages/404.liquid.haml +0 -0
- data/generators/{bootstrap → bootstrap2}/app/views/pages/index.liquid +1 -1
- data/generators/{bootstrap → bootstrap2}/app/views/pages/index.liquid.haml +0 -0
- data/generators/{bootstrap → bootstrap2}/app/views/snippets/footer.liquid +0 -0
- data/generators/{bootstrap → bootstrap2}/app/views/snippets/footer.liquid.haml +0 -0
- data/generators/{bootstrap → bootstrap2}/config/deploy.yml +0 -0
- data/generators/bootstrap2/config/site.yml.tt +34 -0
- data/generators/{bootstrap → bootstrap2}/config/translations.yml +0 -0
- data/generators/{bootstrap → bootstrap2}/config.ru +0 -0
- data/generators/{bootstrap → bootstrap2}/data/.empty_directory +0 -0
- data/generators/bootstrap2/public/fonts/FontAwesome.otf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.eot +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.svg +399 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.ttf +0 -0
- data/generators/bootstrap2/public/fonts/fontawesome-webfont.woff +0 -0
- data/generators/{bootstrap → bootstrap2}/public/javascripts/bootstrap.js +230 -109
- data/generators/bootstrap2/public/javascripts/bootstrap.min.js +6 -0
- data/generators/{bootstrap → bootstrap2}/public/samples/.empty_directory +0 -0
- data/generators/{bootstrap → bootstrap2}/public/stylesheets/application.css.scss +0 -0
- data/generators/{bootstrap → bootstrap2}/public/stylesheets/bootstrap-responsive.css +26 -9
- data/generators/bootstrap2/public/stylesheets/bootstrap-responsive.min.css +9 -0
- data/generators/{bootstrap → bootstrap2}/public/stylesheets/bootstrap.css +2961 -3045
- data/generators/bootstrap2/public/stylesheets/bootstrap.min.css +9 -0
- data/generators/{bootstrap → bootstrap2}/public/stylesheets/fonts/awesome.css.scss +0 -0
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.css +1203 -0
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome-ie7.min.css +384 -0
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.css +1470 -0
- data/generators/bootstrap2/public/stylesheets/fonts/font-awesome.min.css +403 -0
- data/generators/bootstrap3/Gemfile.tt +23 -0
- data/generators/bootstrap3/app/content_types/.empty_directory +1 -0
- data/generators/bootstrap3/app/views/pages/404.liquid +13 -0
- data/generators/bootstrap3/app/views/pages/404.liquid.haml +10 -0
- data/generators/bootstrap3/app/views/pages/index.liquid +779 -0
- data/generators/bootstrap3/app/views/pages/index.liquid.haml +1058 -0
- data/generators/bootstrap3/app/views/snippets/footer.liquid +3 -0
- data/generators/bootstrap3/app/views/snippets/footer.liquid.haml +2 -0
- data/generators/bootstrap3/config/deploy.yml +15 -0
- data/generators/bootstrap3/config/site.yml.tt +19 -0
- data/generators/bootstrap3/config/translations.yml +8 -0
- data/generators/bootstrap3/config.ru +3 -0
- data/generators/bootstrap3/data/.empty_directory +1 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.svg +228 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/generators/bootstrap3/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/generators/bootstrap3/public/javascripts/bootstrap.js +1999 -0
- data/generators/bootstrap3/public/javascripts/bootstrap.min.js +6 -0
- data/generators/bootstrap3/public/samples/apple-touch-icon-114-precomposed.png +0 -0
- data/generators/bootstrap3/public/samples/apple-touch-icon-144-precomposed.png +0 -0
- data/generators/bootstrap3/public/samples/apple-touch-icon-57-precomposed.png +0 -0
- data/generators/bootstrap3/public/samples/apple-touch-icon-72-precomposed.png +0 -0
- data/generators/bootstrap3/public/samples/favicon.png +0 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.css +384 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap-theme.min.css +1 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap.css +6805 -0
- data/generators/bootstrap3/public/stylesheets/bootstrap.min.css +9 -0
- data/generators/foundation/app/views/pages/index.liquid +13 -18
- data/generators/foundation/app/views/pages/index.liquid.haml +51 -58
- data/generators/foundation/app/views/snippets/footer.liquid +12 -12
- data/generators/foundation/app/views/snippets/footer.liquid.haml +4 -5
- data/generators/foundation/config/site.yml.tt +20 -6
- data/generators/foundation/public/javascripts/foundation/foundation.abide.js +194 -0
- data/generators/foundation/public/javascripts/foundation/foundation.alerts.js +11 -6
- data/generators/foundation/public/javascripts/foundation/foundation.clearing.js +6 -6
- data/generators/foundation/public/javascripts/foundation/foundation.cookie.js +1 -1
- data/generators/foundation/public/javascripts/foundation/foundation.dropdown.js +19 -14
- data/generators/foundation/public/javascripts/foundation/foundation.forms.js +77 -37
- data/generators/foundation/public/javascripts/foundation/foundation.interchange.js +33 -24
- data/generators/foundation/public/javascripts/foundation/foundation.joyride.js +17 -9
- data/generators/foundation/public/javascripts/foundation/foundation.js +30 -13
- data/generators/foundation/public/javascripts/foundation/foundation.magellan.js +9 -5
- data/generators/foundation/public/javascripts/foundation/foundation.orbit.js +361 -319
- data/generators/foundation/public/javascripts/foundation/foundation.placeholder.js +426 -159
- data/generators/foundation/public/javascripts/foundation/foundation.reveal.js +42 -19
- data/generators/foundation/public/javascripts/foundation/foundation.section.js +322 -308
- data/generators/foundation/public/javascripts/foundation/foundation.tooltips.js +5 -4
- data/generators/foundation/public/javascripts/foundation/foundation.topbar.js +144 -71
- data/generators/foundation/public/javascripts/foundation.min.js +15 -32
- data/generators/foundation/public/javascripts/vendor/custom.modernizr.js +1 -1
- data/generators/foundation/public/javascripts/vendor/jquery.js +4389 -4197
- data/generators/foundation/public/javascripts/vendor/zepto.js +117 -1
- data/generators/foundation/public/stylesheets/foundation.css +1145 -668
- data/generators/foundation/public/stylesheets/foundation.min.css +1 -440
- data/generators/foundation/public/stylesheets/normalize.css +162 -91
- data/lib/locomotive/wagon/exceptions.rb +1 -1
- data/lib/locomotive/wagon/generators/site/bootstrap2.rb +35 -0
- data/lib/locomotive/wagon/generators/site/{bootstrap.rb → bootstrap3.rb} +3 -3
- data/lib/locomotive/wagon/generators/site/foundation.rb +1 -1
- data/lib/locomotive/wagon/generators/site.rb +2 -1
- data/lib/locomotive/wagon/liquid/drops/base.rb +4 -2
- data/lib/locomotive/wagon/liquid/drops/content_entry.rb +4 -4
- data/lib/locomotive/wagon/liquid/drops/page.rb +3 -3
- data/lib/locomotive/wagon/liquid/drops/site.rb +3 -3
- data/lib/locomotive/wagon/liquid/tags/link_to.rb +2 -1
- data/lib/locomotive/wagon/misc/better_errors.rb +1 -1
- data/lib/locomotive/wagon/server/renderer.rb +9 -2
- data/lib/locomotive/wagon/server.rb +1 -3
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +2 -2
- data/spec/integration/server/basic_spec.rb +7 -0
- metadata +68 -35
- data/generators/bootstrap/public/fonts/FontAwesome.otf +0 -0
- data/generators/bootstrap/public/fonts/fontawesome-webfont.eot +0 -0
- data/generators/bootstrap/public/fonts/fontawesome-webfont.ttf +0 -0
- data/generators/bootstrap/public/fonts/fontawesome-webfont.woff +0 -0
- data/generators/bootstrap/public/javascripts/bootstrap.min.js +0 -6
- data/generators/bootstrap/public/stylesheets/bootstrap-responsive.min.css +0 -9
- data/generators/bootstrap/public/stylesheets/bootstrap.min.css +0 -726
- data/generators/bootstrap/public/stylesheets/fonts/font-awesome-ie7.min.css +0 -23
- data/generators/bootstrap/public/stylesheets/fonts/font-awesome.css +0 -460
- data/lib/locomotive/wagon/server/not_found.rb +0 -19
@@ -6,10 +6,12 @@
|
|
6
6
|
Foundation.libs.interchange = {
|
7
7
|
name : 'interchange',
|
8
8
|
|
9
|
-
version : '4.2.
|
9
|
+
version : '4.2.4',
|
10
10
|
|
11
11
|
cache : {},
|
12
12
|
|
13
|
+
images_loaded : false,
|
14
|
+
|
13
15
|
settings : {
|
14
16
|
load_attr : 'interchange',
|
15
17
|
|
@@ -20,22 +22,20 @@
|
|
20
22
|
large : 'only screen and (min-width: 1440px)',
|
21
23
|
landscape : 'only screen and (orientation: landscape)',
|
22
24
|
portrait : 'only screen and (orientation: portrait)',
|
23
|
-
retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),'
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
|
26
|
+
'only screen and (min--moz-device-pixel-ratio: 2),' +
|
27
|
+
'only screen and (-o-min-device-pixel-ratio: 2/1),' +
|
28
|
+
'only screen and (min-device-pixel-ratio: 2),' +
|
29
|
+
'only screen and (min-resolution: 192dpi),' +
|
30
|
+
'only screen and (min-resolution: 2dppx)'
|
29
31
|
},
|
30
32
|
|
31
33
|
directives : {
|
32
|
-
replace
|
34
|
+
replace: function (el, path) {
|
33
35
|
if (/IMG/.test(el[0].nodeName)) {
|
34
|
-
var
|
35
|
-
path_file = path_parts[path_parts.length - 1],
|
36
|
-
orig_path = el[0].src;
|
36
|
+
var orig_path = el[0].src;
|
37
37
|
|
38
|
-
if (new RegExp(
|
38
|
+
if (new RegExp(path, 'i').test(orig_path)) return;
|
39
39
|
|
40
40
|
el[0].src = path;
|
41
41
|
|
@@ -55,7 +55,7 @@
|
|
55
55
|
this.events();
|
56
56
|
this.images();
|
57
57
|
|
58
|
-
if (typeof method
|
58
|
+
if (typeof method !== 'string') {
|
59
59
|
return this.settings.init;
|
60
60
|
} else {
|
61
61
|
return this[method].call(this, options);
|
@@ -73,6 +73,11 @@
|
|
73
73
|
resize : function () {
|
74
74
|
var cache = this.cache;
|
75
75
|
|
76
|
+
if(!this.images_loaded) {
|
77
|
+
setTimeout($.proxy(this.resize, this), 50);
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
76
81
|
for (var uuid in cache) {
|
77
82
|
if (cache.hasOwnProperty(uuid)) {
|
78
83
|
var passed = this.results(uuid, cache[uuid]);
|
@@ -87,18 +92,17 @@
|
|
87
92
|
},
|
88
93
|
|
89
94
|
results : function (uuid, scenarios) {
|
90
|
-
var count = scenarios.length
|
91
|
-
results_arr = [];
|
95
|
+
var count = scenarios.length;
|
92
96
|
|
93
97
|
if (count > 0) {
|
94
98
|
var el = $('[data-uuid="' + uuid + '"]');
|
95
99
|
|
96
100
|
for (var i = count - 1; i >= 0; i--) {
|
97
|
-
var rule = scenarios[i][2];
|
101
|
+
var mq, rule = scenarios[i][2];
|
98
102
|
if (this.settings.named_queries.hasOwnProperty(rule)) {
|
99
|
-
|
103
|
+
mq = matchMedia(this.settings.named_queries[rule]);
|
100
104
|
} else {
|
101
|
-
|
105
|
+
mq = matchMedia(rule);
|
102
106
|
}
|
103
107
|
if (mq.matches) {
|
104
108
|
return {el: el, scenario: scenarios[i]};
|
@@ -120,12 +124,15 @@
|
|
120
124
|
update_images : function () {
|
121
125
|
var images = document.getElementsByTagName('img'),
|
122
126
|
count = images.length,
|
127
|
+
loaded_count = 0,
|
123
128
|
data_attr = 'data-' + this.settings.load_attr;
|
124
129
|
|
125
130
|
this.cached_images = [];
|
131
|
+
this.images_loaded = false;
|
126
132
|
|
127
133
|
for (var i = count - 1; i >= 0; i--) {
|
128
|
-
this.loaded($(images[i]),
|
134
|
+
this.loaded($(images[i]), function (image) {
|
135
|
+
loaded_count++;
|
129
136
|
if (image) {
|
130
137
|
var str = image.getAttribute(data_attr) || '';
|
131
138
|
|
@@ -134,8 +141,10 @@
|
|
134
141
|
}
|
135
142
|
}
|
136
143
|
|
137
|
-
if
|
138
|
-
|
144
|
+
if(loaded_count === count) {
|
145
|
+
this.images_loaded = true;
|
146
|
+
this.enhance();
|
147
|
+
}
|
139
148
|
}.bind(this));
|
140
149
|
}
|
141
150
|
|
@@ -145,9 +154,9 @@
|
|
145
154
|
// based on jquery.imageready.js
|
146
155
|
// @weblinc, @jsantell, (c) 2012
|
147
156
|
|
148
|
-
loaded : function (image,
|
157
|
+
loaded : function (image, callback) {
|
149
158
|
function loaded () {
|
150
|
-
callback(image[0]
|
159
|
+
callback(image[0]);
|
151
160
|
}
|
152
161
|
|
153
162
|
function bindLoad () {
|
@@ -268,4 +277,4 @@
|
|
268
277
|
|
269
278
|
};
|
270
279
|
|
271
|
-
}(Foundation.zj, this, this.document));
|
280
|
+
}(Foundation.zj, this, this.document));
|
@@ -3,10 +3,12 @@
|
|
3
3
|
(function ($, window, document, undefined) {
|
4
4
|
'use strict';
|
5
5
|
|
6
|
+
var Modernizr = Modernizr || false;
|
7
|
+
|
6
8
|
Foundation.libs.joyride = {
|
7
|
-
name: 'joyride',
|
9
|
+
name : 'joyride',
|
8
10
|
|
9
|
-
version : '4.2
|
11
|
+
version : '4.3.2',
|
10
12
|
|
11
13
|
defaults : {
|
12
14
|
expose : false, // turn on or off the expose feature
|
@@ -42,7 +44,7 @@
|
|
42
44
|
expose : '<div class="joyride-expose-wrapper"></div>',
|
43
45
|
exposeCover: '<div class="joyride-expose-cover"></div>'
|
44
46
|
},
|
45
|
-
exposeAddClass
|
47
|
+
exposeAddClass : '' // One or more space-separated class names to be added to exposed element
|
46
48
|
},
|
47
49
|
|
48
50
|
settings : {},
|
@@ -57,7 +59,7 @@
|
|
57
59
|
$.extend(true, this.settings, this.defaults, options);
|
58
60
|
}
|
59
61
|
|
60
|
-
if (typeof method
|
62
|
+
if (typeof method !== 'string') {
|
61
63
|
if (!this.settings.init) this.events();
|
62
64
|
|
63
65
|
return this.settings.init;
|
@@ -121,7 +123,7 @@
|
|
121
123
|
integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
|
122
124
|
int_settings_count = integer_settings.length;
|
123
125
|
|
124
|
-
if (!this.settings.init) this.
|
126
|
+
if (!this.settings.init) this.events();
|
125
127
|
|
126
128
|
// non configureable settings
|
127
129
|
this.settings.$content_el = $this;
|
@@ -339,7 +341,7 @@
|
|
339
341
|
return Modernizr.mq('only screen and (max-width: 767px)') || $('.lt-ie9').length > 0;
|
340
342
|
}
|
341
343
|
|
342
|
-
return (
|
344
|
+
return ($(window).width() < 767);
|
343
345
|
},
|
344
346
|
|
345
347
|
hide : function () {
|
@@ -350,7 +352,13 @@
|
|
350
352
|
if (!this.settings.modal) {
|
351
353
|
$('.joyride-modal-bg').hide();
|
352
354
|
}
|
353
|
-
|
355
|
+
|
356
|
+
// Prevent scroll bouncing...wait to remove from layout
|
357
|
+
this.settings.$current_tip.css('visibility', 'hidden');
|
358
|
+
setTimeout($.proxy(function() {
|
359
|
+
this.hide();
|
360
|
+
this.css('visibility', 'visible');
|
361
|
+
}, this.settings.$current_tip), 0);
|
354
362
|
this.settings.postStepCallback(this.settings.$li.index(),
|
355
363
|
this.settings.$current_tip);
|
356
364
|
},
|
@@ -599,7 +607,7 @@
|
|
599
607
|
zIndex: el.css('z-index'),
|
600
608
|
position: el.css('position')
|
601
609
|
};
|
602
|
-
|
610
|
+
|
603
611
|
origClasses = el.attr('class') == null ? '' : el.attr('class');
|
604
612
|
|
605
613
|
el.css('z-index',parseInt(expose.css('z-index'))+1);
|
@@ -678,7 +686,7 @@
|
|
678
686
|
el.css('position', origCSS.position);
|
679
687
|
}
|
680
688
|
}
|
681
|
-
|
689
|
+
|
682
690
|
origClasses = el.data('orig-class');
|
683
691
|
el.attr('class', origClasses);
|
684
692
|
el.removeData('orig-classes');
|
@@ -38,6 +38,10 @@ if (typeof jQuery === "undefined" &&
|
|
38
38
|
https://github.com/paulirish/matchMedia.js
|
39
39
|
*/
|
40
40
|
|
41
|
+
$('head').append('<meta class="foundation-mq-small">');
|
42
|
+
$('head').append('<meta class="foundation-mq-medium">');
|
43
|
+
$('head').append('<meta class="foundation-mq-large">');
|
44
|
+
|
41
45
|
window.matchMedia = window.matchMedia || (function( doc, undefined ) {
|
42
46
|
|
43
47
|
"use strict";
|
@@ -82,7 +86,7 @@ if (typeof jQuery === "undefined" &&
|
|
82
86
|
|
83
87
|
var t = Object(this),
|
84
88
|
len = t.length >>> 0;
|
85
|
-
if (typeof fun
|
89
|
+
if (typeof fun !== "function") {
|
86
90
|
return;
|
87
91
|
}
|
88
92
|
|
@@ -166,10 +170,18 @@ if (typeof jQuery === "undefined" &&
|
|
166
170
|
window.Foundation = {
|
167
171
|
name : 'Foundation',
|
168
172
|
|
169
|
-
version : '4.2
|
173
|
+
version : '4.3.2',
|
170
174
|
|
171
175
|
cache : {},
|
172
176
|
|
177
|
+
media_queries : {
|
178
|
+
small : $('.foundation-mq-small').css('font-family').replace(/\'/g, ''),
|
179
|
+
medium : $('.foundation-mq-medium').css('font-family').replace(/\'/g, ''),
|
180
|
+
large : $('.foundation-mq-large').css('font-family').replace(/\'/g, '')
|
181
|
+
},
|
182
|
+
|
183
|
+
stylesheet : $('<style></style>').appendTo('head')[0].sheet,
|
184
|
+
|
173
185
|
init : function (scope, libraries, method, options, response, /* internal */ nc) {
|
174
186
|
var library_arr,
|
175
187
|
args = [scope, method, options, response],
|
@@ -231,8 +243,7 @@ if (typeof jQuery === "undefined" &&
|
|
231
243
|
if (this.libs.hasOwnProperty(lib)) {
|
232
244
|
this.patch(this.libs[lib]);
|
233
245
|
return this.libs[lib].init.apply(this.libs[lib], args);
|
234
|
-
}
|
235
|
-
else {
|
246
|
+
} else {
|
236
247
|
return function () {};
|
237
248
|
}
|
238
249
|
}.bind(this), lib);
|
@@ -267,7 +278,7 @@ if (typeof jQuery === "undefined" &&
|
|
267
278
|
},
|
268
279
|
|
269
280
|
random_str : function (length) {
|
270
|
-
var chars = '
|
281
|
+
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
|
271
282
|
|
272
283
|
if (!length) {
|
273
284
|
length = Math.floor(Math.random() * chars.length);
|
@@ -386,6 +397,18 @@ if (typeof jQuery === "undefined" &&
|
|
386
397
|
}
|
387
398
|
|
388
399
|
return true;
|
400
|
+
},
|
401
|
+
|
402
|
+
addCustomRule : function(rule, media) {
|
403
|
+
if(media === undefined) {
|
404
|
+
Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
|
405
|
+
} else {
|
406
|
+
var query = Foundation.media_queries[media];
|
407
|
+
if(query !== undefined) {
|
408
|
+
Foundation.stylesheet.insertRule('@media ' +
|
409
|
+
Foundation.media_queries[media] + '{ ' + rule + ' }');
|
410
|
+
}
|
411
|
+
}
|
389
412
|
}
|
390
413
|
},
|
391
414
|
|
@@ -402,7 +425,7 @@ if (typeof jQuery === "undefined" &&
|
|
402
425
|
return el.outerHeight();
|
403
426
|
};
|
404
427
|
|
405
|
-
lib.outerWidth = function (el) {
|
428
|
+
lib.outerWidth = function (el, bool) {
|
406
429
|
if (typeof Zepto === 'function') {
|
407
430
|
return el.width();
|
408
431
|
}
|
@@ -426,13 +449,7 @@ if (typeof jQuery === "undefined" &&
|
|
426
449
|
return true;
|
427
450
|
},
|
428
451
|
|
429
|
-
zj :
|
430
|
-
if (typeof Zepto !== 'undefined') {
|
431
|
-
return Zepto;
|
432
|
-
} else {
|
433
|
-
return jQuery;
|
434
|
-
}
|
435
|
-
}()
|
452
|
+
zj : $
|
436
453
|
};
|
437
454
|
|
438
455
|
$.fn.foundation = function () {
|
@@ -6,10 +6,11 @@
|
|
6
6
|
Foundation.libs.magellan = {
|
7
7
|
name : 'magellan',
|
8
8
|
|
9
|
-
version : '4.2
|
9
|
+
version : '4.3.2',
|
10
10
|
|
11
11
|
settings : {
|
12
|
-
activeClass: 'active'
|
12
|
+
activeClass: 'active',
|
13
|
+
threshold: 0
|
13
14
|
},
|
14
15
|
|
15
16
|
init : function (scope, method, options) {
|
@@ -20,7 +21,7 @@
|
|
20
21
|
$.extend(true, this.settings, method);
|
21
22
|
}
|
22
23
|
|
23
|
-
if (typeof method
|
24
|
+
if (typeof method !== 'string') {
|
24
25
|
if (!this.settings.init) {
|
25
26
|
this.fixed_magellan = $("[data-magellan-expedition]");
|
26
27
|
this.set_threshold();
|
@@ -79,8 +80,10 @@
|
|
79
80
|
if ($expedition.data("magellan-fixed-position") != fixed_position) {
|
80
81
|
$expedition.data("magellan-fixed-position", fixed_position);
|
81
82
|
if (fixed_position) {
|
83
|
+
$expedition.addClass('fixed');
|
82
84
|
$expedition.css({position:"fixed", top:0});
|
83
85
|
} else {
|
86
|
+
$expedition.removeClass('fixed');
|
84
87
|
$expedition.css({position:"", top:""});
|
85
88
|
}
|
86
89
|
if (fixed_position && typeof attr != 'undefined' && attr != false) {
|
@@ -117,7 +120,7 @@
|
|
117
120
|
},
|
118
121
|
|
119
122
|
set_threshold : function () {
|
120
|
-
if (
|
123
|
+
if (typeof this.settings.threshold !== 'number') {
|
121
124
|
this.settings.threshold = (this.fixed_magellan.length > 0) ?
|
122
125
|
this.outerHeight(this.fixed_magellan, true) : 0;
|
123
126
|
}
|
@@ -125,8 +128,9 @@
|
|
125
128
|
|
126
129
|
off : function () {
|
127
130
|
$(this.scope).off('.fndtn.magellan');
|
131
|
+
$(window).off('.fndtn.magellan');
|
128
132
|
},
|
129
133
|
|
130
134
|
reflow : function () {}
|
131
135
|
};
|
132
|
-
}(Foundation.zj, this, this.document));
|
136
|
+
}(Foundation.zj, this, this.document));
|