moovui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +17 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +1 -0
  7. data/Rakefile +1 -0
  8. data/bourbon/_bourbon-deprecated-upcoming.scss +13 -0
  9. data/bourbon/_bourbon.scss +59 -0
  10. data/bourbon/addons/_button.scss +273 -0
  11. data/bourbon/addons/_clearfix.scss +29 -0
  12. data/bourbon/addons/_font-family.scss +5 -0
  13. data/bourbon/addons/_hide-text.scss +5 -0
  14. data/bourbon/addons/_html5-input-types.scss +56 -0
  15. data/bourbon/addons/_position.scss +42 -0
  16. data/bourbon/addons/_prefixer.scss +49 -0
  17. data/bourbon/addons/_retina-image.scss +32 -0
  18. data/bourbon/addons/_size.scss +44 -0
  19. data/bourbon/addons/_timing-functions.scss +32 -0
  20. data/bourbon/addons/_triangle.scss +45 -0
  21. data/bourbon/css3/_animation.scss +52 -0
  22. data/bourbon/css3/_appearance.scss +3 -0
  23. data/bourbon/css3/_backface-visibility.scss +6 -0
  24. data/bourbon/css3/_background-image.scss +48 -0
  25. data/bourbon/css3/_background.scss +103 -0
  26. data/bourbon/css3/_border-image.scss +55 -0
  27. data/bourbon/css3/_border-radius.scss +22 -0
  28. data/bourbon/css3/_box-sizing.scss +4 -0
  29. data/bourbon/css3/_columns.scss +47 -0
  30. data/bourbon/css3/_flex-box.scss +52 -0
  31. data/bourbon/css3/_font-face.scss +23 -0
  32. data/bourbon/css3/_hidpi-media-query.scss +10 -0
  33. data/bourbon/css3/_image-rendering.scss +13 -0
  34. data/bourbon/css3/_inline-block.scss +8 -0
  35. data/bourbon/css3/_keyframes.scss +43 -0
  36. data/bourbon/css3/_linear-gradient.scss +41 -0
  37. data/bourbon/css3/_perspective.scss +8 -0
  38. data/bourbon/css3/_placeholder.scss +29 -0
  39. data/bourbon/css3/_radial-gradient.scss +44 -0
  40. data/bourbon/css3/_transform.scss +15 -0
  41. data/bourbon/css3/_transition.scss +34 -0
  42. data/bourbon/css3/_user-select.scss +3 -0
  43. data/bourbon/functions/_compact.scss +11 -0
  44. data/bourbon/functions/_flex-grid.scss +39 -0
  45. data/bourbon/functions/_grid-width.scss +13 -0
  46. data/bourbon/functions/_linear-gradient.scss +13 -0
  47. data/bourbon/functions/_modular-scale.scss +40 -0
  48. data/bourbon/functions/_px-to-em.scss +8 -0
  49. data/bourbon/functions/_radial-gradient.scss +23 -0
  50. data/bourbon/functions/_tint-shade.scss +9 -0
  51. data/bourbon/functions/_transition-property-name.scss +22 -0
  52. data/bourbon/helpers/_deprecated-webkit-gradient.scss +39 -0
  53. data/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  54. data/bourbon/helpers/_linear-positions-parser.scss +61 -0
  55. data/bourbon/helpers/_radial-arg-parser.scss +69 -0
  56. data/bourbon/helpers/_radial-positions-parser.scss +18 -0
  57. data/bourbon/helpers/_render-gradients.scss +26 -0
  58. data/bourbon/helpers/_shape-size-stripper.scss +10 -0
  59. data/chosen.jquery.js +1166 -0
  60. data/custom.modernizr.js +4 -0
  61. data/fonts/TSTARPRO-BoldWeb.eot +0 -0
  62. data/fonts/TSTARPRO-BoldWeb.woff +0 -0
  63. data/fonts/entypo.eot +0 -0
  64. data/fonts/entypo.svg +235 -0
  65. data/fonts/entypo.ttf +0 -0
  66. data/fonts/entypo.woff +0 -0
  67. data/foundation.alerts.js +52 -0
  68. data/foundation.dropdown.js +177 -0
  69. data/foundation.js +440 -0
  70. data/foundation.reveal.js +330 -0
  71. data/foundation.section.js +400 -0
  72. data/foundation.tooltips.custom.js +222 -0
  73. data/globals/_base.scss +41 -0
  74. data/globals/_entypo.scss +711 -0
  75. data/globals/_footer.scss +29 -0
  76. data/globals/_header.scss +64 -0
  77. data/globals/_mixins.scss +69 -0
  78. data/globals/_normalize.scss +405 -0
  79. data/globals/_vars.scss +67 -0
  80. data/index.html +1254 -0
  81. data/lib/moovui/version.rb +3 -0
  82. data/lib/moovui.rb +4 -0
  83. data/modules/_accordion.scss +51 -0
  84. data/modules/_btn.scss +130 -0
  85. data/modules/_btnbar.scss +56 -0
  86. data/modules/_code.scss +55 -0
  87. data/modules/_copy.scss +99 -0
  88. data/modules/_definition.scss +34 -0
  89. data/modules/_docs.scss +127 -0
  90. data/modules/_dropdown.scss +32 -0
  91. data/modules/_flex.scss +300 -0
  92. data/modules/_grid.scss +72 -0
  93. data/modules/_input.scss +59 -0
  94. data/modules/_label.scss +6 -0
  95. data/modules/_list.scss +57 -0
  96. data/modules/_media.scss +17 -0
  97. data/modules/_modal.scss +71 -0
  98. data/modules/_notice.scss +111 -0
  99. data/modules/_pane.scss +25 -0
  100. data/modules/_resp.scss +71 -0
  101. data/modules/_select.scss +94 -0
  102. data/modules/_sidebar.scss +117 -0
  103. data/modules/_syntax-highlighter.scss +100 -0
  104. data/modules/_table.scss +63 -0
  105. data/modules/_tooltip.scss +59 -0
  106. data/moovui.gemspec +21 -0
  107. data/moovui.scss +43 -0
  108. data/shBrushBash.js +59 -0
  109. data/shBrushJScript.js +52 -0
  110. data/shBrushNull.js +35 -0
  111. data/shBrushSass.js +90 -0
  112. data/shBrushTritium.js +46 -0
  113. data/shBrushXml.js +69 -0
  114. data/shCore.custom.js +2399 -0
  115. data/shInit.js +14 -0
  116. metadata +187 -0
@@ -0,0 +1,400 @@
1
+ /*jslint unparam: true, browser: true, indent: 2 */
2
+
3
+ ;
4
+ (function($, window, document) {
5
+ 'use strict';
6
+
7
+ Foundation.libs.section = {
8
+ name : 'section',
9
+
10
+ version : '4.3.1',
11
+
12
+ settings: {
13
+ deep_linking: false,
14
+ small_breakpoint: 768,
15
+ one_up: true,
16
+ section_selector: '[data-section]',
17
+ region_selector: 'section, .section, [data-section-region]',
18
+ title_selector: '.title, [data-section-title]',
19
+ //marker: container is resized
20
+ resized_data_attr: 'data-section-resized',
21
+ //marker: container should apply accordion style
22
+ small_style_data_attr: 'data-section-small-style',
23
+ content_selector: '.content, [data-section-content]',
24
+ nav_selector: '[data-section="vertical-nav"], [data-section="horizontal-nav"]',
25
+ active_class: 'active',
26
+ callback: function() {}
27
+ },
28
+
29
+ init: function(scope, method, options) {
30
+ var self = this;
31
+ Foundation.inherit(this, 'throttle data_options position_right offset_right');
32
+
33
+ if (typeof method === 'object') {
34
+ $.extend(true, self.settings, method);
35
+ }
36
+
37
+ if (typeof method !== 'string') {
38
+ this.events();
39
+ return true;
40
+ } else {
41
+ return this[method].call(this, options);
42
+ }
43
+ },
44
+
45
+ events: function() {
46
+ var self = this;
47
+
48
+ //combine titles selector from settings for click event binding
49
+ var click_title_selectors = [],
50
+ section_selector = self.settings.section_selector,
51
+ region_selectors = self.settings.region_selector.split(","),
52
+ title_selectors = self.settings.title_selector.split(",");
53
+
54
+ for (var i = 0, len = region_selectors.length; i < len; i++) {
55
+ var region_selector = region_selectors[i];
56
+
57
+ for (var j = 0, len1 = title_selectors.length; j < len1; j++) {
58
+ var title_selector = section_selector + ">" + region_selector + ">" + title_selectors[j];
59
+
60
+ click_title_selectors.push(title_selector + " a"); //or we can not do preventDefault for click event of <a>
61
+ click_title_selectors.push(title_selector);
62
+ }
63
+ }
64
+
65
+ $(self.scope)
66
+ .on('click.fndtn.section', click_title_selectors.join(","), function(e) {
67
+ var title = $(this).closest(self.settings.title_selector);
68
+
69
+ self.close_navs(title);
70
+ if (title.siblings(self.settings.content_selector).length > 0) {
71
+ self.toggle_active.call(title[0], e);
72
+ }
73
+ });
74
+
75
+ $(window)
76
+ .on('resize.fndtn.section', self.throttle(function() { self.resize(); }, 30))
77
+ .on('hashchange.fndtn.section', self.set_active_from_hash);
78
+
79
+ $(document).on('click.fndtn.section', function (e) {
80
+ if (e.isPropagationStopped && e.isPropagationStopped()) return;
81
+ if (e.target === document) return;
82
+ self.close_navs($(e.target).closest(self.settings.title_selector));
83
+ });
84
+
85
+ $(window).triggerHandler('resize.fndtn.section');
86
+ $(window).triggerHandler('hashchange.fndtn.section');
87
+ },
88
+
89
+ //close nav !one_up on click elsewhere
90
+ close_navs: function(except_nav_with_title) {
91
+ var self = Foundation.libs.section,
92
+ navsToClose = $(self.settings.nav_selector)
93
+ .filter(function() { return !$.extend({},
94
+ self.settings, self.data_options($(this))).one_up; });
95
+
96
+ if (except_nav_with_title.length > 0) {
97
+ var section = except_nav_with_title.parent().parent();
98
+
99
+ if (self.is_horizontal_nav(section) || self.is_vertical_nav(section)) {
100
+ //exclude current nav from list
101
+ navsToClose = navsToClose.filter(function() { return this !== section[0]; });
102
+ }
103
+ }
104
+ //close navs on click on title
105
+ navsToClose.children(self.settings.region_selector).removeClass(self.settings.active_class);
106
+ },
107
+
108
+ toggle_active: function(e) {
109
+ var $this = $(this),
110
+ self = Foundation.libs.section,
111
+ region = $this.parent(),
112
+ content = $this.siblings(self.settings.content_selector),
113
+ section = region.parent(),
114
+ settings = $.extend({}, self.settings, self.data_options(section)),
115
+ prev_active_region = section.children(self.settings.region_selector).filter("." + self.settings.active_class);
116
+
117
+ //for anchors inside [data-section-title]
118
+ if (!settings.deep_linking && content.length > 0) {
119
+ e.preventDefault();
120
+ }
121
+
122
+ e.stopPropagation(); //do not catch same click again on parent
123
+
124
+ if (!region.hasClass(self.settings.active_class)) {
125
+ prev_active_region.removeClass(self.settings.active_class);
126
+ region.addClass(self.settings.active_class);
127
+ //force resize for better performance (do not wait timer)
128
+ self.resize(region.find(self.settings.section_selector).not("[" + self.settings.resized_data_attr + "]"), true);
129
+ } else if (!settings.one_up && (self.small(section) || self.is_vertical_nav(section) || self.is_horizontal_nav(section) || self.is_accordion(section))) {
130
+ region.removeClass(self.settings.active_class);
131
+ }
132
+ settings.callback(section);
133
+ },
134
+
135
+ check_resize_timer: null,
136
+
137
+ //main function that sets title and content positions; runs for :not(.resized) and :visible once when window width is medium up
138
+ //sections:
139
+ // selected sections to resize, are defined on resize forced by visibility changes
140
+ //ensure_has_active_region:
141
+ // is true when we force resize for no resized sections that were hidden and became visible,
142
+ // these sections can have no selected region, because all regions were hidden along with section on executing set_active_from_hash
143
+ resize: function(sections, ensure_has_active_region) {
144
+
145
+ var self = Foundation.libs.section,
146
+ is_small_window = self.small($(document)),
147
+ //filter for section resize
148
+ should_be_resized = function (section, now_is_hidden) {
149
+ return !self.is_accordion(section) &&
150
+ !section.is("[" + self.settings.resized_data_attr + "]") &&
151
+ (!is_small_window || self.is_horizontal_tabs(section)) &&
152
+ now_is_hidden === (section.css('display') === 'none' ||
153
+ !section.parent().is(':visible'));
154
+ };
155
+
156
+ sections = sections || $(self.settings.section_selector);
157
+
158
+ clearTimeout(self.check_resize_timer);
159
+
160
+ if (!is_small_window) {
161
+ sections.removeAttr(self.settings.small_style_data_attr);
162
+ }
163
+
164
+ //resize
165
+ sections.filter(function() { return should_be_resized($(this), false); })
166
+ .each(function() {
167
+ var section = $(this),
168
+ regions = section.children(self.settings.region_selector),
169
+ titles = regions.children(self.settings.title_selector),
170
+ content = regions.children(self.settings.content_selector),
171
+ titles_max_height = 0;
172
+
173
+ if (ensure_has_active_region &&
174
+ section.children(self.settings.region_selector).filter("." + self.settings.active_class).length == 0) {
175
+ var settings = $.extend({}, self.settings, self.data_options(section));
176
+
177
+ if (!settings.deep_linking && (settings.one_up || !self.is_horizontal_nav(section) &&
178
+ !self.is_vertical_nav(section) && !self.is_accordion(section))) {
179
+ regions.filter(":visible").first().addClass(self.settings.active_class);
180
+ }
181
+ }
182
+
183
+ if (self.is_horizontal_tabs(section) || self.is_auto(section)) {
184
+ // region: position relative
185
+ // title: position absolute
186
+ // content: position static
187
+ var titles_sum_width = 0;
188
+
189
+ titles.each(function() {
190
+ var title = $(this);
191
+
192
+ if (title.is(":visible")) {
193
+ title.css(!self.rtl ? 'left' : 'right', titles_sum_width);
194
+ var title_h_border_width = parseInt(title.css("border-" + (self.rtl ? 'left' : 'right') + "-width"), 10);
195
+
196
+ if (title_h_border_width.toString() === 'Nan') {
197
+ title_h_border_width = 0;
198
+ }
199
+
200
+ titles_sum_width += self.outerWidth(title) - title_h_border_width;
201
+ titles_max_height = Math.max(titles_max_height, self.outerHeight(title));
202
+ }
203
+ });
204
+ titles.css('height', titles_max_height);
205
+ regions.each(function() {
206
+ var region = $(this),
207
+ region_content = region.children(self.settings.content_selector),
208
+ content_top_border_width = parseInt(region_content.css("border-top-width"), 10);
209
+
210
+ if (content_top_border_width.toString() === 'Nan') {
211
+ content_top_border_width = 0;
212
+ }
213
+
214
+ region.css('padding-top', titles_max_height - content_top_border_width);
215
+ });
216
+
217
+ section.css("min-height", titles_max_height);
218
+ } else if (self.is_horizontal_nav(section)) {
219
+ var first = true;
220
+ // region: positon relative, float left
221
+ // title: position static
222
+ // content: position absolute
223
+ titles.each(function() {
224
+ titles_max_height = Math.max(titles_max_height, self.outerHeight($(this)));
225
+ });
226
+
227
+ regions.each(function() {
228
+ var region = $(this);
229
+
230
+ region.css("margin-left", "-" + (first ? section : region.children(self.settings.title_selector)).css("border-left-width"));
231
+ first = false;
232
+ });
233
+
234
+ regions.css("margin-top", "-" + section.css("border-top-width"));
235
+ titles.css('height', titles_max_height);
236
+ content.css('top', titles_max_height);
237
+ section.css("min-height", titles_max_height);
238
+ } else if (self.is_vertical_tabs(section)) {
239
+ var titles_sum_height = 0;
240
+ // region: position relative, for .active: fixed padding==title.width
241
+ // title: fixed width, position absolute
242
+ // content: position static
243
+ titles.each(function() {
244
+ var title = $(this);
245
+
246
+ if (title.is(":visible")) {
247
+ title.css('top', titles_sum_height);
248
+ var title_top_border_width = parseInt(title.css("border-top-width"), 10);
249
+
250
+ if (title_top_border_width.toString() === 'Nan') {
251
+ title_top_border_width = 0;
252
+ }
253
+
254
+ titles_sum_height += self.outerHeight(title) - title_top_border_width;
255
+ }
256
+ });
257
+
258
+ content.css('min-height', titles_sum_height + 1);
259
+ } else if (self.is_vertical_nav(section)) {
260
+ var titles_max_width = 0,
261
+ first1 = true;
262
+ // region: positon relative
263
+ // title: position static
264
+ // content: position absolute
265
+ titles.each(function() {
266
+ titles_max_width = Math.max(titles_max_width, self.outerWidth($(this)));
267
+ });
268
+
269
+ regions.each(function () {
270
+ var region = $(this);
271
+
272
+ region.css("margin-top", "-" + (first1 ? section : region.children(self.settings.title_selector)).css("border-top-width"));
273
+ first1 = false;
274
+ });
275
+
276
+ titles.css('width', titles_max_width);
277
+ content.css(!self.rtl ? 'left' : 'right', titles_max_width);
278
+ section.css('width', titles_max_width);
279
+ }
280
+
281
+ section.attr(self.settings.resized_data_attr, true);
282
+ });
283
+
284
+ //wait elements to become visible then resize
285
+ if ($(self.settings.section_selector).filter(function() { return should_be_resized($(this), true); }).length > 0)
286
+ self.check_resize_timer = setTimeout(function() {
287
+ self.resize(sections.filter(function() { return should_be_resized($(this), false); }), true);
288
+ }, 700);
289
+
290
+ if (is_small_window) {
291
+ sections.attr(self.settings.small_style_data_attr, true);
292
+ }
293
+ },
294
+
295
+ is_vertical_nav: function(el) {
296
+ return /vertical-nav/i.test(el.data('section'));
297
+ },
298
+
299
+ is_horizontal_nav: function(el) {
300
+ return /horizontal-nav/i.test(el.data('section'));
301
+ },
302
+
303
+ is_accordion: function(el) {
304
+ return /accordion/i.test(el.data('section'));
305
+ },
306
+
307
+ is_horizontal_tabs: function(el) {
308
+ return /^tabs$/i.test(el.data('section'));
309
+ },
310
+
311
+ is_vertical_tabs: function(el) {
312
+ return /vertical-tabs/i.test(el.data('section'));
313
+ },
314
+
315
+ is_auto: function (el) {
316
+ var data_section = el.data('section');
317
+ return data_section === '' || /auto/i.test(data_section);
318
+ },
319
+
320
+ set_active_from_hash: function() {
321
+ var self = Foundation.libs.section,
322
+ hash = window.location.hash.substring(1),
323
+ sections = $(self.settings.section_selector);
324
+
325
+ sections.each(function() {
326
+ var section = $(this),
327
+ settings = $.extend({}, self.settings, self.data_options(section)),
328
+ regions = section.children(self.settings.region_selector),
329
+ set_active_from_hash = settings.deep_linking && hash.length > 0,
330
+ selected = false;
331
+
332
+ regions.each(function() {
333
+ var region = $(this);
334
+
335
+ if (selected) {
336
+ region.removeClass(self.settings.active_class);
337
+ } else if (set_active_from_hash) {
338
+ var data_slug = region.children(self.settings.content_selector).data('slug');
339
+
340
+ if (data_slug && new RegExp(data_slug, 'i').test(hash)) {
341
+ if (!region.hasClass(self.settings.active_class))
342
+ region.addClass(self.settings.active_class);
343
+ selected = true;
344
+ } else {
345
+ region.removeClass(self.settings.active_class);
346
+ }
347
+ } else if (region.hasClass(self.settings.active_class)) {
348
+ selected = true;
349
+ }
350
+ });
351
+
352
+ if (!selected && !settings.deep_linking && (settings.one_up || !self.is_horizontal_nav(section) &&
353
+ !self.is_vertical_nav(section) && !self.is_accordion(section)))
354
+ regions.filter(":visible").first().addClass(self.settings.active_class);
355
+ });
356
+ },
357
+
358
+ reflow: function() {
359
+ var self = Foundation.libs.section;
360
+
361
+ $(self.settings.section_selector).removeAttr(self.settings.resized_data_attr);
362
+ self.throttle(function() { self.resize(); }, 30)();
363
+ },
364
+
365
+ small: function(el) {
366
+ var settings = $.extend({}, this.settings, this.data_options(el));
367
+
368
+ if (this.is_horizontal_tabs(el)) {
369
+ return false;
370
+ }
371
+ if (el && this.is_accordion(el)) {
372
+ return true;
373
+ }
374
+ if ($('html').hasClass('lt-ie9')) {
375
+ return true;
376
+ }
377
+ if ($('html').hasClass('ie8compat')) {
378
+ return true;
379
+ }
380
+ return $(this.scope).width() < settings.small_breakpoint;
381
+ },
382
+
383
+ off: function() {
384
+ $(this.scope).off('.fndtn.section');
385
+ $(window).off('.fndtn.section');
386
+ $(document).off('.fndtn.section');
387
+ }
388
+ };
389
+
390
+ //resize selected sections
391
+ $.fn.reflow_section = function(ensure_has_active_region) {
392
+ var section = this,
393
+ self = Foundation.libs.section;
394
+
395
+ section.removeAttr(self.settings.resized_data_attr);
396
+ self.throttle(function() { self.resize(section, ensure_has_active_region); }, 30)();
397
+ return this;
398
+ };
399
+
400
+ }(Foundation.zj, window, document));
@@ -0,0 +1,222 @@
1
+ /*jslint unparam: true, browser: true, indent: 2 */
2
+
3
+ ;(function ($, window, document, undefined) {
4
+ 'use strict';
5
+
6
+ Foundation.libs.tooltips = {
7
+ name : 'tooltips',
8
+
9
+ version : '4.2.2',
10
+
11
+ settings : {
12
+ selector : '.has-tip',
13
+ additionalInheritableClasses : [],
14
+ tooltipClass : '.tooltip',
15
+ appendTo: 'body',
16
+ 'disable-for-touch': false,
17
+ tipTemplate : function (selector, content) {
18
+ return '<span data-selector="' + selector + '" class="'
19
+ + Foundation.libs.tooltips.settings.tooltipClass.substring(1)
20
+ + '">' + content + '<span class="nub"></span></span>';
21
+ }
22
+ },
23
+
24
+ cache : {},
25
+
26
+ init : function (scope, method, options) {
27
+ Foundation.inherit(this, 'data_options');
28
+ var self = this;
29
+
30
+ if (typeof method === 'object') {
31
+ $.extend(true, this.settings, method);
32
+ } else if (typeof options !== 'undefined') {
33
+ $.extend(true, this.settings, options);
34
+ }
35
+
36
+ if (typeof method !== 'string') {
37
+ if (Modernizr.touch) {
38
+ $(this.scope)
39
+ .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
40
+ '[data-tooltip]', function (e) {
41
+ var settings = $.extend({}, self.settings, self.data_options($(this)));
42
+ if (!settings['disable-for-touch']) {
43
+ e.preventDefault();
44
+ $(settings.tooltipClass).hide();
45
+ self.showOrCreateTip($(this));
46
+ }
47
+ })
48
+ .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip',
49
+ this.settings.tooltipClass, function (e) {
50
+ e.preventDefault();
51
+ $(this).fadeOut(150);
52
+ });
53
+ } else {
54
+ $(this.scope)
55
+ .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip',
56
+ '[data-tooltip]', function (e) {
57
+ var $this = $(this);
58
+ if (/enter|over/i.test(e.type)) {
59
+ self.showOrCreateTip($this);
60
+ } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
61
+ // PATCH to hover over actual tooltip
62
+ self.getTip($this).data("timeout", setTimeout(function() {
63
+ self.hide($this);
64
+ }, 100));
65
+ }
66
+ });
67
+ }
68
+
69
+ // $(this.scope).data('fndtn-tooltips', true);
70
+ } else {
71
+ return this[method].call(this, options);
72
+ }
73
+
74
+ },
75
+
76
+ showOrCreateTip : function ($target) {
77
+ var $tip = this.getTip($target);
78
+
79
+ if ($tip && $tip.length > 0) {
80
+ return this.show($target);
81
+ }
82
+
83
+ return this.create($target);
84
+ },
85
+
86
+ getTip : function ($target) {
87
+ var selector = this.selector($target),
88
+ tip = null;
89
+
90
+ if (selector) {
91
+ tip = $('span[data-selector="' + selector + '"]' + this.settings.tooltipClass);
92
+ }
93
+
94
+ return (typeof tip === 'object') ? tip : false;
95
+ },
96
+
97
+ selector : function ($target) {
98
+ var id = $target.attr('id'),
99
+ dataSelector = $target.attr('data-tooltip') || $target.attr('data-selector');
100
+
101
+ if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') {
102
+ dataSelector = 'tooltip' + Math.random().toString(36).substring(7);
103
+ $target.attr('data-selector', dataSelector);
104
+ }
105
+
106
+ return (id && id.length > 0) ? id : dataSelector;
107
+ },
108
+
109
+ create : function ($target) {
110
+ var $tip = $(this.settings.tipTemplate(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
111
+ classes = this.inheritable_classes($target);
112
+
113
+ // PATCH to hover over actual tooltip
114
+ var self = this;
115
+ $tip.on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip', function (e) {
116
+ if (/enter|over/i.test(e.type))
117
+ clearTimeout($tip.data("timeout"));
118
+ else if (e.type === 'mouseout' || e.type === 'mouseleave')
119
+ self.hide($(this));
120
+ });
121
+
122
+ $tip.addClass(classes).appendTo(this.settings.appendTo);
123
+ if (Modernizr.touch) {
124
+ $tip.append('<span class="tap-to-close">tap to close </span>');
125
+ }
126
+ $target.removeAttr('title').attr('title','');
127
+ this.show($target);
128
+ },
129
+
130
+ reposition : function (target, tip, classes) {
131
+ var width, nub, nubHeight, nubWidth, column, objPos;
132
+
133
+ tip.css('visibility', 'hidden').show();
134
+
135
+ width = target.data('width');
136
+ nub = tip.children('.nub');
137
+ nubHeight = this.outerHeight(nub);
138
+ nubWidth = this.outerHeight(nub);
139
+
140
+ objPos = function (obj, top, right, bottom, left, width) {
141
+ return obj.css({
142
+ 'top' : (top) ? top : 'auto',
143
+ 'bottom' : (bottom) ? bottom : 'auto',
144
+ 'left' : (left) ? left : 'auto',
145
+ 'right' : (right) ? right : 'auto',
146
+ 'width' : (width) ? width : 'auto'
147
+ }).end();
148
+ };
149
+
150
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', target.offset().left, width);
151
+
152
+ if ($(window).width() < 767) {
153
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', 12.5, $(this.scope).width());
154
+ tip.addClass('tip-override');
155
+ objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
156
+ } else {
157
+ var left = target.offset().left;
158
+ if (Foundation.rtl) {
159
+ left = target.offset().left + target.offset().width - this.outerWidth(tip);
160
+ }
161
+ objPos(tip, (target.offset().top + this.outerHeight(target) + 10), 'auto', 'auto', left, width);
162
+ tip.removeClass('tip-override');
163
+ if (classes && classes.indexOf('tip-top') > -1) {
164
+ objPos(tip, (target.offset().top - this.outerHeight(tip)), 'auto', 'auto', left, width)
165
+ .removeClass('tip-override');
166
+ } else if (classes && classes.indexOf('tip-left') > -1) {
167
+ // PATCH to vertically center tooltips
168
+ tip.css("left", 0); // need this so text doesn't wrap so calc width is accurate
169
+ objPos(tip, (target.offset().top + (this.outerHeight(target) - this.outerHeight(tip)) / 2), 'auto', 'auto', (target.offset().left - this.outerWidth(tip) - nubHeight), width)
170
+ .removeClass('tip-override');
171
+ } else if (classes && classes.indexOf('tip-right') > -1) {
172
+ // PATCH to vertically center tooltips
173
+ objPos(tip, (target.offset().top + (this.outerHeight(target) - this.outerHeight(tip)) / 2), 'auto', 'auto', (target.offset().left + this.outerWidth(target) + nubHeight), width)
174
+ .removeClass('tip-override');
175
+ }
176
+ }
177
+
178
+ tip.css('visibility', 'visible').hide();
179
+ },
180
+
181
+ inheritable_classes : function (target) {
182
+ var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'noradius'].concat(this.settings.additionalInheritableClasses),
183
+ classes = target.attr('class'),
184
+ filtered = classes ? $.map(classes.split(' '), function (el, i) {
185
+ if ($.inArray(el, inheritables) !== -1) {
186
+ return el;
187
+ }
188
+ }).join(' ') : '';
189
+
190
+ return $.trim(filtered);
191
+ },
192
+
193
+ show : function ($target) {
194
+ var $tip = this.getTip($target);
195
+
196
+ this.reposition($target, $tip, $target.attr('class'));
197
+ $tip.fadeIn(150);
198
+ },
199
+
200
+ hide : function ($target) {
201
+ var $tip = this.getTip($target);
202
+
203
+ $tip.fadeOut(150);
204
+ },
205
+
206
+ // deprecate reload
207
+ reload : function () {
208
+ var $self = $(this);
209
+
210
+ return ($self.data('fndtn-tooltips')) ? $self.foundationTooltips('destroy').foundationTooltips('init') : $self.foundationTooltips('init');
211
+ },
212
+
213
+ off : function () {
214
+ $(this.scope).off('.fndtn.tooltip');
215
+ $(this.settings.tooltipClass).each(function (i) {
216
+ $('[data-tooltip]').get(i).attr('title', $(this).text());
217
+ }).remove();
218
+ },
219
+
220
+ reflow : function () {}
221
+ };
222
+ }(Foundation.zj, this, this.document));
@@ -0,0 +1,41 @@
1
+ @if $moovui-init {
2
+ * {
3
+ @include box-sizing(border-box);
4
+ }
5
+
6
+ html {
7
+ height: 100%;
8
+ }
9
+
10
+ body {
11
+ -webkit-text-size-adjust: 100%;
12
+ background: #ced3d8;
13
+ color: $text-color;
14
+ font: $font-size/#{$line-height} $font;
15
+ margin: 0;
16
+ padding: ($nav-height + $sp2) 0 $footer-height;
17
+ position: relative;
18
+ min-width: $min-page-width;
19
+ min-height: 100%;
20
+ }
21
+
22
+ img {
23
+ max-width: 100%;
24
+ }
25
+
26
+ #page, .content {
27
+ @include clearfix;
28
+ margin-left: auto;
29
+ margin-right: auto;
30
+ max-width: $page-width;
31
+ padding: 0 $page-margin;
32
+ }
33
+
34
+ #page {
35
+ padding: $sp $page-margin;
36
+ }
37
+
38
+ .section + .section {
39
+ margin: $sp2 0 0;
40
+ }
41
+ }