kuppayam 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1055) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/kuppayam_manifest.js +0 -0
  6. data/app/assets/images/kuppayam/defaults/default-large.png +0 -0
  7. data/app/assets/images/kuppayam/defaults/default-small.png +0 -0
  8. data/app/assets/images/kuppayam/defaults/user-large.png +0 -0
  9. data/app/assets/images/kuppayam/defaults/user-small.png +0 -0
  10. data/app/assets/images/kuppayam/favicon.png +0 -0
  11. data/app/assets/images/kuppayam/logo.png +0 -0
  12. data/app/assets/javascripts/jquery_with_ujs.js +15 -0
  13. data/app/assets/javascripts/kuppayam.js +21 -0
  14. data/app/assets/javascripts/kuppayam/utilities.js +68 -0
  15. data/app/assets/stylesheets/kuppayam.css +23 -0
  16. data/app/assets/stylesheets/kuppayam/custom.css +8 -0
  17. data/app/assets/stylesheets/kuppayam/handycss.css +996 -0
  18. data/app/controllers/kuppayam/base_controller.rb +43 -0
  19. data/app/helpers/breadcrumbs_helper.rb +27 -0
  20. data/app/helpers/filter_helper.rb +370 -0
  21. data/app/helpers/flash_helper.rb +54 -0
  22. data/app/helpers/image_helper.rb +209 -0
  23. data/app/helpers/kuppayam_helper.rb +72 -0
  24. data/app/helpers/meta_tags_helper.rb +50 -0
  25. data/app/helpers/navigation_helper.rb +17 -0
  26. data/app/helpers/params_parser_helper.rb +48 -0
  27. data/app/helpers/render_helper.rb +28 -0
  28. data/app/helpers/resource_helper.rb +133 -0
  29. data/app/views/kaminari/_first_page.html.erb +11 -0
  30. data/app/views/kaminari/_gap.html.erb +8 -0
  31. data/app/views/kaminari/_last_page.html.erb +11 -0
  32. data/app/views/kaminari/_next_page.html.erb +11 -0
  33. data/app/views/kaminari/_page.html.erb +12 -0
  34. data/app/views/kaminari/_paginator.html.erb +25 -0
  35. data/app/views/kaminari/_prev_page.html.erb +11 -0
  36. data/app/views/layouts/kuppayam/_footer.html.erb +25 -0
  37. data/app/views/layouts/kuppayam/_head.html.erb +29 -0
  38. data/app/views/layouts/kuppayam/_header.html.erb +43 -0
  39. data/app/views/layouts/kuppayam/_heading.html.erb +9 -0
  40. data/app/views/layouts/kuppayam/_navbar.html.erb +321 -0
  41. data/app/views/layouts/kuppayam/_overlays.html.erb +40 -0
  42. data/app/views/layouts/kuppayam/_settings_pane.html.erb +107 -0
  43. data/app/views/layouts/kuppayam/_sidebar.html.erb +612 -0
  44. data/app/views/layouts/kuppayam/_sidebar_old.html.erb +54 -0
  45. data/app/views/layouts/kuppayam/admin.html.erb +59 -0
  46. data/app/views/layouts/kuppayam/blank.html.erb +37 -0
  47. data/config/initializers/config_center.rb +60 -0
  48. data/config/initializers/kuppayam_validators.rb +76 -0
  49. data/config/routes.rb +2 -0
  50. data/lib/kuppayam.rb +8 -0
  51. data/lib/kuppayam/action_view/form_helper.rb +254 -0
  52. data/lib/kuppayam/action_view/modal_helper.rb +7 -0
  53. data/lib/kuppayam/action_view/theme_helper.rb +226 -0
  54. data/lib/kuppayam/engine.rb +34 -0
  55. data/lib/kuppayam/version.rb +3 -0
  56. data/lib/tasks/kuppayam_tasks.rake +4 -0
  57. data/vendor/assets/fonts/elusive/css/animation.css +85 -0
  58. data/vendor/assets/fonts/elusive/css/elusive-codes.css +272 -0
  59. data/vendor/assets/fonts/elusive/css/elusive-embedded.css +325 -0
  60. data/vendor/assets/fonts/elusive/css/elusive-ie7-codes.css +272 -0
  61. data/vendor/assets/fonts/elusive/css/elusive-ie7.css +283 -0
  62. data/vendor/assets/fonts/elusive/css/elusive.css +323 -0
  63. data/vendor/assets/fonts/elusive/font/elusive.eot +0 -0
  64. data/vendor/assets/fonts/elusive/font/elusive.svg +282 -0
  65. data/vendor/assets/fonts/elusive/font/elusive.ttf +0 -0
  66. data/vendor/assets/fonts/elusive/font/elusive.woff +0 -0
  67. data/vendor/assets/fonts/elusive/index.html +0 -0
  68. data/vendor/assets/fonts/fontawesome/css/font-awesome.css +1681 -0
  69. data/vendor/assets/fonts/fontawesome/css/font-awesome.min.css +4 -0
  70. data/vendor/assets/fonts/fontawesome/fonts/FontAwesome.otf +0 -0
  71. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.eot +0 -0
  72. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.svg +520 -0
  73. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
  74. data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.woff +0 -0
  75. data/vendor/assets/fonts/fontawesome/index.html +0 -0
  76. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.eot +0 -0
  77. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.svg +229 -0
  78. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf +0 -0
  79. data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.woff +0 -0
  80. data/vendor/assets/fonts/glyphicons/index.html +0 -0
  81. data/vendor/assets/fonts/linecons/css/animation.css +85 -0
  82. data/vendor/assets/fonts/linecons/css/linecons-codes.css +49 -0
  83. data/vendor/assets/fonts/linecons/css/linecons-embedded.css +102 -0
  84. data/vendor/assets/fonts/linecons/css/linecons-ie7-codes.css +49 -0
  85. data/vendor/assets/fonts/linecons/css/linecons-ie7.css +60 -0
  86. data/vendor/assets/fonts/linecons/css/linecons.css +100 -0
  87. data/vendor/assets/fonts/linecons/font/linecons.eot +0 -0
  88. data/vendor/assets/fonts/linecons/font/linecons.svg +59 -0
  89. data/vendor/assets/fonts/linecons/font/linecons.ttf +0 -0
  90. data/vendor/assets/fonts/linecons/font/linecons.woff +0 -0
  91. data/vendor/assets/fonts/linecons/index.html +0 -0
  92. data/vendor/assets/fonts/meteocons/css/animation.css +85 -0
  93. data/vendor/assets/fonts/meteocons/css/meteocons-codes.css +48 -0
  94. data/vendor/assets/fonts/meteocons/css/meteocons-embedded.css +101 -0
  95. data/vendor/assets/fonts/meteocons/css/meteocons-ie7-codes.css +48 -0
  96. data/vendor/assets/fonts/meteocons/css/meteocons-ie7.css +59 -0
  97. data/vendor/assets/fonts/meteocons/css/meteocons.css +99 -0
  98. data/vendor/assets/fonts/meteocons/font/meteocons.eot +0 -0
  99. data/vendor/assets/fonts/meteocons/font/meteocons.svg +58 -0
  100. data/vendor/assets/fonts/meteocons/font/meteocons.ttf +0 -0
  101. data/vendor/assets/fonts/meteocons/font/meteocons.woff +0 -0
  102. data/vendor/assets/fonts/meteocons/index.html +0 -0
  103. data/vendor/assets/images/flags/flag-al.png +0 -0
  104. data/vendor/assets/images/flags/flag-br.png +0 -0
  105. data/vendor/assets/images/flags/flag-de.png +0 -0
  106. data/vendor/assets/images/flags/flag-es.png +0 -0
  107. data/vendor/assets/images/flags/flag-fr.png +0 -0
  108. data/vendor/assets/images/flags/flag-uk.png +0 -0
  109. data/vendor/assets/images/flags/index.html +0 -0
  110. data/vendor/assets/javascripts/TweenLite.min.js +12 -0
  111. data/vendor/assets/javascripts/TweenMax.min.js +17 -0
  112. data/vendor/assets/javascripts/bootstrap.min.js +7 -0
  113. data/vendor/assets/javascripts/ckeditor/CHANGES.md +643 -0
  114. data/vendor/assets/javascripts/ckeditor/LICENSE.md +1264 -0
  115. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  116. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
  117. data/vendor/assets/javascripts/ckeditor/build-config.js +152 -0
  118. data/vendor/assets/javascripts/ckeditor/ckeditor.js +936 -0
  119. data/vendor/assets/javascripts/ckeditor/config.js +42 -0
  120. data/vendor/assets/javascripts/ckeditor/contents.css +134 -0
  121. data/vendor/assets/javascripts/ckeditor/index.html +0 -0
  122. data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
  123. data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
  124. data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
  125. data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
  126. data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
  127. data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
  128. data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
  129. data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
  130. data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
  131. data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
  132. data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
  133. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  134. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  135. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  136. data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
  137. data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
  138. data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
  139. data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
  140. data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
  141. data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
  142. data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
  143. data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
  144. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  145. data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
  146. data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
  147. data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
  148. data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
  149. data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
  150. data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
  151. data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
  152. data/vendor/assets/javascripts/ckeditor/lang/id.js +5 -0
  153. data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
  154. data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
  155. data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
  156. data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
  157. data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
  158. data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
  159. data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
  160. data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
  161. data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
  162. data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
  163. data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
  164. data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
  165. data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
  166. data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
  167. data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
  168. data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
  169. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  170. data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
  171. data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
  172. data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
  173. data/vendor/assets/javascripts/ckeditor/lang/si.js +5 -0
  174. data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
  175. data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
  176. data/vendor/assets/javascripts/ckeditor/lang/sq.js +5 -0
  177. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  178. data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
  179. data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
  180. data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
  181. data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
  182. data/vendor/assets/javascripts/ckeditor/lang/tt.js +5 -0
  183. data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
  184. data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
  185. data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
  186. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  187. data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
  188. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  189. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  190. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  191. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  192. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  193. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +13 -0
  194. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  195. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  196. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
  197. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  198. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  199. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  200. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  201. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
  202. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  203. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  204. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
  205. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
  206. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  207. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  208. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  209. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  210. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  211. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  212. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +13 -0
  213. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  214. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  215. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  216. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  217. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  218. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +12 -0
  219. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  220. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
  221. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  222. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  223. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  224. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  225. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  226. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  227. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +12 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  229. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  232. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +12 -0
  233. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
  234. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
  237. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +12 -0
  238. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  241. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  243. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +7 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  251. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +7 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +26 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  261. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  262. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  263. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  264. data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  265. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +17 -0
  267. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  268. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  269. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  270. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  271. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  272. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  273. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  274. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  278. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  280. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  281. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  286. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  287. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  288. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  289. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  290. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  291. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  292. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  293. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  294. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  295. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  296. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  297. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  298. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  299. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  301. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  302. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  303. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  304. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  305. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  306. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  307. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  308. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  309. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  310. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  311. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  312. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  313. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  314. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  315. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  316. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  317. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +17 -0
  318. data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  319. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  320. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  321. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  322. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  323. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +74 -0
  324. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  325. data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
  326. data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
  327. data/vendor/assets/javascripts/ckeditor/samples/appendto.html +56 -0
  328. data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  330. data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
  331. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  332. data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  333. data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
  334. data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
  335. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  336. data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
  337. data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
  338. data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
  339. data/vendor/assets/javascripts/ckeditor/samples/jquery.html +100 -0
  340. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  341. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  342. data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  343. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  344. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  345. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  346. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  347. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
  348. data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +206 -0
  349. data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
  350. data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
  351. data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
  352. data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
  353. data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
  354. data/vendor/assets/javascripts/ckeditor/samples/sample.css +365 -0
  355. data/vendor/assets/javascripts/ckeditor/samples/sample.js +50 -0
  356. data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
  357. data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
  358. data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
  359. data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
  360. data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
  361. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons16.svg +683 -0
  362. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons32.svg +694 -0
  363. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/locations.json +140 -0
  364. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog.css +1 -0
  365. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie.css +1 -0
  366. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie7.css +1 -0
  367. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie8.css +1 -0
  368. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_iequirks.css +1 -0
  369. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_opera.css +1 -0
  370. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor.css +1 -0
  371. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_gecko.css +1 -0
  372. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie.css +1 -0
  373. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie7.css +1 -0
  374. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie8.css +1 -0
  375. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_iequirks.css +1 -0
  376. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons.png +0 -0
  377. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons_hidpi.png +0 -0
  378. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/arrow.png +0 -0
  379. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/close.png +0 -0
  380. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/close.png +0 -0
  381. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  382. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock.png +0 -0
  383. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  384. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock-open.png +0 -0
  385. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock.png +0 -0
  386. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/refresh.png +0 -0
  387. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/readme.md +35 -0
  388. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/bootstrapck-sample.html +127 -0
  389. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css +1 -0
  390. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/analytics.js +4 -0
  391. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js +189 -0
  392. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss +25 -0
  393. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/dialog_ie.scss +62 -0
  394. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/editor_ie.scss +71 -0
  395. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/dialog_ie7.scss +68 -0
  396. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/editor_ie7.scss +213 -0
  397. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss +24 -0
  398. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss +27 -0
  399. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss +21 -0
  400. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/editor_iequirks.scss +79 -0
  401. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss +31 -0
  402. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_colorpanel.scss +119 -0
  403. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_elementspath.scss +66 -0
  404. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_mainui.scss +189 -0
  405. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_menu.scss +182 -0
  406. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_panel.scss +199 -0
  407. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_presets.scss +32 -0
  408. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_reset.scss +107 -0
  409. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_richcombo.scss +174 -0
  410. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_toolbar.scss +317 -0
  411. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/editor.scss +66 -0
  412. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_colors.scss +61 -0
  413. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_config.scss +9 -0
  414. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_defaults.scss +37 -0
  415. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/dialog/dialog.scss +822 -0
  416. data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/skin.js +10 -0
  417. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
  418. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
  419. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
  420. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
  421. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  422. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
  423. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
  424. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
  425. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
  426. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
  427. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
  428. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  429. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  430. data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  431. data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  432. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  433. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  434. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  435. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  436. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  437. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  438. data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  439. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
  440. data/vendor/assets/javascripts/ckeditor/styles.js +111 -0
  441. data/vendor/assets/javascripts/colorpicker/bootstrap-colorpicker.min.js +1 -0
  442. data/vendor/assets/javascripts/colorpicker/images/alpha-horizontal.png +0 -0
  443. data/vendor/assets/javascripts/colorpicker/images/alpha.png +0 -0
  444. data/vendor/assets/javascripts/colorpicker/images/hue-horizontal.png +0 -0
  445. data/vendor/assets/javascripts/colorpicker/images/hue.png +0 -0
  446. data/vendor/assets/javascripts/colorpicker/images/saturation.png +0 -0
  447. data/vendor/assets/javascripts/colorpicker/index.html +0 -0
  448. data/vendor/assets/javascripts/cropper/cropper.css +266 -0
  449. data/vendor/assets/javascripts/cropper/cropper.js +1063 -0
  450. data/vendor/assets/javascripts/cropper/cropper.min.css +9 -0
  451. data/vendor/assets/javascripts/cropper/cropper.min.js +9 -0
  452. data/vendor/assets/javascripts/cropper/index.html +0 -0
  453. data/vendor/assets/javascripts/datatables/css/jquery.dataTables.css +476 -0
  454. data/vendor/assets/javascripts/datatables/css/jquery.dataTables.min.css +1 -0
  455. data/vendor/assets/javascripts/datatables/css/jquery.dataTables_themeroller.css +330 -0
  456. data/vendor/assets/javascripts/datatables/dataTables.bootstrap.css +281 -0
  457. data/vendor/assets/javascripts/datatables/dataTables.bootstrap.js +186 -0
  458. data/vendor/assets/javascripts/datatables/datatables-angular.js +2651 -0
  459. data/vendor/assets/javascripts/datatables/images/Sorting icons.psd +0 -0
  460. data/vendor/assets/javascripts/datatables/images/back_disabled.png +0 -0
  461. data/vendor/assets/javascripts/datatables/images/back_enabled.png +0 -0
  462. data/vendor/assets/javascripts/datatables/images/back_enabled_hover.png +0 -0
  463. data/vendor/assets/javascripts/datatables/images/favicon.ico +0 -0
  464. data/vendor/assets/javascripts/datatables/images/forward_disabled.png +0 -0
  465. data/vendor/assets/javascripts/datatables/images/forward_enabled.png +0 -0
  466. data/vendor/assets/javascripts/datatables/images/forward_enabled_hover.png +0 -0
  467. data/vendor/assets/javascripts/datatables/images/sort_asc.png +0 -0
  468. data/vendor/assets/javascripts/datatables/images/sort_asc_disabled.png +0 -0
  469. data/vendor/assets/javascripts/datatables/images/sort_both.png +0 -0
  470. data/vendor/assets/javascripts/datatables/images/sort_desc.png +0 -0
  471. data/vendor/assets/javascripts/datatables/images/sort_desc_disabled.png +0 -0
  472. data/vendor/assets/javascripts/datatables/index.html +0 -0
  473. data/vendor/assets/javascripts/datatables/js/jquery.dataTables.js +14624 -0
  474. data/vendor/assets/javascripts/datatables/js/jquery.dataTables.min.js +155 -0
  475. data/vendor/assets/javascripts/datatables/js/jquery.js +4 -0
  476. data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls.swf +0 -0
  477. data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls_pdf.swf +0 -0
  478. data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.css +361 -0
  479. data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.min.js +69 -0
  480. data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.css +116 -0
  481. data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.js +2235 -0
  482. data/vendor/assets/javascripts/datepicker/bootstrap-datepicker.js +1395 -0
  483. data/vendor/assets/javascripts/datepicker/index.html +0 -0
  484. data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs2.css +256 -0
  485. data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs3.css +288 -0
  486. data/vendor/assets/javascripts/daterangepicker/daterangepicker.js +1118 -0
  487. data/vendor/assets/javascripts/daterangepicker/index.html +0 -0
  488. data/vendor/assets/javascripts/devexpress-web-14.1/js/dx.chartjs.js +12 -0
  489. data/vendor/assets/javascripts/devexpress-web-14.1/js/globalize.min.js +12 -0
  490. data/vendor/assets/javascripts/devexpress-web-14.1/js/knockout-3.1.0.js +12 -0
  491. data/vendor/assets/javascripts/dropzone/css/basic.css +155 -0
  492. data/vendor/assets/javascripts/dropzone/css/dropzone.css +397 -0
  493. data/vendor/assets/javascripts/dropzone/css/stylus/basic.styl +165 -0
  494. data/vendor/assets/javascripts/dropzone/css/stylus/dropzone.styl +180 -0
  495. data/vendor/assets/javascripts/dropzone/dropzone-amd-module.min.js +1 -0
  496. data/vendor/assets/javascripts/dropzone/dropzone.min.js +1 -0
  497. data/vendor/assets/javascripts/dropzone/images/spritemap.png +0 -0
  498. data/vendor/assets/javascripts/dropzone/images/spritemap@2x.png +0 -0
  499. data/vendor/assets/javascripts/dropzone/index.html +0 -0
  500. data/vendor/assets/javascripts/formwizard/index.html +0 -0
  501. data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.js +331 -0
  502. data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.min.js +22 -0
  503. data/vendor/assets/javascripts/fullcalendar/fullcalendar.css +933 -0
  504. data/vendor/assets/javascripts/fullcalendar/fullcalendar.js +8391 -0
  505. data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.css +5 -0
  506. data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.js +8 -0
  507. data/vendor/assets/javascripts/fullcalendar/fullcalendar.print.css +201 -0
  508. data/vendor/assets/javascripts/fullcalendar/index.html +0 -0
  509. data/vendor/assets/javascripts/fullcalendar/moment.min.js +6 -0
  510. data/vendor/assets/javascripts/handlebars.min.js +28 -0
  511. data/vendor/assets/javascripts/icheck/icheck.min.js +11 -0
  512. data/vendor/assets/javascripts/icheck/index.html +0 -0
  513. data/vendor/assets/javascripts/icheck/skins/all.css +61 -0
  514. data/vendor/assets/javascripts/icheck/skins/flat/_all.css +530 -0
  515. data/vendor/assets/javascripts/icheck/skins/flat/aero.css +53 -0
  516. data/vendor/assets/javascripts/icheck/skins/flat/aero.png +0 -0
  517. data/vendor/assets/javascripts/icheck/skins/flat/aero@2x.png +0 -0
  518. data/vendor/assets/javascripts/icheck/skins/flat/blue.css +53 -0
  519. data/vendor/assets/javascripts/icheck/skins/flat/blue.png +0 -0
  520. data/vendor/assets/javascripts/icheck/skins/flat/blue@2x.png +0 -0
  521. data/vendor/assets/javascripts/icheck/skins/flat/flat.css +53 -0
  522. data/vendor/assets/javascripts/icheck/skins/flat/flat.png +0 -0
  523. data/vendor/assets/javascripts/icheck/skins/flat/flat@2x.png +0 -0
  524. data/vendor/assets/javascripts/icheck/skins/flat/green.css +53 -0
  525. data/vendor/assets/javascripts/icheck/skins/flat/green.png +0 -0
  526. data/vendor/assets/javascripts/icheck/skins/flat/green@2x.png +0 -0
  527. data/vendor/assets/javascripts/icheck/skins/flat/grey.css +53 -0
  528. data/vendor/assets/javascripts/icheck/skins/flat/grey.png +0 -0
  529. data/vendor/assets/javascripts/icheck/skins/flat/grey@2x.png +0 -0
  530. data/vendor/assets/javascripts/icheck/skins/flat/orange.css +53 -0
  531. data/vendor/assets/javascripts/icheck/skins/flat/orange.png +0 -0
  532. data/vendor/assets/javascripts/icheck/skins/flat/orange@2x.png +0 -0
  533. data/vendor/assets/javascripts/icheck/skins/flat/pink.css +53 -0
  534. data/vendor/assets/javascripts/icheck/skins/flat/pink.png +0 -0
  535. data/vendor/assets/javascripts/icheck/skins/flat/pink@2x.png +0 -0
  536. data/vendor/assets/javascripts/icheck/skins/flat/purple.css +53 -0
  537. data/vendor/assets/javascripts/icheck/skins/flat/purple.png +0 -0
  538. data/vendor/assets/javascripts/icheck/skins/flat/purple@2x.png +0 -0
  539. data/vendor/assets/javascripts/icheck/skins/flat/red.css +53 -0
  540. data/vendor/assets/javascripts/icheck/skins/flat/red.png +0 -0
  541. data/vendor/assets/javascripts/icheck/skins/flat/red@2x.png +0 -0
  542. data/vendor/assets/javascripts/icheck/skins/flat/yellow.css +53 -0
  543. data/vendor/assets/javascripts/icheck/skins/flat/yellow.png +0 -0
  544. data/vendor/assets/javascripts/icheck/skins/flat/yellow@2x.png +0 -0
  545. data/vendor/assets/javascripts/icheck/skins/futurico/futurico.css +53 -0
  546. data/vendor/assets/javascripts/icheck/skins/futurico/futurico.png +0 -0
  547. data/vendor/assets/javascripts/icheck/skins/futurico/futurico@2x.png +0 -0
  548. data/vendor/assets/javascripts/icheck/skins/line/_all.css +710 -0
  549. data/vendor/assets/javascripts/icheck/skins/line/aero.css +71 -0
  550. data/vendor/assets/javascripts/icheck/skins/line/blue.css +71 -0
  551. data/vendor/assets/javascripts/icheck/skins/line/green.css +71 -0
  552. data/vendor/assets/javascripts/icheck/skins/line/grey.css +71 -0
  553. data/vendor/assets/javascripts/icheck/skins/line/line.css +71 -0
  554. data/vendor/assets/javascripts/icheck/skins/line/line.png +0 -0
  555. data/vendor/assets/javascripts/icheck/skins/line/line@2x.png +0 -0
  556. data/vendor/assets/javascripts/icheck/skins/line/orange.css +71 -0
  557. data/vendor/assets/javascripts/icheck/skins/line/pink.css +71 -0
  558. data/vendor/assets/javascripts/icheck/skins/line/purple.css +71 -0
  559. data/vendor/assets/javascripts/icheck/skins/line/red.css +71 -0
  560. data/vendor/assets/javascripts/icheck/skins/line/yellow.css +71 -0
  561. data/vendor/assets/javascripts/icheck/skins/minimal/_all.css +590 -0
  562. data/vendor/assets/javascripts/icheck/skins/minimal/aero.css +59 -0
  563. data/vendor/assets/javascripts/icheck/skins/minimal/aero.png +0 -0
  564. data/vendor/assets/javascripts/icheck/skins/minimal/aero@2x.png +0 -0
  565. data/vendor/assets/javascripts/icheck/skins/minimal/blue.css +59 -0
  566. data/vendor/assets/javascripts/icheck/skins/minimal/blue.png +0 -0
  567. data/vendor/assets/javascripts/icheck/skins/minimal/blue@2x.png +0 -0
  568. data/vendor/assets/javascripts/icheck/skins/minimal/green.css +59 -0
  569. data/vendor/assets/javascripts/icheck/skins/minimal/green.png +0 -0
  570. data/vendor/assets/javascripts/icheck/skins/minimal/green@2x.png +0 -0
  571. data/vendor/assets/javascripts/icheck/skins/minimal/grey.css +59 -0
  572. data/vendor/assets/javascripts/icheck/skins/minimal/grey.png +0 -0
  573. data/vendor/assets/javascripts/icheck/skins/minimal/grey@2x.png +0 -0
  574. data/vendor/assets/javascripts/icheck/skins/minimal/minimal.css +59 -0
  575. data/vendor/assets/javascripts/icheck/skins/minimal/minimal.png +0 -0
  576. data/vendor/assets/javascripts/icheck/skins/minimal/minimal@2x.png +0 -0
  577. data/vendor/assets/javascripts/icheck/skins/minimal/orange.css +59 -0
  578. data/vendor/assets/javascripts/icheck/skins/minimal/orange.png +0 -0
  579. data/vendor/assets/javascripts/icheck/skins/minimal/orange@2x.png +0 -0
  580. data/vendor/assets/javascripts/icheck/skins/minimal/pink.css +59 -0
  581. data/vendor/assets/javascripts/icheck/skins/minimal/pink.png +0 -0
  582. data/vendor/assets/javascripts/icheck/skins/minimal/pink@2x.png +0 -0
  583. data/vendor/assets/javascripts/icheck/skins/minimal/purple.css +59 -0
  584. data/vendor/assets/javascripts/icheck/skins/minimal/purple.png +0 -0
  585. data/vendor/assets/javascripts/icheck/skins/minimal/purple@2x.png +0 -0
  586. data/vendor/assets/javascripts/icheck/skins/minimal/red.css +59 -0
  587. data/vendor/assets/javascripts/icheck/skins/minimal/red.png +0 -0
  588. data/vendor/assets/javascripts/icheck/skins/minimal/red@2x.png +0 -0
  589. data/vendor/assets/javascripts/icheck/skins/minimal/yellow.css +59 -0
  590. data/vendor/assets/javascripts/icheck/skins/minimal/yellow.png +0 -0
  591. data/vendor/assets/javascripts/icheck/skins/minimal/yellow@2x.png +0 -0
  592. data/vendor/assets/javascripts/icheck/skins/polaris/polaris.css +59 -0
  593. data/vendor/assets/javascripts/icheck/skins/polaris/polaris.png +0 -0
  594. data/vendor/assets/javascripts/icheck/skins/polaris/polaris@2x.png +0 -0
  595. data/vendor/assets/javascripts/icheck/skins/square/_all.css +590 -0
  596. data/vendor/assets/javascripts/icheck/skins/square/aero.css +59 -0
  597. data/vendor/assets/javascripts/icheck/skins/square/aero.png +0 -0
  598. data/vendor/assets/javascripts/icheck/skins/square/aero@2x.png +0 -0
  599. data/vendor/assets/javascripts/icheck/skins/square/blue.css +59 -0
  600. data/vendor/assets/javascripts/icheck/skins/square/blue.png +0 -0
  601. data/vendor/assets/javascripts/icheck/skins/square/blue@2x.png +0 -0
  602. data/vendor/assets/javascripts/icheck/skins/square/green.css +59 -0
  603. data/vendor/assets/javascripts/icheck/skins/square/green.png +0 -0
  604. data/vendor/assets/javascripts/icheck/skins/square/green@2x.png +0 -0
  605. data/vendor/assets/javascripts/icheck/skins/square/grey.css +59 -0
  606. data/vendor/assets/javascripts/icheck/skins/square/grey.png +0 -0
  607. data/vendor/assets/javascripts/icheck/skins/square/grey@2x.png +0 -0
  608. data/vendor/assets/javascripts/icheck/skins/square/orange.css +59 -0
  609. data/vendor/assets/javascripts/icheck/skins/square/orange.png +0 -0
  610. data/vendor/assets/javascripts/icheck/skins/square/orange@2x.png +0 -0
  611. data/vendor/assets/javascripts/icheck/skins/square/pink.css +59 -0
  612. data/vendor/assets/javascripts/icheck/skins/square/pink.png +0 -0
  613. data/vendor/assets/javascripts/icheck/skins/square/pink@2x.png +0 -0
  614. data/vendor/assets/javascripts/icheck/skins/square/purple.css +59 -0
  615. data/vendor/assets/javascripts/icheck/skins/square/purple.png +0 -0
  616. data/vendor/assets/javascripts/icheck/skins/square/purple@2x.png +0 -0
  617. data/vendor/assets/javascripts/icheck/skins/square/red.css +59 -0
  618. data/vendor/assets/javascripts/icheck/skins/square/red.png +0 -0
  619. data/vendor/assets/javascripts/icheck/skins/square/red@2x.png +0 -0
  620. data/vendor/assets/javascripts/icheck/skins/square/square.css +59 -0
  621. data/vendor/assets/javascripts/icheck/skins/square/square.png +0 -0
  622. data/vendor/assets/javascripts/icheck/skins/square/square@2x.png +0 -0
  623. data/vendor/assets/javascripts/icheck/skins/square/yellow.css +59 -0
  624. data/vendor/assets/javascripts/icheck/skins/square/yellow.png +0 -0
  625. data/vendor/assets/javascripts/icheck/skins/square/yellow@2x.png +0 -0
  626. data/vendor/assets/javascripts/inputmask/index.html +0 -0
  627. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.date.extensions.js +8 -0
  628. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.extensions.js +8 -0
  629. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.js +9 -0
  630. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.numeric.extensions.js +8 -0
  631. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.phone.extensions.js +8 -0
  632. data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.regex.extensions.js +8 -0
  633. data/vendor/assets/javascripts/inputmask/jquery.inputmask.bundle.js +9 -0
  634. data/vendor/assets/javascripts/joinable.js +45 -0
  635. data/vendor/assets/javascripts/jquery-1.11.1.min.js +4 -0
  636. data/vendor/assets/javascripts/jquery-ui/external/jquery/jquery.js +9789 -0
  637. data/vendor/assets/javascripts/jquery-ui/index.html +317 -0
  638. data/vendor/assets/javascripts/jquery-ui/jquery-ui.css +239 -0
  639. data/vendor/assets/javascripts/jquery-ui/jquery-ui.js +6343 -0
  640. data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.css +6 -0
  641. data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.js +9 -0
  642. data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.css +245 -0
  643. data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.min.css +5 -0
  644. data/vendor/assets/javascripts/jquery-validate/additional-methods.js +928 -0
  645. data/vendor/assets/javascripts/jquery-validate/additional-methods.min.js +4 -0
  646. data/vendor/assets/javascripts/jquery-validate/index.html +0 -0
  647. data/vendor/assets/javascripts/jquery-validate/jquery.validate.js +1357 -0
  648. data/vendor/assets/javascripts/jquery-validate/jquery.validate.min.js +4 -0
  649. data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.js +33 -0
  650. data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.min.js +4 -0
  651. data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.js +33 -0
  652. data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.min.js +4 -0
  653. data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.js +33 -0
  654. data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.min.js +4 -0
  655. data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.js +33 -0
  656. data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.min.js +4 -0
  657. data/vendor/assets/javascripts/jquery-validate/localization/messages_da.js +30 -0
  658. data/vendor/assets/javascripts/jquery-validate/localization/messages_da.min.js +4 -0
  659. data/vendor/assets/javascripts/jquery-validate/localization/messages_de.js +30 -0
  660. data/vendor/assets/javascripts/jquery-validate/localization/messages_de.min.js +4 -0
  661. data/vendor/assets/javascripts/jquery-validate/localization/messages_el.js +33 -0
  662. data/vendor/assets/javascripts/jquery-validate/localization/messages_el.min.js +4 -0
  663. data/vendor/assets/javascripts/jquery-validate/localization/messages_es.js +36 -0
  664. data/vendor/assets/javascripts/jquery-validate/localization/messages_es.min.js +4 -0
  665. data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.js +37 -0
  666. data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.min.js +4 -0
  667. data/vendor/assets/javascripts/jquery-validate/localization/messages_et.js +31 -0
  668. data/vendor/assets/javascripts/jquery-validate/localization/messages_et.min.js +4 -0
  669. data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.js +33 -0
  670. data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.min.js +4 -0
  671. data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.js +36 -0
  672. data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.min.js +4 -0
  673. data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.js +31 -0
  674. data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.min.js +4 -0
  675. data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.js +59 -0
  676. data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.min.js +4 -0
  677. data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.js +38 -0
  678. data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.min.js +4 -0
  679. data/vendor/assets/javascripts/jquery-validate/localization/messages_he.js +33 -0
  680. data/vendor/assets/javascripts/jquery-validate/localization/messages_he.min.js +4 -0
  681. data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.js +33 -0
  682. data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.min.js +4 -0
  683. data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.js +32 -0
  684. data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.min.js +4 -0
  685. data/vendor/assets/javascripts/jquery-validate/localization/messages_id.js +32 -0
  686. data/vendor/assets/javascripts/jquery-validate/localization/messages_id.min.js +4 -0
  687. data/vendor/assets/javascripts/jquery-validate/localization/messages_is.js +31 -0
  688. data/vendor/assets/javascripts/jquery-validate/localization/messages_is.min.js +4 -0
  689. data/vendor/assets/javascripts/jquery-validate/localization/messages_it.js +36 -0
  690. data/vendor/assets/javascripts/jquery-validate/localization/messages_it.min.js +4 -0
  691. data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.js +33 -0
  692. data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.min.js +4 -0
  693. data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.js +33 -0
  694. data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.min.js +4 -0
  695. data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.js +33 -0
  696. data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.min.js +4 -0
  697. data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.js +33 -0
  698. data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.min.js +4 -0
  699. data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.js +33 -0
  700. data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.min.js +4 -0
  701. data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.js +33 -0
  702. data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.min.js +4 -0
  703. data/vendor/assets/javascripts/jquery-validate/localization/messages_my.js +33 -0
  704. data/vendor/assets/javascripts/jquery-validate/localization/messages_my.min.js +4 -0
  705. data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.js +43 -0
  706. data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.min.js +4 -0
  707. data/vendor/assets/javascripts/jquery-validate/localization/messages_no.js +33 -0
  708. data/vendor/assets/javascripts/jquery-validate/localization/messages_no.min.js +4 -0
  709. data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.js +33 -0
  710. data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.min.js +4 -0
  711. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.js +37 -0
  712. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.min.js +4 -0
  713. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.js +37 -0
  714. data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.min.js +4 -0
  715. data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.js +33 -0
  716. data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.min.js +4 -0
  717. data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.js +33 -0
  718. data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.min.js +4 -0
  719. data/vendor/assets/javascripts/jquery-validate/localization/messages_si.js +33 -0
  720. data/vendor/assets/javascripts/jquery-validate/localization/messages_si.min.js +4 -0
  721. data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.js +30 -0
  722. data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.min.js +4 -0
  723. data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.js +33 -0
  724. data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.min.js +4 -0
  725. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.js +33 -0
  726. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.min.js +4 -0
  727. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.js +33 -0
  728. data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.min.js +4 -0
  729. data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.js +31 -0
  730. data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.min.js +4 -0
  731. data/vendor/assets/javascripts/jquery-validate/localization/messages_th.js +33 -0
  732. data/vendor/assets/javascripts/jquery-validate/localization/messages_th.min.js +4 -0
  733. data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.js +33 -0
  734. data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.min.js +4 -0
  735. data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.js +33 -0
  736. data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.min.js +4 -0
  737. data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.js +33 -0
  738. data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.min.js +4 -0
  739. data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.js +33 -0
  740. data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.min.js +4 -0
  741. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.js +33 -0
  742. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.min.js +4 -0
  743. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.js +34 -0
  744. data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.min.js +4 -0
  745. data/vendor/assets/javascripts/jquery-validate/localization/methods_de.js +22 -0
  746. data/vendor/assets/javascripts/jquery-validate/localization/methods_de.min.js +4 -0
  747. data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.js +22 -0
  748. data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.min.js +4 -0
  749. data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.js +22 -0
  750. data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.min.js +4 -0
  751. data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.js +19 -0
  752. data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.min.js +4 -0
  753. data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.js +19 -0
  754. data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.min.js +4 -0
  755. data/vendor/assets/javascripts/jquery.mousewheel.js +201 -0
  756. data/vendor/assets/javascripts/jvectormap/index.html +0 -0
  757. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.css +37 -0
  758. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.min.js +7 -0
  759. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.css +37 -0
  760. data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  761. data/vendor/assets/javascripts/jvectormap/regions/index.html +0 -0
  762. data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-it-mill-en.js +1 -0
  763. data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-world-mill-en.js +1 -0
  764. data/vendor/assets/javascripts/knob/index.html +0 -0
  765. data/vendor/assets/javascripts/knob/jquery.knob.min.js +1 -0
  766. data/vendor/assets/javascripts/min/bootstrap.min-min.js +2 -0
  767. data/vendor/assets/javascripts/min/resizeable-min.js +1 -0
  768. data/vendor/assets/javascripts/min/xenon-notes-min.js +1 -0
  769. data/vendor/assets/javascripts/min/xenon-toggles-min.js +1 -0
  770. data/vendor/assets/javascripts/moment.min.js +6 -0
  771. data/vendor/assets/javascripts/multiselect/css/index.html +0 -0
  772. data/vendor/assets/javascripts/multiselect/css/multi-select.css +93 -0
  773. data/vendor/assets/javascripts/multiselect/img/index.html +0 -0
  774. data/vendor/assets/javascripts/multiselect/img/switch.png +0 -0
  775. data/vendor/assets/javascripts/multiselect/index.html +0 -0
  776. data/vendor/assets/javascripts/multiselect/js/index.html +0 -0
  777. data/vendor/assets/javascripts/multiselect/js/jquery.multi-select.js +532 -0
  778. data/vendor/assets/javascripts/resizeable.js +122 -0
  779. data/vendor/assets/javascripts/rwd-table/css/rwd-table.css +306 -0
  780. data/vendor/assets/javascripts/rwd-table/css/rwd-table.min.css +7 -0
  781. data/vendor/assets/javascripts/rwd-table/index.html +0 -0
  782. data/vendor/assets/javascripts/rwd-table/js/rwd-table.js +674 -0
  783. data/vendor/assets/javascripts/rwd-table/js/rwd-table.min.js +7 -0
  784. data/vendor/assets/javascripts/select2/LICENSE +18 -0
  785. data/vendor/assets/javascripts/select2/index.html +0 -0
  786. data/vendor/assets/javascripts/select2/select2-bootstrap.css +87 -0
  787. data/vendor/assets/javascripts/select2/select2-spinner.gif +0 -0
  788. data/vendor/assets/javascripts/select2/select2.css +704 -0
  789. data/vendor/assets/javascripts/select2/select2.jquery.json +36 -0
  790. data/vendor/assets/javascripts/select2/select2.js +3508 -0
  791. data/vendor/assets/javascripts/select2/select2.min.js +23 -0
  792. data/vendor/assets/javascripts/select2/select2.png +0 -0
  793. data/vendor/assets/javascripts/select2/select2_locale_ar.js +19 -0
  794. data/vendor/assets/javascripts/select2/select2_locale_az.js +20 -0
  795. data/vendor/assets/javascripts/select2/select2_locale_bg.js +20 -0
  796. data/vendor/assets/javascripts/select2/select2_locale_ca.js +19 -0
  797. data/vendor/assets/javascripts/select2/select2_locale_cs.js +51 -0
  798. data/vendor/assets/javascripts/select2/select2_locale_da.js +19 -0
  799. data/vendor/assets/javascripts/select2/select2_locale_de.js +18 -0
  800. data/vendor/assets/javascripts/select2/select2_locale_el.js +19 -0
  801. data/vendor/assets/javascripts/select2/select2_locale_en.js.template +20 -0
  802. data/vendor/assets/javascripts/select2/select2_locale_es.js +17 -0
  803. data/vendor/assets/javascripts/select2/select2_locale_et.js +19 -0
  804. data/vendor/assets/javascripts/select2/select2_locale_eu.js +45 -0
  805. data/vendor/assets/javascripts/select2/select2_locale_fa.js +21 -0
  806. data/vendor/assets/javascripts/select2/select2_locale_fi.js +30 -0
  807. data/vendor/assets/javascripts/select2/select2_locale_fr.js +18 -0
  808. data/vendor/assets/javascripts/select2/select2_locale_gl.js +45 -0
  809. data/vendor/assets/javascripts/select2/select2_locale_he.js +19 -0
  810. data/vendor/assets/javascripts/select2/select2_locale_hr.js +24 -0
  811. data/vendor/assets/javascripts/select2/select2_locale_hu.js +17 -0
  812. data/vendor/assets/javascripts/select2/select2_locale_id.js +19 -0
  813. data/vendor/assets/javascripts/select2/select2_locale_is.js +17 -0
  814. data/vendor/assets/javascripts/select2/select2_locale_it.js +17 -0
  815. data/vendor/assets/javascripts/select2/select2_locale_ja.js +17 -0
  816. data/vendor/assets/javascripts/select2/select2_locale_ka.js +19 -0
  817. data/vendor/assets/javascripts/select2/select2_locale_ko.js +19 -0
  818. data/vendor/assets/javascripts/select2/select2_locale_lt.js +26 -0
  819. data/vendor/assets/javascripts/select2/select2_locale_lv.js +19 -0
  820. data/vendor/assets/javascripts/select2/select2_locale_mk.js +19 -0
  821. data/vendor/assets/javascripts/select2/select2_locale_ms.js +19 -0
  822. data/vendor/assets/javascripts/select2/select2_locale_nl.js +17 -0
  823. data/vendor/assets/javascripts/select2/select2_locale_no.js +20 -0
  824. data/vendor/assets/javascripts/select2/select2_locale_pl.js +25 -0
  825. data/vendor/assets/javascripts/select2/select2_locale_pt-BR.js +17 -0
  826. data/vendor/assets/javascripts/select2/select2_locale_pt-PT.js +17 -0
  827. data/vendor/assets/javascripts/select2/select2_locale_ro.js +17 -0
  828. data/vendor/assets/javascripts/select2/select2_locale_rs.js +19 -0
  829. data/vendor/assets/javascripts/select2/select2_locale_ru.js +23 -0
  830. data/vendor/assets/javascripts/select2/select2_locale_sk.js +50 -0
  831. data/vendor/assets/javascripts/select2/select2_locale_sv.js +19 -0
  832. data/vendor/assets/javascripts/select2/select2_locale_th.js +19 -0
  833. data/vendor/assets/javascripts/select2/select2_locale_tr.js +19 -0
  834. data/vendor/assets/javascripts/select2/select2_locale_ug-CN.js +16 -0
  835. data/vendor/assets/javascripts/select2/select2_locale_uk.js +25 -0
  836. data/vendor/assets/javascripts/select2/select2_locale_vi.js +20 -0
  837. data/vendor/assets/javascripts/select2/select2_locale_zh-CN.js +16 -0
  838. data/vendor/assets/javascripts/select2/select2_locale_zh-TW.js +16 -0
  839. data/vendor/assets/javascripts/select2/select2x2.png +0 -0
  840. data/vendor/assets/javascripts/selectboxit/index.html +0 -0
  841. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.css +278 -0
  842. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.js +3259 -0
  843. data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.min.js +4 -0
  844. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.css +46 -0
  845. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.js +617 -0
  846. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.less +50 -0
  847. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js +7 -0
  848. data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js.map +1 -0
  849. data/vendor/assets/javascripts/tagsinput/index.html +0 -0
  850. data/vendor/assets/javascripts/tagsinput/min/bootstrap-tagsinput.min-min.js +8 -0
  851. data/vendor/assets/javascripts/timepicker/bootstrap-timepicker.min.js +5 -0
  852. data/vendor/assets/javascripts/timepicker/index.html +0 -0
  853. data/vendor/assets/javascripts/toastr/index.html +0 -0
  854. data/vendor/assets/javascripts/toastr/toastr-icon.png +0 -0
  855. data/vendor/assets/javascripts/toastr/toastr.css +180 -0
  856. data/vendor/assets/javascripts/toastr/toastr.js +350 -0
  857. data/vendor/assets/javascripts/toastr/toastr.less +232 -0
  858. data/vendor/assets/javascripts/toastr/toastr.min.css +1 -0
  859. data/vendor/assets/javascripts/toastr/toastr.min.js +1 -0
  860. data/vendor/assets/javascripts/toastr/toastr.min.js.map +8 -0
  861. data/vendor/assets/javascripts/toastr/toastr.scss +183 -0
  862. data/vendor/assets/javascripts/tocify/index.html +0 -0
  863. data/vendor/assets/javascripts/tocify/jquery.tocify.css +62 -0
  864. data/vendor/assets/javascripts/tocify/jquery.tocify.min.js +4 -0
  865. data/vendor/assets/javascripts/typeahead.bundle.js +1782 -0
  866. data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.css +1253 -0
  867. data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.min.css +3 -0
  868. data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.css +1334 -0
  869. data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.min.css +3 -0
  870. data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.css +1355 -0
  871. data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.min.css +3 -0
  872. data/vendor/assets/javascripts/uikit/css/index.html +0 -0
  873. data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.css +7273 -0
  874. data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.min.css +3 -0
  875. data/vendor/assets/javascripts/uikit/css/uikit.css +1 -0
  876. data/vendor/assets/javascripts/uikit/css/uikit.gradient.css +7341 -0
  877. data/vendor/assets/javascripts/uikit/css/uikit.gradient.min.css +3 -0
  878. data/vendor/assets/javascripts/uikit/css/uikit.min.css +3 -0
  879. data/vendor/assets/javascripts/uikit/fonts/FontAwesome.otf +0 -0
  880. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.eot +0 -0
  881. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.ttf +0 -0
  882. data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.woff +0 -0
  883. data/vendor/assets/javascripts/uikit/fonts/index.html +0 -0
  884. data/vendor/assets/javascripts/uikit/index.html +0 -0
  885. data/vendor/assets/javascripts/uikit/js/addons/autocomplete.js +305 -0
  886. data/vendor/assets/javascripts/uikit/js/addons/autocomplete.min.js +3 -0
  887. data/vendor/assets/javascripts/uikit/js/addons/cover.js +90 -0
  888. data/vendor/assets/javascripts/uikit/js/addons/cover.min.js +3 -0
  889. data/vendor/assets/javascripts/uikit/js/addons/datepicker.js +379 -0
  890. data/vendor/assets/javascripts/uikit/js/addons/datepicker.min.js +3 -0
  891. data/vendor/assets/javascripts/uikit/js/addons/form-password.js +62 -0
  892. data/vendor/assets/javascripts/uikit/js/addons/form-password.min.js +3 -0
  893. data/vendor/assets/javascripts/uikit/js/addons/form-select.js +62 -0
  894. data/vendor/assets/javascripts/uikit/js/addons/form-select.min.js +3 -0
  895. data/vendor/assets/javascripts/uikit/js/addons/htmleditor.js +615 -0
  896. data/vendor/assets/javascripts/uikit/js/addons/htmleditor.min.js +3 -0
  897. data/vendor/assets/javascripts/uikit/js/addons/nestable.js +575 -0
  898. data/vendor/assets/javascripts/uikit/js/addons/nestable.min.js +3 -0
  899. data/vendor/assets/javascripts/uikit/js/addons/notify.js +180 -0
  900. data/vendor/assets/javascripts/uikit/js/addons/notify.min.js +3 -0
  901. data/vendor/assets/javascripts/uikit/js/addons/pagination.js +146 -0
  902. data/vendor/assets/javascripts/uikit/js/addons/pagination.min.js +3 -0
  903. data/vendor/assets/javascripts/uikit/js/addons/search.js +90 -0
  904. data/vendor/assets/javascripts/uikit/js/addons/search.min.js +3 -0
  905. data/vendor/assets/javascripts/uikit/js/addons/sortable.js +520 -0
  906. data/vendor/assets/javascripts/uikit/js/addons/sortable.min.js +3 -0
  907. data/vendor/assets/javascripts/uikit/js/addons/sticky.js +240 -0
  908. data/vendor/assets/javascripts/uikit/js/addons/sticky.min.js +3 -0
  909. data/vendor/assets/javascripts/uikit/js/addons/timepicker.js +165 -0
  910. data/vendor/assets/javascripts/uikit/js/addons/timepicker.min.js +3 -0
  911. data/vendor/assets/javascripts/uikit/js/addons/upload.js +256 -0
  912. data/vendor/assets/javascripts/uikit/js/addons/upload.min.js +3 -0
  913. data/vendor/assets/javascripts/uikit/js/index.html +0 -0
  914. data/vendor/assets/javascripts/uikit/js/uikit.js +2592 -0
  915. data/vendor/assets/javascripts/uikit/js/uikit.min.js +4 -0
  916. data/vendor/assets/javascripts/uikit/less/addons/autocomplete.less +102 -0
  917. data/vendor/assets/javascripts/uikit/less/addons/cover.less +70 -0
  918. data/vendor/assets/javascripts/uikit/less/addons/datepicker.less +193 -0
  919. data/vendor/assets/javascripts/uikit/less/addons/dotnav.less +141 -0
  920. data/vendor/assets/javascripts/uikit/less/addons/flex.less +62 -0
  921. data/vendor/assets/javascripts/uikit/less/addons/form-advanced.less +123 -0
  922. data/vendor/assets/javascripts/uikit/less/addons/form-file.less +63 -0
  923. data/vendor/assets/javascripts/uikit/less/addons/form-password.less +74 -0
  924. data/vendor/assets/javascripts/uikit/less/addons/form-select.less +66 -0
  925. data/vendor/assets/javascripts/uikit/less/addons/htmleditor.less +274 -0
  926. data/vendor/assets/javascripts/uikit/less/addons/nestable.less +204 -0
  927. data/vendor/assets/javascripts/uikit/less/addons/notify.less +191 -0
  928. data/vendor/assets/javascripts/uikit/less/addons/placeholder.less +66 -0
  929. data/vendor/assets/javascripts/uikit/less/addons/search.less +310 -0
  930. data/vendor/assets/javascripts/uikit/less/addons/slidenav.less +164 -0
  931. data/vendor/assets/javascripts/uikit/less/addons/sortable.less +110 -0
  932. data/vendor/assets/javascripts/uikit/less/addons/sticky.less +52 -0
  933. data/vendor/assets/javascripts/uikit/less/addons/upload.less +34 -0
  934. data/vendor/assets/javascripts/uikit/less/alert.less +141 -0
  935. data/vendor/assets/javascripts/uikit/less/animation.less +580 -0
  936. data/vendor/assets/javascripts/uikit/less/article.less +139 -0
  937. data/vendor/assets/javascripts/uikit/less/badge.less +111 -0
  938. data/vendor/assets/javascripts/uikit/less/base.less +521 -0
  939. data/vendor/assets/javascripts/uikit/less/breadcrumb.less +86 -0
  940. data/vendor/assets/javascripts/uikit/less/button.less +407 -0
  941. data/vendor/assets/javascripts/uikit/less/close.less +133 -0
  942. data/vendor/assets/javascripts/uikit/less/comment.less +172 -0
  943. data/vendor/assets/javascripts/uikit/less/description-list.less +70 -0
  944. data/vendor/assets/javascripts/uikit/less/dropdown.less +272 -0
  945. data/vendor/assets/javascripts/uikit/less/form.less +623 -0
  946. data/vendor/assets/javascripts/uikit/less/grid.less +593 -0
  947. data/vendor/assets/javascripts/uikit/less/icon.less +695 -0
  948. data/vendor/assets/javascripts/uikit/less/index.html +0 -0
  949. data/vendor/assets/javascripts/uikit/less/list.less +102 -0
  950. data/vendor/assets/javascripts/uikit/less/modal.less +226 -0
  951. data/vendor/assets/javascripts/uikit/less/nav.less +468 -0
  952. data/vendor/assets/javascripts/uikit/less/navbar.less +327 -0
  953. data/vendor/assets/javascripts/uikit/less/offcanvas.less +162 -0
  954. data/vendor/assets/javascripts/uikit/less/overlay.less +241 -0
  955. data/vendor/assets/javascripts/uikit/less/pagination.less +198 -0
  956. data/vendor/assets/javascripts/uikit/less/panel.less +244 -0
  957. data/vendor/assets/javascripts/uikit/less/print.less +52 -0
  958. data/vendor/assets/javascripts/uikit/less/progress.less +174 -0
  959. data/vendor/assets/javascripts/uikit/less/subnav.less +183 -0
  960. data/vendor/assets/javascripts/uikit/less/switcher.less +33 -0
  961. data/vendor/assets/javascripts/uikit/less/tab.less +368 -0
  962. data/vendor/assets/javascripts/uikit/less/table.less +120 -0
  963. data/vendor/assets/javascripts/uikit/less/text.less +124 -0
  964. data/vendor/assets/javascripts/uikit/less/thumbnail.less +123 -0
  965. data/vendor/assets/javascripts/uikit/less/tooltip.less +179 -0
  966. data/vendor/assets/javascripts/uikit/less/uikit-addons.less +26 -0
  967. data/vendor/assets/javascripts/uikit/less/uikit.css +4426 -0
  968. data/vendor/assets/javascripts/uikit/less/uikit.less +53 -0
  969. data/vendor/assets/javascripts/uikit/less/utility.less +526 -0
  970. data/vendor/assets/javascripts/uikit/less/variables.less +27 -0
  971. data/vendor/assets/javascripts/uikit/uikit.css +1 -0
  972. data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.css +340 -0
  973. data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.js +65 -0
  974. data/vendor/assets/javascripts/uikit/vendor/codemirror/show-hint.css +38 -0
  975. data/vendor/assets/javascripts/uikit/vendor/customizer.js +290 -0
  976. data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.css +127 -0
  977. data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.js +1 -0
  978. data/vendor/assets/javascripts/uikit/vendor/highlight/test.html +45 -0
  979. data/vendor/assets/javascripts/uikit/vendor/holder.js +648 -0
  980. data/vendor/assets/javascripts/uikit/vendor/index.html +0 -0
  981. data/vendor/assets/javascripts/uikit/vendor/jquery.js +4 -0
  982. data/vendor/assets/javascripts/uikit/vendor/jquery.less.js +274 -0
  983. data/vendor/assets/javascripts/uikit/vendor/jquery.mustache.js +16 -0
  984. data/vendor/assets/javascripts/uikit/vendor/jquery.rtl.js +271 -0
  985. data/vendor/assets/javascripts/uikit/vendor/less.js +16 -0
  986. data/vendor/assets/javascripts/uikit/vendor/marked.js +1272 -0
  987. data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.css +480 -0
  988. data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.js +1889 -0
  989. data/vendor/assets/javascripts/uikit/vendor/spectrum/test.html +343 -0
  990. data/vendor/assets/javascripts/wysihtml5/index.html +0 -0
  991. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.css +686 -0
  992. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.min.css +12 -0
  993. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.css +3990 -0
  994. data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.min.css +689 -0
  995. data/vendor/assets/javascripts/wysihtml5/lib/css/index.html +0 -0
  996. data/vendor/assets/javascripts/wysihtml5/lib/css/prettify.css +30 -0
  997. data/vendor/assets/javascripts/wysihtml5/lib/css/wysiwyg-color.css +67 -0
  998. data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings-white.png +0 -0
  999. data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings.png +0 -0
  1000. data/vendor/assets/javascripts/wysihtml5/lib/img/index.html +0 -0
  1001. data/vendor/assets/javascripts/wysihtml5/lib/index.html +0 -0
  1002. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap-button.js +100 -0
  1003. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.js +2025 -0
  1004. data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.min.js +6 -0
  1005. data/vendor/assets/javascripts/wysihtml5/lib/js/index.html +0 -0
  1006. data/vendor/assets/javascripts/wysihtml5/lib/js/jquery-1.7.2.min.js +4 -0
  1007. data/vendor/assets/javascripts/wysihtml5/lib/js/prettify.js +28 -0
  1008. data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.js +9523 -0
  1009. data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.min.js +261 -0
  1010. data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.css +102 -0
  1011. data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.js +519 -0
  1012. data/vendor/assets/javascripts/wysihtml5/src/index.html +0 -0
  1013. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ar-AR.js +49 -0
  1014. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.bg-BG.js +49 -0
  1015. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ca-CT.js +47 -0
  1016. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.cs-CZ.js +48 -0
  1017. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.da-DK.js +48 -0
  1018. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.de-DE.js +49 -0
  1019. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.el-GR.js +48 -0
  1020. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-AR.js +49 -0
  1021. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-ES.js +48 -0
  1022. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.fr-FR.js +49 -0
  1023. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.hr-HR.js +48 -0
  1024. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.it-IT.js +47 -0
  1025. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ja-JP.js +49 -0
  1026. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ko-KR.js +49 -0
  1027. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.lt-LT.js +48 -0
  1028. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.mo-MD.js +48 -0
  1029. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nb-NB.js +49 -0
  1030. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nl-NL.js +48 -0
  1031. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pl-PL.js +48 -0
  1032. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pt-BR.js +52 -0
  1033. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ru-RU.js +49 -0
  1034. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sk-SK.js +48 -0
  1035. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sv-SE.js +48 -0
  1036. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.tr-TR.js +48 -0
  1037. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ua-UA.js +49 -0
  1038. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-CN.js +48 -0
  1039. data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-TW.js +48 -0
  1040. data/vendor/assets/javascripts/wysihtml5/src/locales/index.html +0 -0
  1041. data/vendor/assets/javascripts/wysihtml5/wysihtml5-angular.js +10042 -0
  1042. data/vendor/assets/javascripts/xenon-api.js +91 -0
  1043. data/vendor/assets/javascripts/xenon-custom.js +1950 -0
  1044. data/vendor/assets/javascripts/xenon-notes.js +189 -0
  1045. data/vendor/assets/javascripts/xenon-toggles.js +321 -0
  1046. data/vendor/assets/javascripts/xenon-widgets.js +171 -0
  1047. data/vendor/assets/stylesheets/bootstrap.css +1 -0
  1048. data/vendor/assets/stylesheets/handycss.css +996 -0
  1049. data/vendor/assets/stylesheets/other/wysihtml5-color.css +67 -0
  1050. data/vendor/assets/stylesheets/xenon-components.css +1 -0
  1051. data/vendor/assets/stylesheets/xenon-core.css +1 -0
  1052. data/vendor/assets/stylesheets/xenon-forms.css +18 -0
  1053. data/vendor/assets/stylesheets/xenon-skins.css +1 -0
  1054. data/vendor/assets/stylesheets/xenon.css +18 -0
  1055. metadata +1341 -0
@@ -0,0 +1,3259 @@
1
+ /*! jquery.selectBoxIt - v3.8.1 - 2013-10-17
2
+ * http://www.selectboxit.com
3
+ * Copyright (c) 2013 Greg Franko; Licensed MIT*/
4
+
5
+ // Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE.
6
+
7
+ ;(function (selectBoxIt) {
8
+
9
+ //ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
10
+ "use strict";
11
+
12
+ // Calls the second IIFE and locally passes in the global jQuery, window, and document objects
13
+ selectBoxIt(window.jQuery, window, document);
14
+
15
+ }
16
+
17
+ // Locally passes in `jQuery`, the `window` object, the `document` object, and an `undefined` variable. The `jQuery`, `window` and `document` objects are passed in locally, to improve performance, since javascript first searches for a variable match within the local variables set before searching the global variables set. All of the global variables are also passed in locally to be minifier friendly. `undefined` can be passed in locally, because it is not a reserved word in JavaScript.
18
+
19
+ (function ($, window, document, undefined) {
20
+
21
+ // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
22
+ "use strict";
23
+
24
+ // Calling the jQueryUI Widget Factory Method
25
+ $.widget("selectBox.selectBoxIt", {
26
+
27
+ // Plugin version
28
+ VERSION: "3.8.1",
29
+
30
+ // These options will be used as defaults
31
+ options: {
32
+
33
+ // **showEffect**: Accepts String: "none", "fadeIn", "show", "slideDown", or any of the jQueryUI show effects (i.e. "bounce")
34
+ "showEffect": "none",
35
+
36
+ // **showEffectOptions**: Accepts an object literal. All of the available properties are based on the jqueryUI effect options
37
+ "showEffectOptions": {},
38
+
39
+ // **showEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
40
+ "showEffectSpeed": "medium",
41
+
42
+ // **hideEffect**: Accepts String: "none", "fadeOut", "hide", "slideUp", or any of the jQueryUI hide effects (i.e. "explode")
43
+ "hideEffect": "none",
44
+
45
+ // **hideEffectOptions**: Accepts an object literal. All of the available properties are based on the jqueryUI effect options
46
+ "hideEffectOptions": {},
47
+
48
+ // **hideEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
49
+ "hideEffectSpeed": "medium",
50
+
51
+ // **showFirstOption**: Shows the first dropdown list option within the dropdown list options list
52
+ "showFirstOption": true,
53
+
54
+ // **defaultText**: Overrides the text used by the dropdown list selected option to allow a user to specify custom text. Accepts a String.
55
+ "defaultText": "",
56
+
57
+ // **defaultIcon**: Overrides the icon used by the dropdown list selected option to allow a user to specify a custom icon. Accepts a String (CSS class name(s)).
58
+ "defaultIcon": "",
59
+
60
+ // **downArrowIcon**: Overrides the default down arrow used by the dropdown list to allow a user to specify a custom image. Accepts a String (CSS class name(s)).
61
+ "downArrowIcon": "",
62
+
63
+ // **theme**: Provides theming support for Twitter Bootstrap and jQueryUI
64
+ "theme": "default",
65
+
66
+ // **keydownOpen**: Opens the dropdown if the up or down key is pressed when the dropdown is focused
67
+ "keydownOpen": true,
68
+
69
+ // **isMobile**: Function to determine if a user's browser is a mobile browser
70
+ "isMobile": function() {
71
+
72
+ // Adapted from http://www.detectmobilebrowsers.com
73
+ var ua = navigator.userAgent || navigator.vendor || window.opera;
74
+
75
+ // Checks for iOs, Android, Blackberry, Opera Mini, and Windows mobile devices
76
+ return (/iPhone|iPod|iPad|Silk|Android|BlackBerry|Opera Mini|IEMobile/).test(ua);
77
+
78
+ },
79
+
80
+ // **native**: Triggers the native select box when a user interacts with the drop down
81
+ "native": false,
82
+
83
+ // **aggressiveChange**: Will select a drop down item (and trigger a change event) when a user navigates to the item via the keyboard (up and down arrow or search), before a user selects an option with a click or the enter key
84
+ "aggressiveChange": false,
85
+
86
+ // **selectWhenHidden: Will allow a user to select an option using the keyboard when the drop down list is hidden and focused
87
+ "selectWhenHidden": true,
88
+
89
+ // **viewport**: Allows for a custom domnode used for the viewport. Accepts a selector. Default is $(window).
90
+ "viewport": $(window),
91
+
92
+ // **similarSearch**: Optimizes the search for lists with many similar values (i.e. State lists) by making it easier to navigate through
93
+ "similarSearch": false,
94
+
95
+ // **copyAttributes**: HTML attributes that will be copied over to the new drop down
96
+ "copyAttributes": [
97
+
98
+ "title",
99
+
100
+ "rel"
101
+
102
+ ],
103
+
104
+ // **copyClasses**: HTML classes that will be copied over to the new drop down. The value indicates where the classes should be copied. The default value is 'button', but you can also use 'container' (recommended) or 'none'.
105
+ "copyClasses": "button",
106
+
107
+ // **nativeMousedown**: Mimics native firefox drop down behavior by opening the drop down on mousedown and selecting the currently hovered drop down option on mouseup
108
+ "nativeMousedown": false,
109
+
110
+ // **customShowHideEvent**: Prevents the drop down from opening on click or mousedown, which allows a user to open/close the drop down with a custom event handler.
111
+ "customShowHideEvent": false,
112
+
113
+ // **autoWidth**: Makes sure the width of the drop down is wide enough to fit all of the drop down options
114
+ "autoWidth": true,
115
+
116
+ // **html**: Determines whether or not option text is rendered as html or as text
117
+ "html": true,
118
+
119
+ // **populate**: Convenience option that accepts JSON data, an array, a single object, or valid HTML string to add options to the drop down list
120
+ "populate": "",
121
+
122
+ // **dynamicPositioning**: Determines whether or not the drop down list should fit inside it's viewport
123
+ "dynamicPositioning": true,
124
+
125
+ // **hideCurrent**: Determines whether or not the currently selected drop down option is hidden in the list
126
+ "hideCurrent": false
127
+
128
+ },
129
+
130
+ // Get Themes
131
+ // ----------
132
+ // Retrieves the active drop down theme and returns the theme object
133
+ "getThemes": function() {
134
+
135
+ var self = this,
136
+ theme = $(self.element).attr("data-theme") || "c";
137
+
138
+ return {
139
+
140
+ // Twitter Bootstrap Theme
141
+ "bootstrap": {
142
+
143
+ "focus": "active",
144
+
145
+ "hover": "",
146
+
147
+ "enabled": "enabled",
148
+
149
+ "disabled": "disabled",
150
+
151
+ "arrow": "caret",
152
+
153
+ "button": "btn",
154
+
155
+ "list": "dropdown-menu",
156
+
157
+ "container": "bootstrap",
158
+
159
+ "open": "open"
160
+
161
+ },
162
+
163
+ // jQueryUI Theme
164
+ "jqueryui": {
165
+
166
+ "focus": "ui-state-focus",
167
+
168
+ "hover": "ui-state-hover",
169
+
170
+ "enabled": "ui-state-enabled",
171
+
172
+ "disabled": "ui-state-disabled",
173
+
174
+ "arrow": "ui-icon ui-icon-triangle-1-s",
175
+
176
+ "button": "ui-widget ui-state-default",
177
+
178
+ "list": "ui-widget ui-widget-content",
179
+
180
+ "container": "jqueryui",
181
+
182
+ "open": "selectboxit-open"
183
+
184
+ },
185
+
186
+ // jQuery Mobile Theme
187
+ "jquerymobile": {
188
+
189
+ "focus": "ui-btn-down-" + theme,
190
+
191
+ "hover": "ui-btn-hover-" + theme,
192
+
193
+ "enabled": "ui-enabled",
194
+
195
+ "disabled": "ui-disabled",
196
+
197
+ "arrow": "ui-icon ui-icon-arrow-d ui-icon-shadow",
198
+
199
+ "button": "ui-btn ui-btn-icon-right ui-btn-corner-all ui-shadow ui-btn-up-" + theme,
200
+
201
+ "list": "ui-btn ui-btn-icon-right ui-btn-corner-all ui-shadow ui-btn-up-" + theme,
202
+
203
+ "container": "jquerymobile",
204
+
205
+ "open": "selectboxit-open"
206
+
207
+ },
208
+
209
+ "default": {
210
+
211
+ "focus": "selectboxit-focus",
212
+
213
+ "hover": "selectboxit-hover",
214
+
215
+ "enabled": "selectboxit-enabled",
216
+
217
+ "disabled": "selectboxit-disabled",
218
+
219
+ "arrow": "selectboxit-default-arrow",
220
+
221
+ "button": "selectboxit-btn",
222
+
223
+ "list": "selectboxit-list",
224
+
225
+ "container": "selectboxit-container",
226
+
227
+ "open": "selectboxit-open"
228
+
229
+ }
230
+
231
+ };
232
+
233
+ },
234
+
235
+ // isDeferred
236
+ // ----------
237
+ // Checks if parameter is a defered object
238
+ isDeferred: function(def) {
239
+ return $.isPlainObject(def) && def.promise && def.done;
240
+ },
241
+
242
+ // _Create
243
+ // -------
244
+ // Sets the Plugin Instance variables and
245
+ // constructs the plugin. Only called once.
246
+ _create: function(internal) {
247
+
248
+ var self = this,
249
+ populateOption = self.options["populate"],
250
+ userTheme = self.options["theme"];
251
+
252
+ // If the element calling SelectBoxIt is not a select box or is not visible
253
+ if(!self.element.is("select")) {
254
+
255
+ // Exits the plugin
256
+ return;
257
+
258
+ }
259
+
260
+ // Stores a reference to the parent Widget class
261
+ self.widgetProto = $.Widget.prototype;
262
+
263
+ // The original select box DOM element
264
+ self.originalElem = self.element[0];
265
+
266
+ // The original select box DOM element wrapped in a jQuery object
267
+ self.selectBox = self.element;
268
+
269
+ if(self.options["populate"] && self.add && !internal) {
270
+
271
+ self.add(populateOption);
272
+
273
+ }
274
+
275
+ // All of the original select box options
276
+ self.selectItems = self.element.find("option");
277
+
278
+ // The first option in the original select box
279
+ self.firstSelectItem = self.selectItems.slice(0, 1);
280
+
281
+ // The html document height
282
+ self.documentHeight = $(document).height();
283
+
284
+ self.theme = $.isPlainObject(userTheme) ? $.extend({}, self.getThemes()["default"], userTheme) : self.getThemes()[userTheme] ? self.getThemes()[userTheme] : self.getThemes()["default"];
285
+
286
+ // The index of the currently selected dropdown list option
287
+ self.currentFocus = 0;
288
+
289
+ // Keeps track of which blur events will hide the dropdown list options
290
+ self.blur = true;
291
+
292
+ // Array holding all of the original select box options text
293
+ self.textArray = [];
294
+
295
+ // Maintains search order in the `search` method
296
+ self.currentIndex = 0;
297
+
298
+ // Maintains the current search text in the `search` method
299
+ self.currentText = "";
300
+
301
+ // Whether or not the dropdown list opens up or down (depending on how much room is on the page)
302
+ self.flipped = false;
303
+
304
+ // If the create method is not called internally by the plugin
305
+ if(!internal) {
306
+
307
+ // Saves the original select box `style` attribute within the `selectBoxStyles` plugin instance property
308
+ self.selectBoxStyles = self.selectBox.attr("style");
309
+
310
+ }
311
+
312
+ // Creates the dropdown elements that will become the dropdown
313
+ // Creates the ul element that will become the dropdown options list
314
+ // Add's all attributes (excluding id, class names, and unselectable properties) to the drop down and drop down items list
315
+ // Hides the original select box and adds the new plugin DOM elements to the page
316
+ // Adds event handlers to the new dropdown list
317
+ self._createDropdownButton()._createUnorderedList()._copyAttributes()._replaceSelectBox()._addClasses(self.theme)._eventHandlers();
318
+
319
+ if(self.originalElem.disabled && self.disable) {
320
+
321
+ // Disables the dropdown list if the original dropdown list had the `disabled` attribute
322
+ self.disable();
323
+
324
+ }
325
+
326
+ // If the Aria Accessibility Module has been included
327
+ if(self._ariaAccessibility) {
328
+
329
+ // Adds ARIA accessibillity tags to the dropdown list
330
+ self._ariaAccessibility();
331
+
332
+ }
333
+
334
+ self.isMobile = self.options["isMobile"]();
335
+
336
+ if(self._mobile) {
337
+
338
+ // Adds mobile support
339
+ self._mobile();
340
+
341
+ }
342
+
343
+ // If the native option is set to true
344
+ if(self.options["native"]) {
345
+
346
+ // Triggers the native select box when a user is interacting with the drop down
347
+ this._applyNativeSelect();
348
+
349
+ }
350
+
351
+ // Triggers a custom `create` event on the original dropdown list
352
+ self.triggerEvent("create");
353
+
354
+ // Maintains chainability
355
+ return self;
356
+
357
+ },
358
+
359
+ // _Create dropdown button
360
+ // -----------------------
361
+ // Creates new dropdown and dropdown elements to replace
362
+ // the original select box with a dropdown list
363
+ _createDropdownButton: function() {
364
+
365
+ var self = this,
366
+ originalElemId = self.originalElemId = self.originalElem.id || "",
367
+ originalElemValue = self.originalElemValue = self.originalElem.value || "",
368
+ originalElemName = self.originalElemName = self.originalElem.name || "",
369
+ copyClasses = self.options["copyClasses"],
370
+ selectboxClasses = self.selectBox.attr("class") || "";
371
+
372
+ // Creates a dropdown element that contains the dropdown list text value
373
+ self.dropdownText = $("<span/>", {
374
+
375
+ // Dynamically sets the dropdown `id` attribute
376
+ "id": originalElemId && originalElemId + "SelectBoxItText",
377
+
378
+ "class": "selectboxit-text",
379
+
380
+ // IE specific attribute to not allow the element to be selected
381
+ "unselectable": "on",
382
+
383
+ // Sets the dropdown `text` to equal the original select box default value
384
+ "text": self.firstSelectItem.text()
385
+
386
+ }).
387
+
388
+ // Sets the HTML5 data attribute on the dropdownText `dropdown` element
389
+ attr("data-val", originalElemValue);
390
+
391
+ self.dropdownImageContainer = $("<span/>", {
392
+
393
+ "class": "selectboxit-option-icon-container"
394
+
395
+ });
396
+
397
+ // Creates a dropdown element that contains the dropdown list text value
398
+ self.dropdownImage = $("<i/>", {
399
+
400
+ // Dynamically sets the dropdown `id` attribute
401
+ "id": originalElemId && originalElemId + "SelectBoxItDefaultIcon",
402
+
403
+ "class": "selectboxit-default-icon",
404
+
405
+ // IE specific attribute to not allow the element to be selected
406
+ "unselectable": "on"
407
+
408
+ });
409
+
410
+ // Creates a dropdown to act as the new dropdown list
411
+ self.dropdown = $("<span/>", {
412
+
413
+ // Dynamically sets the dropdown `id` attribute
414
+ "id": originalElemId && originalElemId + "SelectBoxIt",
415
+
416
+ "class": "selectboxit " + (copyClasses === "button" ? selectboxClasses: "") + " " + (self.selectBox.prop("disabled") ? self.theme["disabled"]: self.theme["enabled"]),
417
+
418
+ // Sets the dropdown `name` attribute to be the same name as the original select box
419
+ "name": originalElemName,
420
+
421
+ // Sets the dropdown `tabindex` attribute to 0 to allow the dropdown to be focusable
422
+ "tabindex": self.selectBox.attr("tabindex") || "0",
423
+
424
+ // IE specific attribute to not allow the element to be selected
425
+ "unselectable": "on"
426
+
427
+ }).
428
+
429
+ // Appends the default text to the inner dropdown list dropdown element
430
+ append(self.dropdownImageContainer.append(self.dropdownImage)).append(self.dropdownText);
431
+
432
+ // Create the dropdown container that will hold all of the dropdown list dom elements
433
+ self.dropdownContainer = $("<span/>", {
434
+
435
+ "id": originalElemId && originalElemId + "SelectBoxItContainer",
436
+
437
+ "class": 'selectboxit-container ' + self.theme.container + ' ' + (copyClasses === "container" ? selectboxClasses: "")
438
+
439
+ }).
440
+
441
+ // Appends the inner dropdown list dropdown element to the dropdown list container dropdown element
442
+ append(self.dropdown);
443
+
444
+ // Maintains chainability
445
+ return self;
446
+
447
+ },
448
+
449
+ // _Create Unordered List
450
+ // ----------------------
451
+ // Creates an unordered list element to hold the
452
+ // new dropdown list options that directly match
453
+ // the values of the original select box options
454
+ _createUnorderedList: function() {
455
+
456
+ // Storing the context of the widget
457
+ var self = this,
458
+
459
+ dataDisabled,
460
+
461
+ optgroupClass,
462
+
463
+ optgroupElement,
464
+
465
+ iconClass,
466
+
467
+ iconUrl,
468
+
469
+ iconUrlClass,
470
+
471
+ iconUrlStyle,
472
+
473
+ // Declaring the variable that will hold all of the dropdown list option elements
474
+ currentItem = "",
475
+
476
+ originalElemId = self.originalElemId || "",
477
+
478
+ // Creates an unordered list element
479
+ createdList = $("<ul/>", {
480
+
481
+ // Sets the unordered list `id` attribute
482
+ "id": originalElemId && originalElemId + "SelectBoxItOptions",
483
+
484
+ "class": "selectboxit-options",
485
+
486
+ //Sets the unordered list `tabindex` attribute to -1 to prevent the unordered list from being focusable
487
+ "tabindex": -1
488
+
489
+ }),
490
+
491
+ currentDataSelectedText,
492
+
493
+ currentDataText,
494
+
495
+ currentDataSearch,
496
+
497
+ currentText,
498
+
499
+ currentOption,
500
+
501
+ parent;
502
+
503
+ // Checks the `showFirstOption` plugin option to determine if the first dropdown list option should be shown in the options list.
504
+ if (!self.options["showFirstOption"]) {
505
+
506
+ // Disables the first select box option
507
+ self.selectItems.first().attr("disabled", "disabled");
508
+
509
+ // Excludes the first dropdown list option from the options list
510
+ self.selectItems = self.selectBox.find("option").slice(1);
511
+
512
+ }
513
+
514
+ // Loops through the original select box options list and copies the text of each
515
+ // into new list item elements of the new dropdown list
516
+ self.selectItems.each(function(index) {
517
+
518
+ currentOption = $(this);
519
+
520
+ optgroupClass = "";
521
+
522
+ optgroupElement = "";
523
+
524
+ dataDisabled = currentOption.prop("disabled");
525
+
526
+ iconClass = currentOption.attr("data-icon") || "";
527
+
528
+ iconUrl = currentOption.attr("data-iconurl") || "";
529
+
530
+ iconUrlClass = iconUrl ? "selectboxit-option-icon-url": "";
531
+
532
+ iconUrlStyle = iconUrl ? 'style="background-image:url(\'' + iconUrl + '\');"': "";
533
+
534
+ currentDataSelectedText = currentOption.attr("data-selectedtext");
535
+
536
+ currentDataText = currentOption.attr("data-text");
537
+
538
+ currentText = currentDataText ? currentDataText: currentOption.text();
539
+
540
+ parent = currentOption.parent();
541
+
542
+ // If the current option being traversed is within an optgroup
543
+
544
+ if(parent.is("optgroup")) {
545
+
546
+ optgroupClass = "selectboxit-optgroup-option";
547
+
548
+ if(currentOption.index() === 0) {
549
+
550
+ optgroupElement = '<span class="selectboxit-optgroup-header ' + parent.first().attr("class") + '"data-disabled="true">' + parent.first().attr("label") + '</span>';
551
+
552
+ }
553
+
554
+ }
555
+
556
+ currentOption.attr("value", this.value);
557
+
558
+ // Uses string concatenation for speed (applies HTML attribute encoding)
559
+ currentItem += optgroupElement + '<li data-id="' + index + '" data-val="' + this.value + '" data-disabled="' + dataDisabled + '" class="' + optgroupClass + " selectboxit-option " + ($(this).attr("class") || "") + '"><a class="selectboxit-option-anchor"><span class="selectboxit-option-icon-container"><i class="selectboxit-option-icon ' + iconClass + ' ' + (iconUrlClass || self.theme["container"]) + '"' + iconUrlStyle + '></i></span>' + (self.options["html"] ? currentText: self.htmlEscape(currentText)) + '</a></li>';
560
+
561
+ currentDataSearch = currentOption.attr("data-search");
562
+
563
+ // Stores all of the original select box options text inside of an array
564
+ // (Used later in the `searchAlgorithm` method)
565
+ self.textArray[index] = dataDisabled ? "": currentDataSearch ? currentDataSearch: currentText;
566
+
567
+ // Checks the original select box option for the `selected` attribute
568
+ if (this.selected) {
569
+
570
+ // Replaces the default text with the selected option text
571
+ self._setText(self.dropdownText, currentDataSelectedText || currentText);
572
+
573
+ //Set the currently selected option
574
+ self.currentFocus = index;
575
+
576
+ }
577
+
578
+ });
579
+
580
+ // If the `defaultText` option is being used
581
+ if ((self.options["defaultText"] || self.selectBox.attr("data-text"))) {
582
+
583
+ var defaultedText = self.options["defaultText"] || self.selectBox.attr("data-text");
584
+
585
+ // Overrides the current dropdown default text with the value the user specifies in the `defaultText` option
586
+ self._setText(self.dropdownText, defaultedText);
587
+
588
+ self.options["defaultText"] = defaultedText;
589
+
590
+ }
591
+
592
+ // Append the list item to the unordered list
593
+ createdList.append(currentItem);
594
+
595
+ // Stores the dropdown list options list inside of the `list` instance variable
596
+ self.list = createdList;
597
+
598
+ // Append the dropdown list options list to the dropdown container element
599
+ self.dropdownContainer.append(self.list);
600
+
601
+ // Stores the individual dropdown list options inside of the `listItems` instance variable
602
+ self.listItems = self.list.children("li");
603
+
604
+ self.listAnchors = self.list.find("a");
605
+
606
+ // Sets the 'selectboxit-option-first' class name on the first drop down option
607
+ self.listItems.first().addClass("selectboxit-option-first");
608
+
609
+ // Sets the 'selectboxit-option-last' class name on the last drop down option
610
+ self.listItems.last().addClass("selectboxit-option-last");
611
+
612
+ // Set the disabled CSS class for select box options
613
+ self.list.find("li[data-disabled='true']").not(".optgroupHeader").addClass(self.theme["disabled"]);
614
+
615
+ self.dropdownImage.addClass(self.selectBox.attr("data-icon") || self.options["defaultIcon"] || self.listItems.eq(self.currentFocus).find("i").attr("class"));
616
+
617
+ self.dropdownImage.attr("style", self.listItems.eq(self.currentFocus).find("i").attr("style"));
618
+
619
+ //Maintains chainability
620
+ return self;
621
+
622
+ },
623
+
624
+ // _Replace Select Box
625
+ // -------------------
626
+ // Hides the original dropdown list and inserts
627
+ // the new DOM elements
628
+ _replaceSelectBox: function() {
629
+
630
+ var self = this,
631
+ height,
632
+ originalElemId = self.originalElem.id || "",
633
+ size = self.selectBox.attr("data-size"),
634
+ listSize = self.listSize = size === undefined ? "auto" : size === "0" || "size" === "auto" ? "auto" : +size,
635
+ downArrowContainerWidth,
636
+ dropdownImageWidth;
637
+
638
+ // Hides the original select box
639
+ self.selectBox.css("display", "none").
640
+
641
+ // Adds the new dropdown list to the page directly after the hidden original select box element
642
+ after(self.dropdownContainer);
643
+
644
+ self.dropdownContainer.appendTo('body').
645
+
646
+ addClass('selectboxit-rendering');
647
+
648
+ // The height of the dropdown list
649
+ height = self.dropdown.height();
650
+
651
+ // The down arrow element of the dropdown list
652
+ self.downArrow = $("<i/>", {
653
+
654
+ // Dynamically sets the dropdown `id` attribute of the dropdown list down arrow
655
+ "id": originalElemId && originalElemId + "SelectBoxItArrow",
656
+
657
+ "class": "selectboxit-arrow",
658
+
659
+ // IE specific attribute to not allow the dropdown list text to be selected
660
+ "unselectable": "on"
661
+
662
+ });
663
+
664
+ // The down arrow container element of the dropdown list
665
+ self.downArrowContainer = $("<span/>", {
666
+
667
+ // Dynamically sets the dropdown `id` attribute for the down arrow container element
668
+ "id": originalElemId && originalElemId + "SelectBoxItArrowContainer",
669
+
670
+ "class": "selectboxit-arrow-container",
671
+
672
+ // IE specific attribute to not allow the dropdown list text to be selected
673
+ "unselectable": "on"
674
+
675
+ }).
676
+
677
+ // Inserts the down arrow element inside of the down arrow container element
678
+ append(self.downArrow);
679
+
680
+ // Appends the down arrow element to the dropdown list
681
+ self.dropdown.append(self.downArrowContainer);
682
+
683
+ // Adds the `selectboxit-selected` class name to the currently selected drop down option
684
+ self.listItems.removeClass("selectboxit-selected").eq(self.currentFocus).addClass("selectboxit-selected");
685
+
686
+ // The full outer width of the down arrow container
687
+ downArrowContainerWidth = self.downArrowContainer.outerWidth(true);
688
+
689
+ // The full outer width of the dropdown image
690
+ dropdownImageWidth = self.dropdownImage.outerWidth(true);
691
+
692
+ // If the `autoWidth` option is true
693
+ if(self.options["autoWidth"]) {
694
+
695
+ // Sets the auto width of the drop down
696
+ self.dropdown.css({ "width": "auto" }).css({
697
+
698
+ "width": self.list.outerWidth(true) + downArrowContainerWidth + dropdownImageWidth
699
+
700
+ });
701
+
702
+ self.list.css({
703
+
704
+ "min-width": self.dropdown.width()
705
+
706
+ });
707
+
708
+ }
709
+
710
+ // Dynamically adds the `max-width` and `line-height` CSS styles of the dropdown list text element
711
+ self.dropdownText.css({
712
+
713
+ "max-width": self.dropdownContainer.outerWidth(true) - (downArrowContainerWidth + dropdownImageWidth)
714
+
715
+ });
716
+
717
+ // Adds the new dropdown list to the page directly after the hidden original select box element
718
+ self.selectBox.after(self.dropdownContainer);
719
+
720
+ self.dropdownContainer.removeClass('selectboxit-rendering');
721
+
722
+ if($.type(listSize) === "number") {
723
+
724
+ // Stores the new `max-height` for later
725
+ self.maxHeight = self.listAnchors.outerHeight(true) * listSize;
726
+
727
+ }
728
+
729
+ // Maintains chainability
730
+ return self;
731
+
732
+ },
733
+
734
+ // _Scroll-To-View
735
+ // ---------------
736
+ // Updates the dropdown list scrollTop value
737
+ _scrollToView: function(type) {
738
+
739
+ var self = this,
740
+
741
+ currentOption = self.listItems.eq(self.currentFocus),
742
+
743
+ // The current scroll positioning of the dropdown list options list
744
+ listScrollTop = self.list.scrollTop(),
745
+
746
+ // The height of the currently selected dropdown list option
747
+ currentItemHeight = currentOption.height(),
748
+
749
+ // The relative distance from the currently selected dropdown list option to the the top of the dropdown list options list
750
+ currentTopPosition = currentOption.position().top,
751
+
752
+ absCurrentTopPosition = Math.abs(currentTopPosition),
753
+
754
+ // The height of the dropdown list option list
755
+ listHeight = self.list.height(),
756
+
757
+ currentText;
758
+
759
+ // Scrolling logic for a text search
760
+ if (type === "search") {
761
+
762
+ // Increases the dropdown list options `scrollTop` if a user is searching for an option
763
+ // below the currently selected option that is not visible
764
+ if (listHeight - currentTopPosition < currentItemHeight) {
765
+
766
+ // The selected option will be shown at the very bottom of the visible options list
767
+ self.list.scrollTop(listScrollTop + (currentTopPosition - (listHeight - currentItemHeight)));
768
+
769
+ }
770
+
771
+ // Decreases the dropdown list options `scrollTop` if a user is searching for an option above the currently selected option that is not visible
772
+ else if (currentTopPosition < -1) {
773
+
774
+ self.list.scrollTop(currentTopPosition - currentItemHeight);
775
+
776
+ }
777
+ }
778
+
779
+ // Scrolling logic for the `up` keyboard navigation
780
+ else if (type === "up") {
781
+
782
+ // Decreases the dropdown list option list `scrollTop` if a user is navigating to an element that is not visible
783
+ if (currentTopPosition < -1) {
784
+
785
+ self.list.scrollTop(listScrollTop - absCurrentTopPosition);
786
+
787
+ }
788
+ }
789
+
790
+ // Scrolling logic for the `down` keyboard navigation
791
+ else if (type === "down") {
792
+
793
+ // Increases the dropdown list options `scrollTop` if a user is navigating to an element that is not fully visible
794
+ if (listHeight - currentTopPosition < currentItemHeight) {
795
+
796
+ // Increases the dropdown list options `scrollTop` by the height of the current option item.
797
+ self.list.scrollTop((listScrollTop + (absCurrentTopPosition - listHeight + currentItemHeight)));
798
+
799
+ }
800
+ }
801
+
802
+ // Maintains chainability
803
+ return self;
804
+
805
+ },
806
+
807
+ // _Callback
808
+ // ---------
809
+ // Call the function passed into the method
810
+ _callbackSupport: function(callback) {
811
+
812
+ var self = this;
813
+
814
+ // Checks to make sure the parameter passed in is a function
815
+ if ($.isFunction(callback)) {
816
+
817
+ // Calls the method passed in as a parameter and sets the current `SelectBoxIt` object that is stored in the jQuery data method as the context(allows for `this` to reference the SelectBoxIt API Methods in the callback function. The `dropdown` DOM element that acts as the new dropdown list is also passed as the only parameter to the callback
818
+ callback.call(self, self.dropdown);
819
+
820
+ }
821
+
822
+ // Maintains chainability
823
+ return self;
824
+
825
+ },
826
+
827
+ // _setText
828
+ // --------
829
+ // Set's the text or html for the drop down
830
+ _setText: function(elem, currentText) {
831
+
832
+ var self = this;
833
+
834
+ if(self.options["html"]) {
835
+
836
+ elem.html(currentText);
837
+
838
+ }
839
+
840
+ else {
841
+
842
+ elem.text(currentText);
843
+
844
+ }
845
+
846
+ return self;
847
+
848
+ },
849
+
850
+ // Open
851
+ // ----
852
+ // Opens the dropdown list options list
853
+ open: function(callback) {
854
+
855
+ var self = this,
856
+ showEffect = self.options["showEffect"],
857
+ showEffectSpeed = self.options["showEffectSpeed"],
858
+ showEffectOptions = self.options["showEffectOptions"],
859
+ isNative = self.options["native"],
860
+ isMobile = self.isMobile;
861
+
862
+ // If there are no select box options, do not try to open the select box
863
+ if(!self.listItems.length || self.dropdown.hasClass(self.theme["disabled"])) {
864
+
865
+ return self;
866
+
867
+ }
868
+
869
+ // If the new drop down is being used and is not visible
870
+ if((!isNative && !isMobile) && !this.list.is(":visible")) {
871
+
872
+ // Triggers a custom "open" event on the original select box
873
+ self.triggerEvent("open");
874
+
875
+ if (self._dynamicPositioning && self.options["dynamicPositioning"]) {
876
+
877
+ // Dynamically positions the dropdown list options list
878
+ self._dynamicPositioning();
879
+
880
+ }
881
+
882
+ // Uses `no effect`
883
+ if(showEffect === "none") {
884
+
885
+ // Does not require a callback function because this animation will complete before the call to `scrollToView`
886
+ self.list.show();
887
+
888
+ }
889
+
890
+ // Uses the jQuery `show` special effect
891
+ else if(showEffect === "show" || showEffect === "slideDown" || showEffect === "fadeIn") {
892
+
893
+ // Requires a callback function to determine when the `show` animation is complete
894
+ self.list[showEffect](showEffectSpeed);
895
+
896
+ }
897
+
898
+ // If none of the above options were passed, then a `jqueryUI show effect` is expected
899
+ else {
900
+
901
+ // Allows for custom show effects via the [jQueryUI core effects](http://http://jqueryui.com/demos/show/)
902
+ self.list.show(showEffect, showEffectOptions, showEffectSpeed);
903
+
904
+ }
905
+
906
+ self.list.promise().done(function() {
907
+
908
+ // Updates the list `scrollTop` attribute
909
+ self._scrollToView("search");
910
+
911
+ // Triggers a custom "opened" event when the drop down list is done animating
912
+ self.triggerEvent("opened");
913
+
914
+ });
915
+
916
+ }
917
+
918
+ // Provide callback function support
919
+ self._callbackSupport(callback);
920
+
921
+ // Maintains chainability
922
+ return self;
923
+
924
+ },
925
+
926
+ // Close
927
+ // -----
928
+ // Closes the dropdown list options list
929
+ close: function(callback) {
930
+
931
+ var self = this,
932
+ hideEffect = self.options["hideEffect"],
933
+ hideEffectSpeed = self.options["hideEffectSpeed"],
934
+ hideEffectOptions = self.options["hideEffectOptions"],
935
+ isNative = self.options["native"],
936
+ isMobile = self.isMobile;
937
+
938
+ // If the drop down is being used and is visible
939
+ if((!isNative && !isMobile) && self.list.is(":visible")) {
940
+
941
+ // Triggers a custom "close" event on the original select box
942
+ self.triggerEvent("close");
943
+
944
+ // Uses `no effect`
945
+ if(hideEffect === "none") {
946
+
947
+ // Does not require a callback function because this animation will complete before the call to `scrollToView`
948
+ self.list.hide();
949
+
950
+ }
951
+
952
+ // Uses the jQuery `hide` special effect
953
+ else if(hideEffect === "hide" || hideEffect === "slideUp" || hideEffect === "fadeOut") {
954
+
955
+ self.list[hideEffect](hideEffectSpeed);
956
+
957
+ }
958
+
959
+ // If none of the above options were passed, then a `jqueryUI hide effect` is expected
960
+ else {
961
+
962
+ // Allows for custom hide effects via the [jQueryUI core effects](http://http://jqueryui.com/demos/hide/)
963
+ self.list.hide(hideEffect, hideEffectOptions, hideEffectSpeed);
964
+
965
+ }
966
+
967
+ // After the drop down list is done animating
968
+ self.list.promise().done(function() {
969
+
970
+ // Triggers a custom "closed" event when the drop down list is done animating
971
+ self.triggerEvent("closed");
972
+
973
+ });
974
+
975
+ }
976
+
977
+ // Provide callback function support
978
+ self._callbackSupport(callback);
979
+
980
+ // Maintains chainability
981
+ return self;
982
+
983
+ },
984
+
985
+ toggle: function() {
986
+
987
+ var self = this,
988
+ listIsVisible = self.list.is(":visible");
989
+
990
+ if(listIsVisible) {
991
+
992
+ self.close();
993
+
994
+ }
995
+
996
+ else if(!listIsVisible) {
997
+
998
+ self.open();
999
+
1000
+ }
1001
+
1002
+ },
1003
+
1004
+ // _Key Mappings
1005
+ // -------------
1006
+ // Object literal holding the string representation of each key code
1007
+ _keyMappings: {
1008
+
1009
+ "38": "up",
1010
+
1011
+ "40": "down",
1012
+
1013
+ "13": "enter",
1014
+
1015
+ "8": "backspace",
1016
+
1017
+ "9": "tab",
1018
+
1019
+ "32": "space",
1020
+
1021
+ "27": "esc"
1022
+
1023
+ },
1024
+
1025
+ // _Key Down Methods
1026
+ // -----------------
1027
+ // Methods to use when the keydown event is triggered
1028
+ _keydownMethods: function() {
1029
+
1030
+ var self = this,
1031
+ moveToOption = self.list.is(":visible") || !self.options["keydownOpen"];
1032
+
1033
+ return {
1034
+
1035
+ "down": function() {
1036
+
1037
+ // If the plugin options allow keyboard navigation
1038
+ if (self.moveDown && moveToOption) {
1039
+
1040
+ self.moveDown();
1041
+
1042
+ }
1043
+
1044
+ },
1045
+
1046
+ "up": function() {
1047
+
1048
+ // If the plugin options allow keyboard navigation
1049
+ if (self.moveUp && moveToOption) {
1050
+
1051
+ self.moveUp();
1052
+
1053
+ }
1054
+
1055
+ },
1056
+
1057
+ "enter": function() {
1058
+
1059
+ var activeElem = self.listItems.eq(self.currentFocus);
1060
+
1061
+ // Updates the dropdown list value
1062
+ self._update(activeElem);
1063
+
1064
+ if (activeElem.attr("data-preventclose") !== "true") {
1065
+
1066
+ // Closes the drop down list options list
1067
+ self.close();
1068
+
1069
+ }
1070
+
1071
+ // Triggers the `enter` events on the original select box
1072
+ self.triggerEvent("enter");
1073
+
1074
+ },
1075
+
1076
+ "tab": function() {
1077
+
1078
+ // Triggers the custom `tab-blur` event on the original select box
1079
+ self.triggerEvent("tab-blur");
1080
+
1081
+ // Closes the drop down list
1082
+ self.close();
1083
+
1084
+ },
1085
+
1086
+ "backspace": function() {
1087
+
1088
+ // Triggers the custom `backspace` event on the original select box
1089
+ self.triggerEvent("backspace");
1090
+
1091
+ },
1092
+
1093
+ "esc": function() {
1094
+
1095
+ // Closes the dropdown options list
1096
+ self.close();
1097
+
1098
+ }
1099
+
1100
+ };
1101
+
1102
+ },
1103
+
1104
+
1105
+ // _Event Handlers
1106
+ // ---------------
1107
+ // Adds event handlers to the new dropdown and the original select box
1108
+ _eventHandlers: function() {
1109
+
1110
+ // LOCAL VARIABLES
1111
+ var self = this,
1112
+ nativeMousedown = self.options["nativeMousedown"],
1113
+ customShowHideEvent = self.options["customShowHideEvent"],
1114
+ currentDataText,
1115
+ currentText,
1116
+ focusClass = self.focusClass,
1117
+ hoverClass = self.hoverClass,
1118
+ openClass = self.openClass;
1119
+
1120
+ // Select Box events
1121
+ this.dropdown.on({
1122
+
1123
+ // `click` event with the `selectBoxIt` namespace
1124
+ "click.selectBoxIt": function() {
1125
+
1126
+ // Used to make sure the dropdown becomes focused (fixes IE issue)
1127
+ self.dropdown.trigger("focus", true);
1128
+
1129
+ // The `click` handler logic will only be applied if the dropdown list is enabled
1130
+ if (!self.originalElem.disabled) {
1131
+
1132
+ // Triggers the `click` event on the original select box
1133
+ self.triggerEvent("click");
1134
+
1135
+ if(!nativeMousedown && !customShowHideEvent) {
1136
+
1137
+ self.toggle();
1138
+
1139
+ }
1140
+
1141
+ }
1142
+
1143
+ },
1144
+
1145
+ // `mousedown` event with the `selectBoxIt` namespace
1146
+ "mousedown.selectBoxIt": function() {
1147
+
1148
+ // Stores data in the jQuery `data` method to help determine if the dropdown list gains focus from a click or tabstop. The mousedown event fires before the focus event.
1149
+ $(this).data("mdown", true);
1150
+
1151
+ self.triggerEvent("mousedown");
1152
+
1153
+ if(nativeMousedown && !customShowHideEvent) {
1154
+
1155
+ self.toggle();
1156
+
1157
+ }
1158
+
1159
+ },
1160
+
1161
+ // `mouseup` event with the `selectBoxIt` namespace
1162
+ "mouseup.selectBoxIt": function() {
1163
+
1164
+ self.triggerEvent("mouseup");
1165
+
1166
+ },
1167
+
1168
+ // `blur` event with the `selectBoxIt` namespace. Uses special blur logic to make sure the dropdown list closes correctly
1169
+ "blur.selectBoxIt": function() {
1170
+
1171
+ // If `self.blur` property is true
1172
+ if (self.blur) {
1173
+
1174
+ // Triggers both the `blur` and `focusout` events on the original select box.
1175
+ // The `focusout` event is also triggered because the event bubbles
1176
+ // This event has to be used when using event delegation (such as the jQuery `delegate` or `on` methods)
1177
+ // Popular open source projects such as Backbone.js utilize event delegation to bind events, so if you are using Backbone.js, use the `focusout` event instead of the `blur` event
1178
+ self.triggerEvent("blur");
1179
+
1180
+ // Closes the dropdown list options list
1181
+ self.close();
1182
+
1183
+ $(this).removeClass(focusClass);
1184
+
1185
+ }
1186
+
1187
+ },
1188
+
1189
+ "focus.selectBoxIt": function(event, internal) {
1190
+
1191
+ // Stores the data associated with the mousedown event inside of a local variable
1192
+ var mdown = $(this).data("mdown");
1193
+
1194
+ // Removes the jQuery data associated with the mousedown event
1195
+ $(this).removeData("mdown");
1196
+
1197
+ // If a mousedown event did not occur and no data was passed to the focus event (this correctly triggers the focus event), then the dropdown list gained focus from a tabstop
1198
+ if (!mdown && !internal) {
1199
+
1200
+ setTimeout(function() {
1201
+
1202
+ // Triggers the `tabFocus` custom event on the original select box
1203
+ self.triggerEvent("tab-focus");
1204
+
1205
+ }, 0);
1206
+
1207
+ }
1208
+
1209
+ // Only trigger the `focus` event on the original select box if the dropdown list is hidden (this verifies that only the correct `focus` events are used to trigger the event on the original select box
1210
+ if(!internal) {
1211
+
1212
+ if(!$(this).hasClass(self.theme["disabled"])) {
1213
+
1214
+ $(this).addClass(focusClass);
1215
+
1216
+ }
1217
+
1218
+ //Triggers the `focus` default event on the original select box
1219
+ self.triggerEvent("focus");
1220
+
1221
+ }
1222
+
1223
+ },
1224
+
1225
+ // `keydown` event with the `selectBoxIt` namespace. Catches all user keyboard navigations
1226
+ "keydown.selectBoxIt": function(e) {
1227
+
1228
+ // Stores the `keycode` value in a local variable
1229
+ var currentKey = self._keyMappings[e.keyCode],
1230
+
1231
+ keydownMethod = self._keydownMethods()[currentKey];
1232
+
1233
+ if(keydownMethod) {
1234
+
1235
+ keydownMethod();
1236
+
1237
+ if(self.options["keydownOpen"] && (currentKey === "up" || currentKey === "down")) {
1238
+
1239
+ self.open();
1240
+
1241
+ }
1242
+
1243
+ }
1244
+
1245
+ if(keydownMethod && currentKey !== "tab") {
1246
+
1247
+ e.preventDefault();
1248
+
1249
+ }
1250
+
1251
+ },
1252
+
1253
+ // `keypress` event with the `selectBoxIt` namespace. Catches all user keyboard text searches since you can only reliably get character codes using the `keypress` event
1254
+ "keypress.selectBoxIt": function(e) {
1255
+
1256
+ // Sets the current key to the `keyCode` value if `charCode` does not exist. Used for cross
1257
+ // browser support since IE uses `keyCode` instead of `charCode`.
1258
+ var currentKey = e.charCode || e.keyCode,
1259
+
1260
+ key = self._keyMappings[e.charCode || e.keyCode],
1261
+
1262
+ // Converts unicode values to characters
1263
+ alphaNumericKey = String.fromCharCode(currentKey);
1264
+
1265
+ // If the plugin options allow text searches
1266
+ if (self.search && (!key || (key && key === "space"))) {
1267
+
1268
+ // Calls `search` and passes the character value of the user's text search
1269
+ self.search(alphaNumericKey, true, true);
1270
+
1271
+ }
1272
+
1273
+ if(key === "space") {
1274
+
1275
+ e.preventDefault();
1276
+
1277
+ }
1278
+
1279
+ },
1280
+
1281
+ // `mousenter` event with the `selectBoxIt` namespace .The mouseenter JavaScript event is proprietary to Internet Explorer. Because of the event's general utility, jQuery simulates this event so that it can be used regardless of browser.
1282
+ "mouseenter.selectBoxIt": function() {
1283
+
1284
+ // Trigger the `mouseenter` event on the original select box
1285
+ self.triggerEvent("mouseenter");
1286
+
1287
+ },
1288
+
1289
+ // `mouseleave` event with the `selectBoxIt` namespace. The mouseleave JavaScript event is proprietary to Internet Explorer. Because of the event's general utility, jQuery simulates this event so that it can be used regardless of browser.
1290
+ "mouseleave.selectBoxIt": function() {
1291
+
1292
+ // Trigger the `mouseleave` event on the original select box
1293
+ self.triggerEvent("mouseleave");
1294
+
1295
+ }
1296
+
1297
+ });
1298
+
1299
+ // Select box options events that set the dropdown list blur logic (decides when the dropdown list gets
1300
+ // closed)
1301
+ self.list.on({
1302
+
1303
+ // `mouseover` event with the `selectBoxIt` namespace
1304
+ "mouseover.selectBoxIt": function() {
1305
+
1306
+ // Prevents the dropdown list options list from closing
1307
+ self.blur = false;
1308
+
1309
+ },
1310
+
1311
+ // `mouseout` event with the `selectBoxIt` namespace
1312
+ "mouseout.selectBoxIt": function() {
1313
+
1314
+ // Allows the dropdown list options list to close
1315
+ self.blur = true;
1316
+
1317
+ },
1318
+
1319
+ // `focusin` event with the `selectBoxIt` namespace
1320
+ "focusin.selectBoxIt": function() {
1321
+
1322
+ // Prevents the default browser outline border to flicker, which results because of the `blur` event
1323
+ self.dropdown.trigger("focus", true);
1324
+
1325
+ }
1326
+
1327
+ });
1328
+
1329
+ // Select box individual options events bound with the jQuery `delegate` method. `Delegate` was used because binding indropdownidual events to each list item (since we don't know how many there will be) would decrease performance. Instead, we bind each event to the unordered list, provide the list item context, and allow the list item events to bubble up (`event bubbling`). This greatly increases page performance because we only have to bind an event to one element instead of x number of elements. Delegates the `click` event with the `selectBoxIt` namespace to the list items
1330
+ self.list.on({
1331
+
1332
+ "mousedown.selectBoxIt": function() {
1333
+
1334
+ self._update($(this));
1335
+
1336
+ self.triggerEvent("option-click");
1337
+
1338
+ // If the current drop down option is not disabled
1339
+ if ($(this).attr("data-disabled") === "false" && $(this).attr("data-preventclose") !== "true") {
1340
+
1341
+ // Closes the drop down list
1342
+ self.close();
1343
+
1344
+ }
1345
+
1346
+ setTimeout(function() {
1347
+
1348
+ self.dropdown.trigger('focus', true);
1349
+
1350
+ }, 0);
1351
+
1352
+ },
1353
+
1354
+ // Delegates the `focusin` event with the `selectBoxIt` namespace to the list items
1355
+ "focusin.selectBoxIt": function() {
1356
+
1357
+ // Removes the hover class from the previous drop down option
1358
+ self.listItems.not($(this)).removeAttr("data-active");
1359
+
1360
+ $(this).attr("data-active", "");
1361
+
1362
+ var listIsHidden = self.list.is(":hidden");
1363
+
1364
+ if((self.options["searchWhenHidden"] && listIsHidden) || self.options["aggressiveChange"] || (listIsHidden && self.options["selectWhenHidden"])) {
1365
+
1366
+ self._update($(this));
1367
+
1368
+ }
1369
+
1370
+ // Adds the focus CSS class to the currently focused dropdown list option
1371
+ $(this).addClass(focusClass);
1372
+
1373
+ },
1374
+
1375
+ // Delegates the `focus` event with the `selectBoxIt` namespace to the list items
1376
+ "mouseup.selectBoxIt": function() {
1377
+
1378
+ if(nativeMousedown && !customShowHideEvent) {
1379
+
1380
+ self._update($(this));
1381
+
1382
+ self.triggerEvent("option-mouseup");
1383
+
1384
+ // If the current drop down option is not disabled
1385
+ if ($(this).attr("data-disabled") === "false" && $(this).attr("data-preventclose") !== "true") {
1386
+
1387
+ // Closes the drop down list
1388
+ self.close();
1389
+
1390
+ }
1391
+
1392
+ }
1393
+
1394
+ },
1395
+
1396
+ // Delegates the `mouseenter` event with the `selectBoxIt` namespace to the list items
1397
+ "mouseenter.selectBoxIt": function() {
1398
+
1399
+ // If the currently moused over drop down option is not disabled
1400
+ if($(this).attr("data-disabled") === "false") {
1401
+
1402
+ self.listItems.removeAttr("data-active");
1403
+
1404
+ $(this).addClass(focusClass).attr("data-active", "");
1405
+
1406
+ // Sets the dropdown list indropdownidual options back to the default state and sets the focus CSS class on the currently hovered option
1407
+ self.listItems.not($(this)).removeClass(focusClass);
1408
+
1409
+ $(this).addClass(focusClass);
1410
+
1411
+ self.currentFocus = +$(this).attr("data-id");
1412
+
1413
+ }
1414
+
1415
+ },
1416
+
1417
+ // Delegates the `mouseleave` event with the `selectBoxIt` namespace to the list items
1418
+ "mouseleave.selectBoxIt": function() {
1419
+
1420
+ // If the currently moused over drop down option is not disabled
1421
+ if($(this).attr("data-disabled") === "false") {
1422
+
1423
+ // Removes the focus class from the previous drop down option
1424
+ self.listItems.not($(this)).removeClass(focusClass).removeAttr("data-active");
1425
+
1426
+ $(this).addClass(focusClass);
1427
+
1428
+ self.currentFocus = +$(this).attr("data-id");
1429
+
1430
+ }
1431
+
1432
+ },
1433
+
1434
+ // Delegates the `blur` event with the `selectBoxIt` namespace to the list items
1435
+ "blur.selectBoxIt": function() {
1436
+
1437
+ // Removes the focus CSS class from the previously focused dropdown list option
1438
+ $(this).removeClass(focusClass);
1439
+
1440
+ }
1441
+
1442
+ }, ".selectboxit-option");
1443
+
1444
+ // Select box individual option anchor events bound with the jQuery `delegate` method. `Delegate` was used because binding indropdownidual events to each list item (since we don't know how many there will be) would decrease performance. Instead, we bind each event to the unordered list, provide the list item context, and allow the list item events to bubble up (`event bubbling`). This greatly increases page performance because we only have to bind an event to one element instead of x number of elements. Delegates the `click` event with the `selectBoxIt` namespace to the list items
1445
+ self.list.on({
1446
+
1447
+ "click.selectBoxIt": function(ev) {
1448
+
1449
+ // Prevents the internal anchor tag from doing anything funny
1450
+ ev.preventDefault();
1451
+
1452
+ }
1453
+
1454
+ }, "a");
1455
+
1456
+ // Original dropdown list events
1457
+ self.selectBox.on({
1458
+
1459
+ // `change` event handler with the `selectBoxIt` namespace
1460
+ "change.selectBoxIt, internal-change.selectBoxIt": function(event, internal) {
1461
+
1462
+ var currentOption,
1463
+ currentDataSelectedText;
1464
+
1465
+ // If the user called the change method
1466
+ if(!internal) {
1467
+
1468
+ currentOption = self.list.find('li[data-val="' + self.originalElem.value + '"]');
1469
+
1470
+ // If there is a dropdown option with the same value as the original select box element
1471
+ if(currentOption.length) {
1472
+
1473
+ self.listItems.eq(self.currentFocus).removeClass(self.focusClass);
1474
+
1475
+ self.currentFocus = +currentOption.attr("data-id");
1476
+
1477
+ }
1478
+
1479
+ }
1480
+
1481
+ currentOption = self.listItems.eq(self.currentFocus);
1482
+
1483
+ currentDataSelectedText = currentOption.attr("data-selectedtext");
1484
+
1485
+ currentDataText = currentOption.attr("data-text");
1486
+
1487
+ currentText = currentDataText ? currentDataText: currentOption.find("a").text();
1488
+
1489
+ // Sets the new dropdown list text to the value of the current option
1490
+ self._setText(self.dropdownText, currentDataSelectedText || currentText);
1491
+
1492
+ self.dropdownText.attr("data-val", self.originalElem.value);
1493
+
1494
+ if(currentOption.find("i").attr("class")) {
1495
+
1496
+ self.dropdownImage.attr("class", currentOption.find("i").attr("class")).addClass("selectboxit-default-icon");
1497
+
1498
+ self.dropdownImage.attr("style", currentOption.find("i").attr("style"));
1499
+ }
1500
+
1501
+ // Triggers a custom changed event on the original select box
1502
+ self.triggerEvent("changed");
1503
+
1504
+ },
1505
+
1506
+ // `disable` event with the `selectBoxIt` namespace
1507
+ "disable.selectBoxIt": function() {
1508
+
1509
+ // Adds the `disabled` CSS class to the new dropdown list to visually show that it is disabled
1510
+ self.dropdown.addClass(self.theme["disabled"]);
1511
+
1512
+ },
1513
+
1514
+ // `enable` event with the `selectBoxIt` namespace
1515
+ "enable.selectBoxIt": function() {
1516
+
1517
+ // Removes the `disabled` CSS class from the new dropdown list to visually show that it is enabled
1518
+ self.dropdown.removeClass(self.theme["disabled"]);
1519
+
1520
+ },
1521
+
1522
+ // `open` event with the `selectBoxIt` namespace
1523
+ "open.selectBoxIt": function() {
1524
+
1525
+ var currentElem = self.list.find("li[data-val='" + self.dropdownText.attr("data-val") + "']"),
1526
+ activeElem;
1527
+
1528
+ // If no current element can be found, then select the first drop down option
1529
+ if(!currentElem.length) {
1530
+
1531
+ // Sets the default value of the dropdown list to the first option that is not disabled
1532
+ currentElem = self.listItems.not("[data-disabled=true]").first();
1533
+
1534
+ }
1535
+
1536
+ self.currentFocus = +currentElem.attr("data-id");
1537
+
1538
+ activeElem = self.listItems.eq(self.currentFocus);
1539
+
1540
+ self.dropdown.addClass(openClass).
1541
+
1542
+ // Removes the focus class from the dropdown list and adds the library focus class for both the dropdown list and the currently selected dropdown list option
1543
+ removeClass(hoverClass).addClass(focusClass);
1544
+
1545
+ self.listItems.removeClass(self.selectedClass).
1546
+
1547
+ removeAttr("data-active").not(activeElem).removeClass(focusClass);
1548
+
1549
+ activeElem.addClass(self.selectedClass).addClass(focusClass);
1550
+
1551
+ if(self.options.hideCurrent) {
1552
+
1553
+ self.listItems.show();
1554
+
1555
+ activeElem.hide();
1556
+
1557
+ }
1558
+
1559
+ },
1560
+
1561
+ "close.selectBoxIt": function() {
1562
+
1563
+ // Removes the open class from the dropdown container
1564
+ self.dropdown.removeClass(openClass);
1565
+
1566
+ },
1567
+
1568
+ "blur.selectBoxIt": function() {
1569
+
1570
+ self.dropdown.removeClass(focusClass);
1571
+
1572
+ },
1573
+
1574
+ // `mousenter` event with the `selectBoxIt` namespace
1575
+ "mouseenter.selectBoxIt": function() {
1576
+
1577
+ if(!$(this).hasClass(self.theme["disabled"])) {
1578
+ self.dropdown.addClass(hoverClass);
1579
+ }
1580
+
1581
+ },
1582
+
1583
+ // `mouseleave` event with the `selectBoxIt` namespace
1584
+ "mouseleave.selectBoxIt": function() {
1585
+
1586
+ // Removes the hover CSS class on the previously hovered dropdown list option
1587
+ self.dropdown.removeClass(hoverClass);
1588
+
1589
+ },
1590
+
1591
+ // `destroy` event
1592
+ "destroy": function(ev) {
1593
+
1594
+ // Prevents the default action from happening
1595
+ ev.preventDefault();
1596
+
1597
+ // Prevents the destroy event from propagating
1598
+ ev.stopPropagation();
1599
+
1600
+ }
1601
+
1602
+ });
1603
+
1604
+ // Maintains chainability
1605
+ return self;
1606
+
1607
+ },
1608
+
1609
+ // _update
1610
+ // -------
1611
+ // Updates the drop down and select box with the current value
1612
+ _update: function(elem) {
1613
+
1614
+ var self = this,
1615
+ currentDataSelectedText,
1616
+ currentDataText,
1617
+ currentText,
1618
+ defaultText = self.options["defaultText"] || self.selectBox.attr("data-text"),
1619
+ currentElem = self.listItems.eq(self.currentFocus);
1620
+
1621
+ if (elem.attr("data-disabled") === "false") {
1622
+
1623
+ currentDataSelectedText = self.listItems.eq(self.currentFocus).attr("data-selectedtext");
1624
+
1625
+ currentDataText = currentElem.attr("data-text");
1626
+
1627
+ currentText = currentDataText ? currentDataText: currentElem.text();
1628
+
1629
+ // If the default text option is set and the current drop down option is not disabled
1630
+ if ((defaultText && self.options["html"] ? self.dropdownText.html() === defaultText: self.dropdownText.text() === defaultText) && self.selectBox.val() === elem.attr("data-val")) {
1631
+
1632
+ self.triggerEvent("change");
1633
+
1634
+ }
1635
+
1636
+ else {
1637
+
1638
+ // Sets the original dropdown list value and triggers the `change` event on the original select box
1639
+ self.selectBox.val(elem.attr("data-val"));
1640
+
1641
+ // Sets `currentFocus` to the currently focused dropdown list option.
1642
+ // The unary `+` operator casts the string to a number
1643
+ // [James Padolsey Blog Post](http://james.padolsey.com/javascript/terse-javascript-101-part-2/)
1644
+ self.currentFocus = +elem.attr("data-id");
1645
+
1646
+ // Triggers the dropdown list `change` event if a value change occurs
1647
+ if (self.originalElem.value !== self.dropdownText.attr("data-val")) {
1648
+
1649
+ self.triggerEvent("change");
1650
+
1651
+ }
1652
+
1653
+ }
1654
+
1655
+ }
1656
+
1657
+ },
1658
+
1659
+ // _addClasses
1660
+ // -----------
1661
+ // Adds SelectBoxIt CSS classes
1662
+ _addClasses: function(obj) {
1663
+
1664
+ var self = this,
1665
+
1666
+ focusClass = self.focusClass = obj.focus,
1667
+
1668
+ hoverClass = self.hoverClass = obj.hover,
1669
+
1670
+ buttonClass = obj.button,
1671
+
1672
+ listClass = obj.list,
1673
+
1674
+ arrowClass = obj.arrow,
1675
+
1676
+ containerClass = obj.container,
1677
+
1678
+ openClass = self.openClass = obj.open;
1679
+
1680
+ self.selectedClass = "selectboxit-selected";
1681
+
1682
+ self.downArrow.addClass(self.selectBox.attr("data-downarrow") || self.options["downArrowIcon"] || arrowClass);
1683
+
1684
+ // Adds the correct container class to the dropdown list
1685
+ self.dropdownContainer.addClass(containerClass);
1686
+
1687
+ // Adds the correct class to the dropdown list
1688
+ self.dropdown.addClass(buttonClass);
1689
+
1690
+ // Adds the default class to the dropdown list options
1691
+ self.list.addClass(listClass);
1692
+
1693
+ // Maintains chainability
1694
+ return self;
1695
+
1696
+ },
1697
+
1698
+ // Refresh
1699
+ // -------
1700
+ // The dropdown will rebuild itself. Useful for dynamic content.
1701
+ refresh: function(callback, internal) {
1702
+
1703
+ var self = this;
1704
+
1705
+ // Destroys the plugin and then recreates the plugin
1706
+ self._destroySelectBoxIt()._create(true);
1707
+
1708
+ if(!internal) {
1709
+ self.triggerEvent("refresh");
1710
+ }
1711
+
1712
+ self._callbackSupport(callback);
1713
+
1714
+ //Maintains chainability
1715
+ return self;
1716
+
1717
+ },
1718
+
1719
+ // HTML Escape
1720
+ // -----------
1721
+ // HTML encodes a string
1722
+ htmlEscape: function(str) {
1723
+
1724
+ return String(str)
1725
+ .replace(/&/g, "&amp;")
1726
+ .replace(/"/g, "&quot;")
1727
+ .replace(/'/g, "&#39;")
1728
+ .replace(/</g, "&lt;")
1729
+ .replace(/>/g, "&gt;");
1730
+
1731
+ },
1732
+
1733
+ // triggerEvent
1734
+ // ------------
1735
+ // Trigger's an external event on the original select box element
1736
+ triggerEvent: function(eventName) {
1737
+
1738
+ var self = this,
1739
+ // Finds the currently option index
1740
+ currentIndex = self.options["showFirstOption"] ? self.currentFocus : ((self.currentFocus - 1) >= 0 ? self.currentFocus: 0);
1741
+
1742
+ // Triggers the custom option-click event on the original select box and passes the select box option
1743
+ self.selectBox.trigger(eventName, { "selectbox": self.selectBox, "selectboxOption": self.selectItems.eq(currentIndex), "dropdown": self.dropdown, "dropdownOption": self.listItems.eq(self.currentFocus) });
1744
+
1745
+ // Maintains chainability
1746
+ return self;
1747
+
1748
+ },
1749
+
1750
+ // _copyAttributes
1751
+ // ---------------
1752
+ // Copies HTML attributes from the original select box to the new drop down
1753
+ _copyAttributes: function() {
1754
+
1755
+ var self = this;
1756
+
1757
+ if(self._addSelectBoxAttributes) {
1758
+
1759
+ self._addSelectBoxAttributes();
1760
+
1761
+ }
1762
+
1763
+ return self;
1764
+
1765
+ },
1766
+
1767
+ // _realOuterWidth
1768
+ // ---------------
1769
+ // Retrieves the true outerWidth dimensions of a hidden DOM element
1770
+ _realOuterWidth: function(elem) {
1771
+
1772
+ if(elem.is(":visible")) {
1773
+
1774
+ return elem.outerWidth(true);
1775
+
1776
+ }
1777
+
1778
+ var self = this,
1779
+ clonedElem = elem.clone(),
1780
+ outerWidth;
1781
+
1782
+ clonedElem.css({
1783
+
1784
+ "visibility": "hidden",
1785
+
1786
+ "display": "block",
1787
+
1788
+ "position": "absolute"
1789
+
1790
+ }).appendTo("body");
1791
+
1792
+ outerWidth = clonedElem.outerWidth(true);
1793
+
1794
+ clonedElem.remove();
1795
+
1796
+ return outerWidth;
1797
+ }
1798
+
1799
+ });
1800
+
1801
+ // Stores the plugin prototype object in a local variable
1802
+ var selectBoxIt = $.selectBox.selectBoxIt.prototype;
1803
+
1804
+ // Add Options Module
1805
+ // ==================
1806
+
1807
+ // add
1808
+ // ---
1809
+ // Adds drop down options
1810
+ // using JSON data, an array,
1811
+ // a single object, or valid HTML string
1812
+
1813
+ selectBoxIt.add = function(data, callback) {
1814
+
1815
+ this._populate(data, function(data) {
1816
+
1817
+ var self = this,
1818
+ dataType = $.type(data),
1819
+ value,
1820
+ x = 0,
1821
+ dataLength,
1822
+ elems = [],
1823
+ isJSON = self._isJSON(data),
1824
+ parsedJSON = isJSON && self._parseJSON(data);
1825
+
1826
+ // If the passed data is a local or JSON array
1827
+ if(data && (dataType === "array" || (isJSON && parsedJSON.data && $.type(parsedJSON.data) === "array")) || (dataType === "object" && data.data && $.type(data.data) === "array")) {
1828
+
1829
+ // If the data is JSON
1830
+ if(self._isJSON(data)) {
1831
+
1832
+ // Parses the JSON and stores it in the data local variable
1833
+ data = parsedJSON;
1834
+
1835
+ }
1836
+
1837
+ // If there is an inner `data` property stored in the first level of the JSON array
1838
+ if(data.data) {
1839
+
1840
+ // Set's the data to the inner `data` property
1841
+ data = data.data;
1842
+
1843
+ }
1844
+
1845
+ // Loops through the array
1846
+ for(dataLength = data.length; x <= dataLength - 1; x += 1) {
1847
+
1848
+ // Stores the currently traversed array item in the local `value` variable
1849
+ value = data[x];
1850
+
1851
+ // If the currently traversed array item is an object literal
1852
+ if($.isPlainObject(value)) {
1853
+
1854
+ // Adds an option to the elems array
1855
+ elems.push($("<option/>", value));
1856
+
1857
+ }
1858
+
1859
+ // If the currently traversed array item is a string
1860
+ else if($.type(value) === "string") {
1861
+
1862
+ // Adds an option to the elems array
1863
+ elems.push($("<option/>", { text: value, value: value }));
1864
+
1865
+ }
1866
+
1867
+ }
1868
+
1869
+ // Appends all options to the drop down (with the correct object configurations)
1870
+ self.selectBox.append(elems);
1871
+
1872
+ }
1873
+
1874
+ // if the passed data is an html string and not a JSON string
1875
+ else if(data && dataType === "string" && !self._isJSON(data)) {
1876
+
1877
+ // Appends the html string options to the original select box
1878
+ self.selectBox.append(data);
1879
+
1880
+ }
1881
+
1882
+ else if(data && dataType === "object") {
1883
+
1884
+ // Appends an option to the original select box (with the object configurations)
1885
+ self.selectBox.append($("<option/>", data));
1886
+
1887
+ }
1888
+
1889
+ else if(data && self._isJSON(data) && $.isPlainObject(self._parseJSON(data))) {
1890
+
1891
+ // Appends an option to the original select box (with the object configurations)
1892
+ self.selectBox.append($("<option/>", self._parseJSON(data)));
1893
+
1894
+ }
1895
+
1896
+ // If the dropdown property exists
1897
+ if(self.dropdown) {
1898
+
1899
+ // Rebuilds the dropdown
1900
+ self.refresh(function() {
1901
+
1902
+ // Provide callback function support
1903
+ self._callbackSupport(callback);
1904
+
1905
+ }, true);
1906
+
1907
+ } else {
1908
+
1909
+ // Provide callback function support
1910
+ self._callbackSupport(callback);
1911
+
1912
+ }
1913
+
1914
+ // Maintains chainability
1915
+ return self;
1916
+
1917
+ });
1918
+
1919
+ };
1920
+
1921
+ // parseJSON
1922
+ // ---------
1923
+ // Detects JSON support and parses JSON data
1924
+ selectBoxIt._parseJSON = function(data) {
1925
+
1926
+ return (JSON && JSON.parse && JSON.parse(data)) || $.parseJSON(data);
1927
+
1928
+ };
1929
+
1930
+ // isjSON
1931
+ // ------
1932
+ // Determines if a string is valid JSON
1933
+
1934
+ selectBoxIt._isJSON = function(data) {
1935
+
1936
+ var self = this,
1937
+ json;
1938
+
1939
+ try {
1940
+
1941
+ json = self._parseJSON(data);
1942
+
1943
+ // Valid JSON
1944
+ return true;
1945
+
1946
+ } catch (e) {
1947
+
1948
+ // Invalid JSON
1949
+ return false;
1950
+
1951
+ }
1952
+
1953
+ };
1954
+
1955
+ // _populate
1956
+ // --------
1957
+ // Handles asynchronous and synchronous data
1958
+ // to populate the select box
1959
+
1960
+ selectBoxIt._populate = function(data, callback) {
1961
+
1962
+ var self = this;
1963
+
1964
+ data = $.isFunction(data) ? data.call() : data;
1965
+
1966
+ if(self.isDeferred(data)) {
1967
+
1968
+ data.done(function(returnedData) {
1969
+
1970
+ callback.call(self, returnedData);
1971
+
1972
+ });
1973
+
1974
+ }
1975
+
1976
+ else {
1977
+
1978
+ callback.call(self, data);
1979
+
1980
+ }
1981
+
1982
+ // Maintains chainability
1983
+ return self;
1984
+
1985
+ };
1986
+
1987
+ // Accessibility Module
1988
+ // ====================
1989
+
1990
+ // _ARIA Accessibility
1991
+ // ------------------
1992
+ // Adds ARIA (Accessible Rich Internet Applications)
1993
+ // Accessibility Tags to the Select Box
1994
+
1995
+ selectBoxIt._ariaAccessibility = function() {
1996
+
1997
+ var self = this,
1998
+ dropdownLabel = $("label[for='" + self.originalElem.id + "']");
1999
+
2000
+ // Adds `ARIA attributes` to the dropdown list
2001
+ self.dropdownContainer.attr({
2002
+
2003
+ // W3C `combobox` description: A presentation of a select; usually similar to a textbox where users can type ahead to select an option.
2004
+ "role": "combobox",
2005
+
2006
+ //W3C `aria-autocomplete` description: Indicates whether user input completion suggestions are provided.
2007
+ "aria-autocomplete": "list",
2008
+
2009
+ "aria-haspopup": "true",
2010
+
2011
+ // W3C `aria-expanded` description: Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
2012
+ "aria-expanded": "false",
2013
+
2014
+ // W3C `aria-owns` description: The value of the aria-owns attribute is a space-separated list of IDREFS that reference one or more elements in the document by ID. The reason for adding aria-owns is to expose a parent/child contextual relationship to assistive technologies that is otherwise impossible to infer from the DOM.
2015
+ "aria-owns": self.list[0].id
2016
+
2017
+ });
2018
+
2019
+ self.dropdownText.attr({
2020
+
2021
+ "aria-live": "polite"
2022
+
2023
+ });
2024
+
2025
+ // Dynamically adds `ARIA attributes` if the new dropdown list is enabled or disabled
2026
+ self.dropdown.on({
2027
+
2028
+ //Select box custom `disable` event with the `selectBoxIt` namespace
2029
+ "disable.selectBoxIt" : function() {
2030
+
2031
+ // W3C `aria-disabled` description: Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
2032
+ self.dropdownContainer.attr("aria-disabled", "true");
2033
+
2034
+ },
2035
+
2036
+ // Select box custom `enable` event with the `selectBoxIt` namespace
2037
+ "enable.selectBoxIt" : function() {
2038
+
2039
+ // W3C `aria-disabled` description: Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
2040
+ self.dropdownContainer.attr("aria-disabled", "false");
2041
+
2042
+ }
2043
+
2044
+ });
2045
+
2046
+ if(dropdownLabel.length) {
2047
+
2048
+ // MDN `aria-labelledby` description: Indicates the IDs of the elements that are the labels for the object.
2049
+ self.dropdownContainer.attr("aria-labelledby", dropdownLabel[0].id);
2050
+
2051
+ }
2052
+
2053
+ // Adds ARIA attributes to the dropdown list options list
2054
+ self.list.attr({
2055
+
2056
+ // W3C `listbox` description: A widget that allows the user to select one or more items from a list of choices.
2057
+ "role": "listbox",
2058
+
2059
+ // Indicates that the dropdown list options list is currently hidden
2060
+ "aria-hidden": "true"
2061
+
2062
+ });
2063
+
2064
+ // Adds `ARIA attributes` to the dropdown list options
2065
+ self.listItems.attr({
2066
+
2067
+ // This must be set for each element when the container element role is set to `listbox`
2068
+ "role": "option"
2069
+
2070
+ });
2071
+
2072
+ // Dynamically updates the new dropdown list `aria-label` attribute after the original dropdown list value changes
2073
+ self.selectBox.on({
2074
+
2075
+ // Custom `open` event with the `selectBoxIt` namespace
2076
+ "open.selectBoxIt": function() {
2077
+
2078
+ // Indicates that the dropdown list options list is currently visible
2079
+ self.list.attr("aria-hidden", "false");
2080
+
2081
+ // Indicates that the dropdown list is currently expanded
2082
+ self.dropdownContainer.attr("aria-expanded", "true");
2083
+
2084
+ },
2085
+
2086
+ // Custom `close` event with the `selectBoxIt` namespace
2087
+ "close.selectBoxIt": function() {
2088
+
2089
+ // Indicates that the dropdown list options list is currently hidden
2090
+ self.list.attr("aria-hidden", "true");
2091
+
2092
+ // Indicates that the dropdown list is currently collapsed
2093
+ self.dropdownContainer.attr("aria-expanded", "false");
2094
+
2095
+ }
2096
+
2097
+ });
2098
+
2099
+ // Maintains chainability
2100
+ return self;
2101
+
2102
+ };
2103
+
2104
+ // Copy Attributes Module
2105
+ // ======================
2106
+
2107
+ // addSelectBoxAttributes
2108
+ // ----------------------
2109
+ // Add's all attributes (excluding id, class names, and the style attribute) from the default select box to the new drop down
2110
+
2111
+ selectBoxIt._addSelectBoxAttributes = function() {
2112
+
2113
+ // Stores the plugin context inside of the self variable
2114
+ var self = this;
2115
+
2116
+ // Add's all attributes to the currently traversed drop down option
2117
+ self._addAttributes(self.selectBox.prop("attributes"), self.dropdown);
2118
+
2119
+ // Add's all attributes to the drop down items list
2120
+ self.selectItems.each(function(iterator) {
2121
+
2122
+ // Add's all attributes to the currently traversed drop down option
2123
+ self._addAttributes($(this).prop("attributes"), self.listItems.eq(iterator));
2124
+
2125
+ });
2126
+
2127
+ // Maintains chainability
2128
+ return self;
2129
+
2130
+ };
2131
+
2132
+ // addAttributes
2133
+ // -------------
2134
+ // Add's attributes to a DOM element
2135
+ selectBoxIt._addAttributes = function(arr, elem) {
2136
+
2137
+ // Stores the plugin context inside of the self variable
2138
+ var self = this,
2139
+ whitelist = self.options["copyAttributes"];
2140
+
2141
+ // If there are array properties
2142
+ if(arr.length) {
2143
+
2144
+ // Iterates over all of array properties
2145
+ $.each(arr, function(iterator, property) {
2146
+
2147
+ // Get's the property name and property value of each property
2148
+ var propName = (property.name).toLowerCase(), propValue = property.value;
2149
+
2150
+ // If the currently traversed property value is not "null", is on the whitelist, or is an HTML 5 data attribute
2151
+ if(propValue !== "null" && ($.inArray(propName, whitelist) !== -1 || propName.indexOf("data") !== -1)) {
2152
+
2153
+ // Set's the currently traversed property on element
2154
+ elem.attr(propName, propValue);
2155
+
2156
+ }
2157
+
2158
+ });
2159
+
2160
+ }
2161
+
2162
+ // Maintains chainability
2163
+ return self;
2164
+
2165
+ };
2166
+ // Destroy Module
2167
+ // ==============
2168
+
2169
+ // Destroy
2170
+ // -------
2171
+ // Removes the plugin from the page
2172
+
2173
+ selectBoxIt.destroy = function(callback) {
2174
+
2175
+ // Stores the plugin context inside of the self variable
2176
+ var self = this;
2177
+
2178
+ self._destroySelectBoxIt();
2179
+
2180
+ // Calls the jQueryUI Widget Factory destroy method
2181
+ self.widgetProto.destroy.call(self);
2182
+
2183
+ // Provides callback function support
2184
+ self._callbackSupport(callback);
2185
+
2186
+ // Maintains chainability
2187
+ return self;
2188
+
2189
+ };
2190
+
2191
+ // Internal Destroy Method
2192
+ // -----------------------
2193
+ // Removes the plugin from the page
2194
+
2195
+ selectBoxIt._destroySelectBoxIt = function() {
2196
+
2197
+ // Stores the plugin context inside of the self variable
2198
+ var self = this;
2199
+
2200
+ // Unbinds all of the dropdown list event handlers with the `selectBoxIt` namespace
2201
+ self.dropdown.off(".selectBoxIt");
2202
+
2203
+ // If the original select box has been placed inside of the new drop down container
2204
+ if ($.contains(self.dropdownContainer[0], self.originalElem)) {
2205
+
2206
+ // Moves the original select box before the drop down container
2207
+ self.dropdownContainer.before(self.selectBox);
2208
+
2209
+ }
2210
+
2211
+ // Remove all of the `selectBoxIt` DOM elements from the page
2212
+ self.dropdownContainer.remove();
2213
+
2214
+ // Resets the style attributes for the original select box
2215
+ self.selectBox.removeAttr("style").attr("style", self.selectBoxStyles);
2216
+
2217
+ // Triggers the custom `destroy` event on the original select box
2218
+ self.triggerEvent("destroy");
2219
+
2220
+ // Maintains chainability
2221
+ return self;
2222
+
2223
+ };
2224
+
2225
+ // Disable Module
2226
+ // ==============
2227
+
2228
+ // Disable
2229
+ // -------
2230
+ // Disables the new dropdown list
2231
+
2232
+ selectBoxIt.disable = function(callback) {
2233
+
2234
+ var self = this;
2235
+
2236
+ if(!self.options["disabled"]) {
2237
+
2238
+ // Makes sure the dropdown list is closed
2239
+ self.close();
2240
+
2241
+ // Sets the `disabled` attribute on the original select box
2242
+ self.selectBox.attr("disabled", "disabled");
2243
+
2244
+ // Makes the dropdown list not focusable by removing the `tabindex` attribute
2245
+ self.dropdown.removeAttr("tabindex").
2246
+
2247
+ // Disables styling for enabled state
2248
+ removeClass(self.theme["enabled"]).
2249
+
2250
+ // Enabled styling for disabled state
2251
+ addClass(self.theme["disabled"]);
2252
+
2253
+ self.setOption("disabled", true);
2254
+
2255
+ // Triggers a `disable` custom event on the original select box
2256
+ self.triggerEvent("disable");
2257
+
2258
+ }
2259
+
2260
+ // Provides callback function support
2261
+ self._callbackSupport(callback);
2262
+
2263
+ // Maintains chainability
2264
+ return self;
2265
+
2266
+ };
2267
+
2268
+ // Disable Option
2269
+ // --------------
2270
+ // Disables a single drop down option
2271
+
2272
+ selectBoxIt.disableOption = function(index, callback) {
2273
+
2274
+ var self = this, currentSelectBoxOption, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
2275
+
2276
+ // If an index is passed to target an indropdownidual drop down option
2277
+ if(type === "number") {
2278
+
2279
+ // Makes sure the dropdown list is closed
2280
+ self.close();
2281
+
2282
+ // The select box option being targeted
2283
+ currentSelectBoxOption = self.selectBox.find("option").eq(index);
2284
+
2285
+ // Triggers a `disable-option` custom event on the original select box and passes the disabled option
2286
+ self.triggerEvent("disable-option");
2287
+
2288
+ // Disables the targeted select box option
2289
+ currentSelectBoxOption.attr("disabled", "disabled");
2290
+
2291
+ // Disables the drop down option
2292
+ self.listItems.eq(index).attr("data-disabled", "true").
2293
+
2294
+ // Applies disabled styling for the drop down option
2295
+ addClass(self.theme["disabled"]);
2296
+
2297
+ // If the currently selected drop down option is the item being disabled
2298
+ if(self.currentFocus === index) {
2299
+
2300
+ hasNextEnabled = self.listItems.eq(self.currentFocus).nextAll("li").not("[data-disabled='true']").first().length;
2301
+
2302
+ hasPreviousEnabled = self.listItems.eq(self.currentFocus).prevAll("li").not("[data-disabled='true']").first().length;
2303
+
2304
+ // If there is a currently enabled option beneath the currently selected option
2305
+ if(hasNextEnabled) {
2306
+
2307
+ // Selects the option beneath the currently selected option
2308
+ self.moveDown();
2309
+
2310
+ }
2311
+
2312
+ // If there is a currently enabled option above the currently selected option
2313
+ else if(hasPreviousEnabled) {
2314
+
2315
+ // Selects the option above the currently selected option
2316
+ self.moveUp();
2317
+
2318
+ }
2319
+
2320
+ // If there is not a currently enabled option
2321
+ else {
2322
+
2323
+ // Disables the entire drop down list
2324
+ self.disable();
2325
+
2326
+ }
2327
+
2328
+ }
2329
+
2330
+ }
2331
+
2332
+ // Provides callback function support
2333
+ self._callbackSupport(callback);
2334
+
2335
+ // Maintains chainability
2336
+ return self;
2337
+
2338
+ };
2339
+
2340
+ // _Is Disabled
2341
+ // -----------
2342
+ // Checks the original select box for the
2343
+ // disabled attribute
2344
+
2345
+ selectBoxIt._isDisabled = function(callback) {
2346
+
2347
+ var self = this;
2348
+
2349
+ // If the original select box is disabled
2350
+ if (self.originalElem.disabled) {
2351
+
2352
+ // Disables the dropdown list
2353
+ self.disable();
2354
+
2355
+ }
2356
+
2357
+ // Maintains chainability
2358
+ return self;
2359
+
2360
+ };
2361
+
2362
+ // Dynamic Positioning Module
2363
+ // ==========================
2364
+
2365
+ // _Dynamic positioning
2366
+ // --------------------
2367
+ // Dynamically positions the dropdown list options list
2368
+
2369
+ selectBoxIt._dynamicPositioning = function() {
2370
+
2371
+ var self = this;
2372
+
2373
+ // If the `size` option is a number
2374
+ if($.type(self.listSize) === "number") {
2375
+
2376
+ // Set's the max-height of the drop down list
2377
+ self.list.css("max-height", self.maxHeight || "none");
2378
+
2379
+ }
2380
+
2381
+ // If the `size` option is not a number
2382
+ else {
2383
+
2384
+ // Returns the x and y coordinates of the dropdown list options list relative to the document
2385
+ var listOffsetTop = self.dropdown.offset().top,
2386
+
2387
+ // The height of the dropdown list options list
2388
+ listHeight = self.list.data("max-height") || self.list.outerHeight(),
2389
+
2390
+ // The height of the dropdown list DOM element
2391
+ selectBoxHeight = self.dropdown.outerHeight(),
2392
+
2393
+ viewport = self.options["viewport"],
2394
+
2395
+ viewportHeight = viewport.height(),
2396
+
2397
+ viewportScrollTop = $.isWindow(viewport.get(0)) ? viewport.scrollTop() : viewport.offset().top,
2398
+
2399
+ topToBottom = (listOffsetTop + selectBoxHeight + listHeight <= viewportHeight + viewportScrollTop),
2400
+
2401
+ bottomReached = !topToBottom;
2402
+
2403
+ if(!self.list.data("max-height")) {
2404
+
2405
+ self.list.data("max-height", self.list.outerHeight());
2406
+
2407
+ }
2408
+
2409
+ // If there is room on the bottom of the viewport to display the drop down options
2410
+ if (!bottomReached) {
2411
+
2412
+ self.list.css("max-height", listHeight);
2413
+
2414
+ // Sets custom CSS properties to place the dropdown list options directly below the dropdown list
2415
+ self.list.css("top", "auto");
2416
+
2417
+ }
2418
+
2419
+ // If there is room on the top of the viewport
2420
+ else if((self.dropdown.offset().top - viewportScrollTop) >= listHeight) {
2421
+
2422
+ self.list.css("max-height", listHeight);
2423
+
2424
+ // Sets custom CSS properties to place the dropdown list options directly above the dropdown list
2425
+ self.list.css("top", (self.dropdown.position().top - self.list.outerHeight()));
2426
+
2427
+ }
2428
+
2429
+ // If there is not enough room on the top or the bottom
2430
+ else {
2431
+
2432
+ var outsideBottomViewport = Math.abs((listOffsetTop + selectBoxHeight + listHeight) - (viewportHeight + viewportScrollTop)),
2433
+
2434
+ outsideTopViewport = Math.abs((self.dropdown.offset().top - viewportScrollTop) - listHeight);
2435
+
2436
+ // If there is more room on the bottom
2437
+ if(outsideBottomViewport < outsideTopViewport) {
2438
+
2439
+ self.list.css("max-height", listHeight - outsideBottomViewport - (selectBoxHeight/2));
2440
+
2441
+ self.list.css("top", "auto");
2442
+
2443
+ }
2444
+
2445
+ // If there is more room on the top
2446
+ else {
2447
+
2448
+ self.list.css("max-height", listHeight - outsideTopViewport - (selectBoxHeight/2));
2449
+
2450
+ // Sets custom CSS properties to place the dropdown list options directly above the dropdown list
2451
+ self.list.css("top", (self.dropdown.position().top - self.list.outerHeight()));
2452
+
2453
+ }
2454
+
2455
+ }
2456
+
2457
+ }
2458
+
2459
+ // Maintains chainability
2460
+ return self;
2461
+
2462
+ };
2463
+
2464
+ // Enable Module
2465
+ // =============
2466
+
2467
+ // Enable
2468
+ // ------
2469
+ // Enables the new dropdown list
2470
+
2471
+ selectBoxIt.enable = function(callback) {
2472
+
2473
+ var self = this;
2474
+
2475
+ if(self.options["disabled"]) {
2476
+
2477
+ // Triggers a `enable` custom event on the original select box
2478
+ self.triggerEvent("enable");
2479
+
2480
+ // Removes the `disabled` attribute from the original dropdown list
2481
+ self.selectBox.removeAttr("disabled");
2482
+
2483
+ // Make the dropdown list focusable
2484
+ self.dropdown.attr("tabindex", 0).
2485
+
2486
+ // Disable styling for disabled state
2487
+ removeClass(self.theme["disabled"]).
2488
+
2489
+ // Enables styling for enabled state
2490
+ addClass(self.theme["enabled"]);
2491
+
2492
+ self.setOption("disabled", false);
2493
+
2494
+ // Provide callback function support
2495
+ self._callbackSupport(callback);
2496
+
2497
+ }
2498
+
2499
+ // Maintains chainability
2500
+ return self;
2501
+
2502
+ };
2503
+
2504
+ // Enable Option
2505
+ // -------------
2506
+ // Disables a single drop down option
2507
+
2508
+ selectBoxIt.enableOption = function(index, callback) {
2509
+
2510
+ var self = this, currentSelectBoxOption, currentIndex = 0, hasNextEnabled, hasPreviousEnabled, type = $.type(index);
2511
+
2512
+ // If an index is passed to target an indropdownidual drop down option
2513
+ if(type === "number") {
2514
+
2515
+ // The select box option being targeted
2516
+ currentSelectBoxOption = self.selectBox.find("option").eq(index);
2517
+
2518
+ // Triggers a `enable-option` custom event on the original select box and passes the enabled option
2519
+ self.triggerEvent("enable-option");
2520
+
2521
+ // Disables the targeted select box option
2522
+ currentSelectBoxOption.removeAttr("disabled");
2523
+
2524
+ // Disables the drop down option
2525
+ self.listItems.eq(index).attr("data-disabled", "false").
2526
+
2527
+ // Applies disabled styling for the drop down option
2528
+ removeClass(self.theme["disabled"]);
2529
+
2530
+ }
2531
+
2532
+ // Provides callback function support
2533
+ self._callbackSupport(callback);
2534
+
2535
+ // Maintains chainability
2536
+ return self;
2537
+
2538
+ };
2539
+
2540
+ // Keyboard Navigation Module
2541
+ // ==========================
2542
+
2543
+ // Move Down
2544
+ // ---------
2545
+ // Handles the down keyboard navigation logic
2546
+
2547
+ selectBoxIt.moveDown = function(callback) {
2548
+
2549
+ var self = this;
2550
+
2551
+ // Increments `currentFocus`, which represents the currently focused list item `id` attribute.
2552
+ self.currentFocus += 1;
2553
+
2554
+ // Determines whether the dropdown option the user is trying to go to is currently disabled
2555
+ var disabled = self.listItems.eq(self.currentFocus).attr("data-disabled") === "true" ? true: false,
2556
+
2557
+ hasNextEnabled = self.listItems.eq(self.currentFocus).nextAll("li").not("[data-disabled='true']").first().length;
2558
+
2559
+ // If the user has reached the top of the list
2560
+ if (self.currentFocus === self.listItems.length) {
2561
+
2562
+ // Does not allow the user to continue to go up the list
2563
+ self.currentFocus -= 1;
2564
+
2565
+ }
2566
+
2567
+ // If the option the user is trying to go to is disabled, but there is another enabled option
2568
+ else if (disabled && hasNextEnabled) {
2569
+
2570
+ // Blur the previously selected option
2571
+ self.listItems.eq(self.currentFocus - 1).blur();
2572
+
2573
+ // Call the `moveDown` method again
2574
+ self.moveDown();
2575
+
2576
+ // Exit the method
2577
+ return;
2578
+
2579
+ }
2580
+
2581
+ // If the option the user is trying to go to is disabled, but there is not another enabled option
2582
+ else if (disabled && !hasNextEnabled) {
2583
+
2584
+ self.currentFocus -= 1;
2585
+
2586
+ }
2587
+
2588
+ // If the user has not reached the bottom of the unordered list
2589
+ else {
2590
+
2591
+ // Blurs the previously focused list item
2592
+ // The jQuery `end()` method allows you to continue chaining while also using a different selector
2593
+ self.listItems.eq(self.currentFocus - 1).blur().end().
2594
+
2595
+ // Focuses the currently focused list item
2596
+ eq(self.currentFocus).focusin();
2597
+
2598
+ // Calls `scrollToView` to make sure the `scrollTop` is correctly updated. The `down` user action
2599
+ self._scrollToView("down");
2600
+
2601
+ // Triggers the custom `moveDown` event on the original select box
2602
+ self.triggerEvent("moveDown");
2603
+
2604
+ }
2605
+
2606
+ // Provide callback function support
2607
+ self._callbackSupport(callback);
2608
+
2609
+ // Maintains chainability
2610
+ return self;
2611
+
2612
+ };
2613
+
2614
+ // Move Up
2615
+ // ------
2616
+ // Handles the up keyboard navigation logic
2617
+ selectBoxIt.moveUp = function(callback) {
2618
+
2619
+ var self = this;
2620
+
2621
+ // Increments `currentFocus`, which represents the currently focused list item `id` attribute.
2622
+ self.currentFocus -= 1;
2623
+
2624
+ // Determines whether the dropdown option the user is trying to go to is currently disabled
2625
+ var disabled = self.listItems.eq(self.currentFocus).attr("data-disabled") === "true" ? true: false,
2626
+
2627
+ hasPreviousEnabled = self.listItems.eq(self.currentFocus).prevAll("li").not("[data-disabled='true']").first().length;
2628
+
2629
+ // If the user has reached the top of the list
2630
+ if (self.currentFocus === -1) {
2631
+
2632
+ // Does not allow the user to continue to go up the list
2633
+ self.currentFocus += 1;
2634
+
2635
+ }
2636
+
2637
+ // If the option the user is trying to go to is disabled and the user is not trying to go up after the user has reached the top of the list
2638
+ else if (disabled && hasPreviousEnabled) {
2639
+
2640
+ // Blur the previously selected option
2641
+ self.listItems.eq(self.currentFocus + 1).blur();
2642
+
2643
+ // Call the `moveUp` method again
2644
+ self.moveUp();
2645
+
2646
+ // Exits the method
2647
+ return;
2648
+
2649
+ }
2650
+
2651
+ else if (disabled && !hasPreviousEnabled) {
2652
+
2653
+ self.currentFocus += 1;
2654
+
2655
+ }
2656
+
2657
+ // If the user has not reached the top of the unordered list
2658
+ else {
2659
+
2660
+ // Blurs the previously focused list item
2661
+ // The jQuery `end()` method allows you to continue chaining while also using a different selector
2662
+ self.listItems.eq(this.currentFocus + 1).blur().end().
2663
+
2664
+ // Focuses the currently focused list item
2665
+ eq(self.currentFocus).focusin();
2666
+
2667
+ // Calls `scrollToView` to make sure the `scrollTop` is correctly updated. The `down` user action
2668
+ self._scrollToView("up");
2669
+
2670
+ // Triggers the custom `moveDown` event on the original select box
2671
+ self.triggerEvent("moveUp");
2672
+
2673
+ }
2674
+
2675
+ // Provide callback function support
2676
+ self._callbackSupport(callback);
2677
+
2678
+ // Maintains chainability
2679
+ return self;
2680
+
2681
+ };
2682
+
2683
+ // Keyboard Search Module
2684
+ // ======================
2685
+
2686
+ // _Set Current Search Option
2687
+ // -------------------------
2688
+ // Sets the currently selected dropdown list search option
2689
+
2690
+ selectBoxIt._setCurrentSearchOption = function(currentOption) {
2691
+
2692
+ var self = this;
2693
+
2694
+ // Does not change the current option if `showFirstOption` is false and the matched search item is the hidden first option.
2695
+ // Otherwise, the current option value is updated
2696
+ if ((self.options["aggressiveChange"] || self.options["selectWhenHidden"] || self.listItems.eq(currentOption).is(":visible")) && self.listItems.eq(currentOption).data("disabled") !== true) {
2697
+
2698
+ // Calls the `blur` event of the currently selected dropdown list option
2699
+ self.listItems.eq(self.currentFocus).blur();
2700
+
2701
+ // Sets `currentIndex` to the currently selected dropdown list option
2702
+ self.currentIndex = currentOption;
2703
+
2704
+ // Sets `currentFocus` to the currently selected dropdown list option
2705
+ self.currentFocus = currentOption;
2706
+
2707
+ // Focuses the currently selected dropdown list option
2708
+ self.listItems.eq(self.currentFocus).focusin();
2709
+
2710
+ // Updates the scrollTop so that the currently selected dropdown list option is visible to the user
2711
+ self._scrollToView("search");
2712
+
2713
+ // Triggers the custom `search` event on the original select box
2714
+ self.triggerEvent("search");
2715
+
2716
+ }
2717
+
2718
+ // Maintains chainability
2719
+ return self;
2720
+
2721
+ };
2722
+
2723
+ // _Search Algorithm
2724
+ // -----------------
2725
+ // Uses regular expressions to find text matches
2726
+ selectBoxIt._searchAlgorithm = function(currentIndex, alphaNumeric) {
2727
+
2728
+ var self = this,
2729
+
2730
+ // Boolean to determine if a pattern match exists
2731
+ matchExists = false,
2732
+
2733
+ // Iteration variable used in the outermost for loop
2734
+ x,
2735
+
2736
+ // Iteration variable used in the nested for loop
2737
+ y,
2738
+
2739
+ // Variable used to cache the length of the text array (Small enhancement to speed up traversing)
2740
+ arrayLength,
2741
+
2742
+ // Variable storing the current search
2743
+ currentSearch,
2744
+
2745
+ // Variable storing the textArray property
2746
+ textArray = self.textArray,
2747
+
2748
+ // Variable storing the current text property
2749
+ currentText = self.currentText;
2750
+
2751
+ // Loops through the text array to find a pattern match
2752
+ for (x = currentIndex, arrayLength = textArray.length; x < arrayLength; x += 1) {
2753
+
2754
+ currentSearch = textArray[x];
2755
+
2756
+ // Nested for loop to help search for a pattern match with the currently traversed array item
2757
+ for (y = 0; y < arrayLength; y += 1) {
2758
+
2759
+ // Searches for a match
2760
+ if (textArray[y].search(alphaNumeric) !== -1) {
2761
+
2762
+ // `matchExists` is set to true if there is a match
2763
+ matchExists = true;
2764
+
2765
+ // Exits the nested for loop
2766
+ y = arrayLength;
2767
+
2768
+ }
2769
+
2770
+ } // End nested for loop
2771
+
2772
+ // If a match does not exist
2773
+ if (!matchExists) {
2774
+
2775
+ // Sets the current text to the last entered character
2776
+ self.currentText = self.currentText.charAt(self.currentText.length - 1).
2777
+
2778
+ // Escapes the regular expression to make sure special characters are seen as literal characters instead of special commands
2779
+ replace(/[|()\[{.+*?$\\]/g, "\\$0");
2780
+
2781
+ currentText = self.currentText;
2782
+
2783
+ }
2784
+
2785
+ // Resets the regular expression with the new value of `self.currentText`
2786
+ alphaNumeric = new RegExp(currentText, "gi");
2787
+
2788
+ // Searches based on the first letter of the dropdown list options text if the currentText < 3 characters
2789
+ if (currentText.length < 3) {
2790
+
2791
+ alphaNumeric = new RegExp(currentText.charAt(0), "gi");
2792
+
2793
+ // If there is a match based on the first character
2794
+ if ((currentSearch.charAt(0).search(alphaNumeric) !== -1)) {
2795
+
2796
+ // Sets properties of that dropdown list option to make it the currently selected option
2797
+ self._setCurrentSearchOption(x);
2798
+
2799
+ if((currentSearch.substring(0, currentText.length).toLowerCase() !== currentText.toLowerCase()) || self.options["similarSearch"]) {
2800
+
2801
+ // Increments the current index by one
2802
+ self.currentIndex += 1;
2803
+
2804
+ }
2805
+
2806
+ // Exits the search
2807
+ return false;
2808
+
2809
+ }
2810
+
2811
+ }
2812
+
2813
+ // If `self.currentText` > 1 character
2814
+ else {
2815
+
2816
+ // If there is a match based on the entire string
2817
+ if ((currentSearch.search(alphaNumeric) !== -1)) {
2818
+
2819
+ // Sets properties of that dropdown list option to make it the currently selected option
2820
+ self._setCurrentSearchOption(x);
2821
+
2822
+ // Exits the search
2823
+ return false;
2824
+
2825
+ }
2826
+
2827
+ }
2828
+
2829
+ // If the current text search is an exact match
2830
+ if (currentSearch.toLowerCase() === self.currentText.toLowerCase()) {
2831
+
2832
+ // Sets properties of that dropdown list option to make it the currently selected option
2833
+ self._setCurrentSearchOption(x);
2834
+
2835
+ // Resets the current text search to a blank string to start fresh again
2836
+ self.currentText = "";
2837
+
2838
+ // Exits the search
2839
+ return false;
2840
+
2841
+ }
2842
+
2843
+ }
2844
+
2845
+ // Returns true if there is not a match at all
2846
+ return true;
2847
+
2848
+ };
2849
+
2850
+ // Search
2851
+ // ------
2852
+ // Calls searchAlgorithm()
2853
+ selectBoxIt.search = function(alphaNumericKey, callback, rememberPreviousSearch) {
2854
+
2855
+ var self = this;
2856
+
2857
+ // If the search method is being called internally by the plugin, and not externally as a method by a user
2858
+ if (rememberPreviousSearch) {
2859
+
2860
+ // Continued search with history from past searches. Properly escapes the regular expression
2861
+ self.currentText += alphaNumericKey.replace(/[|()\[{.+*?$\\]/g, "\\$0");
2862
+
2863
+ }
2864
+
2865
+ else {
2866
+
2867
+ // Brand new search. Properly escapes the regular expression
2868
+ self.currentText = alphaNumericKey.replace(/[|()\[{.+*?$\\]/g, "\\$0");
2869
+
2870
+ }
2871
+
2872
+ // Searches globally
2873
+ var searchResults = self._searchAlgorithm(self.currentIndex, new RegExp(self.currentText, "gi"));
2874
+
2875
+ // Searches the list again if a match is not found. This is needed, because the first search started at the array indece of the currently selected dropdown list option, and does not search the options before the current array indece.
2876
+ // If there are many similar dropdown list options, starting the search at the indece of the currently selected dropdown list option is needed to properly traverse the text array.
2877
+ if (searchResults) {
2878
+
2879
+ // Searches the dropdown list values starting from the beginning of the text array
2880
+ self._searchAlgorithm(0, self.currentText);
2881
+
2882
+ }
2883
+
2884
+ // Provide callback function support
2885
+ self._callbackSupport(callback);
2886
+
2887
+ // Maintains chainability
2888
+ return self;
2889
+
2890
+ };
2891
+
2892
+ // Mobile Module
2893
+ // =============
2894
+
2895
+ // Set Mobile Text
2896
+ // ---------------
2897
+ // Updates the text of the drop down
2898
+ selectBoxIt._updateMobileText = function() {
2899
+
2900
+ var self = this,
2901
+ currentOption,
2902
+ currentDataText,
2903
+ currentText;
2904
+
2905
+ currentOption = self.selectBox.find("option").filter(":selected");
2906
+
2907
+ currentDataText = currentOption.attr("data-text");
2908
+
2909
+ currentText = currentDataText ? currentDataText: currentOption.text();
2910
+
2911
+ // Sets the new dropdown list text to the value of the original dropdown list
2912
+ self._setText(self.dropdownText, currentText);
2913
+
2914
+ if(self.list.find('li[data-val="' + currentOption.val() + '"]').find("i").attr("class")) {
2915
+
2916
+ self.dropdownImage.attr("class", self.list.find('li[data-val="' + currentOption.val() + '"]').find("i").attr("class")).addClass("selectboxit-default-icon");
2917
+
2918
+ }
2919
+
2920
+ };
2921
+
2922
+ // Apply Native Select
2923
+ // -------------------
2924
+ // Applies the original select box directly over the new drop down
2925
+
2926
+ selectBoxIt._applyNativeSelect = function() {
2927
+
2928
+ // Stores the plugin context inside of the self variable
2929
+ var self = this;
2930
+
2931
+ // Appends the native select box to the drop down (allows for relative positioning using the position() method)
2932
+ self.dropdownContainer.append(self.selectBox);
2933
+
2934
+ self.dropdown.attr("tabindex", "-1");
2935
+
2936
+ // Positions the original select box directly over top the new dropdown list using position absolute and "hides" the original select box using an opacity of 0. This allows the mobile browser "wheel" interface for better usability.
2937
+ self.selectBox.css({
2938
+
2939
+ "display": "block",
2940
+
2941
+ "visibility": "visible",
2942
+
2943
+ "width": self._realOuterWidth(self.dropdown),
2944
+
2945
+ "height": self.dropdown.outerHeight(),
2946
+
2947
+ "opacity": "0",
2948
+
2949
+ "position": "absolute",
2950
+
2951
+ "top": "0",
2952
+
2953
+ "left": "0",
2954
+
2955
+ "cursor": "pointer",
2956
+
2957
+ "z-index": "999999",
2958
+
2959
+ "margin": self.dropdown.css("margin"),
2960
+
2961
+ "padding": "0",
2962
+
2963
+ "-webkit-appearance": "menulist-button"
2964
+
2965
+ });
2966
+
2967
+ if(self.originalElem.disabled) {
2968
+
2969
+ self.triggerEvent("disable");
2970
+
2971
+ }
2972
+
2973
+ return this;
2974
+
2975
+ };
2976
+
2977
+ // Mobile Events
2978
+ // -------------
2979
+ // Listens to mobile-specific events
2980
+ selectBoxIt._mobileEvents = function() {
2981
+
2982
+ var self = this;
2983
+
2984
+ self.selectBox.on({
2985
+
2986
+ "changed.selectBoxIt": function() {
2987
+
2988
+ self.hasChanged = true;
2989
+
2990
+ self._updateMobileText();
2991
+
2992
+ // Triggers the `option-click` event on mobile
2993
+ self.triggerEvent("option-click");
2994
+
2995
+ },
2996
+
2997
+ "mousedown.selectBoxIt": function() {
2998
+
2999
+ // If the select box has not been changed, the defaultText option is being used
3000
+ if(!self.hasChanged && self.options.defaultText && !self.originalElem.disabled) {
3001
+
3002
+ self._updateMobileText();
3003
+
3004
+ self.triggerEvent("option-click");
3005
+
3006
+ }
3007
+
3008
+ },
3009
+
3010
+ "enable.selectBoxIt": function() {
3011
+
3012
+ // Moves SelectBoxIt onto the page
3013
+ self.selectBox.removeClass('selectboxit-rendering');
3014
+
3015
+ },
3016
+
3017
+ "disable.selectBoxIt": function() {
3018
+
3019
+ // Moves SelectBoxIt off the page
3020
+ self.selectBox.addClass('selectboxit-rendering');
3021
+
3022
+ }
3023
+
3024
+ });
3025
+
3026
+ };
3027
+
3028
+ // Mobile
3029
+ // ------
3030
+ // Applies the native "wheel" interface when a mobile user is interacting with the dropdown
3031
+
3032
+ selectBoxIt._mobile = function(callback) {
3033
+
3034
+ // Stores the plugin context inside of the self variable
3035
+ var self = this;
3036
+
3037
+ if(self.isMobile) {
3038
+
3039
+ self._applyNativeSelect();
3040
+
3041
+ self._mobileEvents();
3042
+
3043
+ }
3044
+
3045
+ // Maintains chainability
3046
+ return this;
3047
+
3048
+ };
3049
+
3050
+ // Remove Options Module
3051
+ // =====================
3052
+
3053
+ // remove
3054
+ // ------
3055
+ // Removes drop down list options
3056
+ // using an index
3057
+
3058
+ selectBoxIt.remove = function(indexes, callback) {
3059
+
3060
+ var self = this,
3061
+ dataType = $.type(indexes),
3062
+ value,
3063
+ x = 0,
3064
+ dataLength,
3065
+ elems = "";
3066
+
3067
+ // If an array is passed in
3068
+ if(dataType === "array") {
3069
+
3070
+ // Loops through the array
3071
+ for(dataLength = indexes.length; x <= dataLength - 1; x += 1) {
3072
+
3073
+ // Stores the currently traversed array item in the local `value` variable
3074
+ value = indexes[x];
3075
+
3076
+ // If the currently traversed array item is an object literal
3077
+ if($.type(value) === "number") {
3078
+
3079
+ if(elems.length) {
3080
+
3081
+ // Adds an element to the removal string
3082
+ elems += ", option:eq(" + value + ")";
3083
+
3084
+ }
3085
+
3086
+ else {
3087
+
3088
+ // Adds an element to the removal string
3089
+ elems += "option:eq(" + value + ")";
3090
+
3091
+ }
3092
+
3093
+ }
3094
+
3095
+ }
3096
+
3097
+ // Removes all of the appropriate options from the select box
3098
+ self.selectBox.find(elems).remove();
3099
+
3100
+ }
3101
+
3102
+ // If a number is passed in
3103
+ else if(dataType === "number") {
3104
+
3105
+ self.selectBox.find("option").eq(indexes).remove();
3106
+
3107
+ }
3108
+
3109
+ // If anything besides a number or array is passed in
3110
+ else {
3111
+
3112
+ // Removes all of the options from the original select box
3113
+ self.selectBox.find("option").remove();
3114
+
3115
+ }
3116
+
3117
+ // If the dropdown property exists
3118
+ if(self.dropdown) {
3119
+
3120
+ // Rebuilds the dropdown
3121
+ self.refresh(function() {
3122
+
3123
+ // Provide callback function support
3124
+ self._callbackSupport(callback);
3125
+
3126
+ }, true);
3127
+
3128
+ } else {
3129
+
3130
+ // Provide callback function support
3131
+ self._callbackSupport(callback);
3132
+
3133
+ }
3134
+
3135
+ // Maintains chainability
3136
+ return self;
3137
+
3138
+ };
3139
+
3140
+ // Select Option Module
3141
+ // ====================
3142
+
3143
+ // Select Option
3144
+ // -------------
3145
+ // Programatically selects a drop down option by either index or value
3146
+
3147
+ selectBoxIt.selectOption = function(val, callback) {
3148
+
3149
+ // Stores the plugin context inside of the self variable
3150
+ var self = this,
3151
+ type = $.type(val);
3152
+
3153
+ // Makes sure the passed in position is a number
3154
+ if(type === "number") {
3155
+
3156
+ // Set's the original select box value and triggers the change event (which SelectBoxIt listens for)
3157
+ self.selectBox.val(self.selectItems.eq(val).val()).change();
3158
+
3159
+ }
3160
+
3161
+ else if(type === "string") {
3162
+
3163
+ // Set's the original select box value and triggers the change event (which SelectBoxIt listens for)
3164
+ self.selectBox.val(val).change();
3165
+
3166
+ }
3167
+
3168
+ // Calls the callback function
3169
+ self._callbackSupport(callback);
3170
+
3171
+ // Maintains chainability
3172
+ return self;
3173
+
3174
+ };
3175
+
3176
+ // Set Option Module
3177
+ // =================
3178
+
3179
+ // Set Option
3180
+ // ----------
3181
+ // Accepts an string key, a value, and a callback function to replace a single
3182
+ // property of the plugin options object
3183
+
3184
+ selectBoxIt.setOption = function(key, value, callback) {
3185
+
3186
+ var self = this;
3187
+
3188
+ //Makes sure a string is passed in
3189
+ if($.type(key) === "string") {
3190
+
3191
+ // Sets the plugin option to the new value provided by the user
3192
+ self.options[key] = value;
3193
+
3194
+ }
3195
+
3196
+ // Rebuilds the dropdown
3197
+ self.refresh(function() {
3198
+
3199
+ // Provide callback function support
3200
+ self._callbackSupport(callback);
3201
+
3202
+ }, true);
3203
+
3204
+ // Maintains chainability
3205
+ return self;
3206
+
3207
+ };
3208
+
3209
+ // Set Options Module
3210
+ // ==================
3211
+
3212
+ // Set Options
3213
+ // ----------
3214
+ // Accepts an object to replace plugin options
3215
+ // properties of the plugin options object
3216
+
3217
+ selectBoxIt.setOptions = function(newOptions, callback) {
3218
+
3219
+ var self = this;
3220
+
3221
+ // If the passed in parameter is an object literal
3222
+ if($.isPlainObject(newOptions)) {
3223
+
3224
+ self.options = $.extend({}, self.options, newOptions);
3225
+
3226
+ }
3227
+
3228
+ // Rebuilds the dropdown
3229
+ self.refresh(function() {
3230
+
3231
+ // Provide callback function support
3232
+ self._callbackSupport(callback);
3233
+
3234
+ }, true);
3235
+
3236
+ // Maintains chainability
3237
+ return self;
3238
+
3239
+ };
3240
+
3241
+ // Wait Module
3242
+ // ===========
3243
+
3244
+ // Wait
3245
+ // ----
3246
+ // Delays execution by the amount of time
3247
+ // specified by the parameter
3248
+
3249
+ selectBoxIt.wait = function(time, callback) {
3250
+
3251
+ var self = this;
3252
+
3253
+ self.widgetProto._delay.call(self, callback, time);
3254
+
3255
+ // Maintains chainability
3256
+ return self;
3257
+
3258
+ };
3259
+ })); // End of all modules