va_common 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -4
  3. data/app/assets/js/va_common_main.js +16 -1
  4. data/lib/va_common/version.rb +1 -1
  5. data/lib/va_common.rb +4 -0
  6. data/va_common.gemspec +15 -0
  7. metadata +200 -177
  8. data/app/assets/js/foundation/foundation.abide.js +0 -408
  9. data/app/assets/js/foundation/foundation.accordion.js +0 -88
  10. data/app/assets/js/foundation/foundation.alert.js +0 -43
  11. data/app/assets/js/foundation/foundation.clearing.js +0 -586
  12. data/app/assets/js/foundation/foundation.dropdown.js +0 -463
  13. data/app/assets/js/foundation/foundation.equalizer.js +0 -104
  14. data/app/assets/js/foundation/foundation.interchange.js +0 -359
  15. data/app/assets/js/foundation/foundation.joyride.js +0 -932
  16. data/app/assets/js/foundation/foundation.js +0 -725
  17. data/app/assets/js/foundation/foundation.magellan.js +0 -215
  18. data/app/assets/js/foundation/foundation.offcanvas.js +0 -152
  19. data/app/assets/js/foundation/foundation.orbit.js +0 -476
  20. data/app/assets/js/foundation/foundation.reveal.js +0 -498
  21. data/app/assets/js/foundation/foundation.slider.js +0 -281
  22. data/app/assets/js/foundation/foundation.tab.js +0 -249
  23. data/app/assets/js/foundation/foundation.tooltip.js +0 -339
  24. data/app/assets/js/foundation/foundation.topbar.js +0 -458
  25. data/app/assets/js/foundation.min.js +0 -6376
  26. data/app/assets/js/vendor/html5shiv.js +0 -8
  27. data/app/assets/js/vendor/jquery-1.11.0.min.js +0 -4
  28. data/app/assets/js/vendor/jquery.js +0 -9789
  29. data/app/assets/js/vendor/jquery.smooth-scroll.js +0 -255
  30. data/app/assets/js/vendor/jquery.stellar.js +0 -651
  31. data/app/assets/js/vendor/jquery.tipsy.js +0 -258
  32. data/app/assets/js/vendor/menu.js +0 -40
  33. data/app/assets/js/vendor/modernizr.custom.js +0 -4
  34. data/app/assets/js/vendor/respond.min.js +0 -6
  35. data/app/assets/js/vendor/selectivizr-1.0.3b.js +0 -560
  36. data/app/assets/js/vendor/tota11y.min.js +0 -28
  37. data/app/assets/js/vendor/wow.min.js +0 -2
  38. data/app/assets/stylesheets/foundation/_functions.scss +0 -146
  39. data/app/assets/stylesheets/foundation/_settings.scss +0 -1467
  40. data/app/assets/stylesheets/foundation/_variables.scss +0 -1286
  41. data/app/assets/stylesheets/foundation/components/_accordion.scss +0 -157
  42. data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
  43. data/app/assets/stylesheets/foundation/components/_block-grid.scss +0 -132
  44. data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
  45. data/app/assets/stylesheets/foundation/components/_button-groups.scss +0 -200
  46. data/app/assets/stylesheets/foundation/components/_buttons.scss +0 -259
  47. data/app/assets/stylesheets/foundation/components/_clearing.scss +0 -256
  48. data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -131
  49. data/app/assets/stylesheets/foundation/components/_dropdown.scss +0 -262
  50. data/app/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
  51. data/app/assets/stylesheets/foundation/components/_forms.scss +0 -570
  52. data/app/assets/stylesheets/foundation/components/_global.scss +0 -481
  53. data/app/assets/stylesheets/foundation/components/_grid.scss +0 -289
  54. data/app/assets/stylesheets/foundation/components/_icon-bar.scss +0 -358
  55. data/app/assets/stylesheets/foundation/components/_inline-lists.scss +0 -57
  56. data/app/assets/stylesheets/foundation/components/_joyride.scss +0 -222
  57. data/app/assets/stylesheets/foundation/components/_keystrokes.scss +0 -61
  58. data/app/assets/stylesheets/foundation/components/_labels.scss +0 -106
  59. data/app/assets/stylesheets/foundation/components/_magellan.scss +0 -34
  60. data/app/assets/stylesheets/foundation/components/_offcanvas.scss +0 -515
  61. data/app/assets/stylesheets/foundation/components/_orbit.scss +0 -368
  62. data/app/assets/stylesheets/foundation/components/_pagination.scss +0 -162
  63. data/app/assets/stylesheets/foundation/components/_panels.scss +0 -101
  64. data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
  65. data/app/assets/stylesheets/foundation/components/_progress-bars.scss +0 -79
  66. data/app/assets/stylesheets/foundation/components/_range-slider.scss +0 -169
  67. data/app/assets/stylesheets/foundation/components/_reveal.scss +0 -202
  68. data/app/assets/stylesheets/foundation/components/_side-nav.scss +0 -116
  69. data/app/assets/stylesheets/foundation/components/_split-buttons.scss +0 -199
  70. data/app/assets/stylesheets/foundation/components/_sub-nav.scss +0 -123
  71. data/app/assets/stylesheets/foundation/components/_switches.scss +0 -238
  72. data/app/assets/stylesheets/foundation/components/_tables.scss +0 -135
  73. data/app/assets/stylesheets/foundation/components/_tabs.scss +0 -123
  74. data/app/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
  75. data/app/assets/stylesheets/foundation/components/_toolbar.scss +0 -70
  76. data/app/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
  77. data/app/assets/stylesheets/foundation/components/_top-bar.scss +0 -691
  78. data/app/assets/stylesheets/foundation/components/_type.scss +0 -525
  79. data/app/assets/stylesheets/foundation/components/_visibility.scss +0 -408
  80. data/app/assets/stylesheets/lib/_normalize.scss +0 -427
  81. data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +0 -411
  82. data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +0 -87
  83. data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +0 -26
  84. data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +0 -48
  85. data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +0 -25
  86. data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +0 -25
  87. data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +0 -64
  88. data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +0 -25
  89. data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +0 -30
  90. data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +0 -31
  91. data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +0 -27
  92. data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +0 -26
  93. data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +0 -26
  94. data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +0 -48
  95. data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +0 -66
  96. data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +0 -25
  97. data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +0 -51
  98. data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +0 -112
  99. data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +0 -34
  100. data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +0 -63
  101. data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +0 -29
  102. data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +0 -43
  103. data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +0 -3
  104. data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +0 -3
  105. data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +0 -42
  106. data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +0 -55
  107. data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +0 -59
  108. data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +0 -4
  109. data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +0 -47
  110. data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +0 -4
  111. data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +0 -287
  112. data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +0 -24
  113. data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +0 -4
  114. data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +0 -10
  115. data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +0 -4
  116. data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +0 -14
  117. data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +0 -36
  118. data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +0 -38
  119. data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +0 -8
  120. data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +0 -8
  121. data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +0 -39
  122. data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +0 -42
  123. data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +0 -19
  124. data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +0 -15
  125. data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +0 -71
  126. data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +0 -3
  127. data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +0 -11
  128. data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +0 -20
  129. data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +0 -26
  130. data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +0 -11
  131. data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +0 -21
  132. data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +0 -11
  133. data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +0 -13
  134. data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +0 -69
  135. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +0 -13
  136. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +0 -15
  137. data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +0 -24
  138. data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +0 -17
  139. data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +0 -24
  140. data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +0 -22
  141. data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +0 -27
  142. data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +0 -21
  143. data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +0 -96
  144. data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +0 -43
  145. data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +0 -13
  146. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +0 -25
  147. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +0 -41
  148. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +0 -61
  149. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +0 -31
  150. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +0 -69
  151. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +0 -50
  152. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +0 -18
  153. data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +0 -26
  154. data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +0 -10
  155. data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +0 -50
  156. data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +0 -7
  157. data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +0 -9
  158. data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +0 -1
  159. data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +0 -8
  160. data/app/assets/stylesheets/lib/neat/_neat.scss +0 -23
  161. data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +0 -49
  162. data/app/assets/stylesheets/lib/neat/functions/_private.scss +0 -114
  163. data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +0 -15
  164. data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +0 -33
  165. data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +0 -28
  166. data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +0 -22
  167. data/app/assets/stylesheets/lib/neat/grid/_media.scss +0 -92
  168. data/app/assets/stylesheets/lib/neat/grid/_omega.scss +0 -87
  169. data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +0 -38
  170. data/app/assets/stylesheets/lib/neat/grid/_pad.scss +0 -25
  171. data/app/assets/stylesheets/lib/neat/grid/_private.scss +0 -35
  172. data/app/assets/stylesheets/lib/neat/grid/_row.scss +0 -52
  173. data/app/assets/stylesheets/lib/neat/grid/_shift.scss +0 -50
  174. data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +0 -94
  175. data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +0 -97
  176. data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +0 -42
  177. data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +0 -13
  178. data/app/assets/stylesheets/lib/neat/settings/_grid.scss +0 -51
  179. data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +0 -27
  180. data/app/assets/stylesheets/va_common_main.css.scss +0 -18
  181. /data/app/assets/js/{vendor/scroll-settings.js → scroll-settings.js} +0 -0
  182. /data/app/assets/js/{vendor/stellar-settings.js → stellar-settings.js} +0 -0
@@ -1,339 +0,0 @@
1
- ;(function ($, window, document, undefined) {
2
- 'use strict';
3
-
4
- Foundation.libs.tooltip = {
5
- name : 'tooltip',
6
-
7
- version : '5.5.2',
8
-
9
- settings : {
10
- additional_inheritable_classes : [],
11
- tooltip_class : '.tooltip',
12
- append_to : 'body',
13
- touch_close_text : 'Tap To Close',
14
- disable_for_touch : false,
15
- hover_delay : 200,
16
- show_on : 'all',
17
- tip_template : function (selector, content) {
18
- return '<span data-selector="' + selector + '" id="' + selector + '" class="'
19
- + Foundation.libs.tooltip.settings.tooltip_class.substring(1)
20
- + '" role="tooltip">' + content + '<span class="nub"></span></span>';
21
- }
22
- },
23
-
24
- cache : {},
25
-
26
- init : function (scope, method, options) {
27
- Foundation.inherit(this, 'random_str');
28
- this.bindings(method, options);
29
- },
30
-
31
- should_show : function (target, tip) {
32
- var settings = $.extend({}, this.settings, this.data_options(target));
33
-
34
- if (settings.show_on === 'all') {
35
- return true;
36
- } else if (this.small() && settings.show_on === 'small') {
37
- return true;
38
- } else if (this.medium() && settings.show_on === 'medium') {
39
- return true;
40
- } else if (this.large() && settings.show_on === 'large') {
41
- return true;
42
- }
43
- return false;
44
- },
45
-
46
- medium : function () {
47
- return matchMedia(Foundation.media_queries['medium']).matches;
48
- },
49
-
50
- large : function () {
51
- return matchMedia(Foundation.media_queries['large']).matches;
52
- },
53
-
54
- events : function (instance) {
55
- var self = this,
56
- S = self.S;
57
-
58
- self.create(this.S(instance));
59
-
60
- function _startShow(elt, $this, immediate) {
61
- if (elt.timer) {
62
- return;
63
- }
64
-
65
- if (immediate) {
66
- elt.timer = null;
67
- self.showTip($this);
68
- } else {
69
- elt.timer = setTimeout(function () {
70
- elt.timer = null;
71
- self.showTip($this);
72
- }.bind(elt), self.settings.hover_delay);
73
- }
74
- }
75
-
76
- function _startHide(elt, $this) {
77
- if (elt.timer) {
78
- clearTimeout(elt.timer);
79
- elt.timer = null;
80
- }
81
-
82
- self.hide($this);
83
- }
84
-
85
- $(this.scope)
86
- .off('.tooltip')
87
- .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',
88
- '[' + this.attr_name() + ']', function (e) {
89
- var $this = S(this),
90
- settings = $.extend({}, self.settings, self.data_options($this)),
91
- is_touch = false;
92
-
93
- if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type) && S(e.target).is('a')) {
94
- return false;
95
- }
96
-
97
- if (/mouse/i.test(e.type) && self.ie_touch(e)) {
98
- return false;
99
- }
100
-
101
- if ($this.hasClass('open')) {
102
- if (Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
103
- e.preventDefault();
104
- }
105
- self.hide($this);
106
- } else {
107
- if (settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
108
- return;
109
- } else if (!settings.disable_for_touch && Modernizr.touch && /touchstart|MSPointerDown/i.test(e.type)) {
110
- e.preventDefault();
111
- S(settings.tooltip_class + '.open').hide();
112
- is_touch = true;
113
- // close other open tooltips on touch
114
- if ($('.open[' + self.attr_name() + ']').length > 0) {
115
- var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
116
- self.hide(prevOpen);
117
- }
118
- }
119
-
120
- if (/enter|over/i.test(e.type)) {
121
- _startShow(this, $this);
122
-
123
- } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
124
- _startHide(this, $this);
125
- } else {
126
- _startShow(this, $this, true);
127
- }
128
- }
129
- })
130
- .on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', '[' + this.attr_name() + '].open', function (e) {
131
- if (/mouse/i.test(e.type) && self.ie_touch(e)) {
132
- return false;
133
- }
134
-
135
- if ($(this).data('tooltip-open-event-type') == 'touch' && e.type == 'mouseleave') {
136
- return;
137
- } else if ($(this).data('tooltip-open-event-type') == 'mouse' && /MSPointerDown|touchstart/i.test(e.type)) {
138
- self.convert_to_touch($(this));
139
- } else {
140
- _startHide(this, $(this));
141
- }
142
- })
143
- .on('DOMNodeRemoved DOMAttrModified', '[' + this.attr_name() + ']:not(a)', function (e) {
144
- _startHide(this, S(this));
145
- });
146
- },
147
-
148
- ie_touch : function (e) {
149
- // How do I distinguish between IE11 and Windows Phone 8?????
150
- return false;
151
- },
152
-
153
- showTip : function ($target) {
154
- var $tip = this.getTip($target);
155
- if (this.should_show($target, $tip)) {
156
- return this.show($target);
157
- }
158
- return;
159
- },
160
-
161
- getTip : function ($target) {
162
- var selector = this.selector($target),
163
- settings = $.extend({}, this.settings, this.data_options($target)),
164
- tip = null;
165
-
166
- if (selector) {
167
- tip = this.S('span[data-selector="' + selector + '"]' + settings.tooltip_class);
168
- }
169
-
170
- return (typeof tip === 'object') ? tip : false;
171
- },
172
-
173
- selector : function ($target) {
174
- var dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
175
-
176
- if (typeof dataSelector != 'string') {
177
- dataSelector = this.random_str(6);
178
- $target
179
- .attr('data-selector', dataSelector)
180
- .attr('aria-describedby', dataSelector);
181
- }
182
-
183
- return dataSelector;
184
- },
185
-
186
- create : function ($target) {
187
- var self = this,
188
- settings = $.extend({}, this.settings, this.data_options($target)),
189
- tip_template = this.settings.tip_template;
190
-
191
- if (typeof settings.tip_template === 'string' && window.hasOwnProperty(settings.tip_template)) {
192
- tip_template = window[settings.tip_template];
193
- }
194
-
195
- var $tip = $(tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
196
- classes = this.inheritable_classes($target);
197
-
198
- $tip.addClass(classes).appendTo(settings.append_to);
199
-
200
- if (Modernizr.touch) {
201
- $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
202
- $tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip', function (e) {
203
- self.hide($target);
204
- });
205
- }
206
-
207
- $target.removeAttr('title').attr('title', '');
208
- },
209
-
210
- reposition : function (target, tip, classes) {
211
- var width, nub, nubHeight, nubWidth, column, objPos;
212
-
213
- tip.css('visibility', 'hidden').show();
214
-
215
- width = target.data('width');
216
- nub = tip.children('.nub');
217
- nubHeight = nub.outerHeight();
218
- nubWidth = nub.outerHeight();
219
-
220
- if (this.small()) {
221
- tip.css({'width' : '100%'});
222
- } else {
223
- tip.css({'width' : (width) ? width : 'auto'});
224
- }
225
-
226
- objPos = function (obj, top, right, bottom, left, width) {
227
- return obj.css({
228
- 'top' : (top) ? top : 'auto',
229
- 'bottom' : (bottom) ? bottom : 'auto',
230
- 'left' : (left) ? left : 'auto',
231
- 'right' : (right) ? right : 'auto'
232
- }).end();
233
- };
234
-
235
- objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
236
-
237
- if (this.small()) {
238
- objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, $(this.scope).width());
239
- tip.addClass('tip-override');
240
- objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left);
241
- } else {
242
- var left = target.offset().left;
243
- if (Foundation.rtl) {
244
- nub.addClass('rtl');
245
- left = target.offset().left + target.outerWidth() - tip.outerWidth();
246
- }
247
-
248
- objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
249
- // reset nub from small styles, if they've been applied
250
- if (nub.attr('style')) {
251
- nub.removeAttr('style');
252
- }
253
-
254
- tip.removeClass('tip-override');
255
- if (classes && classes.indexOf('tip-top') > -1) {
256
- if (Foundation.rtl) {
257
- nub.addClass('rtl');
258
- }
259
- objPos(tip, (target.offset().top - tip.outerHeight()), 'auto', 'auto', left)
260
- .removeClass('tip-override');
261
- } else if (classes && classes.indexOf('tip-left') > -1) {
262
- objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
263
- .removeClass('tip-override');
264
- nub.removeClass('rtl');
265
- } else if (classes && classes.indexOf('tip-right') > -1) {
266
- objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
267
- .removeClass('tip-override');
268
- nub.removeClass('rtl');
269
- }
270
- }
271
-
272
- tip.css('visibility', 'visible').hide();
273
- },
274
-
275
- small : function () {
276
- return matchMedia(Foundation.media_queries.small).matches &&
277
- !matchMedia(Foundation.media_queries.medium).matches;
278
- },
279
-
280
- inheritable_classes : function ($target) {
281
- var settings = $.extend({}, this.settings, this.data_options($target)),
282
- inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(settings.additional_inheritable_classes),
283
- classes = $target.attr('class'),
284
- filtered = classes ? $.map(classes.split(' '), function (el, i) {
285
- if ($.inArray(el, inheritables) !== -1) {
286
- return el;
287
- }
288
- }).join(' ') : '';
289
-
290
- return $.trim(filtered);
291
- },
292
-
293
- convert_to_touch : function ($target) {
294
- var self = this,
295
- $tip = self.getTip($target),
296
- settings = $.extend({}, self.settings, self.data_options($target));
297
-
298
- if ($tip.find('.tap-to-close').length === 0) {
299
- $tip.append('<span class="tap-to-close">' + settings.touch_close_text + '</span>');
300
- $tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose', function (e) {
301
- self.hide($target);
302
- });
303
- }
304
-
305
- $target.data('tooltip-open-event-type', 'touch');
306
- },
307
-
308
- show : function ($target) {
309
- var $tip = this.getTip($target);
310
-
311
- if ($target.data('tooltip-open-event-type') == 'touch') {
312
- this.convert_to_touch($target);
313
- }
314
-
315
- this.reposition($target, $tip, $target.attr('class'));
316
- $target.addClass('open');
317
- $tip.fadeIn(150);
318
- },
319
-
320
- hide : function ($target) {
321
- var $tip = this.getTip($target);
322
- $tip.fadeOut(150, function () {
323
- $tip.find('.tap-to-close').remove();
324
- $tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');
325
- $target.removeClass('open');
326
- });
327
- },
328
-
329
- off : function () {
330
- var self = this;
331
- this.S(this.scope).off('.fndtn.tooltip');
332
- this.S(this.settings.tooltip_class).each(function (i) {
333
- $('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
334
- }).remove();
335
- },
336
-
337
- reflow : function () {}
338
- };
339
- }(jQuery, window, window.document));