TokiCLI 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (368) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +7 -0
  4. data/README.md +56 -10
  5. data/TokiCLI.gemspec +5 -2
  6. data/lib/API/dbapi.rb +104 -67
  7. data/lib/API/helpers.rb +47 -3
  8. data/lib/TokiCLI/app.rb +88 -12
  9. data/lib/TokiCLI/version.rb +1 -1
  10. data/lib/TokiCLI/view.rb +5 -1
  11. data/lib/TokiServer/Gemfile +6 -0
  12. data/lib/TokiServer/README.md +37 -0
  13. data/lib/TokiServer/bower.json +8 -0
  14. data/lib/TokiServer/bower_components/fastclick/.bower.json +23 -0
  15. data/lib/TokiServer/bower_components/fastclick/LICENSE +22 -0
  16. data/lib/TokiServer/bower_components/fastclick/README.md +133 -0
  17. data/lib/TokiServer/bower_components/fastclick/bower.json +13 -0
  18. data/lib/TokiServer/bower_components/fastclick/lib/fastclick.js +790 -0
  19. data/lib/TokiServer/bower_components/foundation/.bower.json +30 -0
  20. data/lib/TokiServer/bower_components/foundation/bower.json +20 -0
  21. data/lib/TokiServer/bower_components/foundation/css/foundation.css +4860 -0
  22. data/lib/TokiServer/bower_components/foundation/css/normalize.css +320 -0
  23. data/lib/TokiServer/bower_components/foundation/js/foundation.js +5543 -0
  24. data/lib/TokiServer/bower_components/foundation/js/foundation.min.js +3 -0
  25. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.abide.js +299 -0
  26. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.accordion.js +59 -0
  27. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.alert.js +43 -0
  28. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.clearing.js +534 -0
  29. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.dropdown.js +311 -0
  30. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.equalizer.js +74 -0
  31. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.interchange.js +331 -0
  32. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.joyride.js +843 -0
  33. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.js +611 -0
  34. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.magellan.js +178 -0
  35. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.offcanvas.js +108 -0
  36. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.orbit.js +610 -0
  37. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.reveal.js +437 -0
  38. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.slider.js +199 -0
  39. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tab.js +167 -0
  40. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tooltip.js +298 -0
  41. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.topbar.js +425 -0
  42. data/lib/TokiServer/bower_components/foundation/js/vendor/fastclick.js +9 -0
  43. data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.cookie.js +8 -0
  44. data/lib/TokiServer/bower_components/foundation/js/vendor/jquery.js +26 -0
  45. data/lib/TokiServer/bower_components/foundation/js/vendor/modernizr.js +8 -0
  46. data/lib/TokiServer/bower_components/foundation/js/vendor/placeholder.js +2 -0
  47. data/lib/TokiServer/bower_components/foundation/scss/foundation.scss +45 -0
  48. data/lib/TokiServer/bower_components/foundation/scss/foundation/_functions.scss +101 -0
  49. data/lib/TokiServer/bower_components/foundation/scss/foundation/_settings.scss +1289 -0
  50. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_accordion.scss +53 -0
  51. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +126 -0
  52. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_block-grid.scss +132 -0
  53. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +127 -0
  54. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_button-groups.scss +108 -0
  55. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_buttons.scss +222 -0
  56. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_clearing.scss +247 -0
  57. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +129 -0
  58. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown.scss +248 -0
  59. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_flex-video.scss +51 -0
  60. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_forms.scss +498 -0
  61. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_global.scss +429 -0
  62. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_grid.scss +260 -0
  63. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_inline-lists.scss +57 -0
  64. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_joyride.scss +220 -0
  65. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_keystrokes.scss +61 -0
  66. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_labels.scss +104 -0
  67. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_magellan.scss +34 -0
  68. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_offcanvas.scss +355 -0
  69. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_orbit.scss +423 -0
  70. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pagination.scss +150 -0
  71. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_panels.scss +90 -0
  72. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +150 -0
  73. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_progress-bars.scss +79 -0
  74. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_range-slider.scss +148 -0
  75. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal-new.scss +0 -0
  76. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal.scss +216 -0
  77. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_side-nav.scss +115 -0
  78. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_split-buttons.scss +191 -0
  79. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_sub-nav.scss +125 -0
  80. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_switch.scss +294 -0
  81. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tables.scss +129 -0
  82. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tabs.scss +109 -0
  83. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_thumbs.scss +68 -0
  84. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tooltips.scss +140 -0
  85. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_top-bar.scss +644 -0
  86. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_type.scss +511 -0
  87. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_visibility.scss +408 -0
  88. data/lib/TokiServer/bower_components/foundation/scss/normalize.scss +425 -0
  89. data/lib/TokiServer/bower_components/jquery-placeholder/.bower.json +17 -0
  90. data/lib/TokiServer/bower_components/jquery-placeholder/.gitattributes +1 -0
  91. data/lib/TokiServer/bower_components/jquery-placeholder/.gitignore +1 -0
  92. data/lib/TokiServer/bower_components/jquery-placeholder/LICENSE-MIT.txt +20 -0
  93. data/lib/TokiServer/bower_components/jquery-placeholder/README.md +76 -0
  94. data/lib/TokiServer/bower_components/jquery-placeholder/bower.json +5 -0
  95. data/lib/TokiServer/bower_components/jquery-placeholder/demo.html +55 -0
  96. data/lib/TokiServer/bower_components/jquery-placeholder/jquery.placeholder.js +185 -0
  97. data/lib/TokiServer/bower_components/jquery-placeholder/tests/index.html +32 -0
  98. data/lib/TokiServer/bower_components/jquery-placeholder/tests/tests.js +134 -0
  99. data/lib/TokiServer/bower_components/jquery.cookie/.bower.json +28 -0
  100. data/lib/TokiServer/bower_components/jquery.cookie/jquery.cookie.js +117 -0
  101. data/lib/TokiServer/bower_components/jquery/.bower.json +37 -0
  102. data/lib/TokiServer/bower_components/jquery/MIT-LICENSE.txt +21 -0
  103. data/lib/TokiServer/bower_components/jquery/bower.json +27 -0
  104. data/lib/TokiServer/bower_components/jquery/dist/jquery.js +9190 -0
  105. data/lib/TokiServer/bower_components/jquery/dist/jquery.min.js +5 -0
  106. data/lib/TokiServer/bower_components/jquery/dist/jquery.min.map +1 -0
  107. data/lib/TokiServer/bower_components/jquery/src/ajax.js +806 -0
  108. data/lib/TokiServer/bower_components/jquery/src/ajax/jsonp.js +89 -0
  109. data/lib/TokiServer/bower_components/jquery/src/ajax/load.js +75 -0
  110. data/lib/TokiServer/bower_components/jquery/src/ajax/parseJSON.js +13 -0
  111. data/lib/TokiServer/bower_components/jquery/src/ajax/parseXML.js +28 -0
  112. data/lib/TokiServer/bower_components/jquery/src/ajax/script.js +64 -0
  113. data/lib/TokiServer/bower_components/jquery/src/ajax/var/nonce.js +5 -0
  114. data/lib/TokiServer/bower_components/jquery/src/ajax/var/rquery.js +3 -0
  115. data/lib/TokiServer/bower_components/jquery/src/ajax/xhr.js +135 -0
  116. data/lib/TokiServer/bower_components/jquery/src/attributes.js +11 -0
  117. data/lib/TokiServer/bower_components/jquery/src/attributes/attr.js +143 -0
  118. data/lib/TokiServer/bower_components/jquery/src/attributes/classes.js +158 -0
  119. data/lib/TokiServer/bower_components/jquery/src/attributes/prop.js +96 -0
  120. data/lib/TokiServer/bower_components/jquery/src/attributes/support.js +35 -0
  121. data/lib/TokiServer/bower_components/jquery/src/attributes/val.js +163 -0
  122. data/lib/TokiServer/bower_components/jquery/src/callbacks.js +205 -0
  123. data/lib/TokiServer/bower_components/jquery/src/core.js +498 -0
  124. data/lib/TokiServer/bower_components/jquery/src/core/access.js +60 -0
  125. data/lib/TokiServer/bower_components/jquery/src/core/init.js +123 -0
  126. data/lib/TokiServer/bower_components/jquery/src/core/parseHTML.js +39 -0
  127. data/lib/TokiServer/bower_components/jquery/src/core/ready.js +97 -0
  128. data/lib/TokiServer/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
  129. data/lib/TokiServer/bower_components/jquery/src/css.js +451 -0
  130. data/lib/TokiServer/bower_components/jquery/src/css/addGetHookIf.js +24 -0
  131. data/lib/TokiServer/bower_components/jquery/src/css/curCSS.js +57 -0
  132. data/lib/TokiServer/bower_components/jquery/src/css/defaultDisplay.js +70 -0
  133. data/lib/TokiServer/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  134. data/lib/TokiServer/bower_components/jquery/src/css/support.js +91 -0
  135. data/lib/TokiServer/bower_components/jquery/src/css/swap.js +28 -0
  136. data/lib/TokiServer/bower_components/jquery/src/css/var/cssExpand.js +3 -0
  137. data/lib/TokiServer/bower_components/jquery/src/css/var/getStyles.js +5 -0
  138. data/lib/TokiServer/bower_components/jquery/src/css/var/isHidden.js +13 -0
  139. data/lib/TokiServer/bower_components/jquery/src/css/var/rmargin.js +3 -0
  140. data/lib/TokiServer/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
  141. data/lib/TokiServer/bower_components/jquery/src/data.js +179 -0
  142. data/lib/TokiServer/bower_components/jquery/src/data/Data.js +181 -0
  143. data/lib/TokiServer/bower_components/jquery/src/data/accepts.js +20 -0
  144. data/lib/TokiServer/bower_components/jquery/src/data/var/data_priv.js +5 -0
  145. data/lib/TokiServer/bower_components/jquery/src/data/var/data_user.js +5 -0
  146. data/lib/TokiServer/bower_components/jquery/src/deferred.js +149 -0
  147. data/lib/TokiServer/bower_components/jquery/src/deprecated.js +13 -0
  148. data/lib/TokiServer/bower_components/jquery/src/dimensions.js +50 -0
  149. data/lib/TokiServer/bower_components/jquery/src/effects.js +649 -0
  150. data/lib/TokiServer/bower_components/jquery/src/effects/Tween.js +114 -0
  151. data/lib/TokiServer/bower_components/jquery/src/effects/animatedSelector.js +13 -0
  152. data/lib/TokiServer/bower_components/jquery/src/event.js +868 -0
  153. data/lib/TokiServer/bower_components/jquery/src/event/alias.js +39 -0
  154. data/lib/TokiServer/bower_components/jquery/src/event/support.js +9 -0
  155. data/lib/TokiServer/bower_components/jquery/src/exports/amd.js +24 -0
  156. data/lib/TokiServer/bower_components/jquery/src/exports/global.js +32 -0
  157. data/lib/TokiServer/bower_components/jquery/src/intro.js +44 -0
  158. data/lib/TokiServer/bower_components/jquery/src/jquery.js +36 -0
  159. data/lib/TokiServer/bower_components/jquery/src/manipulation.js +582 -0
  160. data/lib/TokiServer/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
  161. data/lib/TokiServer/bower_components/jquery/src/manipulation/support.js +31 -0
  162. data/lib/TokiServer/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  163. data/lib/TokiServer/bower_components/jquery/src/offset.js +204 -0
  164. data/lib/TokiServer/bower_components/jquery/src/outro.js +1 -0
  165. data/lib/TokiServer/bower_components/jquery/src/queue.js +142 -0
  166. data/lib/TokiServer/bower_components/jquery/src/queue/delay.js +22 -0
  167. data/lib/TokiServer/bower_components/jquery/src/selector-native.js +172 -0
  168. data/lib/TokiServer/bower_components/jquery/src/selector-sizzle.js +14 -0
  169. data/lib/TokiServer/bower_components/jquery/src/selector.js +1 -0
  170. data/lib/TokiServer/bower_components/jquery/src/serialize.js +111 -0
  171. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.js +2044 -0
  172. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  173. data/lib/TokiServer/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  174. data/lib/TokiServer/bower_components/jquery/src/traversing.js +200 -0
  175. data/lib/TokiServer/bower_components/jquery/src/traversing/findFilter.js +100 -0
  176. data/lib/TokiServer/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
  177. data/lib/TokiServer/bower_components/jquery/src/var/arr.js +3 -0
  178. data/lib/TokiServer/bower_components/jquery/src/var/class2type.js +4 -0
  179. data/lib/TokiServer/bower_components/jquery/src/var/concat.js +5 -0
  180. data/lib/TokiServer/bower_components/jquery/src/var/hasOwn.js +5 -0
  181. data/lib/TokiServer/bower_components/jquery/src/var/indexOf.js +5 -0
  182. data/lib/TokiServer/bower_components/jquery/src/var/pnum.js +3 -0
  183. data/lib/TokiServer/bower_components/jquery/src/var/push.js +5 -0
  184. data/lib/TokiServer/bower_components/jquery/src/var/rnotwhite.js +3 -0
  185. data/lib/TokiServer/bower_components/jquery/src/var/slice.js +5 -0
  186. data/lib/TokiServer/bower_components/jquery/src/var/strundefined.js +3 -0
  187. data/lib/TokiServer/bower_components/jquery/src/var/support.js +4 -0
  188. data/lib/TokiServer/bower_components/jquery/src/var/toString.js +5 -0
  189. data/lib/TokiServer/bower_components/jquery/src/wrap.js +78 -0
  190. data/lib/TokiServer/bower_components/modernizr/.bower.json +14 -0
  191. data/lib/TokiServer/bower_components/modernizr/.editorconfig +10 -0
  192. data/lib/TokiServer/bower_components/modernizr/.gitignore +2 -0
  193. data/lib/TokiServer/bower_components/modernizr/.travis.yml +6 -0
  194. data/lib/TokiServer/bower_components/modernizr/feature-detects/a-download.js +8 -0
  195. data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-audiodata-api.js +4 -0
  196. data/lib/TokiServer/bower_components/modernizr/feature-detects/audio-webaudio-api.js +4 -0
  197. data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-api.js +8 -0
  198. data/lib/TokiServer/bower_components/modernizr/feature-detects/battery-level.js +11 -0
  199. data/lib/TokiServer/bower_components/modernizr/feature-detects/blob-constructor.js +10 -0
  200. data/lib/TokiServer/bower_components/modernizr/feature-detects/canvas-todataurl-type.js +28 -0
  201. data/lib/TokiServer/bower_components/modernizr/feature-detects/contenteditable.js +9 -0
  202. data/lib/TokiServer/bower_components/modernizr/feature-detects/contentsecuritypolicy.js +10 -0
  203. data/lib/TokiServer/bower_components/modernizr/feature-detects/contextmenu.js +11 -0
  204. data/lib/TokiServer/bower_components/modernizr/feature-detects/cookies.js +15 -0
  205. data/lib/TokiServer/bower_components/modernizr/feature-detects/cors.js +3 -0
  206. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-shorthand.js +19 -0
  207. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundposition-xy.js +15 -0
  208. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundrepeat.js +31 -0
  209. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-backgroundsizecover.js +10 -0
  210. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-boxsizing.js +9 -0
  211. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-calc.js +12 -0
  212. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-cubicbezierrange.js +8 -0
  213. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displayrunin.js +18 -0
  214. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-displaytable.js +27 -0
  215. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-filters.js +7 -0
  216. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-hyphens.js +205 -0
  217. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-lastchild.js +11 -0
  218. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mask.js +12 -0
  219. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-mediaqueries.js +3 -0
  220. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-objectfit.js +6 -0
  221. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-overflow-scrolling.js +9 -0
  222. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-pointerevents.js +25 -0
  223. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-positionsticky.js +13 -0
  224. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-regions.js +55 -0
  225. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-remunit.js +19 -0
  226. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-resize.js +8 -0
  227. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-scrollbars.js +19 -0
  228. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-shapes.js +4 -0
  229. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-subpixelfont.js +23 -0
  230. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-supports.js +6 -0
  231. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-userselect.js +10 -0
  232. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vhunit.js +14 -0
  233. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vmaxunit.js +14 -0
  234. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vminunit.js +14 -0
  235. data/lib/TokiServer/bower_components/modernizr/feature-detects/css-vwunit.js +14 -0
  236. data/lib/TokiServer/bower_components/modernizr/feature-detects/custom-protocol-handler.js +10 -0
  237. data/lib/TokiServer/bower_components/modernizr/feature-detects/dart.js +6 -0
  238. data/lib/TokiServer/bower_components/modernizr/feature-detects/dataview-api.js +4 -0
  239. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-classlist.js +4 -0
  240. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-createElement-attrs.js +11 -0
  241. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-dataset.js +9 -0
  242. data/lib/TokiServer/bower_components/modernizr/feature-detects/dom-microdata.js +4 -0
  243. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-datalist.js +12 -0
  244. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-details.js +25 -0
  245. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-output.js +4 -0
  246. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-progress-meter.js +11 -0
  247. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-ruby.js +53 -0
  248. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-time.js +4 -0
  249. data/lib/TokiServer/bower_components/modernizr/feature-detects/elem-track.js +11 -0
  250. data/lib/TokiServer/bower_components/modernizr/feature-detects/emoji.js +11 -0
  251. data/lib/TokiServer/bower_components/modernizr/feature-detects/es5-strictmode.js +7 -0
  252. data/lib/TokiServer/bower_components/modernizr/feature-detects/event-deviceorientation-motion.js +11 -0
  253. data/lib/TokiServer/bower_components/modernizr/feature-detects/exif-orientation.js +32 -0
  254. data/lib/TokiServer/bower_components/modernizr/feature-detects/file-api.js +12 -0
  255. data/lib/TokiServer/bower_components/modernizr/feature-detects/file-filesystem.js +9 -0
  256. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-fileinput.js +13 -0
  257. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-formattribute.js +29 -0
  258. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-inputnumber-l10n.js +32 -0
  259. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-placeholder.js +10 -0
  260. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-speechinput.js +19 -0
  261. data/lib/TokiServer/bower_components/modernizr/feature-detects/forms-validation.js +62 -0
  262. data/lib/TokiServer/bower_components/modernizr/feature-detects/fullscreen-api.js +10 -0
  263. data/lib/TokiServer/bower_components/modernizr/feature-detects/gamepad.js +12 -0
  264. data/lib/TokiServer/bower_components/modernizr/feature-detects/getusermedia.js +5 -0
  265. data/lib/TokiServer/bower_components/modernizr/feature-detects/ie8compat.js +12 -0
  266. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-sandbox.js +5 -0
  267. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-seamless.js +5 -0
  268. data/lib/TokiServer/bower_components/modernizr/feature-detects/iframe-srcdoc.js +5 -0
  269. data/lib/TokiServer/bower_components/modernizr/feature-detects/img-apng.js +26 -0
  270. data/lib/TokiServer/bower_components/modernizr/feature-detects/img-webp.js +20 -0
  271. data/lib/TokiServer/bower_components/modernizr/feature-detects/json.js +7 -0
  272. data/lib/TokiServer/bower_components/modernizr/feature-detects/lists-reversed.js +6 -0
  273. data/lib/TokiServer/bower_components/modernizr/feature-detects/mathml.js +23 -0
  274. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-connection.js +22 -0
  275. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-eventsource.js +5 -0
  276. data/lib/TokiServer/bower_components/modernizr/feature-detects/network-xhr2.js +13 -0
  277. data/lib/TokiServer/bower_components/modernizr/feature-detects/notification.js +10 -0
  278. data/lib/TokiServer/bower_components/modernizr/feature-detects/performance.js +5 -0
  279. data/lib/TokiServer/bower_components/modernizr/feature-detects/pointerlock-api.js +4 -0
  280. data/lib/TokiServer/bower_components/modernizr/feature-detects/quota-management-api.js +11 -0
  281. data/lib/TokiServer/bower_components/modernizr/feature-detects/requestanimationframe.js +7 -0
  282. data/lib/TokiServer/bower_components/modernizr/feature-detects/script-async.js +3 -0
  283. data/lib/TokiServer/bower_components/modernizr/feature-detects/script-defer.js +3 -0
  284. data/lib/TokiServer/bower_components/modernizr/feature-detects/style-scoped.js +6 -0
  285. data/lib/TokiServer/bower_components/modernizr/feature-detects/svg-filters.js +13 -0
  286. data/lib/TokiServer/bower_components/modernizr/feature-detects/unicode.js +32 -0
  287. data/lib/TokiServer/bower_components/modernizr/feature-detects/url-data-uri.js +26 -0
  288. data/lib/TokiServer/bower_components/modernizr/feature-detects/userdata.js +7 -0
  289. data/lib/TokiServer/bower_components/modernizr/feature-detects/vibration.js +4 -0
  290. data/lib/TokiServer/bower_components/modernizr/feature-detects/web-intents.js +6 -0
  291. data/lib/TokiServer/bower_components/modernizr/feature-detects/webgl-extensions.js +42 -0
  292. data/lib/TokiServer/bower_components/modernizr/feature-detects/websockets-binary.js +20 -0
  293. data/lib/TokiServer/bower_components/modernizr/feature-detects/window-framed.js +8 -0
  294. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-blobworkers.js +66 -0
  295. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-dataworkers.js +34 -0
  296. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-sharedworkers.js +3 -0
  297. data/lib/TokiServer/bower_components/modernizr/grunt.js +69 -0
  298. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.ai +292 -1
  299. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.eps +0 -0
  300. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.pdf +292 -1
  301. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.png +0 -0
  302. data/lib/TokiServer/bower_components/modernizr/media/Modernizr 2 Logo.svg +35 -0
  303. data/lib/TokiServer/bower_components/modernizr/modernizr.js +1406 -0
  304. data/lib/TokiServer/bower_components/modernizr/readme.md +28 -0
  305. data/lib/TokiServer/bower_components/modernizr/test/basic.html +65 -0
  306. data/lib/TokiServer/bower_components/modernizr/test/caniuse.html +1451 -0
  307. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.eot +0 -0
  308. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.otf +0 -0
  309. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.svg +147 -0
  310. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.ttf +0 -0
  311. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/Windsong-webfont.woff +0 -0
  312. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/alpha.png +0 -0
  313. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/apng_test.png +0 -0
  314. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/before-after.png +0 -0
  315. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/form_validation.html +15 -0
  316. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ga.js +43 -0
  317. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/green5x5.png +0 -0
  318. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/hashchange.html +16 -0
  319. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/jquery.min.js +18 -0
  320. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml.html +120 -0
  321. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/mathml_ref.png +0 -0
  322. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/modernizr-1.7.min.js +2 -0
  323. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/png_alpha_result.png +0 -0
  324. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/pushstate.html +40 -0
  325. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/red30x30.png +0 -0
  326. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/ruby.png +0 -0
  327. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/stroked-text.png +0 -0
  328. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/style.css +168 -0
  329. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-html-blur.png +0 -0
  330. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg +5 -0
  331. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg-img.svg.1 +5 -0
  332. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/svg_blur.png +0 -0
  333. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/table.png +0 -0
  334. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow1.png +0 -0
  335. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/text-shadow2.png +0 -0
  336. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/windsong_font.png +0 -0
  337. data/lib/TokiServer/bower_components/modernizr/test/caniuse_files/xhtml.html +14 -0
  338. data/lib/TokiServer/bower_components/modernizr/test/index.html +104 -0
  339. data/lib/TokiServer/bower_components/modernizr/test/js/basic.html +65 -0
  340. data/lib/TokiServer/bower_components/modernizr/test/js/dumpdata.js +75 -0
  341. data/lib/TokiServer/bower_components/modernizr/test/js/lib/detect-global.js +153 -0
  342. data/lib/TokiServer/bower_components/modernizr/test/js/lib/jquery-1.7b2.js +9279 -0
  343. data/lib/TokiServer/bower_components/modernizr/test/js/lib/jsonselect.js +279 -0
  344. data/lib/TokiServer/bower_components/modernizr/test/js/lib/polyfills.js +96 -0
  345. data/lib/TokiServer/bower_components/modernizr/test/js/lib/uaparser.js +215 -0
  346. data/lib/TokiServer/bower_components/modernizr/test/js/setup.js +44 -0
  347. data/lib/TokiServer/bower_components/modernizr/test/js/unit-caniuse.js +191 -0
  348. data/lib/TokiServer/bower_components/modernizr/test/js/unit.js +669 -0
  349. data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.css +231 -0
  350. data/lib/TokiServer/bower_components/modernizr/test/qunit/qunit.js +1932 -0
  351. data/lib/TokiServer/bower_components/modernizr/test/qunit/run-qunit.js +72 -0
  352. data/lib/TokiServer/config.rb +25 -0
  353. data/lib/TokiServer/humans.txt +8 -0
  354. data/lib/TokiServer/itunesicon.rb +60 -0
  355. data/lib/TokiServer/js/app.js +3 -0
  356. data/lib/TokiServer/public/stylesheets/app.css +8094 -0
  357. data/lib/TokiServer/robots.txt +4 -0
  358. data/lib/TokiServer/scss/_settings.scss +1240 -0
  359. data/lib/TokiServer/scss/app.scss +102 -0
  360. data/lib/TokiServer/tokiserver.rb +377 -0
  361. data/lib/TokiServer/views/apps_total.erb +28 -0
  362. data/lib/TokiServer/views/error.erb +25 -0
  363. data/lib/TokiServer/views/index.erb +191 -0
  364. data/lib/TokiServer/views/layout.erb +20 -0
  365. data/lib/TokiServer/views/name_log.erb +50 -0
  366. data/lib/TokiServer/views/name_split.erb +37 -0
  367. data/lib/TokiServer/views/name_total.erb +34 -0
  368. metadata +416 -4
@@ -0,0 +1,178 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs['magellan-expedition'] = {
5
+ name : 'magellan-expedition',
6
+
7
+ version : '5.2.3',
8
+
9
+ settings : {
10
+ active_class: 'active',
11
+ threshold: 0, // pixels from the top of the expedition for it to become fixes
12
+ destination_threshold: 20, // pixels from the top of destination for it to be considered active
13
+ throttle_delay: 30, // calculation throttling to increase framerate
14
+ fixed_top: 0 // top distance in pixels assigend to the fixed element on scroll
15
+ },
16
+
17
+ init : function (scope, method, options) {
18
+ Foundation.inherit(this, 'throttle');
19
+ this.bindings(method, options);
20
+ },
21
+
22
+ events : function () {
23
+ var self = this,
24
+ S = self.S,
25
+ settings = self.settings;
26
+
27
+ // initialize expedition offset
28
+ self.set_expedition_position();
29
+
30
+ S(self.scope)
31
+ .off('.magellan')
32
+ .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) {
33
+ e.preventDefault();
34
+ var expedition = $(this).closest('[' + self.attr_name() + ']'),
35
+ settings = expedition.data('magellan-expedition-init'),
36
+ hash = this.hash.split('#').join(''),
37
+ target = $("a[name='"+hash+"']");
38
+
39
+ if (target.length === 0) {
40
+ target = $('#'+hash);
41
+ }
42
+
43
+ // Account for expedition height if fixed position
44
+ var scroll_top = target.offset().top;
45
+ scroll_top = scroll_top - expedition.outerHeight();
46
+
47
+ $('html, body').stop().animate({
48
+ 'scrollTop': scroll_top
49
+ }, 700, 'swing', function () {
50
+ if(history.pushState) {
51
+ history.pushState(null, null, '#'+hash);
52
+ }
53
+ else {
54
+ location.hash = '#'+hash;
55
+ }
56
+ });
57
+ })
58
+ .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay));
59
+
60
+ $(window)
61
+ .on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
62
+ },
63
+
64
+ check_for_arrivals : function() {
65
+ var self = this;
66
+ self.update_arrivals();
67
+ self.update_expedition_positions();
68
+ },
69
+
70
+ set_expedition_position : function() {
71
+ var self = this;
72
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
73
+ var expedition = $(this),
74
+ styles = expedition.attr('styles'), // save styles
75
+ top_offset;
76
+
77
+ expedition.attr('style', '');
78
+ top_offset = expedition.offset().top + self.settings.threshold;
79
+
80
+ expedition.data(self.data_attr('magellan-top-offset'), top_offset);
81
+ expedition.attr('style', styles);
82
+ });
83
+ },
84
+
85
+ update_expedition_positions : function() {
86
+ var self = this,
87
+ window_top_offset = $(window).scrollTop();
88
+
89
+ $('[' + this.attr_name() + '=fixed]', self.scope).each(function() {
90
+ var expedition = $(this),
91
+ top_offset = expedition.data('magellan-top-offset');
92
+
93
+ if (window_top_offset >= top_offset) {
94
+ // Placeholder allows height calculations to be consistent even when
95
+ // appearing to switch between fixed/non-fixed placement
96
+ var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
97
+ if (placeholder.length === 0) {
98
+ placeholder = expedition.clone();
99
+ placeholder.removeAttr(self.attr_name());
100
+ placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
101
+ expedition.before(placeholder);
102
+ }
103
+ expedition.css({position:'fixed', top: self.settings.fixed_top});
104
+ } else {
105
+ expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
106
+ expedition.attr('style','').removeClass('fixed');
107
+ }
108
+ });
109
+ },
110
+
111
+ update_arrivals : function() {
112
+ var self = this,
113
+ window_top_offset = $(window).scrollTop();
114
+
115
+ $('[' + this.attr_name() + ']', self.scope).each(function() {
116
+ var expedition = $(this),
117
+ settings = expedition.data(self.attr_name(true) + '-init'),
118
+ offsets = self.offsets(expedition, window_top_offset),
119
+ arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
120
+ active_item = false;
121
+ offsets.each(function(idx, item) {
122
+ if (item.viewport_offset >= item.top_offset) {
123
+ var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
124
+ arrivals.not(item.arrival).removeClass(settings.active_class);
125
+ item.arrival.addClass(settings.active_class);
126
+ active_item = true;
127
+ return true;
128
+ }
129
+ });
130
+
131
+ if (!active_item) arrivals.removeClass(settings.active_class);
132
+ });
133
+ },
134
+
135
+ offsets : function(expedition, window_offset) {
136
+ var self = this,
137
+ settings = expedition.data(self.attr_name(true) + '-init'),
138
+ viewport_offset = window_offset;
139
+
140
+ return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function(idx, el) {
141
+ var name = $(this).data(self.data_attr('magellan-arrival')),
142
+ dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
143
+ if (dest.length > 0) {
144
+ var top_offset = dest.offset().top - settings.destination_threshold - expedition.outerHeight();
145
+ return {
146
+ destination : dest,
147
+ arrival : $(this),
148
+ top_offset : top_offset,
149
+ viewport_offset : viewport_offset
150
+ }
151
+ }
152
+ }).sort(function(a, b) {
153
+ if (a.top_offset < b.top_offset) return -1;
154
+ if (a.top_offset > b.top_offset) return 1;
155
+ return 0;
156
+ });
157
+ },
158
+
159
+ data_attr: function (str) {
160
+ if (this.namespace.length > 0) {
161
+ return this.namespace + '-' + str;
162
+ }
163
+
164
+ return str;
165
+ },
166
+
167
+ off : function () {
168
+ this.S(this.scope).off('.magellan');
169
+ this.S(window).off('.magellan');
170
+ },
171
+
172
+ reflow : function () {
173
+ var self = this;
174
+ // remove placeholder expeditions used for height calculation purposes
175
+ $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
176
+ }
177
+ };
178
+ }(jQuery, window, window.document));
@@ -0,0 +1,108 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.offcanvas = {
5
+ name : 'offcanvas',
6
+
7
+ version : '5.2.3',
8
+
9
+ settings : {
10
+ open_method: 'move',
11
+ close_on_click: true
12
+ },
13
+
14
+ init : function (scope, method, options) {
15
+ this.bindings(method, options);
16
+ },
17
+
18
+ events : function () {
19
+ var self = this,
20
+ S = self.S,
21
+ move_class = '',
22
+ right_postfix = '',
23
+ left_postfix = '';
24
+
25
+ if (this.settings.open_method === 'move') {
26
+ move_class = 'move-';
27
+ right_postfix = 'right';
28
+ left_postfix = 'left';
29
+ } else if (this.settings.open_method === 'overlap') {
30
+ move_class = 'offcanvas-overlap';
31
+ }
32
+
33
+ S(this.scope).off('.offcanvas')
34
+ .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
35
+ self.click_toggle_class(e, move_class + right_postfix);
36
+ })
37
+ .on('click.fndtn.offcanvas', '.left-off-canvas-menu a', function (e) {
38
+ var settings = self.get_settings(e);
39
+ if (settings.close_on_click) {
40
+ self.hide.call(self, move_class + right_postfix, self.get_wrapper(e));
41
+ }
42
+ })
43
+ .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
44
+ self.click_toggle_class(e, move_class + left_postfix);
45
+ })
46
+ .on('click.fndtn.offcanvas', '.right-off-canvas-menu a', function (e) {
47
+ var settings = self.get_settings(e);
48
+ if (settings.close_on_click) {
49
+ self.hide.call(self, move_class + left_postfix, self.get_wrapper(e));
50
+ }
51
+ })
52
+ .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
53
+ self.click_remove_class(e, move_class + left_postfix);
54
+ if (right_postfix) self.click_remove_class(e, move_class + right_postfix);
55
+ });
56
+
57
+ },
58
+
59
+ toggle: function(class_name, $off_canvas) {
60
+ $off_canvas = $off_canvas || this.get_wrapper();
61
+ if ($off_canvas.is('.' + class_name)) {
62
+ this.hide(class_name, $off_canvas);
63
+ } else {
64
+ this.show(class_name, $off_canvas);
65
+ }
66
+ },
67
+
68
+ show: function(class_name, $off_canvas) {
69
+ $off_canvas = $off_canvas || this.get_wrapper();
70
+ $off_canvas.trigger('open');
71
+ $off_canvas.addClass(class_name);
72
+ },
73
+
74
+ hide: function(class_name, $off_canvas) {
75
+ $off_canvas = $off_canvas || this.get_wrapper();
76
+ $off_canvas.trigger('close');
77
+ $off_canvas.removeClass(class_name);
78
+ },
79
+
80
+ click_toggle_class: function(e, class_name) {
81
+ e.preventDefault();
82
+ var $off_canvas = this.get_wrapper(e);
83
+ this.toggle(class_name, $off_canvas);
84
+ },
85
+
86
+ click_remove_class: function(e, class_name) {
87
+ e.preventDefault();
88
+ var $off_canvas = this.get_wrapper(e);
89
+ this.hide(class_name, $off_canvas);
90
+ },
91
+
92
+ get_settings: function(e) {
93
+ var offcanvas = this.S(e.target).closest('[' + this.attr_name() + ']');
94
+ return offcanvas.data(this.attr_name(true) + '-init') || this.settings;
95
+ },
96
+
97
+ get_wrapper: function(e) {
98
+ var $off_canvas = this.S(e ? e.target : this.scope).closest('.off-canvas-wrap');
99
+
100
+ if ($off_canvas.length === 0) {
101
+ $off_canvas = this.S('.off-canvas-wrap');
102
+ }
103
+ return $off_canvas;
104
+ },
105
+
106
+ reflow : function () {}
107
+ };
108
+ }(jQuery, window, window.document));
@@ -0,0 +1,610 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ var noop = function() {};
5
+
6
+ var Orbit = function(el, settings) {
7
+ // Don't reinitialize plugin
8
+ if (el.hasClass(settings.slides_container_class)) {
9
+ return this;
10
+ }
11
+
12
+ var self = this,
13
+ container,
14
+ slides_container = el,
15
+ number_container,
16
+ bullets_container,
17
+ timer_container,
18
+ idx = 0,
19
+ animate,
20
+ adjust_height_after = false,
21
+ has_init_active = slides_container.find("." + settings.active_slide_class).length > 0;
22
+
23
+ self.cache = {};
24
+
25
+ self.slides = function() {
26
+ return slides_container.children(settings.slide_selector);
27
+ };
28
+
29
+ if (!has_init_active) {self.slides().first().addClass(settings.active_slide_class)};
30
+
31
+ self.update_slide_number = function(index) {
32
+ if (settings.slide_number) {
33
+ number_container.find('span:first').text(parseInt(index)+1);
34
+ number_container.find('span:last').text(self.slides().length);
35
+ }
36
+ if (settings.bullets) {
37
+ bullets_container.children().removeClass(settings.bullets_active_class);
38
+ $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
39
+ }
40
+ };
41
+
42
+ self.update_active_link = function(index) {
43
+ var link = $('[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');
44
+ link.siblings().removeClass(settings.bullets_active_class);
45
+ link.addClass(settings.bullets_active_class);
46
+ };
47
+
48
+ self.build_markup = function() {
49
+ slides_container.wrap('<div class="'+settings.container_class+'"></div>');
50
+ container = slides_container.parent();
51
+ slides_container.addClass(settings.slides_container_class);
52
+ slides_container.addClass(settings.animation);
53
+
54
+ if (settings.stack_on_small) {
55
+ container.addClass(settings.stack_on_small_class);
56
+ }
57
+
58
+ if (settings.navigation_arrows) {
59
+ container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
60
+ container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
61
+ }
62
+
63
+ if (settings.timer) {
64
+ timer_container = $('<div>').addClass(settings.timer_container_class);
65
+ timer_container.append('<span>');
66
+ if (settings.timer_show_progress_bar) {
67
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
68
+ }
69
+ timer_container.addClass(settings.timer_paused_class);
70
+ container.append(timer_container);
71
+ }
72
+
73
+ if (settings.slide_number) {
74
+ number_container = $('<div>').addClass(settings.slide_number_class);
75
+ number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
76
+ container.append(number_container);
77
+ }
78
+
79
+ if (settings.bullets) {
80
+ bullets_container = $('<ol>').addClass(settings.bullets_container_class);
81
+ container.append(bullets_container);
82
+ bullets_container.wrap('<div class="orbit-bullets-container"></div>');
83
+ self.slides().each(function(idx, el) {
84
+ var bullet = $('<li>').attr('data-orbit-slide', idx)
85
+ .on('click', self.link_bullet);
86
+ bullets_container.append(bullet);
87
+ });
88
+ }
89
+
90
+ };
91
+
92
+ self._prepare_direction = function(next_idx, current_direction) {
93
+ var dir = 'next';
94
+ if (next_idx <= idx) { dir = 'prev'; }
95
+
96
+ if (settings.animation === 'slide') {
97
+ setTimeout(function(){
98
+ slides_container.removeClass("swipe-prev swipe-next");
99
+ if (dir === 'next') {slides_container.addClass("swipe-next");}
100
+ else if (dir === 'prev') {slides_container.addClass("swipe-prev");}
101
+ },0);
102
+ }
103
+
104
+ var slides = self.slides();
105
+ if (next_idx >= slides.length) {
106
+ if (!settings.circular) return false;
107
+ next_idx = 0;
108
+ } else if (next_idx < 0) {
109
+ if (!settings.circular) return false;
110
+ next_idx = slides.length - 1;
111
+ }
112
+ var current = $(slides.get(idx))
113
+ , next = $(slides.get(next_idx));
114
+
115
+ return [dir, current, next, next_idx];
116
+ };
117
+
118
+ self._goto = function(next_idx, start_timer) {
119
+ if (next_idx === null) {return false;}
120
+ if (self.cache.animating) {return false;}
121
+ if (next_idx === idx) {return false;}
122
+ if (typeof self.cache.timer === 'object') {self.cache.timer.restart();}
123
+
124
+ var slides = self.slides();
125
+ self.cache.animating = true;
126
+ var res = self._prepare_direction(next_idx)
127
+ , dir = res[0]
128
+ , current = res[1]
129
+ , next = res[2]
130
+ , next_idx = res[3];
131
+
132
+ // This means that circular is disabled and we most likely reached the last slide.
133
+ if (res === false) return false;
134
+
135
+ slides_container.trigger('before-slide-change.fndtn.orbit');
136
+ settings.before_slide_change();
137
+ idx = next_idx;
138
+
139
+ current.css("transitionDuration", settings.animation_speed+"ms");
140
+ next.css("transitionDuration", settings.animation_speed+"ms");
141
+
142
+ var callback = function() {
143
+ var unlock = function() {
144
+ if (start_timer === true) {self.cache.timer.restart();}
145
+ self.update_slide_number(idx);
146
+ // Remove "animate-in" class as late as possible to avoid "flickering" (especially with variable_height).
147
+ next.removeClass("animate-in");
148
+ next.addClass(settings.active_slide_class);
149
+ self.update_active_link(next_idx);
150
+ slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
151
+ settings.after_slide_change(idx, slides.length);
152
+ setTimeout(function(){
153
+ self.cache.animating = false;
154
+ }, 100);
155
+
156
+ };
157
+ if (slides_container.height() != next.height() && settings.variable_height) {
158
+ slides_container.animate({'min-height': next.height()}, 250, 'linear', unlock);
159
+ } else {
160
+ unlock();
161
+ }
162
+ };
163
+
164
+ if (slides.length === 1) {callback(); return false;}
165
+
166
+ var start_animation = function() {
167
+ if (dir === 'next') {animate.next(current, next, callback);}
168
+ if (dir === 'prev') {animate.prev(current, next, callback);}
169
+ };
170
+
171
+ if (next.height() > slides_container.height() && settings.variable_height) {
172
+ slides_container.animate({'min-height': next.height()}, 250, 'linear', start_animation);
173
+ } else {
174
+ start_animation();
175
+ }
176
+ };
177
+
178
+ self.next = function(e) {
179
+ e.stopImmediatePropagation();
180
+ e.preventDefault();
181
+ self._prepare_direction(idx + 1);
182
+ setTimeout(function(){
183
+ self._goto(idx + 1);
184
+ }, 100);
185
+ };
186
+
187
+ self.prev = function(e) {
188
+ e.stopImmediatePropagation();
189
+ e.preventDefault();
190
+ self._prepare_direction(idx - 1);
191
+ setTimeout(function(){
192
+ self._goto(idx - 1)
193
+ }, 100);
194
+ };
195
+
196
+ self.link_custom = function(e) {
197
+ e.preventDefault();
198
+ var link = $(this).attr('data-orbit-link');
199
+ if ((typeof link === 'string') && (link = $.trim(link)) != "") {
200
+ var slide = container.find('[data-orbit-slide='+link+']');
201
+ if (slide.index() != -1) {
202
+ setTimeout(function(){
203
+ self._goto(slide.index());
204
+ },100);
205
+ }
206
+ }
207
+ };
208
+
209
+ // Click handler for slides and bullets.
210
+ self.link_bullet = function(e) {
211
+ var index = $(this).attr('data-orbit-slide');
212
+ if ((typeof index === 'string') && (index = $.trim(index)) != "") {
213
+ if(isNaN(parseInt(index)))
214
+ {
215
+ var slide = container.find('[data-orbit-slide='+index+']');
216
+ if (slide.index() != -1) {
217
+ index = slide.index() + 1;
218
+ self._prepare_direction(index);
219
+ setTimeout(function(){
220
+ self._goto(index);
221
+ },100);
222
+ }
223
+ }
224
+ else
225
+ {
226
+ index = parseInt(index);
227
+ self._prepare_direction(index);
228
+ setTimeout(function(){
229
+ self._goto(index);
230
+ },100);
231
+ }
232
+ }
233
+ }
234
+
235
+ self.timer_callback = function() {
236
+ self._goto(idx + 1, true);
237
+ }
238
+
239
+ self.compute_dimensions = function() {
240
+ var current = $(self.slides().get(idx));
241
+ var h = current.height();
242
+ if (!settings.variable_height) {
243
+ self.slides().each(function(){
244
+ if ($(this).height() > h) { h = $(this).height(); }
245
+ });
246
+ }
247
+ slides_container.css('minHeight', String(h)+'px');
248
+ };
249
+
250
+ self.create_timer = function() {
251
+ var t = new Timer(
252
+ container.find('.'+settings.timer_container_class),
253
+ settings,
254
+ self.timer_callback
255
+ );
256
+ return t;
257
+ };
258
+
259
+ self.stop_timer = function() {
260
+ if (typeof self.cache.timer === 'object') self.cache.timer.stop();
261
+ };
262
+
263
+ self.toggle_timer = function() {
264
+ var t = container.find('.'+settings.timer_container_class);
265
+ if (t.hasClass(settings.timer_paused_class)) {
266
+ if (typeof self.cache.timer === 'undefined') {self.cache.timer = self.create_timer();}
267
+ self.cache.timer.start();
268
+ }
269
+ else {
270
+ if (typeof self.cache.timer === 'object') {self.cache.timer.stop();}
271
+ }
272
+ };
273
+
274
+ self.init = function() {
275
+ self.build_markup();
276
+ if (settings.timer) {
277
+ self.cache.timer = self.create_timer();
278
+ Foundation.utils.image_loaded(this.slides().find('img'), self.cache.timer.start);
279
+ }
280
+
281
+ animate = new CSSAnimation(settings, slides_container);
282
+
283
+ if (has_init_active) {
284
+ var $init_target = slides_container.find("." + settings.active_slide_class),
285
+ animation_speed = settings.animation_speed;
286
+ settings.animation_speed = 1;
287
+ $init_target.removeClass('active');
288
+ self._goto($init_target.index());
289
+ settings.animation_speed = animation_speed;
290
+ }
291
+
292
+ container.on('click', '.'+settings.next_class, self.next);
293
+ container.on('click', '.'+settings.prev_class, self.prev);
294
+
295
+ if (settings.next_on_click) {
296
+ container.on('click', '.'+settings.slides_container_class+' [data-orbit-slide]', self.link_bullet);
297
+ }
298
+
299
+ container.on('click', self.toggle_timer);
300
+ if (settings.swipe) {
301
+ slides_container.on('touchstart.fndtn.orbit',function(e) {
302
+ if (self.cache.animating) {return;}
303
+ if (!e.touches) {e = e.originalEvent;}
304
+ e.preventDefault();
305
+ e.stopPropagation();
306
+
307
+ self.cache.start_page_x = e.touches[0].pageX;
308
+ self.cache.start_page_y = e.touches[0].pageY;
309
+ self.cache.start_time = (new Date()).getTime();
310
+ self.cache.delta_x = 0;
311
+ self.cache.is_scrolling = null;
312
+ self.cache.direction = null;
313
+
314
+ self.stop_timer(); // does not appear to prevent callback from occurring
315
+ })
316
+ .on('touchmove.fndtn.orbit',function(e) {
317
+ if (Math.abs(self.cache.delta_x) > 5) {
318
+ e.preventDefault();
319
+ e.stopPropagation();
320
+ }
321
+
322
+ if (self.cache.animating) {return;}
323
+ requestAnimationFrame(function(){
324
+ if (!e.touches) { e = e.originalEvent; }
325
+
326
+ // Ignore pinch/zoom events
327
+ if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
328
+
329
+ self.cache.delta_x = e.touches[0].pageX - self.cache.start_page_x;
330
+
331
+ if (self.cache.is_scrolling === null) {
332
+ self.cache.is_scrolling = !!( self.cache.is_scrolling || Math.abs(self.cache.delta_x) < Math.abs(e.touches[0].pageY - self.cache.start_page_y) );
333
+ }
334
+
335
+ if (self.cache.is_scrolling) {
336
+ return;
337
+ }
338
+
339
+ var direction = (self.cache.delta_x < 0) ? (idx+1) : (idx-1);
340
+ if (self.cache.direction !== direction) {
341
+ var res = self._prepare_direction(direction);
342
+ self.cache.direction = direction;
343
+ self.cache.dir = res[0];
344
+ self.cache.current = res[1];
345
+ self.cache.next = res[2];
346
+ }
347
+
348
+ if (settings.animation === 'slide') {
349
+ var offset, next_offset;
350
+
351
+ offset = (self.cache.delta_x / container.width()) * 100;
352
+ if (offset >= 0) {next_offset = -(100 - offset);}
353
+ else {next_offset = 100 + offset;}
354
+
355
+ self.cache.current.css("transform","translate3d("+offset+"%,0,0)");
356
+ self.cache.next.css("transform","translate3d("+next_offset+"%,0,0)");
357
+ }
358
+ });
359
+ })
360
+ .on('touchend.fndtn.orbit', function(e) {
361
+ if (self.cache.animating) {return;}
362
+ e.preventDefault();
363
+ e.stopPropagation();
364
+ setTimeout(function(){
365
+ self._goto(self.cache.direction);
366
+ }, 50);
367
+ });
368
+ }
369
+ container.on('mouseenter.fndtn.orbit', function(e) {
370
+ if (settings.timer && settings.pause_on_hover) {
371
+ self.stop_timer();
372
+ }
373
+ })
374
+ .on('mouseleave.fndtn.orbit', function(e) {
375
+ if (settings.timer && settings.resume_on_mouseout) {
376
+ self.cache.timer.start();
377
+ }
378
+ });
379
+
380
+ $(document).on('click', '[data-orbit-link]', self.link_custom);
381
+ $(window).on('load resize', self.compute_dimensions);
382
+ var children = this.slides().find('img');
383
+ Foundation.utils.image_loaded(children, self.compute_dimensions);
384
+ Foundation.utils.image_loaded(children, function() {
385
+ container.prev('.'+settings.preloader_class).css('display', 'none');
386
+ self.update_slide_number(idx);
387
+ self.update_active_link(idx);
388
+ slides_container.trigger('ready.fndtn.orbit');
389
+ });
390
+ };
391
+
392
+ self.init();
393
+ };
394
+
395
+ var Timer = function(el, settings, callback) {
396
+ var self = this,
397
+ duration = settings.timer_speed,
398
+ progress = el.find('.'+settings.timer_progress_class),
399
+ do_progress = progress && progress.css('display') != 'none',
400
+ start,
401
+ timeout,
402
+ left = -1;
403
+
404
+ this.update_progress = function(w) {
405
+ var new_progress = progress.clone();
406
+ new_progress.attr('style', '');
407
+ new_progress.css('width', w+'%');
408
+ progress.replaceWith(new_progress);
409
+ progress = new_progress;
410
+ };
411
+
412
+ this.restart = function() {
413
+ clearTimeout(timeout);
414
+ el.addClass(settings.timer_paused_class);
415
+ left = -1;
416
+ if (do_progress) {self.update_progress(0);}
417
+ self.start();
418
+ };
419
+
420
+ this.start = function() {
421
+ if (!el.hasClass(settings.timer_paused_class)) {return true;}
422
+ left = (left === -1) ? duration : left;
423
+ el.removeClass(settings.timer_paused_class);
424
+ if (do_progress) {
425
+ start = new Date().getTime();
426
+ progress.animate({'width': '100%'}, left, 'linear');
427
+ }
428
+ timeout = setTimeout(function() {
429
+ self.restart();
430
+ callback();
431
+ }, left);
432
+ el.trigger('timer-started.fndtn.orbit')
433
+ };
434
+
435
+ this.stop = function() {
436
+ if (el.hasClass(settings.timer_paused_class)) {return true;}
437
+ clearTimeout(timeout);
438
+ el.addClass(settings.timer_paused_class);
439
+ if (do_progress) {
440
+ var end = new Date().getTime();
441
+ left = left - (end - start);
442
+ var w = 100 - ((left / duration) * 100);
443
+ self.update_progress(w);
444
+ }
445
+ el.trigger('timer-stopped.fndtn.orbit');
446
+ };
447
+ };
448
+
449
+ var CSSAnimation = function(settings, container) {
450
+ var animation_end = "webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";
451
+
452
+ this.next = function(current, next, callback) {
453
+ if (Modernizr.csstransitions) {
454
+ next.on(animation_end, function(e){
455
+ next.unbind(animation_end);
456
+ current.removeClass("active animate-out");
457
+ container.children().css({
458
+ "transform":"",
459
+ "-ms-transform":"",
460
+ "-webkit-transition-duration":"",
461
+ "-moz-transition-duration": "",
462
+ "-o-transition-duration": "",
463
+ "transition-duration":""
464
+ });
465
+ callback();
466
+ });
467
+ } else {
468
+ setTimeout(function(){
469
+ current.removeClass("active animate-out");
470
+ container.children().css({
471
+ "transform":"",
472
+ "-ms-transform":"",
473
+ "-webkit-transition-duration":"",
474
+ "-moz-transition-duration": "",
475
+ "-o-transition-duration": "",
476
+ "transition-duration":""
477
+ });
478
+ callback();
479
+ }, settings.animation_speed);
480
+ }
481
+ container.children().css({
482
+ "transform":"",
483
+ "-ms-transform":"",
484
+ "-webkit-transition-duration":"",
485
+ "-moz-transition-duration": "",
486
+ "-o-transition-duration": "",
487
+ "transition-duration":""
488
+ });
489
+ current.addClass("animate-out");
490
+ next.addClass("animate-in");
491
+ };
492
+
493
+ this.prev = function(current, prev, callback) {
494
+ if (Modernizr.csstransitions) {
495
+ prev.on(animation_end, function(e){
496
+ prev.unbind(animation_end);
497
+ current.removeClass("active animate-out");
498
+ container.children().css({
499
+ "transform":"",
500
+ "-ms-transform":"",
501
+ "-webkit-transition-duration":"",
502
+ "-moz-transition-duration": "",
503
+ "-o-transition-duration": "",
504
+ "transition-duration":""
505
+ });
506
+ callback();
507
+ });
508
+ } else {
509
+ setTimeout(function(){
510
+ current.removeClass("active animate-out");
511
+ container.children().css({
512
+ "transform":"",
513
+ "-ms-transform":"",
514
+ "-webkit-transition-duration":"",
515
+ "-moz-transition-duration": "",
516
+ "-o-transition-duration": "",
517
+ "transition-duration":""
518
+ });
519
+ callback();
520
+ }, settings.animation_speed);
521
+ }
522
+ container.children().css({
523
+ "transform":"",
524
+ "-ms-transform":"",
525
+ "-webkit-transition-duration":"",
526
+ "-moz-transition-duration": "",
527
+ "-o-transition-duration": "",
528
+ "transition-duration":""
529
+ });
530
+ current.addClass("animate-out");
531
+ prev.addClass("animate-in");
532
+ };
533
+ };
534
+
535
+
536
+ Foundation.libs = Foundation.libs || {};
537
+
538
+ Foundation.libs.orbit = {
539
+ name: 'orbit',
540
+
541
+ version: '5.2.3',
542
+
543
+ settings: {
544
+ animation: 'slide',
545
+ timer_speed: 10000,
546
+ pause_on_hover: true,
547
+ resume_on_mouseout: false,
548
+ next_on_click: true,
549
+ animation_speed: 500,
550
+ stack_on_small: false,
551
+ navigation_arrows: true,
552
+ slide_number: true,
553
+ slide_number_text: 'of',
554
+ container_class: 'orbit-container',
555
+ stack_on_small_class: 'orbit-stack-on-small',
556
+ next_class: 'orbit-next',
557
+ prev_class: 'orbit-prev',
558
+ timer_container_class: 'orbit-timer',
559
+ timer_paused_class: 'paused',
560
+ timer_progress_class: 'orbit-progress',
561
+ timer_show_progress_bar: true,
562
+ slides_container_class: 'orbit-slides-container',
563
+ preloader_class: 'preloader',
564
+ slide_selector: '*',
565
+ bullets_container_class: 'orbit-bullets',
566
+ bullets_active_class: 'active',
567
+ slide_number_class: 'orbit-slide-number',
568
+ caption_class: 'orbit-caption',
569
+ active_slide_class: 'active',
570
+ orbit_transition_class: 'orbit-transitioning',
571
+ bullets: true,
572
+ circular: true,
573
+ timer: true,
574
+ variable_height: false,
575
+ swipe: true,
576
+ before_slide_change: noop,
577
+ after_slide_change: noop
578
+ },
579
+
580
+ init : function (scope, method, options) {
581
+ var self = this;
582
+ this.bindings(method, options);
583
+ },
584
+
585
+ events : function (instance) {
586
+ var self = this;
587
+ var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
588
+ this.S(instance).data(self.name + '-instance', orbit_instance);
589
+ },
590
+
591
+ reflow : function () {
592
+ var self = this;
593
+
594
+ if (self.S(self.scope).is('[data-orbit]')) {
595
+ var $el = self.S(self.scope);
596
+ var instance = $el.data(self.name + '-instance');
597
+ instance.compute_dimensions();
598
+ } else {
599
+ self.S('[data-orbit]', self.scope).each(function(idx, el) {
600
+ var $el = self.S(el);
601
+ var opts = self.data_options($el);
602
+ var instance = $el.data(self.name + '-instance');
603
+ instance.compute_dimensions();
604
+ });
605
+ }
606
+ }
607
+ };
608
+
609
+
610
+ }(jQuery, window, window.document));