foundation-rails 5.5.3.2 → 6.6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -2
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +17 -4
  5. data/Appraisals +19 -0
  6. data/Gemfile +5 -2
  7. data/Gemfile.lock +210 -0
  8. data/LICENSE.txt +1 -1
  9. data/README.md +64 -28
  10. data/Rakefile +30 -0
  11. data/app/views/foundation/rails/styleguide/show.html.erb +10 -13
  12. data/bower.json +3 -2
  13. data/foundation-rails.gemspec +12 -7
  14. data/gemfiles/rails_4.1.gemfile +10 -0
  15. data/gemfiles/rails_4.1.gemfile.lock +181 -0
  16. data/gemfiles/rails_4.2.gemfile +10 -0
  17. data/gemfiles/rails_4.2.gemfile.lock +181 -0
  18. data/gemfiles/rails_5.0.gemfile +10 -0
  19. data/gemfiles/rails_5.0.gemfile.lock +196 -0
  20. data/gemfiles/rails_5.1.gemfile +10 -0
  21. data/gemfiles/rails_5.1.gemfile.lock +196 -0
  22. data/gemfiles/rails_5.2.gemfile +10 -0
  23. data/gemfiles/rails_5.2.gemfile.lock +196 -0
  24. data/lib/foundation/rails/engine.rb +2 -3
  25. data/lib/foundation/rails/version.rb +1 -1
  26. data/lib/foundation-rails.rb +1 -0
  27. data/lib/generators/foundation/install_generator.rb +39 -27
  28. data/lib/generators/foundation/templates/_settings.scss +895 -0
  29. data/lib/generators/foundation/templates/application.html.erb +1 -2
  30. data/lib/generators/foundation/templates/application.html.haml +2 -4
  31. data/lib/generators/foundation/templates/application.html.slim +1 -3
  32. data/lib/generators/foundation/templates/browserslist +4 -0
  33. data/lib/generators/foundation/templates/foundation_and_overrides.scss +56 -0
  34. data/spec/features/generator_spec.rb +1 -1
  35. data/spec/support/helpers.rb +8 -2
  36. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  37. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  38. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  39. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  40. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  41. data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  42. data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  43. data/vendor/assets/js/foundation.cjs.js +12529 -0
  44. data/vendor/assets/js/foundation.cjs.js.map +1 -0
  45. data/vendor/assets/js/foundation.es6.js +11006 -0
  46. data/vendor/assets/js/foundation.es6.js.map +1 -0
  47. data/vendor/assets/js/foundation.esm.js +12490 -0
  48. data/vendor/assets/js/foundation.esm.js.map +1 -0
  49. data/vendor/assets/js/foundation.js +13897 -0
  50. data/vendor/assets/js/foundation.js.map +1 -0
  51. data/vendor/assets/js/foundation.min.js +2 -0
  52. data/vendor/assets/js/foundation.min.js.map +1 -0
  53. data/vendor/assets/js/plugins/foundation.abide.js +1142 -0
  54. data/vendor/assets/js/plugins/foundation.abide.js.map +1 -0
  55. data/vendor/assets/js/plugins/foundation.abide.min.js +2 -0
  56. data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -0
  57. data/vendor/assets/js/plugins/foundation.accordion.js +661 -0
  58. data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -0
  59. data/vendor/assets/js/plugins/foundation.accordion.min.js +2 -0
  60. data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -0
  61. data/vendor/assets/js/plugins/foundation.accordionMenu.js +616 -0
  62. data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -0
  63. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +2 -0
  64. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -0
  65. data/vendor/assets/js/plugins/foundation.core.js +1180 -0
  66. data/vendor/assets/js/plugins/foundation.core.js.map +1 -0
  67. data/vendor/assets/js/plugins/foundation.core.min.js +2 -0
  68. data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -0
  69. data/vendor/assets/js/plugins/foundation.drilldown.js +968 -0
  70. data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -0
  71. data/vendor/assets/js/plugins/foundation.drilldown.min.js +2 -0
  72. data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -0
  73. data/vendor/assets/js/plugins/foundation.dropdown.js +1328 -0
  74. data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -0
  75. data/vendor/assets/js/plugins/foundation.dropdown.min.js +2 -0
  76. data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -0
  77. data/vendor/assets/js/plugins/foundation.dropdownMenu.js +799 -0
  78. data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -0
  79. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +2 -0
  80. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -0
  81. data/vendor/assets/js/plugins/foundation.equalizer.js +614 -0
  82. data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -0
  83. data/vendor/assets/js/plugins/foundation.equalizer.min.js +2 -0
  84. data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -0
  85. data/vendor/assets/js/plugins/foundation.interchange.js +796 -0
  86. data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -0
  87. data/vendor/assets/js/plugins/foundation.interchange.min.js +2 -0
  88. data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -0
  89. data/vendor/assets/js/plugins/foundation.magellan.js +850 -0
  90. data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -0
  91. data/vendor/assets/js/plugins/foundation.magellan.min.js +2 -0
  92. data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -0
  93. data/vendor/assets/js/plugins/foundation.offcanvas.js +1318 -0
  94. data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -0
  95. data/vendor/assets/js/plugins/foundation.offcanvas.min.js +2 -0
  96. data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -0
  97. data/vendor/assets/js/plugins/foundation.orbit.js +886 -0
  98. data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -0
  99. data/vendor/assets/js/plugins/foundation.orbit.min.js +2 -0
  100. data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -0
  101. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +585 -0
  102. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -0
  103. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +2 -0
  104. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -0
  105. data/vendor/assets/js/plugins/foundation.responsiveMenu.js +413 -0
  106. data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -0
  107. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +2 -0
  108. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -0
  109. data/vendor/assets/js/plugins/foundation.responsiveToggle.js +394 -0
  110. data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -0
  111. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +2 -0
  112. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -0
  113. data/vendor/assets/js/plugins/foundation.reveal.js +1275 -0
  114. data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -0
  115. data/vendor/assets/js/plugins/foundation.reveal.min.js +2 -0
  116. data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -0
  117. data/vendor/assets/js/plugins/foundation.slider.js +1346 -0
  118. data/vendor/assets/js/plugins/foundation.slider.js.map +1 -0
  119. data/vendor/assets/js/plugins/foundation.slider.min.js +2 -0
  120. data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -0
  121. data/vendor/assets/js/plugins/foundation.smoothScroll.js +359 -0
  122. data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -0
  123. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +2 -0
  124. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -0
  125. data/vendor/assets/js/plugins/foundation.sticky.js +1105 -0
  126. data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -0
  127. data/vendor/assets/js/plugins/foundation.sticky.min.js +2 -0
  128. data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -0
  129. data/vendor/assets/js/plugins/foundation.tabs.js +792 -0
  130. data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -0
  131. data/vendor/assets/js/plugins/foundation.tabs.min.js +2 -0
  132. data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -0
  133. data/vendor/assets/js/plugins/foundation.toggler.js +704 -0
  134. data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -0
  135. data/vendor/assets/js/plugins/foundation.toggler.min.js +2 -0
  136. data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -0
  137. data/vendor/assets/js/plugins/foundation.tooltip.js +1333 -0
  138. data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -0
  139. data/vendor/assets/js/plugins/foundation.tooltip.min.js +2 -0
  140. data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -0
  141. data/vendor/assets/js/plugins/foundation.util.box.js +354 -0
  142. data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -0
  143. data/vendor/assets/js/plugins/foundation.util.box.min.js +2 -0
  144. data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -0
  145. data/vendor/assets/js/plugins/foundation.util.imageLoader.js +218 -0
  146. data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -0
  147. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +2 -0
  148. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -0
  149. data/vendor/assets/js/plugins/foundation.util.keyboard.js +341 -0
  150. data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -0
  151. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +2 -0
  152. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -0
  153. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +509 -0
  154. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -0
  155. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +2 -0
  156. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -0
  157. data/vendor/assets/js/plugins/foundation.util.motion.js +274 -0
  158. data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -0
  159. data/vendor/assets/js/plugins/foundation.util.motion.min.js +2 -0
  160. data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -0
  161. data/vendor/assets/js/plugins/foundation.util.nest.js +240 -0
  162. data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -0
  163. data/vendor/assets/js/plugins/foundation.util.nest.min.js +2 -0
  164. data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -0
  165. data/vendor/assets/js/plugins/foundation.util.timer.js +226 -0
  166. data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -0
  167. data/vendor/assets/js/plugins/foundation.util.timer.min.js +2 -0
  168. data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -0
  169. data/vendor/assets/js/plugins/foundation.util.touch.js +365 -0
  170. data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -0
  171. data/vendor/assets/js/plugins/foundation.util.touch.min.js +2 -0
  172. data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -0
  173. data/vendor/assets/js/plugins/foundation.util.triggers.js +470 -0
  174. data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -0
  175. data/vendor/assets/js/plugins/foundation.util.triggers.min.js +2 -0
  176. data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -0
  177. data/vendor/assets/scss/_global.scss +244 -0
  178. data/vendor/assets/scss/components/_accordion-menu.scss +174 -0
  179. data/vendor/assets/scss/components/_accordion.scss +164 -0
  180. data/vendor/assets/scss/components/_badge.scss +63 -0
  181. data/vendor/assets/scss/components/_breadcrumbs.scss +119 -0
  182. data/vendor/assets/scss/components/_button-group.scss +304 -0
  183. data/vendor/assets/scss/components/_button.scss +428 -0
  184. data/vendor/assets/scss/components/_callout.scss +108 -0
  185. data/vendor/assets/scss/components/_card.scss +129 -0
  186. data/vendor/assets/scss/components/_close-button.scss +127 -0
  187. data/vendor/assets/scss/components/_drilldown.scss +140 -0
  188. data/vendor/assets/scss/components/_dropdown-menu.scss +279 -0
  189. data/vendor/assets/scss/components/_dropdown.scss +82 -0
  190. data/vendor/assets/scss/components/_flex-video.scss +1 -0
  191. data/vendor/assets/scss/components/_flex.scss +119 -0
  192. data/vendor/assets/scss/components/_float.scss +27 -0
  193. data/vendor/assets/scss/components/_label.scss +64 -0
  194. data/vendor/assets/scss/components/_media-object.scss +114 -0
  195. data/vendor/assets/scss/components/_menu-icon.scss +9 -0
  196. data/vendor/assets/scss/components/_menu.scss +495 -0
  197. data/vendor/assets/scss/components/_off-canvas.scss +511 -0
  198. data/vendor/assets/scss/components/_orbit.scss +197 -0
  199. data/vendor/assets/scss/components/_pagination.scss +201 -0
  200. data/vendor/assets/scss/components/_progress-bar.scss +63 -0
  201. data/vendor/assets/scss/components/_responsive-embed.scss +57 -0
  202. data/vendor/assets/scss/components/_reveal.scss +185 -0
  203. data/vendor/assets/scss/components/_slider.scss +137 -0
  204. data/vendor/assets/scss/components/_sticky.scss +39 -0
  205. data/vendor/assets/scss/components/_switch.scss +261 -0
  206. data/vendor/assets/scss/components/_table.scss +328 -0
  207. data/vendor/assets/scss/components/_tabs.scss +193 -0
  208. data/vendor/assets/scss/components/_thumbnail.scss +67 -0
  209. data/vendor/assets/scss/components/_title-bar.scss +84 -0
  210. data/vendor/assets/scss/components/_tooltip.scss +160 -0
  211. data/vendor/assets/scss/components/_top-bar.scss +175 -0
  212. data/vendor/assets/scss/components/_visibility.scss +135 -0
  213. data/vendor/assets/scss/forms/_checkbox.scss +41 -0
  214. data/vendor/assets/scss/forms/_error.scss +89 -0
  215. data/vendor/assets/scss/forms/_fieldset.scss +53 -0
  216. data/vendor/assets/scss/forms/_forms.scss +34 -0
  217. data/vendor/assets/scss/forms/_help-text.scss +30 -0
  218. data/vendor/assets/scss/forms/_input-group.scss +142 -0
  219. data/vendor/assets/scss/forms/_label.scss +50 -0
  220. data/vendor/assets/scss/forms/_meter.scss +116 -0
  221. data/vendor/assets/scss/forms/_progress.scss +94 -0
  222. data/vendor/assets/scss/forms/_range.scss +149 -0
  223. data/vendor/assets/scss/forms/_select.scss +90 -0
  224. data/vendor/assets/scss/forms/_text.scss +179 -0
  225. data/vendor/assets/scss/foundation.scss +155 -0
  226. data/vendor/assets/scss/grid/_classes.scss +189 -0
  227. data/vendor/assets/scss/grid/_column.scss +78 -0
  228. data/vendor/assets/scss/grid/_flex-grid.scss +260 -0
  229. data/vendor/assets/scss/grid/_grid.scss +48 -0
  230. data/vendor/assets/scss/grid/_gutter.scss +67 -0
  231. data/vendor/assets/scss/grid/_layout.scss +76 -0
  232. data/vendor/assets/scss/grid/_position.scss +100 -0
  233. data/vendor/assets/scss/grid/_row.scss +99 -0
  234. data/vendor/assets/scss/grid/_size.scss +24 -0
  235. data/vendor/assets/scss/motion-ui/_classes.scss +109 -0
  236. data/vendor/assets/scss/motion-ui/_settings.scss +62 -0
  237. data/vendor/assets/scss/motion-ui/effects/_fade.scss +29 -0
  238. data/vendor/assets/scss/motion-ui/effects/_hinge.scss +66 -0
  239. data/vendor/assets/scss/motion-ui/effects/_shake.scss +15 -0
  240. data/vendor/assets/scss/motion-ui/effects/_slide.scss +42 -0
  241. data/vendor/assets/scss/motion-ui/effects/_spin.scss +29 -0
  242. data/vendor/assets/scss/motion-ui/effects/_wiggle.scss +13 -0
  243. data/vendor/assets/scss/motion-ui/effects/_zoom.scss +15 -0
  244. data/vendor/assets/scss/motion-ui/motion-ui.scss +31 -0
  245. data/vendor/assets/scss/motion-ui/transitions/_fade.scss +30 -0
  246. data/vendor/assets/scss/motion-ui/transitions/_hinge.scss +44 -0
  247. data/vendor/assets/scss/motion-ui/transitions/_slide.scss +43 -0
  248. data/vendor/assets/scss/motion-ui/transitions/_spin.scss +40 -0
  249. data/vendor/assets/scss/motion-ui/transitions/_zoom.scss +41 -0
  250. data/vendor/assets/scss/motion-ui/util/_animation.scss +7 -0
  251. data/vendor/assets/scss/motion-ui/util/_args.scss +15 -0
  252. data/vendor/assets/scss/motion-ui/util/_function.scss +94 -0
  253. data/vendor/assets/scss/motion-ui/util/_keyframe.scss +136 -0
  254. data/vendor/assets/scss/motion-ui/util/_selector.scss +23 -0
  255. data/vendor/assets/scss/motion-ui/util/_series.scss +57 -0
  256. data/vendor/assets/scss/motion-ui/util/_string.scss +36 -0
  257. data/vendor/assets/scss/motion-ui/util/_transition.scss +45 -0
  258. data/vendor/assets/scss/motion-ui/util/_unit.scss +7 -0
  259. data/vendor/assets/scss/prototype/_arrow.scss +36 -0
  260. data/vendor/assets/scss/prototype/_border-box.scss +35 -0
  261. data/vendor/assets/scss/prototype/_border-none.scss +35 -0
  262. data/vendor/assets/scss/prototype/_bordered.scss +54 -0
  263. data/vendor/assets/scss/prototype/_box.scss +23 -0
  264. data/vendor/assets/scss/prototype/_display.scss +50 -0
  265. data/vendor/assets/scss/prototype/_font-styling.scss +95 -0
  266. data/vendor/assets/scss/prototype/_list-style-type.scss +95 -0
  267. data/vendor/assets/scss/prototype/_overflow.scss +72 -0
  268. data/vendor/assets/scss/prototype/_position.scss +114 -0
  269. data/vendor/assets/scss/prototype/_prototype.scss +87 -0
  270. data/vendor/assets/scss/prototype/_relation.scss +157 -0
  271. data/vendor/assets/scss/prototype/_rotate.scss +31 -0
  272. data/vendor/assets/scss/prototype/_rounded.scss +61 -0
  273. data/vendor/assets/scss/prototype/_separator.scss +96 -0
  274. data/vendor/assets/scss/prototype/_shadow.scss +43 -0
  275. data/vendor/assets/scss/prototype/_sizing.scss +73 -0
  276. data/vendor/assets/scss/prototype/_spacing.scss +179 -0
  277. data/vendor/assets/scss/prototype/_text-decoration.scss +48 -0
  278. data/vendor/assets/scss/prototype/_text-transformation.scss +48 -0
  279. data/vendor/assets/scss/prototype/_text-utilities.scss +88 -0
  280. data/vendor/assets/scss/settings/_settings.scss +895 -0
  281. data/vendor/assets/scss/typography/_alignment.scss +22 -0
  282. data/vendor/assets/scss/typography/_base.scss +474 -0
  283. data/vendor/assets/scss/typography/_helpers.scss +180 -0
  284. data/vendor/assets/scss/typography/_print.scss +96 -0
  285. data/vendor/assets/scss/typography/_typography.scss +26 -0
  286. data/vendor/assets/scss/util/_breakpoint.scss +435 -0
  287. data/vendor/assets/scss/util/_color.scss +139 -0
  288. data/vendor/assets/scss/util/_direction.scss +31 -0
  289. data/vendor/assets/scss/util/_flex.scss +90 -0
  290. data/vendor/assets/scss/util/_math.scss +147 -0
  291. data/vendor/assets/scss/util/_mixins.scss +373 -0
  292. data/vendor/assets/scss/util/_selector.scss +41 -0
  293. data/vendor/assets/scss/util/_typography.scss +26 -0
  294. data/vendor/assets/scss/util/_unit.scss +152 -0
  295. data/vendor/assets/scss/util/_util.scss +14 -0
  296. data/vendor/assets/scss/util/_value.scss +200 -0
  297. data/vendor/assets/scss/vendor/normalize.scss +281 -0
  298. data/vendor/assets/scss/xy-grid/_cell.scss +272 -0
  299. data/vendor/assets/scss/xy-grid/_classes.scss +493 -0
  300. data/vendor/assets/scss/xy-grid/_collapse.scss +75 -0
  301. data/vendor/assets/scss/xy-grid/_frame.scss +86 -0
  302. data/vendor/assets/scss/xy-grid/_grid.scss +37 -0
  303. data/vendor/assets/scss/xy-grid/_gutters.scss +45 -0
  304. data/vendor/assets/scss/xy-grid/_layout.scss +36 -0
  305. data/vendor/assets/scss/xy-grid/_position.scss +55 -0
  306. data/vendor/assets/scss/xy-grid/_xy-grid.scss +51 -0
  307. metadata +342 -83
  308. data/update-gem.sh +0 -20
  309. data/vendor/assets/javascripts/foundation/foundation.abide.js +0 -426
  310. data/vendor/assets/javascripts/foundation/foundation.accordion.js +0 -125
  311. data/vendor/assets/javascripts/foundation/foundation.alert.js +0 -43
  312. data/vendor/assets/javascripts/foundation/foundation.clearing.js +0 -586
  313. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +0 -468
  314. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +0 -104
  315. data/vendor/assets/javascripts/foundation/foundation.interchange.js +0 -360
  316. data/vendor/assets/javascripts/foundation/foundation.joyride.js +0 -935
  317. data/vendor/assets/javascripts/foundation/foundation.js +0 -732
  318. data/vendor/assets/javascripts/foundation/foundation.magellan.js +0 -214
  319. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +0 -225
  320. data/vendor/assets/javascripts/foundation/foundation.orbit.js +0 -476
  321. data/vendor/assets/javascripts/foundation/foundation.reveal.js +0 -522
  322. data/vendor/assets/javascripts/foundation/foundation.slider.js +0 -296
  323. data/vendor/assets/javascripts/foundation/foundation.tab.js +0 -247
  324. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +0 -348
  325. data/vendor/assets/javascripts/foundation/foundation.topbar.js +0 -458
  326. data/vendor/assets/javascripts/foundation.js +0 -17
  327. data/vendor/assets/javascripts/vendor/modernizr.js +0 -1406
  328. data/vendor/assets/stylesheets/foundation/_functions.scss +0 -156
  329. data/vendor/assets/stylesheets/foundation/_settings.scss +0 -1489
  330. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +0 -161
  331. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
  332. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +0 -133
  333. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
  334. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +0 -208
  335. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +0 -261
  336. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +0 -260
  337. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -130
  338. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +0 -269
  339. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
  340. data/vendor/assets/stylesheets/foundation/components/_forms.scss +0 -607
  341. data/vendor/assets/stylesheets/foundation/components/_global.scss +0 -566
  342. data/vendor/assets/stylesheets/foundation/components/_grid.scss +0 -292
  343. data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +0 -460
  344. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +0 -58
  345. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +0 -220
  346. data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +0 -60
  347. data/vendor/assets/stylesheets/foundation/components/_labels.scss +0 -106
  348. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +0 -34
  349. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +0 -606
  350. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +0 -388
  351. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +0 -163
  352. data/vendor/assets/stylesheets/foundation/components/_panels.scss +0 -107
  353. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
  354. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +0 -85
  355. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +0 -177
  356. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +0 -212
  357. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +0 -120
  358. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +0 -203
  359. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +0 -125
  360. data/vendor/assets/stylesheets/foundation/components/_switches.scss +0 -241
  361. data/vendor/assets/stylesheets/foundation/components/_tables.scss +0 -135
  362. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +0 -142
  363. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
  364. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
  365. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +0 -745
  366. data/vendor/assets/stylesheets/foundation/components/_type.scss +0 -525
  367. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +0 -425
  368. data/vendor/assets/stylesheets/foundation.scss +0 -42
  369. data/vendor/assets/stylesheets/normalize.scss +0 -424
@@ -1,935 +0,0 @@
1
- ;(function ($, window, document, undefined) {
2
- 'use strict';
3
-
4
- var Modernizr = Modernizr || false;
5
-
6
- Foundation.libs.joyride = {
7
- name : 'joyride',
8
-
9
- version : '5.5.3',
10
-
11
- defaults : {
12
- expose : false, // turn on or off the expose feature
13
- modal : true, // Whether to cover page with modal during the tour
14
- keyboard : true, // enable left, right and esc keystrokes
15
- tip_location : 'bottom', // 'top', 'bottom', 'left' or 'right' in relation to parent
16
- nub_position : 'auto', // override on a per tooltip bases
17
- scroll_speed : 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
18
- scroll_animation : 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
19
- timer : 0, // 0 = no timer , all other numbers = timer in milliseconds
20
- start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
21
- start_offset : 0, // the index of the tooltip you want to start on (index of the li)
22
- next_button : true, // true or false to control whether a next button is used
23
- prev_button : true, // true or false to control whether a prev button is used
24
- tip_animation : 'fade', // 'pop' or 'fade' in each tip
25
- pause_after : [], // array of indexes where to pause the tour after
26
- exposed : [], // array of expose elements
27
- tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
28
- cookie_monster : false, // true or false to control whether cookies are used
29
- cookie_name : 'joyride', // Name the cookie you'll use
30
- cookie_domain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
31
- cookie_expires : 365, // set when you would like the cookie to expire.
32
- tip_container : 'body', // Where will the tip be attached
33
- abort_on_close : true, // When true, the close event will not fire any callback
34
- tip_location_patterns : {
35
- top : ['bottom'],
36
- bottom : [], // bottom should not need to be repositioned
37
- left : ['right', 'top', 'bottom'],
38
- right : ['left', 'top', 'bottom']
39
- },
40
- post_ride_callback : function () {}, // A method to call once the tour closes (canceled or complete)
41
- post_step_callback : function () {}, // A method to call after each step
42
- pre_step_callback : function () {}, // A method to call before each step
43
- pre_ride_callback : function () {}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
44
- post_expose_callback : function () {}, // A method to call after an element has been exposed
45
- template : { // HTML segments for tip layout
46
- link : '<a href="#close" class="joyride-close-tip">&times;</a>',
47
- timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
48
- tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
49
- wrapper : '<div class="joyride-content-wrapper"></div>',
50
- button : '<a href="#" class="small button joyride-next-tip"></a>',
51
- prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
52
- modal : '<div class="joyride-modal-bg"></div>',
53
- expose : '<div class="joyride-expose-wrapper"></div>',
54
- expose_cover : '<div class="joyride-expose-cover"></div>'
55
- },
56
- expose_add_class : '' // One or more space-separated class names to be added to exposed element
57
- },
58
-
59
- init : function (scope, method, options) {
60
- Foundation.inherit(this, 'throttle random_str');
61
-
62
- this.settings = this.settings || $.extend({}, this.defaults, (options || method));
63
-
64
- this.bindings(method, options)
65
- },
66
-
67
- go_next : function () {
68
- if (this.settings.$li.next().length < 1) {
69
- this.end();
70
- } else if (this.settings.timer > 0) {
71
- clearTimeout(this.settings.automate);
72
- this.hide();
73
- this.show();
74
- this.startTimer();
75
- } else {
76
- this.hide();
77
- this.show();
78
- }
79
- },
80
-
81
- go_prev : function () {
82
- if (this.settings.$li.prev().length < 1) {
83
- // Do nothing if there are no prev element
84
- } else if (this.settings.timer > 0) {
85
- clearTimeout(this.settings.automate);
86
- this.hide();
87
- this.show(null, true);
88
- this.startTimer();
89
- } else {
90
- this.hide();
91
- this.show(null, true);
92
- }
93
- },
94
-
95
- events : function () {
96
- var self = this;
97
-
98
- $(this.scope)
99
- .off('.joyride')
100
- .on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
101
- e.preventDefault();
102
- this.go_next()
103
- }.bind(this))
104
- .on('click.fndtn.joyride', '.joyride-prev-tip', function (e) {
105
- e.preventDefault();
106
- this.go_prev();
107
- }.bind(this))
108
-
109
- .on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
110
- e.preventDefault();
111
- this.end(this.settings.abort_on_close);
112
- }.bind(this))
113
-
114
- .on('keyup.fndtn.joyride', function (e) {
115
- // Don't do anything if keystrokes are disabled
116
- // or if the joyride is not being shown
117
- if (!this.settings.keyboard || !this.settings.riding) {
118
- return;
119
- }
120
-
121
- switch (e.which) {
122
- case 39: // right arrow
123
- e.preventDefault();
124
- this.go_next();
125
- break;
126
- case 37: // left arrow
127
- e.preventDefault();
128
- this.go_prev();
129
- break;
130
- case 27: // escape
131
- e.preventDefault();
132
- this.end(this.settings.abort_on_close);
133
- }
134
- }.bind(this));
135
-
136
- $(window)
137
- .off('.joyride')
138
- .on('resize.fndtn.joyride', self.throttle(function () {
139
- if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip && self.settings.riding) {
140
- if (self.settings.exposed.length > 0) {
141
- var $els = $(self.settings.exposed);
142
-
143
- $els.each(function () {
144
- var $this = $(this);
145
- self.un_expose($this);
146
- self.expose($this);
147
- });
148
- }
149
-
150
- if (self.is_phone()) {
151
- self.pos_phone();
152
- } else {
153
- self.pos_default(false);
154
- }
155
- }
156
- }, 100));
157
- },
158
-
159
- start : function () {
160
- var self = this,
161
- $this = $('[' + this.attr_name() + ']', this.scope),
162
- integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
163
- int_settings_count = integer_settings.length;
164
-
165
- if (!$this.length > 0) {
166
- return;
167
- }
168
-
169
- if (!this.settings.init) {
170
- this.events();
171
- }
172
-
173
- this.settings = $this.data(this.attr_name(true) + '-init');
174
-
175
- // non configureable settings
176
- this.settings.$content_el = $this;
177
- this.settings.$body = $(this.settings.tip_container);
178
- this.settings.body_offset = $(this.settings.tip_container).position();
179
- this.settings.$tip_content = this.settings.$content_el.find('> li');
180
- this.settings.paused = false;
181
- this.settings.attempts = 0;
182
- this.settings.riding = true;
183
-
184
- // can we create cookies?
185
- if (typeof $.cookie !== 'function') {
186
- this.settings.cookie_monster = false;
187
- }
188
-
189
- // generate the tips and insert into dom.
190
- if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
191
- this.settings.$tip_content.each(function (index) {
192
- var $this = $(this);
193
- this.settings = $.extend({}, self.defaults, self.data_options($this));
194
-
195
- // Make sure that settings parsed from data_options are integers where necessary
196
- var i = int_settings_count;
197
- while (i--) {
198
- self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
199
- }
200
- self.create({$li : $this, index : index});
201
- });
202
-
203
- // show first tip
204
- if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
205
- this.show('init');
206
- this.startTimer();
207
- } else {
208
- this.show('init');
209
- }
210
-
211
- }
212
- },
213
-
214
- resume : function () {
215
- this.set_li();
216
- this.show();
217
- },
218
-
219
- tip_template : function (opts) {
220
- var $blank, content;
221
-
222
- opts.tip_class = opts.tip_class || '';
223
-
224
- $blank = $(this.settings.template.tip).addClass(opts.tip_class);
225
- content = $.trim($(opts.li).html()) +
226
- this.prev_button_text(opts.prev_button_text, opts.index) +
227
- this.button_text(opts.button_text) +
228
- this.settings.template.link +
229
- this.timer_instance(opts.index);
230
-
231
- $blank.append($(this.settings.template.wrapper));
232
- $blank.first().attr(this.add_namespace('data-index'), opts.index);
233
- $('.joyride-content-wrapper', $blank).append(content);
234
-
235
- return $blank[0];
236
- },
237
-
238
- timer_instance : function (index) {
239
- var txt;
240
-
241
- if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
242
- txt = '';
243
- } else {
244
- txt = $(this.settings.template.timer)[0].outerHTML;
245
- }
246
- return txt;
247
- },
248
-
249
- button_text : function (txt) {
250
- if (this.settings.tip_settings.next_button) {
251
- txt = $.trim(txt) || 'Next';
252
- txt = $(this.settings.template.button).append(txt)[0].outerHTML;
253
- } else {
254
- txt = '';
255
- }
256
- return txt;
257
- },
258
-
259
- prev_button_text : function (txt, idx) {
260
- if (this.settings.tip_settings.prev_button) {
261
- txt = $.trim(txt) || 'Previous';
262
-
263
- // Add the disabled class to the button if it's the first element
264
- if (idx == 0) {
265
- txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
266
- } else {
267
- txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
268
- }
269
- } else {
270
- txt = '';
271
- }
272
- return txt;
273
- },
274
-
275
- create : function (opts) {
276
- this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
277
- var buttonText = opts.$li.attr(this.add_namespace('data-button')) || opts.$li.attr(this.add_namespace('data-text')),
278
- prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev')) || opts.$li.attr(this.add_namespace('data-prev-text')),
279
- tipClass = opts.$li.attr('class'),
280
- $tip_content = $(this.tip_template({
281
- tip_class : tipClass,
282
- index : opts.index,
283
- button_text : buttonText,
284
- prev_button_text : prevButtonText,
285
- li : opts.$li
286
- }));
287
-
288
- $(this.settings.tip_container).append($tip_content);
289
- },
290
-
291
- show : function (init, is_prev) {
292
- var $timer = null;
293
-
294
- // are we paused?
295
- if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
296
-
297
- // don't go to the next li if the tour was paused
298
- if (this.settings.paused) {
299
- this.settings.paused = false;
300
- } else {
301
- this.set_li(init, is_prev);
302
- }
303
-
304
- this.settings.attempts = 0;
305
-
306
- if (this.settings.$li.length && this.settings.$target.length > 0) {
307
- if (init) { //run when we first start
308
- this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
309
- if (this.settings.modal) {
310
- this.show_modal();
311
- }
312
- }
313
-
314
- this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
315
-
316
- if (this.settings.modal && this.settings.expose) {
317
- this.expose();
318
- }
319
-
320
- this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
321
-
322
- this.settings.timer = parseInt(this.settings.timer, 10);
323
-
324
- this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
325
-
326
- // scroll and hide bg if not modal and not expose
327
- if (!/body/i.test(this.settings.$target.selector) && !this.settings.expose) {
328
- var joyridemodalbg = $('.joyride-modal-bg');
329
- if (/pop/i.test(this.settings.tipAnimation)) {
330
- joyridemodalbg.hide();
331
- } else {
332
- joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);
333
- }
334
- this.scroll_to();
335
- }
336
-
337
- if (this.is_phone()) {
338
- this.pos_phone(true);
339
- } else {
340
- this.pos_default(true);
341
- }
342
-
343
- $timer = this.settings.$next_tip.find('.joyride-timer-indicator');
344
-
345
- if (/pop/i.test(this.settings.tip_animation)) {
346
-
347
- $timer.width(0);
348
-
349
- if (this.settings.timer > 0) {
350
-
351
- this.settings.$next_tip.show();
352
-
353
- setTimeout(function () {
354
- $timer.animate({
355
- width : $timer.parent().width()
356
- }, this.settings.timer, 'linear');
357
- }.bind(this), this.settings.tip_animation_fade_speed);
358
-
359
- } else {
360
- this.settings.$next_tip.show();
361
-
362
- }
363
-
364
- } else if (/fade/i.test(this.settings.tip_animation)) {
365
-
366
- $timer.width(0);
367
-
368
- if (this.settings.timer > 0) {
369
-
370
- this.settings.$next_tip
371
- .fadeIn(this.settings.tip_animation_fade_speed)
372
- .show();
373
-
374
- setTimeout(function () {
375
- $timer.animate({
376
- width : $timer.parent().width()
377
- }, this.settings.timer, 'linear');
378
- }.bind(this), this.settings.tip_animation_fade_speed);
379
-
380
- } else {
381
- this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
382
- }
383
- }
384
-
385
- this.settings.$current_tip = this.settings.$next_tip;
386
-
387
- // skip non-existant targets
388
- } else if (this.settings.$li && this.settings.$target.length < 1) {
389
-
390
- this.show(init, is_prev);
391
-
392
- } else {
393
-
394
- this.end();
395
-
396
- }
397
- } else {
398
-
399
- this.settings.paused = true;
400
-
401
- }
402
-
403
- },
404
-
405
- is_phone : function () {
406
- return matchMedia(Foundation.media_queries.small).matches &&
407
- !matchMedia(Foundation.media_queries.medium).matches;
408
- },
409
-
410
- hide : function () {
411
- if (this.settings.modal && this.settings.expose) {
412
- this.un_expose();
413
- }
414
-
415
- if (!this.settings.modal) {
416
- $('.joyride-modal-bg').hide();
417
- }
418
-
419
- // Prevent scroll bouncing...wait to remove from layout
420
- this.settings.$current_tip.css('visibility', 'hidden');
421
- setTimeout($.proxy(function () {
422
- this.hide();
423
- this.css('visibility', 'visible');
424
- }, this.settings.$current_tip), 0);
425
- this.settings.post_step_callback(this.settings.$li.index(),
426
- this.settings.$current_tip);
427
- },
428
-
429
- set_li : function (init, is_prev) {
430
- if (init) {
431
- this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
432
- this.set_next_tip();
433
- this.settings.$current_tip = this.settings.$next_tip;
434
- } else {
435
- if (is_prev) {
436
- this.settings.$li = this.settings.$li.prev();
437
- } else {
438
- this.settings.$li = this.settings.$li.next();
439
- }
440
- this.set_next_tip();
441
- }
442
-
443
- this.set_target();
444
- },
445
-
446
- set_next_tip : function () {
447
- this.settings.$next_tip = $('.joyride-tip-guide').eq(this.settings.$li.index());
448
- this.settings.$next_tip.data('closed', '');
449
- },
450
-
451
- set_target : function () {
452
- var cl = this.settings.$li.attr(this.add_namespace('data-class')),
453
- id = this.settings.$li.attr(this.add_namespace('data-id')),
454
- $sel = function () {
455
- if (id) {
456
- return $(document.getElementById(id));
457
- } else if (cl) {
458
- return $('.' + cl).first();
459
- } else {
460
- return $('body');
461
- }
462
- };
463
-
464
- this.settings.$target = $sel();
465
- },
466
-
467
- scroll_to : function () {
468
- var window_half, tipOffset;
469
-
470
- window_half = $(window).height() / 2;
471
- tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
472
-
473
- if (tipOffset != 0) {
474
- $('html, body').stop().animate({
475
- scrollTop : tipOffset
476
- }, this.settings.scroll_speed, 'swing');
477
- }
478
- },
479
-
480
- paused : function () {
481
- return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
482
- },
483
-
484
- restart : function () {
485
- this.hide();
486
- this.settings.$li = undefined;
487
- this.show('init');
488
- },
489
-
490
- pos_default : function (init) {
491
- var $nub = this.settings.$next_tip.find('.joyride-nub'),
492
- nub_width = Math.ceil($nub.outerWidth() / 2),
493
- nub_height = Math.ceil($nub.outerHeight() / 2),
494
- toggle = init || false;
495
-
496
- // tip must not be "display: none" to calculate position
497
- if (toggle) {
498
- this.settings.$next_tip.css('visibility', 'hidden');
499
- this.settings.$next_tip.show();
500
- }
501
-
502
- if (!/body/i.test(this.settings.$target.selector)) {
503
- var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
504
- leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
505
-
506
- if (this.bottom()) {
507
- if (this.rtl) {
508
- this.settings.$next_tip.css({
509
- top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
510
- left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth() + leftAdjustment});
511
- } else {
512
- this.settings.$next_tip.css({
513
- top : (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight() + topAdjustment),
514
- left : this.settings.$target.offset().left + leftAdjustment});
515
- }
516
-
517
- this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
518
-
519
- } else if (this.top()) {
520
- if (this.rtl) {
521
- this.settings.$next_tip.css({
522
- top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
523
- left : this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
524
- } else {
525
- this.settings.$next_tip.css({
526
- top : (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height + topAdjustment),
527
- left : this.settings.$target.offset().left + leftAdjustment});
528
- }
529
-
530
- this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
531
-
532
- } else if (this.right()) {
533
-
534
- this.settings.$next_tip.css({
535
- top : this.settings.$target.offset().top + topAdjustment,
536
- left : (this.settings.$target.outerWidth() + this.settings.$target.offset().left + nub_width + leftAdjustment)});
537
-
538
- this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
539
-
540
- } else if (this.left()) {
541
-
542
- this.settings.$next_tip.css({
543
- top : this.settings.$target.offset().top + topAdjustment,
544
- left : (this.settings.$target.offset().left - this.settings.$next_tip.outerWidth() - nub_width + leftAdjustment)});
545
-
546
- this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
547
-
548
- }
549
-
550
- if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
551
-
552
- $nub.removeClass('bottom')
553
- .removeClass('top')
554
- .removeClass('right')
555
- .removeClass('left');
556
-
557
- this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
558
-
559
- this.settings.attempts++;
560
-
561
- this.pos_default();
562
-
563
- }
564
-
565
- } else if (this.settings.$li.length) {
566
-
567
- this.pos_modal($nub);
568
-
569
- }
570
-
571
- if (toggle) {
572
- this.settings.$next_tip.hide();
573
- this.settings.$next_tip.css('visibility', 'visible');
574
- }
575
-
576
- },
577
-
578
- pos_phone : function (init) {
579
- var tip_height = this.settings.$next_tip.outerHeight(),
580
- tip_offset = this.settings.$next_tip.offset(),
581
- target_height = this.settings.$target.outerHeight(),
582
- $nub = $('.joyride-nub', this.settings.$next_tip),
583
- nub_height = Math.ceil($nub.outerHeight() / 2),
584
- toggle = init || false;
585
-
586
- $nub.removeClass('bottom')
587
- .removeClass('top')
588
- .removeClass('right')
589
- .removeClass('left');
590
-
591
- if (toggle) {
592
- this.settings.$next_tip.css('visibility', 'hidden');
593
- this.settings.$next_tip.show();
594
- }
595
-
596
- if (!/body/i.test(this.settings.$target.selector)) {
597
-
598
- if (this.top()) {
599
-
600
- this.settings.$next_tip.offset({top : this.settings.$target.offset().top - tip_height - nub_height});
601
- $nub.addClass('bottom');
602
-
603
- } else {
604
-
605
- this.settings.$next_tip.offset({top : this.settings.$target.offset().top + target_height + nub_height});
606
- $nub.addClass('top');
607
-
608
- }
609
-
610
- } else if (this.settings.$li.length) {
611
- this.pos_modal($nub);
612
- }
613
-
614
- if (toggle) {
615
- this.settings.$next_tip.hide();
616
- this.settings.$next_tip.css('visibility', 'visible');
617
- }
618
- },
619
-
620
- pos_modal : function ($nub) {
621
- this.center();
622
- $nub.hide();
623
-
624
- this.show_modal();
625
- },
626
-
627
- show_modal : function () {
628
- if (!this.settings.$next_tip.data('closed')) {
629
- var joyridemodalbg = $('.joyride-modal-bg');
630
- if (joyridemodalbg.length < 1) {
631
- var joyridemodalbg = $(this.settings.template.modal);
632
- joyridemodalbg.appendTo('body');
633
- }
634
-
635
- if (/pop/i.test(this.settings.tip_animation)) {
636
- joyridemodalbg.show();
637
- } else {
638
- joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
639
- }
640
- }
641
- },
642
-
643
- expose : function () {
644
- var expose,
645
- exposeCover,
646
- el,
647
- origCSS,
648
- origClasses,
649
- randId = 'expose-' + this.random_str(6);
650
-
651
- if (arguments.length > 0 && arguments[0] instanceof $) {
652
- el = arguments[0];
653
- } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
654
- el = this.settings.$target;
655
- } else {
656
- return false;
657
- }
658
-
659
- if (el.length < 1) {
660
- if (window.console) {
661
- console.error('element not valid', el);
662
- }
663
- return false;
664
- }
665
-
666
- expose = $(this.settings.template.expose);
667
- this.settings.$body.append(expose);
668
- expose.css({
669
- top : el.offset().top,
670
- left : el.offset().left,
671
- width : el.outerWidth(true),
672
- height : el.outerHeight(true)
673
- });
674
-
675
- exposeCover = $(this.settings.template.expose_cover);
676
-
677
- origCSS = {
678
- zIndex : el.css('z-index'),
679
- position : el.css('position')
680
- };
681
-
682
- origClasses = el.attr('class') == null ? '' : el.attr('class');
683
-
684
- el.css('z-index', parseInt(expose.css('z-index')) + 1);
685
-
686
- if (origCSS.position == 'static') {
687
- el.css('position', 'relative');
688
- }
689
-
690
- el.data('expose-css', origCSS);
691
- el.data('orig-class', origClasses);
692
- el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
693
-
694
- exposeCover.css({
695
- top : el.offset().top,
696
- left : el.offset().left,
697
- width : el.outerWidth(true),
698
- height : el.outerHeight(true)
699
- });
700
-
701
- if (this.settings.modal) {
702
- this.show_modal();
703
- }
704
-
705
- this.settings.$body.append(exposeCover);
706
- expose.addClass(randId);
707
- exposeCover.addClass(randId);
708
- el.data('expose', randId);
709
- this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
710
- this.add_exposed(el);
711
- },
712
-
713
- un_expose : function () {
714
- var exposeId,
715
- el,
716
- expose,
717
- origCSS,
718
- origClasses,
719
- clearAll = false;
720
-
721
- if (arguments.length > 0 && arguments[0] instanceof $) {
722
- el = arguments[0];
723
- } else if (this.settings.$target && !/body/i.test(this.settings.$target.selector)) {
724
- el = this.settings.$target;
725
- } else {
726
- return false;
727
- }
728
-
729
- if (el.length < 1) {
730
- if (window.console) {
731
- console.error('element not valid', el);
732
- }
733
- return false;
734
- }
735
-
736
- exposeId = el.data('expose');
737
- expose = $('.' + exposeId);
738
-
739
- if (arguments.length > 1) {
740
- clearAll = arguments[1];
741
- }
742
-
743
- if (clearAll === true) {
744
- $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
745
- } else {
746
- expose.remove();
747
- }
748
-
749
- origCSS = el.data('expose-css');
750
-
751
- if (origCSS.zIndex == 'auto') {
752
- el.css('z-index', '');
753
- } else {
754
- el.css('z-index', origCSS.zIndex);
755
- }
756
-
757
- if (origCSS.position != el.css('position')) {
758
- if (origCSS.position == 'static') {// this is default, no need to set it.
759
- el.css('position', '');
760
- } else {
761
- el.css('position', origCSS.position);
762
- }
763
- }
764
-
765
- origClasses = el.data('orig-class');
766
- el.attr('class', origClasses);
767
- el.removeData('orig-classes');
768
-
769
- el.removeData('expose');
770
- el.removeData('expose-z-index');
771
- this.remove_exposed(el);
772
- },
773
-
774
- add_exposed : function (el) {
775
- this.settings.exposed = this.settings.exposed || [];
776
- if (el instanceof $ || typeof el === 'object') {
777
- this.settings.exposed.push(el[0]);
778
- } else if (typeof el == 'string') {
779
- this.settings.exposed.push(el);
780
- }
781
- },
782
-
783
- remove_exposed : function (el) {
784
- var search, i;
785
- if (el instanceof $) {
786
- search = el[0]
787
- } else if (typeof el == 'string') {
788
- search = el;
789
- }
790
-
791
- this.settings.exposed = this.settings.exposed || [];
792
- i = this.settings.exposed.length;
793
-
794
- while (i--) {
795
- if (this.settings.exposed[i] == search) {
796
- this.settings.exposed.splice(i, 1);
797
- return;
798
- }
799
- }
800
- },
801
-
802
- center : function () {
803
- var $w = $(window);
804
-
805
- this.settings.$next_tip.css({
806
- top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
807
- left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
808
- });
809
-
810
- return true;
811
- },
812
-
813
- bottom : function () {
814
- return /bottom/i.test(this.settings.tip_settings.tip_location);
815
- },
816
-
817
- top : function () {
818
- return /top/i.test(this.settings.tip_settings.tip_location);
819
- },
820
-
821
- right : function () {
822
- return /right/i.test(this.settings.tip_settings.tip_location);
823
- },
824
-
825
- left : function () {
826
- return /left/i.test(this.settings.tip_settings.tip_location);
827
- },
828
-
829
- corners : function (el) {
830
- if (el.length === 0) {
831
- return [false, false, false, false];
832
- }
833
-
834
- var w = $(window),
835
- window_half = w.height() / 2,
836
- //using this to calculate since scroll may not have finished yet.
837
- tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
838
- right = w.width() + w.scrollLeft(),
839
- offsetBottom = w.height() + tipOffset,
840
- bottom = w.height() + w.scrollTop(),
841
- top = w.scrollTop();
842
-
843
- if (tipOffset < top) {
844
- if (tipOffset < 0) {
845
- top = 0;
846
- } else {
847
- top = tipOffset;
848
- }
849
- }
850
-
851
- if (offsetBottom > bottom) {
852
- bottom = offsetBottom;
853
- }
854
-
855
- return [
856
- el.offset().top < top,
857
- right < el.offset().left + el.outerWidth(),
858
- bottom < el.offset().top + el.outerHeight(),
859
- w.scrollLeft() > el.offset().left
860
- ];
861
- },
862
-
863
- visible : function (hidden_corners) {
864
- var i = hidden_corners.length;
865
-
866
- while (i--) {
867
- if (hidden_corners[i]) {
868
- return false;
869
- }
870
- }
871
-
872
- return true;
873
- },
874
-
875
- nub_position : function (nub, pos, def) {
876
- if (pos === 'auto') {
877
- nub.addClass(def);
878
- } else {
879
- nub.addClass(pos);
880
- }
881
- },
882
-
883
- startTimer : function () {
884
- if (this.settings.$li.length) {
885
- this.settings.automate = setTimeout(function () {
886
- this.hide();
887
- this.show();
888
- this.startTimer();
889
- }.bind(this), this.settings.timer);
890
- } else {
891
- clearTimeout(this.settings.automate);
892
- }
893
- },
894
-
895
- end : function (abort) {
896
- if (this.settings.cookie_monster) {
897
- $.cookie(this.settings.cookie_name, 'ridden', {expires : this.settings.cookie_expires, domain : this.settings.cookie_domain});
898
- }
899
-
900
- if (this.settings.timer > 0) {
901
- clearTimeout(this.settings.automate);
902
- }
903
-
904
- if (this.settings.modal && this.settings.expose) {
905
- this.un_expose();
906
- }
907
-
908
- // Unplug keystrokes listener
909
- $(this.scope).off('keyup.joyride')
910
-
911
- this.settings.$next_tip.data('closed', true);
912
- this.settings.riding = false;
913
-
914
- $('.joyride-modal-bg').hide();
915
- this.settings.$current_tip.hide();
916
-
917
- if (typeof abort === 'undefined' || abort === false) {
918
- this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
919
- this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
920
- }
921
-
922
- $('.joyride-tip-guide').remove();
923
- },
924
-
925
- off : function () {
926
- $(this.scope).off('.joyride');
927
- $(window).off('.joyride');
928
- $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
929
- $('.joyride-tip-guide, .joyride-modal-bg').remove();
930
- clearTimeout(this.settings.automate);
931
- },
932
-
933
- reflow : function () {}
934
- };
935
- }(jQuery, window, window.document));