zurb-foundation 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zurb-foundation (4.1.1)
4
+ zurb-foundation (4.1.2)
5
5
  sass (>= 3.2.0)
6
6
 
7
7
  GEM
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ### 4.1.2- April 10, 2013
2
+
3
+ * Added Joyride expose functionality
4
+ * General bug fixes for regressions that came up with RTL release
5
+ * Section is now fully semantic
6
+ * Clicking on current thumbnail in Clearing now advances to next slide
7
+ * data-options support added to Clearing
8
+ * Addressed Foundation loader incompatiblities with non-jQuery and non-Zepto JS libraries
9
+ * Fixed Rails generator bug when using CoffeeScript files
10
+ * Added `reflow` to Section js plugin to support dynamic content
11
+
12
+
13
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.1.1...v4.1.2).
14
+
15
+ ### 4.1.1- April 2, 2013
16
+ * Changed all references to the variable `$default-opposite` to `$opposite-direction`
17
+ * Added `dir` attribute to `html` tag
18
+ * Added direction variables to `foundation.dropdown.js`, `foundation.clearing.js`, `foundation.joyride.js`, `foundation.orbit.js`, `foundation.section.js`, `foundation.topbar.js` and `foundation.tooltips.js`.
19
+ * Updated customizer with text direction setting
20
+ * Added right-to-left text direction documentation
21
+
22
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.0.9...v4.1.1).
23
+
24
+
1
25
  ### 4.0.9- March 19, 2013
2
26
  * Added `auto` option to `Foundation.section.js.
3
27
  * Fixes dropdown positioning for split buttons.
@@ -132,7 +132,7 @@ $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255);
132
132
 
133
133
  <h5>Optional JavaScript Configuration</h5>
134
134
 
135
- <p>Clearing options can only be passed in during initialization at this time.</p>
135
+ <p>As of Clearing 4.1.2, you can now pass in options to <code>data-options</code> when the clearing is initialized on the page.</p>
136
136
 
137
137
  <%= code_example "
138
138
  {
@@ -65,22 +65,22 @@
65
65
  </div>
66
66
  </section>
67
67
  </div>
68
- <div class="section-container auto" data-section data-options="deep_linking: true;">
69
- <section class="section">
70
- <p class="title"><a href="#panel1">Section 1</a></p>
71
- <div class="content" data-slug="panel1">
68
+ <div class="section-container auto" data-section>
69
+ <section>
70
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
71
+ <div class="content" data-slug="panel1" data-section-content>
72
72
  <p>Section 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
73
73
  </div>
74
74
  </section>
75
- <section class="section">
76
- <p class="title"><a href="#panel2">Section 2</a></p>
77
- <div class="content" data-slug="panel2">
75
+ <section>
76
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
77
+ <div class="content" data-slug="panel2" data-section-content>
78
78
  <p>Section 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
79
79
  </div>
80
80
  </section>
81
- <div class="section">
82
- <p class="title"><a href="#panel3">Section 3</a></p>
83
- <div class="content" data-slug="panel3">
81
+ <div data-section-region class="section">
82
+ <p class="title" data-section-title><a href="#panel3">Section 3</a></p>
83
+ <div class="content" data-slug="panel3" data-section-content>
84
84
  <form>
85
85
  <div class="row collapse">
86
86
  <div class="large-2 columns">
@@ -128,15 +128,15 @@
128
128
 
129
129
  <%= code_example '
130
130
  <div class="section-container auto" data-section>
131
- <section class="section">
132
- <p class="title"><a href="#panel1">Section 1</a></p>
133
- <div class="content">
131
+ <section>
132
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
133
+ <div class="content" data-section-content>
134
134
  <p>Content of section 1.</p>
135
135
  </div>
136
136
  </section>
137
- <section class="section">
138
- <p class="title"><a href="#panel2">Section 2</a></p>
139
- <div class="content">
137
+ <section>
138
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
139
+ <div class="content" data-section-content>
140
140
  <p>Content of section 2.</p>
141
141
  </div>
142
142
  </section>
@@ -161,15 +161,15 @@
161
161
  <p>Adding an <code>accordion</code> class to the section container will show an accordion on both small and large screens.</p>
162
162
  <%= code_example '
163
163
  <div class="section-container accordion" data-section="accordion">
164
- <section class="section">
165
- <p class="title"><a href="#">Section 1</a></p>
166
- <div class="content">
164
+ <section>
165
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
166
+ <div class="content" data-section-content>
167
167
  <p>Content of section 1.</p>
168
168
  </div>
169
169
  </section>
170
- <section class="section">
171
- <p class="title"><a href="#">Section 2</a></p>
172
- <div class="content">
170
+ <section>
171
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
172
+ <div class="content" data-section-content>
173
173
  <p>Content of section 2.</p>
174
174
  </div>
175
175
  </section>
@@ -179,15 +179,15 @@
179
179
  <p>Adding a <code>tabs</code> class to the section container will enable tabs on both small and large screens.</p>
180
180
  <%= code_example '
181
181
  <div class="section-container tabs" data-section="tabs">
182
- <section class="section">
183
- <p class="title"><a href="#">Section 1</a></p>
184
- <div class="content">
182
+ <section>
183
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
184
+ <div class="content" data-section-content>
185
185
  <p>Content of section 1.</p>
186
186
  </div>
187
187
  </section>
188
- <section class="section">
189
- <p class="title"><a href="#">Section 2</a></p>
190
- <div class="content">
188
+ <section>
189
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
190
+ <div class="content" data-section-content>
191
191
  <p>Content of section 2.</p>
192
192
  </div>
193
193
  </section>
@@ -204,9 +204,9 @@
204
204
  <div class="row">
205
205
  <div class="large-3 columns">
206
206
  <div class="section-container vertical-nav" data-section="vertical-nav">
207
- <section class="section">
208
- <p class="title"><a href="#">Section 1</a></p>
209
- <div class="content">
207
+ <section>
208
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
209
+ <div class="content" data-section-content>
210
210
  <ul class="side-nav">
211
211
  <li><a href="#">Link 1</a></li>
212
212
  <li><a href="#">Link 2</a></li>
@@ -216,9 +216,9 @@
216
216
  </ul>
217
217
  </div>
218
218
  </section>
219
- <section class="section">
220
- <p class="title"><a href="#">Section 2</a></p>
221
- <div class="content">
219
+ <section>
220
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
221
+ <div class="content" data-section-content>
222
222
  <ul class="side-nav">
223
223
  <li><a href="#">Link 1</a></li>
224
224
  <li><a href="#">Link 2</a></li>
@@ -244,9 +244,9 @@
244
244
 
245
245
  <%= code_example '
246
246
  <div class="section-container horizontal-nav" data-section="horizontal-nav">
247
- <section class="section">
248
- <p class="title"><a href="#">Section 1</a></p>
249
- <div class="content">
247
+ <section>
248
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
249
+ <div class="content" data-section-content>
250
250
  <ul class="side-nav">
251
251
  <li><a href="#">Link 1</a></li>
252
252
  <li><a href="#">Link 2</a></li>
@@ -256,9 +256,9 @@
256
256
  </ul>
257
257
  </div>
258
258
  </section>
259
- <section class="section">
260
- <p class="title"><a href="#">Section 2</a></p>
261
- <div class="content">
259
+ <section>
260
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
261
+ <div class="content" data-section-content>
262
262
  <ul class="side-nav">
263
263
  <li><a href="#">Link 1</a></li>
264
264
  <li><a href="#">Link 2</a></li>
@@ -277,15 +277,15 @@
277
277
 
278
278
  <%= code_example '
279
279
  <div class="section-container auto" data-section data-options="deep_linking: true">
280
- <section class="section">
281
- <p class="title"><a href="#section1">Section 1</a></p>
282
- <div class="content" data-slug="section1">
280
+ <section>
281
+ <p class="title" data-section-title><a href="#section1">Section 1</a></p>
282
+ <div class="content" data-slug="section1" data-section-content>
283
283
  <p>Content of section 1.</p>
284
284
  </div>
285
285
  </section>
286
- <section class="section">
287
- <p class="title"><a href="#section2">Section 2</a></p>
288
- <div class="content" data-slug="section2">
286
+ <section>
287
+ <p class="title" data-section-title><a href="#section2">Section 2</a></p>
288
+ <div class="content" data-slug="section2" data-section-content>
289
289
  <p>Content of section 2.</p>
290
290
  </div>
291
291
  </section>
@@ -305,18 +305,18 @@
305
305
 
306
306
  <%= code_example '
307
307
  <div class="your-class-name" data-section="auto"> <!-- Can use "auto", "accordion", "tabs", "vertical-nav", or "horizontal-nav" -->
308
- <section class="your-section-class" data-section>
309
- <p class="title"><a href="#section1">Section 1</a></p>
310
- <div class="content" data-slug="section1">
308
+ <section class="your-section-class">
309
+ <p class="your-title-class" data-section-title><a href="#section1">Section 1</a></p>
310
+ <div class="your-content-class" data-slug="section1" data-section-content>
311
311
  <p>Content of section 1.</p>
312
312
  </div>
313
313
  </section>
314
- <section class="section">
315
- <p class="title"><a href="#section2">Section 2</a></p>
316
- <div class="content" data-slug="section2">
314
+ <div data-section-region>
315
+ <p class="your-title-class" data-section-title><a href="#section2">Section 2</a></p>
316
+ <div class="your-content-class" data-slug="section2" data-section-content>
317
317
  <p>Content of section 2.</p>
318
318
  </div>
319
- </section>
319
+ </div>
320
320
  </div>', :html %>
321
321
 
322
322
  <hr> -->
@@ -359,9 +359,9 @@ $section-bottom-margin: emCalc(20px);
359
359
 
360
360
  <%= code_example '
361
361
  <div class="section-container auto" data-section>
362
- <section class="section">
363
- <p class="title"><a href="#panel1">Section 1</a></p>
364
- <div class="content">
362
+ <section>
363
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
364
+ <div class="content" data-section-content>
365
365
  <ul class="side-nav">
366
366
  <li><a href="#">Link 1</a></li>
367
367
  <li><a href="#">Link 2</a></li>
@@ -371,9 +371,9 @@ $section-bottom-margin: emCalc(20px);
371
371
  </ul>
372
372
  </div>
373
373
  </section>
374
- <section class="section">
375
- <p class="title"><a href="#panel2">Section 2</a></p>
376
- <div class="content">
374
+ <section>
375
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
376
+ <div class="content" data-section-content>
377
377
  <ul class="side-nav">
378
378
  <li><a href="#">Link 1</a></li>
379
379
  <li><a href="#">Link 2</a></li>
@@ -166,7 +166,7 @@
166
166
  </ol>
167
167
  </div>
168
168
  <div class="large-8 columns">
169
- <h6>Defition Lists</h6>
169
+ <h6>Definition Lists</h6>
170
170
  <dl>
171
171
  <dt>Definition Title</dt>
172
172
  <dd>Definition Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nullam id dolor id nibh ultricies vehicula ut id elit.</dd>
data/docs/controller.rb CHANGED
@@ -30,6 +30,10 @@ helpers do
30
30
  def features_path
31
31
  '/grid.php'
32
32
  end
33
+
34
+ def training_path
35
+ '/training.php'
36
+ end
33
37
 
34
38
  def add_ons_path
35
39
  '/templates.php'
data/docs/index.html.erb CHANGED
@@ -108,7 +108,7 @@
108
108
  <div class="large-4 columns">
109
109
  <dl>
110
110
  <dt><h5><a href="components/joyride.html">Joyride</a></h5></dt>
111
- <dd>This plugin lets you give users a tour of your site our app. Joyride is easy to customize using CSS or our Scss variables.</dd>
111
+ <dd>This plugin lets you give users a tour of your site or app. Joyride is easy to customize using CSS or our Scss variables.</dd>
112
112
  </dl>
113
113
  </div>
114
114
  </div>
data/docs/layout.html.erb CHANGED
@@ -33,6 +33,8 @@
33
33
  <li class="divider"></li>
34
34
  <li><a href="<%= docs_path %>">Docs</a></li>
35
35
  <li class="divider"></li>
36
+ <li><a href="<%= training_path %>">Training</a></li>
37
+ <li class="divider"></li>
36
38
  <li class="has-form">
37
39
  <a href="http://foundation.zurb.com/docs" class="button">Getting Started</a>
38
40
  </li>
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.clearing = {
7
7
  name : 'clearing',
8
8
 
9
- version : '4.1.0',
9
+ version : '4.1.2',
10
10
 
11
11
  settings : {
12
12
  templates : {
@@ -25,8 +25,9 @@
25
25
  locked : false
26
26
  },
27
27
 
28
- init : function (method, options) {
29
- Foundation.inherit(this, 'set_data get_data remove_data throttle');
28
+ init : function (scope, method, options) {
29
+ var self = this;
30
+ Foundation.inherit(this, 'set_data get_data remove_data throttle data_options');
30
31
 
31
32
  if (typeof method === 'object') {
32
33
  options = $.extend(true, this.settings, method);
@@ -34,15 +35,15 @@
34
35
 
35
36
  if (typeof method != 'string') {
36
37
  $(this.scope).find('ul[data-clearing]').each(function () {
37
- var self = Foundation.libs.clearing,
38
- $el = $(this),
38
+ var $el = $(this),
39
39
  options = options || {},
40
+ lis = $el.find('li'),
40
41
  settings = self.get_data($el);
41
42
 
42
- if (!settings) {
43
+ if (!settings && lis.length > 0) {
43
44
  options.$parent = $el.parent();
44
45
 
45
- self.set_data($el, $.extend(true, self.settings, options));
46
+ self.set_data($el, $.extend({}, self.settings, options, self.data_options($el)));
46
47
 
47
48
  self.assemble($el.find('li'));
48
49
 
@@ -69,13 +70,24 @@
69
70
  function (e, current, target) {
70
71
  var current = current || $(this),
71
72
  target = target || current,
72
- settings = self.get_data(current.parent());
73
+ next = current.next('li'),
74
+ settings = self.get_data(current.parent()),
75
+ image = $(e.target);
73
76
 
74
77
  e.preventDefault();
75
78
  if (!settings) self.init();
76
79
 
80
+ // if clearing is open and the current image is
81
+ // clicked, go to the next image in sequence
82
+ if (target.hasClass('visible')
83
+ && current[0] === target[0]
84
+ && next.length > 0 && self.is_open(current)) {
85
+ target = next;
86
+ image = target.find('img');
87
+ }
88
+
77
89
  // set current and target to the clicked li if not otherwise defined.
78
- self.open($(e.target), current, target);
90
+ self.open(image, current, target);
79
91
  self.update_paddles(target);
80
92
  })
81
93
 
@@ -143,7 +155,10 @@
143
155
  },
144
156
 
145
157
  assemble : function ($li) {
146
- var $el = $li.parent(),
158
+ var $el = $li.parent();
159
+ $el.after('<div id="foundationClearingHolder"></div>');
160
+
161
+ var holder = $('#foundationClearingHolder'),
147
162
  settings = this.get_data($el),
148
163
  grid = $el.detach(),
149
164
  data = {
@@ -153,7 +168,7 @@
153
168
  wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
154
169
  data.grid + '</div></div>';
155
170
 
156
- return settings.$parent.append(wrapper);
171
+ return holder.after(wrapper).remove();
157
172
  },
158
173
 
159
174
  // event callbacks
@@ -166,9 +181,12 @@
166
181
 
167
182
  if (!this.locked()) {
168
183
  // set the image to the selected thumbnail
169
- image.attr('src', this.load($image));
184
+ image
185
+ .attr('src', this.load($image))
186
+ .css('visibility', 'hidden');
170
187
 
171
188
  this.loaded(image, function () {
189
+ image.css('visibility', 'visible');
172
190
  // toggle the gallery
173
191
  root.addClass('clearing-blackout');
174
192
  container.addClass('clearing-container');
@@ -209,6 +227,10 @@
209
227
  return false;
210
228
  },
211
229
 
230
+ is_open : function (current) {
231
+ return current.parent().attr('style').length > 0;
232
+ },
233
+
212
234
  keydown : function (e) {
213
235
  var clearing = $('.clearing-blackout').find('ul[data-clearing]');
214
236
 
@@ -256,17 +278,17 @@
256
278
  .closest('.carousel')
257
279
  .siblings('.visible-img');
258
280
 
259
- if (target.next().length) {
281
+ if (target.next().length > 0) {
260
282
  visible_image
261
- .find('.clearing-main-right')
283
+ .find('.clearing-main-next')
262
284
  .removeClass('disabled');
263
285
  } else {
264
286
  visible_image
265
- .find('.clearing-main-right')
287
+ .find('.clearing-main-next')
266
288
  .addClass('disabled');
267
289
  }
268
290
 
269
- if (target.prev().length) {
291
+ if (target.prev().length > 0) {
270
292
  visible_image
271
293
  .find('.clearing-main-prev')
272
294
  .removeClass('disabled');
@@ -480,6 +502,10 @@
480
502
  $(window).off('.fndtn.clearing');
481
503
  this.remove_data(); // empty settings cache
482
504
  this.settings.init = false;
505
+ },
506
+
507
+ reflow : function () {
508
+ this.init();
483
509
  }
484
510
  };
485
511
 
@@ -37,16 +37,23 @@
37
37
 
38
38
  $(this.scope).on('click.fndtn.dropdown', '[data-dropdown]', function (e) {
39
39
  e.preventDefault();
40
- e.stopPropagation();
41
40
  self.toggle($(this));
42
41
  });
43
42
 
44
- $('*, html, body').on('click.fndtn.dropdown', function (e) {
45
- if (!$(e.target).data('dropdown')) {
46
- $('[data-dropdown-content]')
47
- .css(Foundation.rtl ? 'right':'left', '-99999px')
48
- .removeClass(self.settings.activeClass);
43
+ $('body').on('click.fndtn.dropdown', function (e) {
44
+ var parent = $(e.target).closest('[data-dropdown-content]');
45
+
46
+ if ($(e.target).data('dropdown')) {
47
+ return;
48
+ }
49
+ if (parent.length > 0 && ($(e.target).is('[data-dropdown-content]') || $.contains(parent.first()[0], e.target))) {
50
+ e.stopPropagation();
51
+ return;
49
52
  }
53
+
54
+ $('[data-dropdown-content]')
55
+ .css(Foundation.rtl ? 'right':'left', '-99999px')
56
+ .removeClass(self.settings.activeClass);
50
57
  });
51
58
 
52
59
  $(window).on('resize.fndtn.dropdown', self.throttle(function () {
@@ -59,7 +66,10 @@
59
66
  toggle : function (target, resize) {
60
67
  var dropdown = $('#' + target.data('dropdown'));
61
68
 
62
- $('[data-dropdown-content]').not(dropdown).css(Foundation.rtl ? 'right':'left', '-99999px').removeClass(this.settings.activeClass);
69
+ $('[data-dropdown-content]')
70
+ .not(dropdown)
71
+ .css(Foundation.rtl ? 'right':'left', '-99999px')
72
+ .removeClass(this.settings.activeClass);
63
73
 
64
74
  if (dropdown.hasClass(this.settings.activeClass)) {
65
75
  dropdown
@@ -6,18 +6,21 @@
6
6
  Foundation.libs.joyride = {
7
7
  name: 'joyride',
8
8
 
9
- version : '4.0.0',
9
+ version : '4.1.2',
10
10
 
11
11
  defaults : {
12
+ expose : false, // turn on or off the expose feature
13
+ modal : false, // Whether to cover page with modal during the tour
12
14
  tipLocation : 'bottom', // 'top' or 'bottom' in relation to parent
13
15
  nubPosition : 'auto', // override on a per tooltip bases
14
- scrollSpeed : 300, // Page scrolling speed in milliseconds
16
+ scrollSpeed : 300, // Page scrolling speed in milliseconds, 0 = no scroll animation
15
17
  timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
16
18
  startTimerOnClick : true, // true or false - true requires clicking the first button start the timer
17
19
  startOffset : 0, // the index of the tooltip you want to start on (index of the li)
18
20
  nextButton : true, // true or false to control whether a next button is used
19
21
  tipAnimation : 'fade', // 'pop' or 'fade' in each tip
20
22
  pauseAfter : [], // array of indexes where to pause the tour after
23
+ exposed : [], // array of expose elements
21
24
  tipAnimationFadeSpeed: 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
22
25
  cookieMonster : false, // true or false to control whether cookies are used
23
26
  cookieName : 'joyride', // Name the cookie you'll use
@@ -26,12 +29,18 @@
26
29
  tipContainer : 'body', // Where will the tip be attached
27
30
  postRideCallback : function (){}, // A method to call once the tour closes (canceled or complete)
28
31
  postStepCallback : function (){}, // A method to call after each step
32
+ preStepCallback : function (){}, // A method to call before each step
33
+ preRideCallback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
34
+ postExposeCallback : function (){}, // A method to call after an element has been exposed
29
35
  template : { // HTML segments for tip layout
30
36
  link : '<a href="#close" class="joyride-close-tip">&times;</a>',
31
37
  timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
32
38
  tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
33
39
  wrapper : '<div class="joyride-content-wrapper"></div>',
34
- button : '<a href="#" class="small button joyride-next-tip"></a>'
40
+ button : '<a href="#" class="small button joyride-next-tip"></a>',
41
+ modal : '<div class="joyride-modal-bg"></div>',
42
+ expose : '<div class="joyride-expose-wrapper"></div>',
43
+ exposeCover: '<div class="joyride-expose-cover"></div>'
35
44
  }
36
45
  },
37
46
 
@@ -84,6 +93,16 @@
84
93
 
85
94
  $(window).on('resize.fndtn.joyride', self.throttle(function () {
86
95
  if ($('[data-joyride]').length > 0 && self.settings.$next_tip) {
96
+ if (self.settings.exposed.length > 0) {
97
+ var $els = $(self.settings.exposed);
98
+
99
+ $els.each(function () {
100
+ var $this = $(this);
101
+ self.un_expose($this);
102
+ self.expose($this);
103
+ });
104
+ }
105
+
87
106
  if (self.is_phone()) {
88
107
  self.pos_phone();
89
108
  } else {
@@ -105,6 +124,7 @@
105
124
 
106
125
  // non configureable settings
107
126
  this.settings.$content_el = $this;
127
+ this.settings.$body = $(this.settings.tipContainer);
108
128
  this.settings.body_offset = $(this.settings.tipContainer).position();
109
129
  this.settings.$tip_content = this.settings.$content_el.find('> li');
110
130
  this.settings.paused = false;
@@ -219,6 +239,18 @@
219
239
  this.settings.attempts = 0;
220
240
 
221
241
  if (this.settings.$li.length && this.settings.$target.length > 0) {
242
+ if (init) { //run when we first start
243
+ this.settings.preRideCallback(this.settings.$li.index(), this.settings.$next_tip);
244
+ if (this.settings.modal) {
245
+ this.show_modal();
246
+ }
247
+ }
248
+
249
+ this.settings.preStepCallback(this.settings.$li.index(), this.settings.$next_tip);
250
+
251
+ if (this.settings.modal && this.settings.expose) {
252
+ this.expose();
253
+ }
222
254
 
223
255
  this.settings.tipSettings = $.extend(this.settings, this.data_options(this.settings.$li));
224
256
 
@@ -243,7 +275,7 @@
243
275
 
244
276
  $timer.width(0);
245
277
 
246
- if (thsi.settings.timer > 0) {
278
+ if (this.settings.timer > 0) {
247
279
 
248
280
  this.settings.$next_tip.show();
249
281
 
@@ -310,10 +342,16 @@
310
342
  },
311
343
 
312
344
  hide : function () {
345
+ if (this.settings.modal && this.settings.expose) {
346
+ this.un_expose();
347
+ }
348
+
349
+ if (!this.settings.modal) {
350
+ $('.joyride-modal-bg').hide();
351
+ }
352
+ this.settings.$current_tip.hide();
313
353
  this.settings.postStepCallback(this.settings.$li.index(),
314
354
  this.settings.$current_tip);
315
- $('.joyride-modal-bg').hide();
316
- this.settings.$current_tip.hide();
317
355
  },
318
356
 
319
357
  set_li : function (init) {
@@ -378,6 +416,7 @@
378
416
  var half_fold = Math.ceil($(window).height() / 2),
379
417
  tip_position = this.settings.$next_tip.offset(),
380
418
  $nub = this.settings.$next_tip.find('.joyride-nub'),
419
+ nub_width = Math.ceil(this.outerWidth($nub) / 2),
381
420
  nub_height = Math.ceil(this.outerHeight($nub) / 2),
382
421
  toggle = init || false;
383
422
 
@@ -387,7 +426,10 @@
387
426
  this.settings.$next_tip.show();
388
427
  }
389
428
 
390
- if (typeof resizing === 'undefined') resizing = false;
429
+ if (typeof resizing === 'undefined') {
430
+ resizing = false;
431
+ }
432
+
391
433
  if (!/body/i.test(this.settings.$target.selector)) {
392
434
 
393
435
  if (this.bottom()) {
@@ -416,7 +458,7 @@
416
458
 
417
459
  this.settings.$next_tip.css({
418
460
  top: this.settings.$target.offset().top,
419
- left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left)});
461
+ left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left + nub_width)});
420
462
 
421
463
  this.nub_position($nub, this.settings.tipSettings.nubPosition, 'left');
422
464
 
@@ -424,7 +466,7 @@
424
466
 
425
467
  this.settings.$next_tip.css({
426
468
  top: this.settings.$target.offset().top,
427
- left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_height)});
469
+ left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_width)});
428
470
 
429
471
  this.nub_position($nub, this.settings.tipSettings.nubPosition, 'right');
430
472
 
@@ -503,9 +545,14 @@
503
545
  pos_modal : function ($nub) {
504
546
  this.center();
505
547
  $nub.hide();
548
+
549
+ this.show_modal();
550
+ },
551
+
552
+ show_modal : function () {
506
553
  if (!this.settings.$next_tip.data('closed')) {
507
554
  if ($('.joyride-modal-bg').length < 1) {
508
- $('body').append('<div class="joyride-modal-bg">').show();
555
+ $('body').append(this.settings.template.modal).show();
509
556
  }
510
557
 
511
558
  if (/pop/i.test(this.settings.tipAnimation)) {
@@ -516,6 +563,151 @@
516
563
  }
517
564
  },
518
565
 
566
+ expose : function () {
567
+ var expose,
568
+ exposeCover,
569
+ el,
570
+ origCSS,
571
+ randId = 'expose-'+Math.floor(Math.random()*10000);
572
+
573
+ if (arguments.length > 0 && arguments[0] instanceof $) {
574
+ el = arguments[0];
575
+ } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
576
+ el = this.settings.$target;
577
+ } else {
578
+ return false;
579
+ }
580
+
581
+ if(el.length < 1){
582
+ if(window.console){
583
+ console.error('element not valid', el);
584
+ }
585
+ return false;
586
+ }
587
+
588
+ expose = $(this.settings.template.expose);
589
+ this.settings.$body.append(expose);
590
+ expose.css({
591
+ top: el.offset().top,
592
+ left: el.offset().left,
593
+ width: this.outerWidth(el, true),
594
+ height: this.outerHeight(el, true)
595
+ });
596
+
597
+ exposeCover = $(this.settings.template.exposeCover);
598
+
599
+ origCSS = {
600
+ zIndex: el.css('z-index'),
601
+ position: el.css('position')
602
+ };
603
+
604
+ el.css('z-index',expose.css('z-index')*1+1);
605
+
606
+ if (origCSS.position == 'static') {
607
+ el.css('position','relative');
608
+ }
609
+
610
+ el.data('expose-css',origCSS);
611
+
612
+ exposeCover.css({
613
+ top: el.offset().top,
614
+ left: el.offset().left,
615
+ width: this.outerWidth(el, true),
616
+ height: this.outerHeight(el, true)
617
+ });
618
+
619
+ this.settings.$body.append(exposeCover);
620
+ expose.addClass(randId);
621
+ exposeCover.addClass(randId);
622
+ el.data('expose', randId);
623
+ this.settings.postExposeCallback(this.settings.$li.index(), this.settings.$next_tip, el);
624
+ this.add_exposed(el);
625
+ },
626
+
627
+ un_expose : function () {
628
+ var exposeId,
629
+ el,
630
+ expose ,
631
+ origCSS,
632
+ clearAll = false;
633
+
634
+ if (arguments.length > 0 && arguments[0] instanceof $) {
635
+ el = arguments[0];
636
+ } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
637
+ el = this.settings.$target;
638
+ } else {
639
+ return false;
640
+ }
641
+
642
+ if(el.length < 1){
643
+ if (window.console) {
644
+ console.error('element not valid', el);
645
+ }
646
+ return false;
647
+ }
648
+
649
+ exposeId = el.data('expose');
650
+ expose = $('.' + exposeId);
651
+
652
+ if (arguments.length > 1) {
653
+ clearAll = arguments[1];
654
+ }
655
+
656
+ if (clearAll === true) {
657
+ $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
658
+ } else {
659
+ expose.remove();
660
+ }
661
+
662
+ origCSS = el.data('expose-css');
663
+
664
+ if (origCSS.zIndex == 'auto') {
665
+ el.css('z-index', '');
666
+ } else {
667
+ el.css('z-index', origCSS.zIndex);
668
+ }
669
+
670
+ if (origCSS.position != el.css('position')) {
671
+ if(origCSS.position == 'static') {// this is default, no need to set it.
672
+ el.css('position', '');
673
+ } else {
674
+ el.css('position', origCSS.position);
675
+ }
676
+ }
677
+
678
+ el.removeData('expose');
679
+ el.removeData('expose-z-index');
680
+ this.remove_exposed(el);
681
+ },
682
+
683
+ add_exposed: function(el){
684
+ this.settings.exposed = this.settings.exposed || [];
685
+ if (el instanceof $ || typeof el === 'object') {
686
+ this.settings.exposed.push(el[0]);
687
+ } else if (typeof el == 'string') {
688
+ this.settings.exposed.push(el);
689
+ }
690
+ },
691
+
692
+ remove_exposed: function(el){
693
+ var search, count;
694
+ if (el instanceof $) {
695
+ search = el[0]
696
+ } else if (typeof el == 'string'){
697
+ search = el;
698
+ }
699
+
700
+ this.settings.exposed = this.settings.exposed || [];
701
+ count = this.settings.exposed.length;
702
+
703
+ for (var i=0; i < count; i++) {
704
+ if (this.settings.exposed[i] == search) {
705
+ this.settings.exposed.splice(i, 1);
706
+ return;
707
+ }
708
+ }
709
+ },
710
+
519
711
  center : function () {
520
712
  var $w = $(window);
521
713
 
@@ -545,14 +737,31 @@
545
737
 
546
738
  corners : function (el) {
547
739
  var w = $(window),
740
+ window_half = w.height() / 2,
741
+ //using this to calculate since scroll may not have finished yet.
742
+ tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
548
743
  right = w.width() + this.scrollLeft(w),
549
- bottom = w.width() + w.scrollTop();
744
+ offsetBottom = w.height() + tipOffset,
745
+ bottom = w.height() + w.scrollTop(),
746
+ top = w.scrollTop();
747
+
748
+ if (tipOffset < top) {
749
+ if (tipOffset < 0) {
750
+ top = 0;
751
+ } else {
752
+ top = tipOffset;
753
+ }
754
+ }
755
+
756
+ if (offsetBottom > bottom) {
757
+ bottom = offsetBottom;
758
+ }
550
759
 
551
760
  return [
552
- el.offset().top <= w.scrollTop(),
553
- right <= el.offset().left + this.outerWidth(el),
554
- bottom <= el.offset().top + this.outerHeight(el),
555
- this.scrollLeft(w) >= el.offset().left
761
+ el.offset().top < top,
762
+ right < el.offset().left + el.outerWidth(),
763
+ bottom < el.offset().top + el.outerHeight(),
764
+ this.scrollLeft(w) > el.offset().left
556
765
  ];
557
766
  },
558
767
 
@@ -595,6 +804,10 @@
595
804
  clearTimeout(this.settings.automate);
596
805
  }
597
806
 
807
+ if (this.settings.modal && this.settings.expose) {
808
+ this.un_expose();
809
+ }
810
+
598
811
  this.settings.$next_tip.data('closed', true);
599
812
 
600
813
  $('.joyride-modal-bg').hide();
@@ -145,9 +145,9 @@ if (typeof jQuery === "undefined" &&
145
145
  },
146
146
 
147
147
  response_obj : function (response_arr, args) {
148
- for (var callback in args) {
149
- if (typeof args[callback] === 'function') {
150
- return args[callback]({
148
+ for (var i = 0, len = args.length; i < len; i++) {
149
+ if (typeof args[i] === 'function') {
150
+ return args[i]({
151
151
  errors: response_arr.filter(function (s) {
152
152
  if (typeof s === 'string') return s;
153
153
  })
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.reveal = {
7
7
  name: 'reveal',
8
8
 
9
- version : '4.0.9',
9
+ version : '4.1.2',
10
10
 
11
11
  locked : false,
12
12
 
@@ -41,6 +41,8 @@
41
41
 
42
42
  if (typeof method === 'object') {
43
43
  $.extend(true, this.settings, method);
44
+ } else if (typeof options !== 'undefined') {
45
+ $.extend(true, this.settings, options);
44
46
  }
45
47
 
46
48
  if (typeof method != 'string') {
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.section = {
7
7
  name: 'section',
8
8
 
9
- version : '4.1.1',
9
+ version : '4.1.2',
10
10
 
11
11
  settings : {
12
12
  deep_linking: false,
@@ -32,7 +32,7 @@
32
32
  var self = this;
33
33
 
34
34
  $(this.scope)
35
- .on('click.fndtn.section', '[data-section] .title', function (e) {
35
+ .on('click.fndtn.section', '[data-section] .title, [data-section] [data-section-title]', function (e) {
36
36
  var $this = $(this),
37
37
  section = $this.closest('[data-section]');
38
38
 
@@ -52,9 +52,9 @@
52
52
 
53
53
  $(document)
54
54
  .on('click.fndtn.section', function (e) {
55
- if ($(e.target).closest('.title').length < 1) {
55
+ if ($(e.target).closest('.title, [data-section-title]').length < 1) {
56
56
  $('[data-section="vertical-nav"], [data-section="horizontal-nav"]')
57
- .find('section, .section')
57
+ .find('section, .section, [data-section-region]')
58
58
  .removeClass('active')
59
59
  .attr('style', '');
60
60
  }
@@ -64,8 +64,8 @@
64
64
 
65
65
  toggle_active : function (e, self) {
66
66
  var $this = $(this),
67
- section = $this.closest('section, .section'),
68
- content = section.find('.content'),
67
+ section = $this.closest('section, .section, [data-section-region]'),
68
+ content = section.find('.content, [data-section-content]'),
69
69
  parent = section.closest('[data-section]'),
70
70
  self = Foundation.libs.section,
71
71
  settings = $.extend({}, self.settings, self.data_options(parent));
@@ -87,10 +87,10 @@
87
87
  }
88
88
  } else {
89
89
  var prev_active_section = null,
90
- title_height = self.outerHeight(section.find('.title'));
90
+ title_height = self.outerHeight(section.find('.title, [data-section-title]'));
91
91
 
92
92
  if (self.small(parent) || settings.one_up) {
93
- prev_active_section = $this.closest('[data-section]').find('section.active, .section.active');
93
+ prev_active_section = $this.closest('[data-section]').find('section.active, .section.active, .active[data-section-region]');
94
94
 
95
95
  if (self.small(parent)) {
96
96
  prev_active_section.attr('style', '');
@@ -125,7 +125,7 @@
125
125
 
126
126
  sections.each(function() {
127
127
  var $this = $(this),
128
- active_section = $this.find('section.active, .section.active'),
128
+ active_section = $this.find('section.active, .section.active, .active[data-section-region]'),
129
129
  settings = $.extend({}, self.settings, self.data_options($this));
130
130
 
131
131
  if (active_section.length > 1) {
@@ -138,20 +138,23 @@
138
138
  && !self.is_horizontal($this)
139
139
  && !self.is_accordion($this)) {
140
140
 
141
- var first = $this.find('section, .section').first();
142
- first.addClass('active');
141
+ var first = $this.find('section, .section, [data-section-region]').first();
142
+
143
+ if (settings.one_up) {
144
+ first.addClass('active');
145
+ }
143
146
 
144
147
  if (self.small($this)) {
145
148
  first.attr('style', '');
146
149
  } else {
147
- first.css('padding-top', self.outerHeight(first.find('.title')));
150
+ first.css('padding-top', self.outerHeight(first.find('.title, [data-section-title]')));
148
151
  }
149
152
  }
150
153
 
151
154
  if (self.small($this)) {
152
155
  active_section.attr('style', '');
153
156
  } else {
154
- active_section.css('padding-top', self.outerHeight(active_section.find('.title')));
157
+ active_section.css('padding-top', self.outerHeight(active_section.find('.title, [data-section-title]')));
155
158
  }
156
159
 
157
160
  self.position_titles($this);
@@ -191,19 +194,19 @@
191
194
 
192
195
  if (hash.length > 0 && settings.deep_linking) {
193
196
  section
194
- .find('section, .section')
197
+ .find('section, .section, [data-section-region]')
195
198
  .attr('style', '')
196
199
  .removeClass('active');
197
200
  section
198
- .find('.content[data-slug="' + hash + '"]')
199
- .closest('section, .section')
201
+ .find('.content[data-slug="' + hash + '"], [data-section-content][data-slug="' + hash + '"]')
202
+ .closest('section, .section, [data-section-region]')
200
203
  .addClass('active');
201
204
  }
202
205
  });
203
206
  },
204
207
 
205
208
  position_titles : function (section, off) {
206
- var titles = section.find('.title'),
209
+ var titles = section.find('.title, [data-section-title]'),
207
210
  previous_width = 0,
208
211
  self = this;
209
212
 
@@ -223,17 +226,17 @@
223
226
  },
224
227
 
225
228
  position_content : function (section, off) {
226
- var titles = section.find('.title'),
227
- content = section.find('.content'),
229
+ var titles = section.find('.title, [data-section-title]'),
230
+ content = section.find('.content, [data-section-content]'),
228
231
  self = this;
229
232
 
230
233
  if (typeof off === 'boolean') {
231
234
  content.attr('style', '');
232
235
  section.attr('style', '');
233
236
  } else {
234
- section.find('section, .section').each(function () {
235
- var title = $(this).find('.title'),
236
- content = $(this).find('.content');
237
+ section.find('section, .section, [data-section-region]').each(function () {
238
+ var title = $(this).find('.title, [data-section-title]'),
239
+ content = $(this).find('.content, [data-section-content]');
237
240
  if (!self.rtl) {
238
241
  content.css({left: title.position().left - 1, top: self.outerHeight(title) - 2});
239
242
  } else {
@@ -254,7 +257,7 @@
254
257
  position_right : function (el) {
255
258
  var section = el.closest('[data-section]'),
256
259
  section_width = el.closest('[data-section]').width(),
257
- offset = section.find('.title').length;
260
+ offset = section.find('.title, [data-section-title]').length;
258
261
  return (section_width - el.position().left - el.width() * (el.index() + 1) - offset);
259
262
  },
260
263
 
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.topbar = {
7
7
  name : 'topbar',
8
8
 
9
- version : '4.1.0',
9
+ version : '4.1.2',
10
10
 
11
11
  settings : {
12
12
  index : 0,
@@ -16,7 +16,7 @@
16
16
  init : false
17
17
  },
18
18
 
19
- init : function (method, options) {
19
+ init : function (section, method, options) {
20
20
  var self = this;
21
21
 
22
22
  if (typeof method === 'object') {
@@ -85,17 +85,18 @@
85
85
  }
86
86
  section.find('li.moved').removeClass('moved');
87
87
  topbar.data('index', 0);
88
- }
89
88
 
90
- if (topbar.parent().hasClass('fixed')) {
89
+ if (topbar.hasClass('fixed')) {
90
+ topbar.parent().addClass('fixed');
91
+ topbar.removeClass('fixed');
92
+ $('body').css('padding-top',offst);
93
+ }
94
+ } else if (topbar.parent().hasClass('fixed')) {
91
95
  topbar.parent().removeClass('fixed');
96
+ topbar.addClass('fixed');
92
97
  $('body').css('padding-top','0');
93
98
  window.scrollTo(0,0);
94
- } else if (topbar.hasClass('fixed expanded')) {
95
- topbar.parent().addClass('fixed');
96
- $('body').css('padding-top',offst);
97
99
  }
98
-
99
100
  })
100
101
 
101
102
  .on('click.fndtn.topbar', '.top-bar .has-dropdown>a', function (e) {
@@ -126,7 +127,7 @@
126
127
  topbar
127
128
  .css('min-height', topbar.data('height') + self.outerHeight(titlebar, true) * 2)
128
129
  }
129
- });
130
+ });
130
131
 
131
132
  $(window).on('resize.fndtn.topbar', function () {
132
133
  if (!self.breakpoint()) {
@@ -21,6 +21,7 @@ module Foundation
21
21
  end
22
22
 
23
23
  def detect_js_format
24
+ return ['.coffee', '#='] if File.exist?('app/assets/javascripts/application.coffee')
24
25
  return ['.js.coffee', '#='] if File.exist?('app/assets/javascripts/application.js.coffee')
25
26
  return ['.js', '//='] if File.exist?('app/assets/javascripts/application.js')
26
27
  end
@@ -26,3 +26,6 @@
26
26
  = yield
27
27
 
28
28
  = javascript_include_tag "application"
29
+
30
+ :plain
31
+ </html>
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "4.1.1"
2
+ VERSION = "4.1.2"
3
3
  end
@@ -116,7 +116,7 @@ $custom-dropdown-width-large: 434px !default;
116
116
  background: linear-gradient(to bottom, $custom-dropdown-bg 0%,$custom-select-fade-to-color 100%);
117
117
  -webkit-box-shadow: none;
118
118
  box-shadow: none;
119
- font-size: emCalc(14px);
119
+ font-size: $custom-dropdown-font-size;
120
120
  vertical-align: top;
121
121
 
122
122
  ul {
@@ -237,4 +237,4 @@ $custom-dropdown-width-large: 434px !default;
237
237
  /* Custom input, disabled */
238
238
  .custom.disabled { background-color: $custom-form-bg-disabled; }
239
239
  }
240
- }
240
+ }
@@ -157,6 +157,25 @@ $joyride-screenfill: rgba(0,0,0,0.5) !default;
157
157
  cursor: pointer;
158
158
  }
159
159
 
160
+ .joyride-expose-wrapper {
161
+ background-color: #ffffff;
162
+ position: absolute;
163
+ border-radius: 3px;
164
+ z-index: 102;
165
+ -moz-box-shadow: 0px 0px 30px #ffffff;
166
+ -webkit-box-shadow: 0px 0px 15px #ffffff;
167
+ box-shadow: 0px 0px 15px #ffffff;
168
+ }
169
+
170
+ .joyride-expose-cover {
171
+ background: transparent;
172
+ border-radius: 3px;
173
+ position: absolute;
174
+ z-index: 9999;
175
+ top: 0px;
176
+ left: 0px;
177
+ }
178
+
160
179
 
161
180
  /* Styles for screens that are atleast 768px; */
162
181
  @media #{$small} {
@@ -249,7 +249,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
249
249
  }
250
250
 
251
251
  // Apply the active link color when it has that class
252
- &.active a { background: darken($topbar-dropdown-bg, 3%); }
252
+ &.active > a { background: darken($topbar-dropdown-bg, 3%); }
253
253
  }
254
254
 
255
255
  // Add some extra padding for list items contains buttons
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zurb-foundation
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-02 00:00:00.000000000 Z
12
+ date: 2013-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  segments:
233
233
  - 0
234
- hash: 1017486002222735027
234
+ hash: -1096634432269913109
235
235
  required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  none: false
237
237
  requirements:
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  segments:
242
242
  - 0
243
- hash: 1017486002222735027
243
+ hash: -1096634432269913109
244
244
  requirements: []
245
245
  rubyforge_project:
246
246
  rubygems_version: 1.8.23