cg_app_base 1.0.51

Sign up to get free protection for your applications and to get access to all the features.
Files changed (852) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +23 -0
  5. data/app/assets/fonts/flatty/FontAwesome.otf +0 -0
  6. data/app/assets/fonts/flatty/bootstrap/glyphicons-halflings-regular.eot +0 -0
  7. data/app/assets/fonts/flatty/bootstrap/glyphicons-halflings-regular.svg +228 -0
  8. data/app/assets/fonts/flatty/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  9. data/app/assets/fonts/flatty/bootstrap/glyphicons-halflings-regular.woff +0 -0
  10. data/app/assets/fonts/flatty/fontawesome-webfont.eot +0 -0
  11. data/app/assets/fonts/flatty/fontawesome-webfont.svg +399 -0
  12. data/app/assets/fonts/flatty/fontawesome-webfont.ttf +0 -0
  13. data/app/assets/fonts/flatty/fontawesome-webfont.woff +0 -0
  14. data/app/assets/fonts/flatty/montserrat-bold-webfont.eot +0 -0
  15. data/app/assets/fonts/flatty/montserrat-bold-webfont.svg +244 -0
  16. data/app/assets/fonts/flatty/montserrat-bold-webfont.ttf +0 -0
  17. data/app/assets/fonts/flatty/montserrat-bold-webfont.woff +0 -0
  18. data/app/assets/fonts/flatty/montserrat-regular-webfont.eot +0 -0
  19. data/app/assets/fonts/flatty/montserrat-regular-webfont.svg +243 -0
  20. data/app/assets/fonts/flatty/montserrat-regular-webfont.ttf +0 -0
  21. data/app/assets/fonts/flatty/montserrat-regular-webfont.woff +0 -0
  22. data/app/assets/images/ajaxSpinner.gif +0 -0
  23. data/app/assets/images/flatty/ajax-loaders/1.gif +0 -0
  24. data/app/assets/images/flatty/ajax-loaders/10.gif +0 -0
  25. data/app/assets/images/flatty/ajax-loaders/11.gif +0 -0
  26. data/app/assets/images/flatty/ajax-loaders/12.gif +0 -0
  27. data/app/assets/images/flatty/ajax-loaders/13.gif +0 -0
  28. data/app/assets/images/flatty/ajax-loaders/14.gif +0 -0
  29. data/app/assets/images/flatty/ajax-loaders/15.gif +0 -0
  30. data/app/assets/images/flatty/ajax-loaders/16.gif +0 -0
  31. data/app/assets/images/flatty/ajax-loaders/17.gif +0 -0
  32. data/app/assets/images/flatty/ajax-loaders/18.gif +0 -0
  33. data/app/assets/images/flatty/ajax-loaders/2.gif +0 -0
  34. data/app/assets/images/flatty/ajax-loaders/3.gif +0 -0
  35. data/app/assets/images/flatty/ajax-loaders/4.gif +0 -0
  36. data/app/assets/images/flatty/ajax-loaders/5.gif +0 -0
  37. data/app/assets/images/flatty/ajax-loaders/6.gif +0 -0
  38. data/app/assets/images/flatty/ajax-loaders/7.gif +0 -0
  39. data/app/assets/images/flatty/ajax-loaders/8.gif +0 -0
  40. data/app/assets/images/flatty/ajax-loaders/9.gif +0 -0
  41. data/app/assets/images/flatty/avatar.jpg +0 -0
  42. data/app/assets/images/flatty/avatar@2x.jpg +0 -0
  43. data/app/assets/images/flatty/emails/logo.jpg +0 -0
  44. data/app/assets/images/flatty/emails/logo_blue.jpg +0 -0
  45. data/app/assets/images/flatty/emails/logo_green.jpg +0 -0
  46. data/app/assets/images/flatty/emails/logo_muted.jpg +0 -0
  47. data/app/assets/images/flatty/emails/logo_orange.jpg +0 -0
  48. data/app/assets/images/flatty/emails/logo_purple.jpg +0 -0
  49. data/app/assets/images/flatty/jquery_ui/animated-overlay.gif +0 -0
  50. data/app/assets/images/flatty/logo.png +0 -0
  51. data/app/assets/images/flatty/logo.svg +3443 -0
  52. data/app/assets/images/flatty/logo_lg.png +0 -0
  53. data/app/assets/images/flatty/logo_lg.svg +59 -0
  54. data/app/assets/images/flatty/logo_xs.png +0 -0
  55. data/app/assets/images/flatty/logo_xs.svg +3372 -0
  56. data/app/assets/images/flatty/meta_icons/apple-touch-icon-114x114.png +0 -0
  57. data/app/assets/images/flatty/meta_icons/apple-touch-icon-144x144.png +0 -0
  58. data/app/assets/images/flatty/meta_icons/apple-touch-icon-57x57.png +0 -0
  59. data/app/assets/images/flatty/meta_icons/apple-touch-icon-72x72.png +0 -0
  60. data/app/assets/images/flatty/meta_icons/apple-touch-icon.png +0 -0
  61. data/app/assets/images/flatty/meta_icons/favicon.ico +0 -0
  62. data/app/assets/images/flatty/plugins/bootstrap_colorpicker/alpha.png +0 -0
  63. data/app/assets/images/flatty/plugins/bootstrap_colorpicker/hue.png +0 -0
  64. data/app/assets/images/flatty/plugins/bootstrap_colorpicker/saturation.png +0 -0
  65. data/app/assets/images/flatty/plugins/dynatree/icons.gif +0 -0
  66. data/app/assets/images/flatty/plugins/dynatree/loading.gif +0 -0
  67. data/app/assets/images/flatty/plugins/flags/flags.png +0 -0
  68. data/app/assets/images/flatty/plugins/lightbox/close.png +0 -0
  69. data/app/assets/images/flatty/plugins/lightbox/loading.gif +0 -0
  70. data/app/assets/images/flatty/plugins/lightbox/next.png +0 -0
  71. data/app/assets/images/flatty/plugins/lightbox/prev.png +0 -0
  72. data/app/assets/images/flatty/plugins/naked_password/f0.png +0 -0
  73. data/app/assets/images/flatty/plugins/naked_password/f1.png +0 -0
  74. data/app/assets/images/flatty/plugins/naked_password/f2.png +0 -0
  75. data/app/assets/images/flatty/plugins/naked_password/f3.png +0 -0
  76. data/app/assets/images/flatty/plugins/naked_password/f4.png +0 -0
  77. data/app/assets/images/flatty/plugins/naked_password/f5.png +0 -0
  78. data/app/assets/images/flatty/plugins/naked_password/m0.png +0 -0
  79. data/app/assets/images/flatty/plugins/naked_password/m1.png +0 -0
  80. data/app/assets/images/flatty/plugins/naked_password/m2.png +0 -0
  81. data/app/assets/images/flatty/plugins/naked_password/m3.png +0 -0
  82. data/app/assets/images/flatty/plugins/naked_password/m4.png +0 -0
  83. data/app/assets/images/flatty/plugins/naked_password/m5.png +0 -0
  84. data/app/assets/images/flatty/plugins/select2/select2-spinner.gif +0 -0
  85. data/app/assets/images/flatty/plugins/select2/select2.png +0 -0
  86. data/app/assets/images/flatty/plugins/select2/select2x2.png +0 -0
  87. data/app/assets/images/loading.gif +0 -0
  88. data/app/assets/images/logo_caronetguay-3.jpg +0 -0
  89. data/app/assets/images/logo_caronetguay-nwsltr.jpg +0 -0
  90. data/app/assets/images/logo_caronetguay.jpg +0 -0
  91. data/app/assets/images/newicons/black0.png +0 -0
  92. data/app/assets/images/newicons/black1.png +0 -0
  93. data/app/assets/images/newicons/black10.png +0 -0
  94. data/app/assets/images/newicons/black100.png +0 -0
  95. data/app/assets/images/newicons/black11.png +0 -0
  96. data/app/assets/images/newicons/black12.png +0 -0
  97. data/app/assets/images/newicons/black13.png +0 -0
  98. data/app/assets/images/newicons/black14.png +0 -0
  99. data/app/assets/images/newicons/black15.png +0 -0
  100. data/app/assets/images/newicons/black16.png +0 -0
  101. data/app/assets/images/newicons/black17.png +0 -0
  102. data/app/assets/images/newicons/black18.png +0 -0
  103. data/app/assets/images/newicons/black19.png +0 -0
  104. data/app/assets/images/newicons/black2.png +0 -0
  105. data/app/assets/images/newicons/black20.png +0 -0
  106. data/app/assets/images/newicons/black21.png +0 -0
  107. data/app/assets/images/newicons/black22.png +0 -0
  108. data/app/assets/images/newicons/black23.png +0 -0
  109. data/app/assets/images/newicons/black24.png +0 -0
  110. data/app/assets/images/newicons/black25.png +0 -0
  111. data/app/assets/images/newicons/black26.png +0 -0
  112. data/app/assets/images/newicons/black27.png +0 -0
  113. data/app/assets/images/newicons/black28.png +0 -0
  114. data/app/assets/images/newicons/black29.png +0 -0
  115. data/app/assets/images/newicons/black3.png +0 -0
  116. data/app/assets/images/newicons/black30.png +0 -0
  117. data/app/assets/images/newicons/black31.png +0 -0
  118. data/app/assets/images/newicons/black32.png +0 -0
  119. data/app/assets/images/newicons/black33.png +0 -0
  120. data/app/assets/images/newicons/black34.png +0 -0
  121. data/app/assets/images/newicons/black35.png +0 -0
  122. data/app/assets/images/newicons/black36.png +0 -0
  123. data/app/assets/images/newicons/black37.png +0 -0
  124. data/app/assets/images/newicons/black38.png +0 -0
  125. data/app/assets/images/newicons/black39.png +0 -0
  126. data/app/assets/images/newicons/black4.png +0 -0
  127. data/app/assets/images/newicons/black40.png +0 -0
  128. data/app/assets/images/newicons/black41.png +0 -0
  129. data/app/assets/images/newicons/black42.png +0 -0
  130. data/app/assets/images/newicons/black43.png +0 -0
  131. data/app/assets/images/newicons/black44.png +0 -0
  132. data/app/assets/images/newicons/black45.png +0 -0
  133. data/app/assets/images/newicons/black46.png +0 -0
  134. data/app/assets/images/newicons/black47.png +0 -0
  135. data/app/assets/images/newicons/black48.png +0 -0
  136. data/app/assets/images/newicons/black49.png +0 -0
  137. data/app/assets/images/newicons/black5.png +0 -0
  138. data/app/assets/images/newicons/black50.png +0 -0
  139. data/app/assets/images/newicons/black51.png +0 -0
  140. data/app/assets/images/newicons/black52.png +0 -0
  141. data/app/assets/images/newicons/black53.png +0 -0
  142. data/app/assets/images/newicons/black54.png +0 -0
  143. data/app/assets/images/newicons/black55.png +0 -0
  144. data/app/assets/images/newicons/black56.png +0 -0
  145. data/app/assets/images/newicons/black57.png +0 -0
  146. data/app/assets/images/newicons/black58.png +0 -0
  147. data/app/assets/images/newicons/black59.png +0 -0
  148. data/app/assets/images/newicons/black6.png +0 -0
  149. data/app/assets/images/newicons/black60.png +0 -0
  150. data/app/assets/images/newicons/black61.png +0 -0
  151. data/app/assets/images/newicons/black62.png +0 -0
  152. data/app/assets/images/newicons/black63.png +0 -0
  153. data/app/assets/images/newicons/black64.png +0 -0
  154. data/app/assets/images/newicons/black65.png +0 -0
  155. data/app/assets/images/newicons/black66.png +0 -0
  156. data/app/assets/images/newicons/black67.png +0 -0
  157. data/app/assets/images/newicons/black68.png +0 -0
  158. data/app/assets/images/newicons/black69.png +0 -0
  159. data/app/assets/images/newicons/black7.png +0 -0
  160. data/app/assets/images/newicons/black70.png +0 -0
  161. data/app/assets/images/newicons/black71.png +0 -0
  162. data/app/assets/images/newicons/black72.png +0 -0
  163. data/app/assets/images/newicons/black73.png +0 -0
  164. data/app/assets/images/newicons/black74.png +0 -0
  165. data/app/assets/images/newicons/black75.png +0 -0
  166. data/app/assets/images/newicons/black76.png +0 -0
  167. data/app/assets/images/newicons/black77.png +0 -0
  168. data/app/assets/images/newicons/black78.png +0 -0
  169. data/app/assets/images/newicons/black79.png +0 -0
  170. data/app/assets/images/newicons/black8.png +0 -0
  171. data/app/assets/images/newicons/black80.png +0 -0
  172. data/app/assets/images/newicons/black81.png +0 -0
  173. data/app/assets/images/newicons/black82.png +0 -0
  174. data/app/assets/images/newicons/black83.png +0 -0
  175. data/app/assets/images/newicons/black84.png +0 -0
  176. data/app/assets/images/newicons/black85.png +0 -0
  177. data/app/assets/images/newicons/black86.png +0 -0
  178. data/app/assets/images/newicons/black87.png +0 -0
  179. data/app/assets/images/newicons/black88.png +0 -0
  180. data/app/assets/images/newicons/black89.png +0 -0
  181. data/app/assets/images/newicons/black9.png +0 -0
  182. data/app/assets/images/newicons/black90.png +0 -0
  183. data/app/assets/images/newicons/black91.png +0 -0
  184. data/app/assets/images/newicons/black92.png +0 -0
  185. data/app/assets/images/newicons/black93.png +0 -0
  186. data/app/assets/images/newicons/black94.png +0 -0
  187. data/app/assets/images/newicons/black95.png +0 -0
  188. data/app/assets/images/newicons/black96.png +0 -0
  189. data/app/assets/images/newicons/black97.png +0 -0
  190. data/app/assets/images/newicons/black98.png +0 -0
  191. data/app/assets/images/newicons/black99.png +0 -0
  192. data/app/assets/images/newicons/index.html +213 -0
  193. data/app/assets/images/newicons/red0.png +0 -0
  194. data/app/assets/images/newicons/red1.png +0 -0
  195. data/app/assets/images/newicons/red10.png +0 -0
  196. data/app/assets/images/newicons/red100.png +0 -0
  197. data/app/assets/images/newicons/red11.png +0 -0
  198. data/app/assets/images/newicons/red12.png +0 -0
  199. data/app/assets/images/newicons/red13.png +0 -0
  200. data/app/assets/images/newicons/red14.png +0 -0
  201. data/app/assets/images/newicons/red15.png +0 -0
  202. data/app/assets/images/newicons/red16.png +0 -0
  203. data/app/assets/images/newicons/red17.png +0 -0
  204. data/app/assets/images/newicons/red18.png +0 -0
  205. data/app/assets/images/newicons/red19.png +0 -0
  206. data/app/assets/images/newicons/red2.png +0 -0
  207. data/app/assets/images/newicons/red20.png +0 -0
  208. data/app/assets/images/newicons/red21.png +0 -0
  209. data/app/assets/images/newicons/red22.png +0 -0
  210. data/app/assets/images/newicons/red23.png +0 -0
  211. data/app/assets/images/newicons/red24.png +0 -0
  212. data/app/assets/images/newicons/red25.png +0 -0
  213. data/app/assets/images/newicons/red26.png +0 -0
  214. data/app/assets/images/newicons/red27.png +0 -0
  215. data/app/assets/images/newicons/red28.png +0 -0
  216. data/app/assets/images/newicons/red29.png +0 -0
  217. data/app/assets/images/newicons/red3.png +0 -0
  218. data/app/assets/images/newicons/red30.png +0 -0
  219. data/app/assets/images/newicons/red31.png +0 -0
  220. data/app/assets/images/newicons/red32.png +0 -0
  221. data/app/assets/images/newicons/red33.png +0 -0
  222. data/app/assets/images/newicons/red34.png +0 -0
  223. data/app/assets/images/newicons/red35.png +0 -0
  224. data/app/assets/images/newicons/red36.png +0 -0
  225. data/app/assets/images/newicons/red37.png +0 -0
  226. data/app/assets/images/newicons/red38.png +0 -0
  227. data/app/assets/images/newicons/red39.png +0 -0
  228. data/app/assets/images/newicons/red4.png +0 -0
  229. data/app/assets/images/newicons/red40.png +0 -0
  230. data/app/assets/images/newicons/red41.png +0 -0
  231. data/app/assets/images/newicons/red42.png +0 -0
  232. data/app/assets/images/newicons/red43.png +0 -0
  233. data/app/assets/images/newicons/red44.png +0 -0
  234. data/app/assets/images/newicons/red45.png +0 -0
  235. data/app/assets/images/newicons/red46.png +0 -0
  236. data/app/assets/images/newicons/red47.png +0 -0
  237. data/app/assets/images/newicons/red48.png +0 -0
  238. data/app/assets/images/newicons/red49.png +0 -0
  239. data/app/assets/images/newicons/red5.png +0 -0
  240. data/app/assets/images/newicons/red50.png +0 -0
  241. data/app/assets/images/newicons/red51.png +0 -0
  242. data/app/assets/images/newicons/red52.png +0 -0
  243. data/app/assets/images/newicons/red53.png +0 -0
  244. data/app/assets/images/newicons/red54.png +0 -0
  245. data/app/assets/images/newicons/red55.png +0 -0
  246. data/app/assets/images/newicons/red56.png +0 -0
  247. data/app/assets/images/newicons/red57.png +0 -0
  248. data/app/assets/images/newicons/red58.png +0 -0
  249. data/app/assets/images/newicons/red59.png +0 -0
  250. data/app/assets/images/newicons/red6.png +0 -0
  251. data/app/assets/images/newicons/red60.png +0 -0
  252. data/app/assets/images/newicons/red61.png +0 -0
  253. data/app/assets/images/newicons/red62.png +0 -0
  254. data/app/assets/images/newicons/red63.png +0 -0
  255. data/app/assets/images/newicons/red64.png +0 -0
  256. data/app/assets/images/newicons/red65.png +0 -0
  257. data/app/assets/images/newicons/red66.png +0 -0
  258. data/app/assets/images/newicons/red67.png +0 -0
  259. data/app/assets/images/newicons/red68.png +0 -0
  260. data/app/assets/images/newicons/red69.png +0 -0
  261. data/app/assets/images/newicons/red7.png +0 -0
  262. data/app/assets/images/newicons/red70.png +0 -0
  263. data/app/assets/images/newicons/red71.png +0 -0
  264. data/app/assets/images/newicons/red72.png +0 -0
  265. data/app/assets/images/newicons/red73.png +0 -0
  266. data/app/assets/images/newicons/red74.png +0 -0
  267. data/app/assets/images/newicons/red75.png +0 -0
  268. data/app/assets/images/newicons/red76.png +0 -0
  269. data/app/assets/images/newicons/red77.png +0 -0
  270. data/app/assets/images/newicons/red78.png +0 -0
  271. data/app/assets/images/newicons/red79.png +0 -0
  272. data/app/assets/images/newicons/red8.png +0 -0
  273. data/app/assets/images/newicons/red80.png +0 -0
  274. data/app/assets/images/newicons/red81.png +0 -0
  275. data/app/assets/images/newicons/red82.png +0 -0
  276. data/app/assets/images/newicons/red83.png +0 -0
  277. data/app/assets/images/newicons/red84.png +0 -0
  278. data/app/assets/images/newicons/red85.png +0 -0
  279. data/app/assets/images/newicons/red86.png +0 -0
  280. data/app/assets/images/newicons/red87.png +0 -0
  281. data/app/assets/images/newicons/red88.png +0 -0
  282. data/app/assets/images/newicons/red89.png +0 -0
  283. data/app/assets/images/newicons/red9.png +0 -0
  284. data/app/assets/images/newicons/red90.png +0 -0
  285. data/app/assets/images/newicons/red91.png +0 -0
  286. data/app/assets/images/newicons/red92.png +0 -0
  287. data/app/assets/images/newicons/red93.png +0 -0
  288. data/app/assets/images/newicons/red94.png +0 -0
  289. data/app/assets/images/newicons/red95.png +0 -0
  290. data/app/assets/images/newicons/red96.png +0 -0
  291. data/app/assets/images/newicons/red97.png +0 -0
  292. data/app/assets/images/newicons/red98.png +0 -0
  293. data/app/assets/images/newicons/red99.png +0 -0
  294. data/app/assets/images/spinner_squares_circle.gif +0 -0
  295. data/app/assets/images/sprite-skin-flat.png +0 -0
  296. data/app/assets/images/top-arrow.png +0 -0
  297. data/app/assets/javascripts/autocomplete-rails.js +143 -0
  298. data/app/assets/javascripts/base.js.coffee +56 -0
  299. data/app/assets/javascripts/flatty/bootstrap/bootstrap.js +1999 -0
  300. data/app/assets/javascripts/flatty/bootstrap/bootstrap.min.js +6 -0
  301. data/app/assets/javascripts/flatty/demo.js.coffee +19 -0
  302. data/app/assets/javascripts/flatty/ie/html5shiv.js +11 -0
  303. data/app/assets/javascripts/flatty/ie/respond.min.js +6 -0
  304. data/app/assets/javascripts/flatty/jquery/jquery-migrate.min.js +2 -0
  305. data/app/assets/javascripts/flatty/jquery/jquery-ui.min.js +12 -0
  306. data/app/assets/javascripts/flatty/jquery/jquery.min.js +4 -0
  307. data/app/assets/javascripts/flatty/jquery/jquery.mobile.custom.min.js +2 -0
  308. data/app/assets/javascripts/flatty/plugins/autosize/jquery.autosize-min.js +7 -0
  309. data/app/assets/javascripts/flatty/plugins/bootbox/bootbox.min.js +6 -0
  310. data/app/assets/javascripts/flatty/plugins/bootstrap_colorpicker/bootstrap-colorpicker.min.js +1 -0
  311. data/app/assets/javascripts/flatty/plugins/bootstrap_daterangepicker/bootstrap-daterangepicker.js +1026 -0
  312. data/app/assets/javascripts/flatty/plugins/bootstrap_daterangepicker/daterangepicker.js +1026 -0
  313. data/app/assets/javascripts/flatty/plugins/bootstrap_daterangepicker/moment.min.js +6 -0
  314. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/bootstrap-datepicker.js +1671 -0
  315. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/bootstrap-datetimepicker.js +26 -0
  316. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ar.js +15 -0
  317. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.az.js +12 -0
  318. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.bg.js +14 -0
  319. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ca.js +14 -0
  320. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.cs.js +15 -0
  321. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.cy.js +14 -0
  322. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.da.js +15 -0
  323. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.de.js +17 -0
  324. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.el.js +13 -0
  325. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.es.js +14 -0
  326. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.et.js +18 -0
  327. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.fa.js +17 -0
  328. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.fi.js +16 -0
  329. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.fr.js +17 -0
  330. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.gl.js +11 -0
  331. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.he.js +15 -0
  332. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.hr.js +13 -0
  333. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.hu.js +16 -0
  334. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.id.js +15 -0
  335. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.is.js +14 -0
  336. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.it.js +17 -0
  337. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ja.js +15 -0
  338. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ka.js +17 -0
  339. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.kk.js +15 -0
  340. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.kr.js +13 -0
  341. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.lt.js +16 -0
  342. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.lv.js +16 -0
  343. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.mk.js +15 -0
  344. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ms.js +14 -0
  345. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.nb.js +14 -0
  346. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.nl-BE.js +17 -0
  347. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.nl.js +14 -0
  348. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.no.js +16 -0
  349. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.pl.js +15 -0
  350. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.pt-BR.js +15 -0
  351. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.pt.js +16 -0
  352. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ro.js +16 -0
  353. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.rs-latin.js +14 -0
  354. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.rs.js +14 -0
  355. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ru.js +15 -0
  356. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.sk.js +15 -0
  357. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.sl.js +14 -0
  358. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.sq.js +15 -0
  359. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.sv.js +16 -0
  360. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.sw.js +15 -0
  361. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.th.js +14 -0
  362. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.tr.js +16 -0
  363. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.ua.js +15 -0
  364. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.vi.js +16 -0
  365. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.zh-CN.js +16 -0
  366. data/app/assets/javascripts/flatty/plugins/bootstrap_datetimepicker/locales/bootstrap-datepicker.zh-TW.js +17 -0
  367. data/app/assets/javascripts/flatty/plugins/bootstrap_hover_dropdown/twitter-bootstrap-hover-dropdown.min.js +13 -0
  368. data/app/assets/javascripts/flatty/plugins/bootstrap_maxlength/bootstrap-maxlength.min.js +13 -0
  369. data/app/assets/javascripts/flatty/plugins/bootstrap_switch/bootstrapSwitch.min.js +14 -0
  370. data/app/assets/javascripts/flatty/plugins/charCount/charCount.js +58 -0
  371. data/app/assets/javascripts/flatty/plugins/ckeditor/build-config.js +162 -0
  372. data/app/assets/javascripts/flatty/plugins/ckeditor/ckeditor.js +919 -0
  373. data/app/assets/javascripts/flatty/plugins/ckeditor/config.js +10 -0
  374. data/app/assets/javascripts/flatty/plugins/ckeditor/contents.css +103 -0
  375. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/af.js +5 -0
  376. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ar.js +5 -0
  377. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/bg.js +5 -0
  378. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/bn.js +5 -0
  379. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/bs.js +5 -0
  380. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ca.js +5 -0
  381. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/cs.js +5 -0
  382. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/cy.js +5 -0
  383. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/da.js +5 -0
  384. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/de.js +5 -0
  385. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/el.js +5 -0
  386. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/en-au.js +5 -0
  387. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/en-ca.js +5 -0
  388. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/en-gb.js +5 -0
  389. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/en.js +5 -0
  390. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/eo.js +5 -0
  391. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/es.js +5 -0
  392. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/et.js +5 -0
  393. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/eu.js +5 -0
  394. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/fa.js +5 -0
  395. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/fi.js +5 -0
  396. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/fo.js +5 -0
  397. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/fr-ca.js +5 -0
  398. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/fr.js +5 -0
  399. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/gl.js +5 -0
  400. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/gu.js +5 -0
  401. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/he.js +5 -0
  402. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/hi.js +5 -0
  403. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/hr.js +5 -0
  404. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/hu.js +5 -0
  405. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/is.js +5 -0
  406. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/it.js +5 -0
  407. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ja.js +5 -0
  408. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ka.js +5 -0
  409. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/km.js +5 -0
  410. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ko.js +5 -0
  411. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ku.js +5 -0
  412. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/lt.js +5 -0
  413. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/lv.js +5 -0
  414. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/mk.js +5 -0
  415. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/mn.js +5 -0
  416. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ms.js +5 -0
  417. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/nb.js +5 -0
  418. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/nl.js +5 -0
  419. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/no.js +5 -0
  420. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/pl.js +5 -0
  421. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/pt-br.js +5 -0
  422. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/pt.js +5 -0
  423. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ro.js +5 -0
  424. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ru.js +5 -0
  425. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sk.js +5 -0
  426. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sl.js +5 -0
  427. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sq.js +5 -0
  428. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sr-latn.js +5 -0
  429. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sr.js +5 -0
  430. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/sv.js +5 -0
  431. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/th.js +5 -0
  432. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/tr.js +5 -0
  433. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/ug.js +5 -0
  434. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/uk.js +5 -0
  435. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/vi.js +5 -0
  436. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/zh-cn.js +5 -0
  437. data/app/assets/javascripts/flatty/plugins/ckeditor/lang/zh.js +5 -0
  438. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  439. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  440. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  441. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  442. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +10 -0
  443. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  444. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  445. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  446. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  447. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  448. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  449. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  450. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  451. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  452. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  453. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  454. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +10 -0
  455. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +10 -0
  456. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  457. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  458. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  459. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  460. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +9 -0
  461. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  462. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  463. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +9 -0
  464. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  465. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  466. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +11 -0
  467. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  468. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  469. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  470. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  471. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  472. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -0
  473. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  474. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +9 -0
  475. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  476. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  477. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  478. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -0
  479. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +9 -0
  480. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  481. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +9 -0
  482. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  483. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  484. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +9 -0
  485. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  486. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  487. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/about/dialogs/about.js +6 -0
  488. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  489. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  490. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/colordialog/dialogs/colordialog.js +13 -0
  491. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  492. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/div/dialogs/div.js +9 -0
  493. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  494. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/find/dialogs/find.js +24 -0
  495. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/flash/dialogs/flash.js +24 -0
  496. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/flash/images/placeholder.png +0 -0
  497. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/button.js +8 -0
  498. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/checkbox.js +8 -0
  499. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/form.js +8 -0
  500. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/hiddenfield.js +8 -0
  501. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/radio.js +8 -0
  502. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/select.js +20 -0
  503. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
  504. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/dialogs/textfield.js +10 -0
  505. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  506. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/icons.png +0 -0
  507. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  508. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  509. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/image/dialogs/image.js +43 -0
  510. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/image/images/noimage.png +0 -0
  511. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  512. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/link/dialogs/link.js +36 -0
  513. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/link/images/anchor.png +0 -0
  514. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  515. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/magicline/images/icon.png +0 -0
  516. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  517. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  518. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/preview/preview.html +10 -0
  519. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  520. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  521. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  522. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  523. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  524. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  525. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  526. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  527. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  528. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  529. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  530. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  531. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  532. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/dialogs/smiley.js +10 -0
  533. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  534. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  535. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  536. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  537. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  538. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  539. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  540. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  541. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  542. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/heart.gif +0 -0
  543. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  544. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  545. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  546. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  547. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  548. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  549. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  550. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  551. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  552. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  553. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  554. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  555. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  556. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  557. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  558. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  559. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  560. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  561. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  562. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  563. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  564. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  565. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  566. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  567. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  568. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  569. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  570. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/he.js +13 -0
  571. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  572. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  573. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  574. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  575. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  576. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  577. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  578. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  579. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  580. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  581. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  582. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  583. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  584. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  585. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  586. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  587. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  588. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/table/dialogs/table.js +21 -0
  589. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  590. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  591. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  592. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/templates/default.js +6 -0
  593. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  594. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  595. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  596. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  597. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  598. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  599. data/app/assets/javascripts/flatty/plugins/ckeditor/plugins/wsc/dialogs/wsc.js +11 -0
  600. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/ajax.html +82 -0
  601. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/api.html +207 -0
  602. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/appendto.html +57 -0
  603. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/inlineall/logo.png +0 -0
  604. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  605. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/posteddata.php +59 -0
  606. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/sample.css +3 -0
  607. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/sample.jpg +0 -0
  608. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  609. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/datafiltering.html +401 -0
  610. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/divreplace.html +141 -0
  611. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/index.html +122 -0
  612. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/inlineall.html +311 -0
  613. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/inlinebycode.html +122 -0
  614. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  615. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  616. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  617. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  618. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  619. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  620. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  621. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
  622. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/magicline/magicline.html +207 -0
  623. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
  624. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
  625. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/readonly.html +73 -0
  626. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/replacebyclass.html +57 -0
  627. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/replacebycode.html +56 -0
  628. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.css +339 -0
  629. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js +33 -0
  630. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/sample_posteddata.php +16 -0
  631. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/tabindex.html +75 -0
  632. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/uicolor.html +69 -0
  633. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/uilanguages.html +119 -0
  634. data/app/assets/javascripts/flatty/plugins/ckeditor/samples/xhtmlstyle.html +231 -0
  635. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog.css +5 -0
  636. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog_ie.css +5 -0
  637. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog_ie7.css +5 -0
  638. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog_ie8.css +5 -0
  639. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  640. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/dialog_opera.css +5 -0
  641. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor.css +5 -0
  642. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor_gecko.css +5 -0
  643. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor_ie.css +5 -0
  644. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor_ie7.css +5 -0
  645. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor_ie8.css +5 -0
  646. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/editor_iequirks.css +5 -0
  647. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/icons.png +0 -0
  648. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/images/arrow.png +0 -0
  649. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/images/close.png +0 -0
  650. data/app/assets/javascripts/flatty/plugins/ckeditor/skins/moono/images/mini.png +0 -0
  651. data/app/assets/javascripts/flatty/plugins/ckeditor/styles.js +111 -0
  652. data/app/assets/javascripts/flatty/plugins/common/bootstrap-wysihtml5.js +498 -0
  653. data/app/assets/javascripts/flatty/plugins/common/moment.min.js +6 -0
  654. data/app/assets/javascripts/flatty/plugins/common/wysihtml5.min.js +261 -0
  655. data/app/assets/javascripts/flatty/plugins/datatables/dataTables.overrides.js +131 -0
  656. data/app/assets/javascripts/flatty/plugins/datatables/jquery.dataTables.columnFilter.js +365 -0
  657. data/app/assets/javascripts/flatty/plugins/datatables/jquery.dataTables.min.js +155 -0
  658. data/app/assets/javascripts/flatty/plugins/dynatree/jquery.dynatree.min.js +4 -0
  659. data/app/assets/javascripts/flatty/plugins/fileinput/bootstrap-fileinput.js +122 -0
  660. data/app/assets/javascripts/flatty/plugins/fileupload/canvas-to-blob.min.js +1 -0
  661. data/app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-fp.min.js +1 -0
  662. data/app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-init.js +48 -0
  663. data/app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload-ui.min.js +1 -0
  664. data/app/assets/javascripts/flatty/plugins/fileupload/jquery.fileupload.min.js +1 -0
  665. data/app/assets/javascripts/flatty/plugins/fileupload/jquery.iframe-transport.min.js +1 -0
  666. data/app/assets/javascripts/flatty/plugins/fileupload/load-image.min.js +1 -0
  667. data/app/assets/javascripts/flatty/plugins/fileupload/tmpl.min.js +1 -0
  668. data/app/assets/javascripts/flatty/plugins/flot/excanvas.js +1 -0
  669. data/app/assets/javascripts/flatty/plugins/flot/flot.crosshair.js +167 -0
  670. data/app/assets/javascripts/flatty/plugins/flot/flot.fillbetween.js +183 -0
  671. data/app/assets/javascripts/flatty/plugins/flot/flot.image.js +238 -0
  672. data/app/assets/javascripts/flatty/plugins/flot/flot.min.js +33 -0
  673. data/app/assets/javascripts/flatty/plugins/flot/flot.navigate.js +33 -0
  674. data/app/assets/javascripts/flatty/plugins/flot/flot.pie.js +750 -0
  675. data/app/assets/javascripts/flatty/plugins/flot/flot.resize.js +60 -0
  676. data/app/assets/javascripts/flatty/plugins/flot/flot.selection.js +344 -0
  677. data/app/assets/javascripts/flatty/plugins/flot/flot.stack.js +184 -0
  678. data/app/assets/javascripts/flatty/plugins/flot/flot.symbol.js +70 -0
  679. data/app/assets/javascripts/flatty/plugins/flot/flot.threshold.js +103 -0
  680. data/app/assets/javascripts/flatty/plugins/fuelux/wizard.js +165 -0
  681. data/app/assets/javascripts/flatty/plugins/fullcalendar/fullcalendar.min.js +7 -0
  682. data/app/assets/javascripts/flatty/plugins/input_mask/bootstrap-inputmask.min.js +7 -0
  683. data/app/assets/javascripts/flatty/plugins/ion_range_slider/ion.rangeSlider.js +1966 -0
  684. data/app/assets/javascripts/flatty/plugins/ion_range_slider/ion.rangeSlider.min.js +69 -0
  685. data/app/assets/javascripts/flatty/plugins/jgrowl/jquery.jgrowl.min.js +1 -0
  686. data/app/assets/javascripts/flatty/plugins/jquery_ui_touch_punch/jquery.ui.touch-punch.min.js +11 -0
  687. data/app/assets/javascripts/flatty/plugins/lightbox/lightbox.min.js +1 -0
  688. data/app/assets/javascripts/flatty/plugins/mention/mention.min.js +166 -0
  689. data/app/assets/javascripts/flatty/plugins/modernizr/modernizr.min.js +4 -0
  690. data/app/assets/javascripts/flatty/plugins/naked_password/naked_password-0.2.4.min.js +9 -0
  691. data/app/assets/javascripts/flatty/plugins/nestable/jquery.nestable.js +485 -0
  692. data/app/assets/javascripts/flatty/plugins/plugins.js +50 -0
  693. data/app/assets/javascripts/flatty/plugins/pwstrength/pwstrength.js +320 -0
  694. data/app/assets/javascripts/flatty/plugins/retina/retina.js +3 -0
  695. data/app/assets/javascripts/flatty/plugins/select2/select2.js +22 -0
  696. data/app/assets/javascripts/flatty/plugins/slider_nav/slidernav-min.js +7 -0
  697. data/app/assets/javascripts/flatty/plugins/slimscroll/jquery.slimscroll.min.js +16 -0
  698. data/app/assets/javascripts/flatty/plugins/sparklines/jquery.sparkline.min.js +5 -0
  699. data/app/assets/javascripts/flatty/plugins/tabdrop/bootstrap-tabdrop.js +117 -0
  700. data/app/assets/javascripts/flatty/plugins/timeago/jquery.timeago.js +193 -0
  701. data/app/assets/javascripts/flatty/plugins/typeahead/typeahead.js +335 -0
  702. data/app/assets/javascripts/flatty/plugins/validate/additional-methods.js +617 -0
  703. data/app/assets/javascripts/flatty/plugins/validate/additional-methods.min.js +2 -0
  704. data/app/assets/javascripts/flatty/plugins/validate/jquery.validate.js +1231 -0
  705. data/app/assets/javascripts/flatty/plugins/validate/jquery.validate.min.js +2 -0
  706. data/app/assets/javascripts/flatty/plugins/validate/messages_fr.js +47 -0
  707. data/app/assets/javascripts/flatty/theme.js.coffee +314 -0
  708. data/app/assets/stylesheets/_timeline.scss +87 -0
  709. data/app/assets/stylesheets/application.scss +7 -0
  710. data/app/assets/stylesheets/application2.scss +1675 -0
  711. data/app/assets/stylesheets/bootstrap-generators.scss +22 -0
  712. data/app/assets/stylesheets/bootstrap-variables.scss +839 -0
  713. data/app/assets/stylesheets/cg_app_base/application.css +15 -0
  714. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_alerts.scss +73 -0
  715. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_badges.scss +51 -0
  716. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_bootstrap.scss +59 -0
  717. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_breadcrumbs.scss +23 -0
  718. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_button-groups.scss +250 -0
  719. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_buttons.scss +165 -0
  720. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_carousel.scss +209 -0
  721. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_close.scss +35 -0
  722. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_code.scss +56 -0
  723. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_component-animations.scss +29 -0
  724. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_dropdowns.scss +194 -0
  725. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_forms.scss +352 -0
  726. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_glyphicons.scss +232 -0
  727. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_grid.scss +296 -0
  728. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_input-groups.scss +127 -0
  729. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_jumbotron.scss +40 -0
  730. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_labels.scss +70 -0
  731. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_list-group.scss +90 -0
  732. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_media.scss +56 -0
  733. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_mixins.scss +730 -0
  734. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_modals.scss +146 -0
  735. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_navbar.scss +625 -0
  736. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_navs.scss +229 -0
  737. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_normalize.scss +396 -0
  738. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_pager.scss +55 -0
  739. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_pagination.scss +83 -0
  740. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_panels.scss +148 -0
  741. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_popovers.scss +133 -0
  742. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_print.scss +100 -0
  743. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_progress-bars.scss +95 -0
  744. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_responsive-utilities.scss +209 -0
  745. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_scaffolding.scss +130 -0
  746. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_tables.scss +236 -0
  747. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_theme.scss +234 -0
  748. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_thumbnails.scss +31 -0
  749. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_tooltip.scss +95 -0
  750. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_type.scss +238 -0
  751. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_utilities.scss +42 -0
  752. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_variables.scss +627 -0
  753. data/app/assets/stylesheets/flatty/bootstrap/bootstrap/_wells.scss +29 -0
  754. data/app/assets/stylesheets/flatty/bootstrap/bootstrap.scss +1 -0
  755. data/app/assets/stylesheets/flatty/dark-blue-theme.scss +142 -0
  756. data/app/assets/stylesheets/flatty/dark-theme.scss +142 -0
  757. data/app/assets/stylesheets/flatty/demo.scss +16 -0
  758. data/app/assets/stylesheets/flatty/jquery/jquery.ui.datepicker.scss +179 -0
  759. data/app/assets/stylesheets/flatty/jquery/jquery.ui.theme.scss +408 -0
  760. data/app/assets/stylesheets/flatty/jquery/jquery_ui.scss +6 -0
  761. data/app/assets/stylesheets/flatty/light-theme.scss +142 -0
  762. data/app/assets/stylesheets/flatty/plugins/_plugins.scss +19 -0
  763. data/app/assets/stylesheets/flatty/plugins/bootstrap_colorpicker/bootstrap-colorpicker.scss +7 -0
  764. data/app/assets/stylesheets/flatty/plugins/bootstrap_daterangepicker/bootstrap-daterangepicker.scss +267 -0
  765. data/app/assets/stylesheets/flatty/plugins/bootstrap_datetimepicker/bootstrap-datetimepicker.min.scss +249 -0
  766. data/app/assets/stylesheets/flatty/plugins/bootstrap_datetimepicker/datepicker3.scss +790 -0
  767. data/app/assets/stylesheets/flatty/plugins/bootstrap_switch/bootstrap-switch.scss +287 -0
  768. data/app/assets/stylesheets/flatty/plugins/common/bootstrap-wysihtml5.scss +102 -0
  769. data/app/assets/stylesheets/flatty/plugins/datatables/bootstrap-datatable.scss +152 -0
  770. data/app/assets/stylesheets/flatty/plugins/dynatree/ui.dynatree.scss +452 -0
  771. data/app/assets/stylesheets/flatty/plugins/flags/flags.scss +258 -0
  772. data/app/assets/stylesheets/flatty/plugins/fuelux/wizard.scss +164 -0
  773. data/app/assets/stylesheets/flatty/plugins/fullcalendar/fullcalendar.scss +564 -0
  774. data/app/assets/stylesheets/flatty/plugins/ion_range_slider/ion.rangeSlider.css +146 -0
  775. data/app/assets/stylesheets/flatty/plugins/ion_range_slider/ion.range_slider.skin_flat.css +107 -0
  776. data/app/assets/stylesheets/flatty/plugins/jgrowl/jquery.jgrowl.min.scss +136 -0
  777. data/app/assets/stylesheets/flatty/plugins/jquery_fileupload/jquery.fileupload-ui.scss +84 -0
  778. data/app/assets/stylesheets/flatty/plugins/lightbox/lightbox.scss +170 -0
  779. data/app/assets/stylesheets/flatty/plugins/mention/mention.scss +19 -0
  780. data/app/assets/stylesheets/flatty/plugins/select2/select2.scss +614 -0
  781. data/app/assets/stylesheets/flatty/plugins/slider_nav/slidernav.scss +26 -0
  782. data/app/assets/stylesheets/flatty/plugins/tabdrop/tabdrop.scss +12 -0
  783. data/app/assets/stylesheets/flatty/theme/_accordions.scss +39 -0
  784. data/app/assets/stylesheets/flatty/theme/_boxes-quick-links.scss +63 -0
  785. data/app/assets/stylesheets/flatty/theme/_boxes-statistics.scss +59 -0
  786. data/app/assets/stylesheets/flatty/theme/_boxes.scss +193 -0
  787. data/app/assets/stylesheets/flatty/theme/_calendar.scss +62 -0
  788. data/app/assets/stylesheets/flatty/theme/_chat.scss +114 -0
  789. data/app/assets/stylesheets/flatty/theme/_common.scss +55 -0
  790. data/app/assets/stylesheets/flatty/theme/_content.scss +117 -0
  791. data/app/assets/stylesheets/flatty/theme/_font-awesome.scss +1479 -0
  792. data/app/assets/stylesheets/flatty/theme/_forms.scss +144 -0
  793. data/app/assets/stylesheets/flatty/theme/_header.scss +336 -0
  794. data/app/assets/stylesheets/flatty/theme/_navigation.scss +484 -0
  795. data/app/assets/stylesheets/flatty/theme/_nestable-list.scss +99 -0
  796. data/app/assets/stylesheets/flatty/theme/_overrides-bootstrap.scss +86 -0
  797. data/app/assets/stylesheets/flatty/theme/_overrides-plugins.scss +223 -0
  798. data/app/assets/stylesheets/flatty/theme/_recent-activity.scss +124 -0
  799. data/app/assets/stylesheets/flatty/theme/_tables.scss +130 -0
  800. data/app/assets/stylesheets/flatty/theme/_tabs.scss +221 -0
  801. data/app/assets/stylesheets/flatty/theme/_tasks.scss +12 -0
  802. data/app/assets/stylesheets/flatty/theme/_todo-list.scss +152 -0
  803. data/app/assets/stylesheets/flatty/theme/_type.scss +170 -0
  804. data/app/assets/stylesheets/flatty/theme/_utilities.scss +122 -0
  805. data/app/assets/stylesheets/flatty/theme/_variables.scss +140 -0
  806. data/app/assets/stylesheets/flatty/theme/_wizard.scss +62 -0
  807. data/app/assets/stylesheets/flatty/theme/common/_buttons.scss +258 -0
  808. data/app/assets/stylesheets/flatty/theme/common/_dropdowns.scss +7 -0
  809. data/app/assets/stylesheets/flatty/theme/common/_elements.scss +17 -0
  810. data/app/assets/stylesheets/flatty/theme/common/_modals.scss +3 -0
  811. data/app/assets/stylesheets/flatty/theme/common/_paginations.scss +5 -0
  812. data/app/assets/stylesheets/flatty/theme/common/_progress.scss +55 -0
  813. data/app/assets/stylesheets/flatty/theme/pages/_errors.scss +84 -0
  814. data/app/assets/stylesheets/flatty/theme/pages/_faq.scss +25 -0
  815. data/app/assets/stylesheets/flatty/theme/pages/_gallery.scss +64 -0
  816. data/app/assets/stylesheets/flatty/theme/pages/_invoice.scss +77 -0
  817. data/app/assets/stylesheets/flatty/theme/pages/_login.scss +81 -0
  818. data/app/assets/stylesheets/flatty/theme/pages/_orders.scss +45 -0
  819. data/app/assets/stylesheets/flatty/theme/pages/_pricing_tables.scss +65 -0
  820. data/app/assets/stylesheets/flatty/theme/pages/_timeline.scss +87 -0
  821. data/app/assets/stylesheets/flatty/theme-colors.scss +329 -0
  822. data/app/assets/stylesheets/scaffolds.css.scss +69 -0
  823. data/app/assets/stylesheets/vehicles.css.scss +3 -0
  824. data/app/controllers/cg_app_base/application_controller.rb +13 -0
  825. data/app/controllers/cg_app_base/redirect_tool_controller.rb +10 -0
  826. data/app/controllers/concerns/cg_app_base/ip_authorization_concern.rb +19 -0
  827. data/app/helpers/cg_app_base/application_helper.rb +23 -0
  828. data/app/models/ability.rb +41 -0
  829. data/app/models/cg_app_base/address.rb +54 -0
  830. data/app/models/cg_app_base/contact.rb +33 -0
  831. data/app/models/cg_app_base/phone.rb +36 -0
  832. data/app/models/concerns/attributes_normalizer.rb +19 -0
  833. data/app/navigation_renderers/cg_navigation_renderer.rb +57 -0
  834. data/app/views/cg_app_base/redirect_tool/index.html.erb +86 -0
  835. data/app/views/layouts/application.html.erb +116 -0
  836. data/app/views/shared/_flash_message.html.erb +14 -0
  837. data/app/views/shared/_main_navigation.html.erb +17 -0
  838. data/app/views/shared/_navigation.html.erb +21 -0
  839. data/app/views/shared/_navigation_embedded.html.erb +10 -0
  840. data/config/cucumber.yml +8 -0
  841. data/config/initializers/simple_form.rb +145 -0
  842. data/config/initializers/simple_form_bootstrap.rb +86 -0
  843. data/config/initializers/simple_navigation.rb +2 -0
  844. data/config/navigation.rb +117 -0
  845. data/config/routes.rb +2 -0
  846. data/lib/cg_app_base/engine.rb +13 -0
  847. data/lib/cg_app_base/version.rb +3 -0
  848. data/lib/cg_app_base.rb +11 -0
  849. data/lib/controllers/concerns/layout_concern.rb +16 -0
  850. data/lib/tasks/cg_app_base_tasks.rake +4 -0
  851. data/lib/tasks/cucumber.rake +65 -0
  852. metadata +1104 -0
@@ -0,0 +1,1966 @@
1
+ // Ion.RangeSlider
2
+ // version 2.0.10 Build: 323
3
+ // © Denis Ineshin, 2015
4
+ // https://github.com/IonDen
5
+ //
6
+ // Project page: http://ionden.com/a/plugins/ion.rangeSlider/en.html
7
+ // GitHub page: https://github.com/IonDen/ion.rangeSlider
8
+ //
9
+ // Released under MIT licence:
10
+ // http://ionden.com/a/plugins/licence-en.html
11
+ // =====================================================================================================================
12
+
13
+ ;(function ($, document, window, navigator, undefined) {
14
+ "use strict";
15
+
16
+ // =================================================================================================================
17
+ // Service
18
+
19
+ var plugin_count = 0;
20
+
21
+ // IE8 fix
22
+ var is_old_ie = (function () {
23
+ var n = navigator.userAgent,
24
+ r = /msie\s\d+/i,
25
+ v;
26
+ if (n.search(r) > 0) {
27
+ v = r.exec(n).toString();
28
+ v = v.split(" ")[1];
29
+ if (v < 9) {
30
+ $("html").addClass("lt-ie9");
31
+ return true;
32
+ }
33
+ }
34
+ return false;
35
+ } ());
36
+ if (!Function.prototype.bind) {
37
+ Function.prototype.bind = function bind(that) {
38
+
39
+ var target = this;
40
+ var slice = [].slice;
41
+
42
+ if (typeof target != "function") {
43
+ throw new TypeError();
44
+ }
45
+
46
+ var args = slice.call(arguments, 1),
47
+ bound = function () {
48
+
49
+ if (this instanceof bound) {
50
+
51
+ var F = function(){};
52
+ F.prototype = target.prototype;
53
+ var self = new F();
54
+
55
+ var result = target.apply(
56
+ self,
57
+ args.concat(slice.call(arguments))
58
+ );
59
+ if (Object(result) === result) {
60
+ return result;
61
+ }
62
+ return self;
63
+
64
+ } else {
65
+
66
+ return target.apply(
67
+ that,
68
+ args.concat(slice.call(arguments))
69
+ );
70
+
71
+ }
72
+
73
+ };
74
+
75
+ return bound;
76
+ };
77
+ }
78
+ if (!Array.prototype.indexOf) {
79
+ Array.prototype.indexOf = function(searchElement, fromIndex) {
80
+ var k;
81
+ if (this == null) {
82
+ throw new TypeError('"this" is null or not defined');
83
+ }
84
+ var O = Object(this);
85
+ var len = O.length >>> 0;
86
+ if (len === 0) {
87
+ return -1;
88
+ }
89
+ var n = +fromIndex || 0;
90
+ if (Math.abs(n) === Infinity) {
91
+ n = 0;
92
+ }
93
+ if (n >= len) {
94
+ return -1;
95
+ }
96
+ k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
97
+ while (k < len) {
98
+ if (k in O && O[k] === searchElement) {
99
+ return k;
100
+ }
101
+ k++;
102
+ }
103
+ return -1;
104
+ };
105
+ }
106
+
107
+
108
+
109
+ // =================================================================================================================
110
+ // Template
111
+
112
+ var base_html =
113
+ '<span class="irs">' +
114
+ '<span class="irs-line" tabindex="-1"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span>' +
115
+ '<span class="irs-min">0</span><span class="irs-max">1</span>' +
116
+ '<span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span>' +
117
+ '</span>' +
118
+ '<span class="irs-grid"></span>' +
119
+ '<span class="irs-bar"></span>';
120
+
121
+ var single_html =
122
+ '<span class="irs-bar-edge"></span>' +
123
+ '<span class="irs-shadow shadow-single"></span>' +
124
+ '<span class="irs-slider single"></span>';
125
+
126
+ var double_html =
127
+ '<span class="irs-shadow shadow-from"></span>' +
128
+ '<span class="irs-shadow shadow-to"></span>' +
129
+ '<span class="irs-slider from"></span>' +
130
+ '<span class="irs-slider to"></span>';
131
+
132
+ var disable_html =
133
+ '<span class="irs-disable-mask"></span>';
134
+
135
+
136
+
137
+ // =================================================================================================================
138
+ // Core
139
+
140
+ var IonRangeSlider = function (input, options, plugin_count) {
141
+ this.VERSION = "2.0.10";
142
+ this.input = input;
143
+ this.plugin_count = plugin_count;
144
+ this.current_plugin = 0;
145
+ this.calc_count = 0;
146
+ this.update_tm = 0;
147
+ this.old_from = 0;
148
+ this.old_to = 0;
149
+ this.raf_id = null;
150
+ this.dragging = false;
151
+ this.force_redraw = false;
152
+ this.is_key = false;
153
+ this.is_update = false;
154
+ this.is_start = true;
155
+ this.is_active = false;
156
+ this.is_resize = false;
157
+ this.is_click = false;
158
+
159
+ this.$cache = {
160
+ win: $(window),
161
+ body: $(document.body),
162
+ input: $(input),
163
+ cont: null,
164
+ rs: null,
165
+ min: null,
166
+ max: null,
167
+ from: null,
168
+ to: null,
169
+ single: null,
170
+ bar: null,
171
+ line: null,
172
+ s_single: null,
173
+ s_from: null,
174
+ s_to: null,
175
+ shad_single: null,
176
+ shad_from: null,
177
+ shad_to: null,
178
+ grid: null,
179
+ grid_labels: []
180
+ };
181
+
182
+ // get config data attributes
183
+ var $inp = this.$cache.input;
184
+ var data = {
185
+ type: $inp.data("type"),
186
+
187
+ min: $inp.data("min"),
188
+ max: $inp.data("max"),
189
+ from: $inp.data("from"),
190
+ to: $inp.data("to"),
191
+ step: $inp.data("step"),
192
+
193
+ min_interval: $inp.data("minInterval"),
194
+ max_interval: $inp.data("maxInterval"),
195
+ drag_interval: $inp.data("dragInterval"),
196
+
197
+ values: $inp.data("values"),
198
+
199
+ from_fixed: $inp.data("fromFixed"),
200
+ from_min: $inp.data("fromMin"),
201
+ from_max: $inp.data("fromMax"),
202
+ from_shadow: $inp.data("fromShadow"),
203
+
204
+ to_fixed: $inp.data("toFixed"),
205
+ to_min: $inp.data("toMin"),
206
+ to_max: $inp.data("toMax"),
207
+ to_shadow: $inp.data("toShadow"),
208
+
209
+ prettify_enabled: $inp.data("prettifyEnabled"),
210
+ prettify_separator: $inp.data("prettifySeparator"),
211
+
212
+ force_edges: $inp.data("forceEdges"),
213
+
214
+ keyboard: $inp.data("keyboard"),
215
+ keyboard_step: $inp.data("keyboardStep"),
216
+
217
+ grid: $inp.data("grid"),
218
+ grid_margin: $inp.data("gridMargin"),
219
+ grid_num: $inp.data("gridNum"),
220
+ grid_snap: $inp.data("gridSnap"),
221
+
222
+ hide_min_max: $inp.data("hideMinMax"),
223
+ hide_from_to: $inp.data("hideFromTo"),
224
+
225
+ prefix: $inp.data("prefix"),
226
+ postfix: $inp.data("postfix"),
227
+ max_postfix: $inp.data("maxPostfix"),
228
+ decorate_both: $inp.data("decorateBoth"),
229
+ values_separator: $inp.data("valuesSeparator"),
230
+
231
+ disable: $inp.data("disable")
232
+ };
233
+ data.values = data.values && data.values.split(",");
234
+
235
+ // get from and to out of input
236
+ var val = $inp.prop("value");
237
+ if (val) {
238
+ val = val.split(";");
239
+
240
+ if (val[0] && val[0] == +val[0]) {
241
+ val[0] = +val[0];
242
+ }
243
+ if (val[1] && val[1] == +val[1]) {
244
+ val[1] = +val[1];
245
+ }
246
+
247
+ if (options && options.values && options.values.length) {
248
+ data.from = val[0] && options.values.indexOf(val[0]);
249
+ data.to = val[1] && options.values.indexOf(val[1]);
250
+ } else {
251
+ data.from = val[0] && +val[0];
252
+ data.to = val[1] && +val[1];
253
+ }
254
+ }
255
+
256
+ // JS config has a priority
257
+ options = $.extend(data, options);
258
+
259
+ // get config from options
260
+ this.options = $.extend({
261
+ type: "single",
262
+
263
+ min: 10,
264
+ max: 100,
265
+ from: null,
266
+ to: null,
267
+ step: 1,
268
+
269
+ min_interval: 0,
270
+ max_interval: 0,
271
+ drag_interval: false,
272
+
273
+ values: [],
274
+ p_values: [],
275
+
276
+ from_fixed: false,
277
+ from_min: null,
278
+ from_max: null,
279
+ from_shadow: false,
280
+
281
+ to_fixed: false,
282
+ to_min: null,
283
+ to_max: null,
284
+ to_shadow: false,
285
+
286
+ prettify_enabled: true,
287
+ prettify_separator: " ",
288
+ prettify: null,
289
+
290
+ force_edges: false,
291
+
292
+ keyboard: false,
293
+ keyboard_step: 5,
294
+
295
+ grid: false,
296
+ grid_margin: true,
297
+ grid_num: 4,
298
+ grid_snap: false,
299
+
300
+ hide_min_max: false,
301
+ hide_from_to: false,
302
+
303
+ prefix: "",
304
+ postfix: "",
305
+ max_postfix: "",
306
+ decorate_both: true,
307
+ values_separator: " — ",
308
+
309
+ disable: false,
310
+
311
+ onStart: null,
312
+ onChange: null,
313
+ onFinish: null,
314
+ onUpdate: null
315
+ }, options);
316
+
317
+ this.validate();
318
+
319
+ this.result = {
320
+ input: this.$cache.input,
321
+ slider: null,
322
+
323
+ min: this.options.min,
324
+ max: this.options.max,
325
+
326
+ from: this.options.from,
327
+ from_percent: 0,
328
+ from_value: null,
329
+
330
+ to: this.options.to,
331
+ to_percent: 0,
332
+ to_value: null
333
+ };
334
+
335
+ this.coords = {
336
+ // left
337
+ x_gap: 0,
338
+ x_pointer: 0,
339
+
340
+ // width
341
+ w_rs: 0,
342
+ w_rs_old: 0,
343
+ w_handle: 0,
344
+
345
+ // percents
346
+ p_gap: 0,
347
+ p_gap_left: 0,
348
+ p_gap_right: 0,
349
+ p_step: 0,
350
+ p_pointer: 0,
351
+ p_handle: 0,
352
+ p_single: 0,
353
+ p_single_real: 0,
354
+ p_from: 0,
355
+ p_from_real: 0,
356
+ p_to: 0,
357
+ p_to_real: 0,
358
+ p_bar_x: 0,
359
+ p_bar_w: 0,
360
+
361
+ // grid
362
+ grid_gap: 0,
363
+ big_num: 0,
364
+ big: [],
365
+ big_w: [],
366
+ big_p: [],
367
+ big_x: []
368
+ };
369
+
370
+ this.labels = {
371
+ // width
372
+ w_min: 0,
373
+ w_max: 0,
374
+ w_from: 0,
375
+ w_to: 0,
376
+ w_single: 0,
377
+
378
+ // percents
379
+ p_min: 0,
380
+ p_max: 0,
381
+ p_from: 0,
382
+ p_from_left: 0,
383
+ p_to: 0,
384
+ p_to_left: 0,
385
+ p_single: 0,
386
+ p_single_left: 0
387
+ };
388
+
389
+ this.init();
390
+ };
391
+
392
+ IonRangeSlider.prototype = {
393
+ init: function (is_update) {
394
+ this.coords.p_step = this.options.step / ((this.options.max - this.options.min) / 100);
395
+ this.target = "base";
396
+
397
+ this.toggleInput();
398
+ this.append();
399
+ this.setMinMax();
400
+
401
+ if (is_update) {
402
+ this.force_redraw = true;
403
+ this.calc(true);
404
+
405
+ if (this.options.onUpdate && typeof this.options.onUpdate === "function") {
406
+ this.options.onUpdate(this.result);
407
+ }
408
+ } else {
409
+ this.force_redraw = true;
410
+ this.calc(true);
411
+
412
+ if (this.options.onStart && typeof this.options.onStart === "function") {
413
+ this.options.onStart(this.result);
414
+ }
415
+ }
416
+
417
+ this.updateScene();
418
+ },
419
+
420
+ append: function () {
421
+ var container_html = '<span class="irs js-irs-' + this.plugin_count + '"></span>';
422
+ this.$cache.input.before(container_html);
423
+ this.$cache.input.prop("readonly", true);
424
+ this.$cache.cont = this.$cache.input.prev();
425
+ this.result.slider = this.$cache.cont;
426
+
427
+ this.$cache.cont.html(base_html);
428
+ this.$cache.rs = this.$cache.cont.find(".irs");
429
+ this.$cache.min = this.$cache.cont.find(".irs-min");
430
+ this.$cache.max = this.$cache.cont.find(".irs-max");
431
+ this.$cache.from = this.$cache.cont.find(".irs-from");
432
+ this.$cache.to = this.$cache.cont.find(".irs-to");
433
+ this.$cache.single = this.$cache.cont.find(".irs-single");
434
+ this.$cache.bar = this.$cache.cont.find(".irs-bar");
435
+ this.$cache.line = this.$cache.cont.find(".irs-line");
436
+ this.$cache.grid = this.$cache.cont.find(".irs-grid");
437
+
438
+ if (this.options.type === "single") {
439
+ this.$cache.cont.append(single_html);
440
+ this.$cache.s_single = this.$cache.cont.find(".single");
441
+ this.$cache.from[0].style.visibility = "hidden";
442
+ this.$cache.to[0].style.visibility = "hidden";
443
+ this.$cache.shad_single = this.$cache.cont.find(".shadow-single");
444
+ } else {
445
+ this.$cache.cont.append(double_html);
446
+ this.$cache.s_from = this.$cache.cont.find(".from");
447
+ this.$cache.s_to = this.$cache.cont.find(".to");
448
+ this.$cache.shad_from = this.$cache.cont.find(".shadow-from");
449
+ this.$cache.shad_to = this.$cache.cont.find(".shadow-to");
450
+
451
+ this.setTopHandler();
452
+ }
453
+
454
+ if (this.options.hide_from_to) {
455
+ this.$cache.from[0].style.display = "none";
456
+ this.$cache.to[0].style.display = "none";
457
+ this.$cache.single[0].style.display = "none";
458
+ }
459
+
460
+ this.appendGrid();
461
+
462
+ if (this.options.disable) {
463
+ this.appendDisableMask();
464
+ this.$cache.input[0].disabled = true;
465
+ } else {
466
+ this.$cache.cont.removeClass("irs-disabled");
467
+ this.$cache.input[0].disabled = false;
468
+ this.bindEvents();
469
+ }
470
+ },
471
+
472
+ setTopHandler: function () {
473
+ var min = this.options.min,
474
+ max = this.options.max,
475
+ from = this.options.from,
476
+ to = this.options.to;
477
+
478
+ if (from > min && to === max) {
479
+ this.$cache.s_from.addClass("type_last");
480
+ } else if (to < max) {
481
+ this.$cache.s_to.addClass("type_last");
482
+ }
483
+ },
484
+
485
+ appendDisableMask: function () {
486
+ this.$cache.cont.append(disable_html);
487
+ this.$cache.cont.addClass("irs-disabled");
488
+ },
489
+
490
+ remove: function () {
491
+ this.$cache.cont.remove();
492
+ this.$cache.cont = null;
493
+
494
+ this.$cache.line.off("keydown.irs_" + this.plugin_count);
495
+
496
+ this.$cache.body.off("touchmove.irs_" + this.plugin_count);
497
+ this.$cache.body.off("mousemove.irs_" + this.plugin_count);
498
+
499
+ this.$cache.win.off("touchend.irs_" + this.plugin_count);
500
+ this.$cache.win.off("mouseup.irs_" + this.plugin_count);
501
+
502
+ if (is_old_ie) {
503
+ this.$cache.body.off("mouseup.irs_" + this.plugin_count);
504
+ this.$cache.body.off("mouseleave.irs_" + this.plugin_count);
505
+ }
506
+
507
+ this.$cache.grid_labels = [];
508
+ this.coords.big = [];
509
+ this.coords.big_w = [];
510
+ this.coords.big_p = [];
511
+ this.coords.big_x = [];
512
+
513
+ cancelAnimationFrame(this.raf_id);
514
+ },
515
+
516
+ bindEvents: function () {
517
+ this.$cache.body.on("touchmove.irs_" + this.plugin_count, this.pointerMove.bind(this));
518
+ this.$cache.body.on("mousemove.irs_" + this.plugin_count, this.pointerMove.bind(this));
519
+
520
+ this.$cache.win.on("touchend.irs_" + this.plugin_count, this.pointerUp.bind(this));
521
+ this.$cache.win.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this));
522
+
523
+ this.$cache.line.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
524
+ this.$cache.line.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
525
+
526
+ if (this.options.drag_interval && this.options.type === "double") {
527
+ this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "both"));
528
+ this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "both"));
529
+ } else {
530
+ this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
531
+ this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
532
+ }
533
+
534
+ if (this.options.type === "single") {
535
+ this.$cache.s_single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
536
+ this.$cache.shad_single.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
537
+
538
+ this.$cache.s_single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
539
+ this.$cache.shad_single.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
540
+ } else {
541
+ this.$cache.s_from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
542
+ this.$cache.s_to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
543
+ this.$cache.shad_from.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
544
+ this.$cache.shad_to.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
545
+
546
+ this.$cache.s_from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
547
+ this.$cache.s_to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
548
+ this.$cache.shad_from.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
549
+ this.$cache.shad_to.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
550
+ }
551
+
552
+ if (this.options.keyboard) {
553
+ this.$cache.line.on("keydown.irs_" + this.plugin_count, this.key.bind(this, "keyboard"));
554
+ }
555
+
556
+ if (is_old_ie) {
557
+ this.$cache.body.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this));
558
+ this.$cache.body.on("mouseleave.irs_" + this.plugin_count, this.pointerUp.bind(this));
559
+ }
560
+ },
561
+
562
+ pointerMove: function (e) {
563
+ if (!this.dragging) {
564
+ return;
565
+ }
566
+
567
+ var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
568
+ this.coords.x_pointer = x - this.coords.x_gap;
569
+
570
+ this.calc();
571
+ },
572
+
573
+ pointerUp: function (e) {
574
+ if (this.current_plugin !== this.plugin_count) {
575
+ return;
576
+ }
577
+
578
+ if (this.is_active) {
579
+ this.is_active = false;
580
+ } else {
581
+ return;
582
+ }
583
+
584
+ var is_function = this.options.onFinish && typeof this.options.onFinish === "function",
585
+ is_original = $.contains(this.$cache.cont[0], e.target) || this.dragging;
586
+
587
+ if (is_function && is_original) {
588
+ this.options.onFinish(this.result);
589
+ }
590
+
591
+ this.$cache.cont.find(".state_hover").removeClass("state_hover");
592
+
593
+ this.force_redraw = true;
594
+ this.dragging = false;
595
+
596
+ if (is_old_ie) {
597
+ $("*").prop("unselectable", false);
598
+ }
599
+
600
+ this.updateScene();
601
+ },
602
+
603
+ pointerDown: function (target, e) {
604
+ e.preventDefault();
605
+ var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
606
+ if (e.button === 2) {
607
+ return;
608
+ }
609
+
610
+ this.current_plugin = this.plugin_count;
611
+ this.target = target;
612
+
613
+ this.is_active = true;
614
+ this.dragging = true;
615
+
616
+ this.coords.x_gap = this.$cache.rs.offset().left;
617
+ this.coords.x_pointer = x - this.coords.x_gap;
618
+
619
+ this.calcPointer();
620
+
621
+ switch (target) {
622
+ case "single":
623
+ this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single);
624
+ break;
625
+ case "from":
626
+ this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from);
627
+ this.$cache.s_from.addClass("state_hover");
628
+ this.$cache.s_from.addClass("type_last");
629
+ this.$cache.s_to.removeClass("type_last");
630
+ break;
631
+ case "to":
632
+ this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to);
633
+ this.$cache.s_to.addClass("state_hover");
634
+ this.$cache.s_to.addClass("type_last");
635
+ this.$cache.s_from.removeClass("type_last");
636
+ break;
637
+ case "both":
638
+ this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from);
639
+ this.coords.p_gap_right = this.toFixed(this.coords.p_to - this.coords.p_pointer);
640
+ this.$cache.s_to.removeClass("type_last");
641
+ this.$cache.s_from.removeClass("type_last");
642
+ break;
643
+ }
644
+
645
+ if (is_old_ie) {
646
+ $("*").prop("unselectable", true);
647
+ }
648
+
649
+ this.$cache.line.trigger("focus");
650
+
651
+ this.updateScene();
652
+ },
653
+
654
+ pointerClick: function (target, e) {
655
+ e.preventDefault();
656
+ var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
657
+ if (e.button === 2) {
658
+ return;
659
+ }
660
+
661
+ this.current_plugin = this.plugin_count;
662
+ this.target = target;
663
+
664
+ this.is_click = true;
665
+ this.coords.x_gap = this.$cache.rs.offset().left;
666
+ this.coords.x_pointer = +(x - this.coords.x_gap).toFixed();
667
+
668
+ this.force_redraw = true;
669
+ this.calc();
670
+
671
+ this.$cache.line.trigger("focus");
672
+ },
673
+
674
+ key: function (target, e) {
675
+ if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
676
+ return;
677
+ }
678
+
679
+ switch (e.which) {
680
+ case 83: // W
681
+ case 65: // A
682
+ case 40: // DOWN
683
+ case 37: // LEFT
684
+ e.preventDefault();
685
+ this.moveByKey(false);
686
+ break;
687
+
688
+ case 87: // S
689
+ case 68: // D
690
+ case 38: // UP
691
+ case 39: // RIGHT
692
+ e.preventDefault();
693
+ this.moveByKey(true);
694
+ break;
695
+ }
696
+
697
+ return true;
698
+ },
699
+
700
+ // Move by key. Beta
701
+ // TODO: refactor than have plenty of time
702
+ moveByKey: function (right) {
703
+ var p = this.coords.p_pointer;
704
+
705
+ if (right) {
706
+ p += this.options.keyboard_step;
707
+ } else {
708
+ p -= this.options.keyboard_step;
709
+ }
710
+
711
+ this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p);
712
+ this.is_key = true;
713
+ this.calc();
714
+ },
715
+
716
+ setMinMax: function () {
717
+ if (!this.options) {
718
+ return;
719
+ }
720
+
721
+ if (this.options.hide_min_max) {
722
+ this.$cache.min[0].style.display = "none";
723
+ this.$cache.max[0].style.display = "none";
724
+ return;
725
+ }
726
+
727
+ if (this.options.values.length) {
728
+ this.$cache.min.html(this.decorate(this.options.p_values[this.options.min]));
729
+ this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));
730
+ } else {
731
+ this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min));
732
+ this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max));
733
+ }
734
+
735
+ this.labels.w_min = this.$cache.min.outerWidth(false);
736
+ this.labels.w_max = this.$cache.max.outerWidth(false);
737
+ },
738
+
739
+
740
+
741
+ // =============================================================================================================
742
+ // Calculations
743
+
744
+ calc: function (update) {
745
+ if (!this.options) {
746
+ return;
747
+ }
748
+
749
+ this.calc_count++;
750
+
751
+ if (this.calc_count === 10 || update) {
752
+ this.calc_count = 0;
753
+ this.coords.w_rs = this.$cache.rs.outerWidth(false);
754
+ if (this.options.type === "single") {
755
+ this.coords.w_handle = this.$cache.s_single.outerWidth(false);
756
+ } else {
757
+ this.coords.w_handle = this.$cache.s_from.outerWidth(false);
758
+ }
759
+ }
760
+
761
+ if (!this.coords.w_rs) {
762
+ return;
763
+ }
764
+
765
+ this.calcPointer();
766
+
767
+ this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);
768
+ var real_width = 100 - this.coords.p_handle,
769
+ real_x = this.toFixed(this.coords.p_pointer - this.coords.p_gap);
770
+
771
+ if (this.target === "click") {
772
+ real_x = this.toFixed(this.coords.p_pointer - (this.coords.p_handle / 2));
773
+ this.target = this.chooseHandle(real_x);
774
+ }
775
+
776
+ if (real_x < 0) {
777
+ real_x = 0;
778
+ } else if (real_x > real_width) {
779
+ real_x = real_width;
780
+ }
781
+
782
+ switch (this.target) {
783
+ case "base":
784
+ var w = (this.options.max - this.options.min) / 100,
785
+ f = (this.result.from - this.options.min) / w,
786
+ t = (this.result.to - this.options.min) / w;
787
+
788
+ this.coords.p_single_real = this.toFixed(f);
789
+ this.coords.p_from_real = this.toFixed(f);
790
+ this.coords.p_to_real = this.toFixed(t);
791
+
792
+ this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);
793
+ this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
794
+ this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
795
+
796
+ this.coords.p_single = this.toFixed(f - (this.coords.p_handle / 100 * f));
797
+ this.coords.p_from = this.toFixed(f - (this.coords.p_handle / 100 * f));
798
+ this.coords.p_to = this.toFixed(t - (this.coords.p_handle / 100 * t));
799
+
800
+ this.target = null;
801
+
802
+ break;
803
+
804
+ case "single":
805
+ if (this.options.from_fixed) {
806
+ break;
807
+ }
808
+
809
+ this.coords.p_single_real = this.calcWithStep(real_x / real_width * 100);
810
+ this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);
811
+ this.coords.p_single = this.toFixed(this.coords.p_single_real / 100 * real_width);
812
+
813
+ break;
814
+
815
+ case "from":
816
+ if (this.options.from_fixed) {
817
+ break;
818
+ }
819
+
820
+ this.coords.p_from_real = this.calcWithStep(real_x / real_width * 100);
821
+ if (this.coords.p_from_real > this.coords.p_to_real) {
822
+ this.coords.p_from_real = this.coords.p_to_real;
823
+ }
824
+ this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
825
+ this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
826
+ this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
827
+ this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width);
828
+
829
+ break;
830
+
831
+ case "to":
832
+ if (this.options.to_fixed) {
833
+ break;
834
+ }
835
+
836
+ this.coords.p_to_real = this.calcWithStep(real_x / real_width * 100);
837
+ if (this.coords.p_to_real < this.coords.p_from_real) {
838
+ this.coords.p_to_real = this.coords.p_from_real;
839
+ }
840
+ this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
841
+ this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
842
+ this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
843
+ this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width);
844
+
845
+ break;
846
+
847
+ case "both":
848
+ if (this.options.from_fixed || this.options.to_fixed) {
849
+ break;
850
+ }
851
+
852
+ real_x = this.toFixed(real_x + (this.coords.p_handle * 0.1));
853
+
854
+ this.coords.p_from_real = this.calcWithStep((real_x - this.coords.p_gap_left) / real_width * 100);
855
+ this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
856
+ this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
857
+ this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width);
858
+
859
+ this.coords.p_to_real = this.calcWithStep((real_x + this.coords.p_gap_right) / real_width * 100);
860
+ this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
861
+ this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
862
+ this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width);
863
+
864
+ break;
865
+ }
866
+
867
+ if (this.options.type === "single") {
868
+ this.coords.p_bar_x = (this.coords.p_handle / 2);
869
+ this.coords.p_bar_w = this.coords.p_single;
870
+
871
+ this.result.from_percent = this.coords.p_single_real;
872
+ this.result.from = this.calcReal(this.coords.p_single_real);
873
+ if (this.options.values.length) {
874
+ this.result.from_value = this.options.values[this.result.from];
875
+ }
876
+ } else {
877
+ this.coords.p_bar_x = this.toFixed(this.coords.p_from + (this.coords.p_handle / 2));
878
+ this.coords.p_bar_w = this.toFixed(this.coords.p_to - this.coords.p_from);
879
+
880
+ this.result.from_percent = this.coords.p_from_real;
881
+ this.result.from = this.calcReal(this.coords.p_from_real);
882
+ this.result.to_percent = this.coords.p_to_real;
883
+ this.result.to = this.calcReal(this.coords.p_to_real);
884
+ if (this.options.values.length) {
885
+ this.result.from_value = this.options.values[this.result.from];
886
+ this.result.to_value = this.options.values[this.result.to];
887
+ }
888
+ }
889
+
890
+ this.calcMinMax();
891
+ this.calcLabels();
892
+ },
893
+
894
+ calcPointer: function () {
895
+ if (!this.coords.w_rs) {
896
+ this.coords.p_pointer = 0;
897
+ return;
898
+ }
899
+
900
+ if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) {
901
+ this.coords.x_pointer = 0;
902
+ } else if (this.coords.x_pointer > this.coords.w_rs) {
903
+ this.coords.x_pointer = this.coords.w_rs;
904
+ }
905
+
906
+ this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100);
907
+ },
908
+
909
+ chooseHandle: function (real_x) {
910
+ if (this.options.type === "single") {
911
+ return "single";
912
+ } else {
913
+ var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2);
914
+ if (real_x >= m_point) {
915
+ return this.options.to_fixed ? "from" : "to";
916
+ } else {
917
+ return this.options.from_fixed ? "to" : "from";
918
+ }
919
+ }
920
+ },
921
+
922
+ calcMinMax: function () {
923
+ if (!this.coords.w_rs) {
924
+ return;
925
+ }
926
+
927
+ this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100;
928
+ this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100;
929
+ },
930
+
931
+ calcLabels: function () {
932
+ if (!this.coords.w_rs || this.options.hide_from_to) {
933
+ return;
934
+ }
935
+
936
+ if (this.options.type === "single") {
937
+
938
+ this.labels.w_single = this.$cache.single.outerWidth(false);
939
+ this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100;
940
+ this.labels.p_single_left = this.coords.p_single + (this.coords.p_handle / 2) - (this.labels.p_single / 2);
941
+ this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single);
942
+
943
+ } else {
944
+
945
+ this.labels.w_from = this.$cache.from.outerWidth(false);
946
+ this.labels.p_from = this.labels.w_from / this.coords.w_rs * 100;
947
+ this.labels.p_from_left = this.coords.p_from + (this.coords.p_handle / 2) - (this.labels.p_from / 2);
948
+ this.labels.p_from_left = this.toFixed(this.labels.p_from_left);
949
+ this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from);
950
+
951
+ this.labels.w_to = this.$cache.to.outerWidth(false);
952
+ this.labels.p_to = this.labels.w_to / this.coords.w_rs * 100;
953
+ this.labels.p_to_left = this.coords.p_to + (this.coords.p_handle / 2) - (this.labels.p_to / 2);
954
+ this.labels.p_to_left = this.toFixed(this.labels.p_to_left);
955
+ this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to);
956
+
957
+ this.labels.w_single = this.$cache.single.outerWidth(false);
958
+ this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100;
959
+ this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to) / 2) - (this.labels.p_single / 2);
960
+ this.labels.p_single_left = this.toFixed(this.labels.p_single_left);
961
+ this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single);
962
+
963
+ }
964
+ },
965
+
966
+
967
+
968
+ // =============================================================================================================
969
+ // Drawings
970
+
971
+ updateScene: function () {
972
+ if (this.raf_id) {
973
+ cancelAnimationFrame(this.raf_id);
974
+ this.raf_id = null;
975
+ }
976
+
977
+ clearTimeout(this.update_tm);
978
+ this.update_tm = null;
979
+
980
+ if (!this.options) {
981
+ return;
982
+ }
983
+
984
+ this.drawHandles();
985
+
986
+ if (this.is_active) {
987
+ this.raf_id = requestAnimationFrame(this.updateScene.bind(this));
988
+ } else {
989
+ this.update_tm = setTimeout(this.updateScene.bind(this), 300);
990
+ }
991
+ },
992
+
993
+ drawHandles: function () {
994
+ this.coords.w_rs = this.$cache.rs.outerWidth(false);
995
+
996
+ if (!this.coords.w_rs) {
997
+ return;
998
+ }
999
+
1000
+ if (this.coords.w_rs !== this.coords.w_rs_old) {
1001
+ this.target = "base";
1002
+ this.is_resize = true;
1003
+ }
1004
+
1005
+ if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) {
1006
+ this.setMinMax();
1007
+ this.calc(true);
1008
+ this.drawLabels();
1009
+ if (this.options.grid) {
1010
+ this.calcGridMargin();
1011
+ this.calcGridLabels();
1012
+ }
1013
+ this.force_redraw = true;
1014
+ this.coords.w_rs_old = this.coords.w_rs;
1015
+ this.drawShadow();
1016
+ }
1017
+
1018
+ if (!this.coords.w_rs) {
1019
+ return;
1020
+ }
1021
+
1022
+ if (!this.dragging && !this.force_redraw && !this.is_key) {
1023
+ return;
1024
+ }
1025
+
1026
+ if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) {
1027
+
1028
+ this.drawLabels();
1029
+
1030
+ this.$cache.bar[0].style.left = this.coords.p_bar_x + "%";
1031
+ this.$cache.bar[0].style.width = this.coords.p_bar_w + "%";
1032
+
1033
+ if (this.options.type === "single") {
1034
+ this.$cache.s_single[0].style.left = this.coords.p_single + "%";
1035
+
1036
+ this.$cache.single[0].style.left = this.labels.p_single_left + "%";
1037
+
1038
+ if (this.options.values.length) {
1039
+ this.$cache.input.prop("value", this.result.from_value);
1040
+ this.$cache.input.data("from", this.result.from_value);
1041
+ } else {
1042
+ this.$cache.input.prop("value", this.result.from);
1043
+ this.$cache.input.data("from", this.result.from);
1044
+ }
1045
+ } else {
1046
+ this.$cache.s_from[0].style.left = this.coords.p_from + "%";
1047
+ this.$cache.s_to[0].style.left = this.coords.p_to + "%";
1048
+
1049
+ if (this.old_from !== this.result.from || this.force_redraw) {
1050
+ this.$cache.from[0].style.left = this.labels.p_from_left + "%";
1051
+ }
1052
+ if (this.old_to !== this.result.to || this.force_redraw) {
1053
+ this.$cache.to[0].style.left = this.labels.p_to_left + "%";
1054
+ }
1055
+
1056
+ this.$cache.single[0].style.left = this.labels.p_single_left + "%";
1057
+
1058
+ if (this.options.values.length) {
1059
+ this.$cache.input.prop("value", this.result.from_value + ";" + this.result.to_value);
1060
+ this.$cache.input.data("from", this.result.from_value);
1061
+ this.$cache.input.data("to", this.result.to_value);
1062
+ } else {
1063
+ this.$cache.input.prop("value", this.result.from + ";" + this.result.to);
1064
+ this.$cache.input.data("from", this.result.from);
1065
+ this.$cache.input.data("to", this.result.to);
1066
+ }
1067
+ }
1068
+
1069
+ if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) {
1070
+ this.$cache.input.trigger("change");
1071
+ }
1072
+
1073
+ this.old_from = this.result.from;
1074
+ this.old_to = this.result.to;
1075
+
1076
+ var is_function = this.options.onChange && typeof this.options.onChange === "function" && !this.is_resize;
1077
+ if (is_function && !this.is_update && !this.is_start) {
1078
+ this.options.onChange(this.result);
1079
+ }
1080
+
1081
+ var is_finish = this.options.onFinish && typeof this.options.onFinish === "function";
1082
+ if (is_finish && (this.is_key || this.is_click)) {
1083
+ this.options.onFinish(this.result);
1084
+ }
1085
+
1086
+ this.is_update = false;
1087
+ this.is_resize = false;
1088
+ }
1089
+
1090
+ this.is_start = false;
1091
+ this.is_key = false;
1092
+ this.is_click = false;
1093
+ this.force_redraw = false;
1094
+ },
1095
+
1096
+ drawLabels: function () {
1097
+ if (!this.options) {
1098
+ return;
1099
+ }
1100
+
1101
+ var values_num = this.options.values.length,
1102
+ p_values = this.options.p_values,
1103
+ text_single,
1104
+ text_from,
1105
+ text_to;
1106
+
1107
+ if (this.options.hide_from_to) {
1108
+ return;
1109
+ }
1110
+
1111
+ if (this.options.type === "single") {
1112
+
1113
+ if (values_num) {
1114
+ text_single = this.decorate(p_values[this.result.from]);
1115
+ this.$cache.single.html(text_single);
1116
+ } else {
1117
+ text_single = this.decorate(this._prettify(this.result.from), this.result.from);
1118
+ this.$cache.single.html(text_single);
1119
+ }
1120
+
1121
+ this.calcLabels();
1122
+
1123
+ if (this.labels.p_single_left < this.labels.p_min + 1) {
1124
+ this.$cache.min[0].style.visibility = "hidden";
1125
+ } else {
1126
+ this.$cache.min[0].style.visibility = "visible";
1127
+ }
1128
+
1129
+ if (this.labels.p_single_left + this.labels.p_single > 100 - this.labels.p_max - 1) {
1130
+ this.$cache.max[0].style.visibility = "hidden";
1131
+ } else {
1132
+ this.$cache.max[0].style.visibility = "visible";
1133
+ }
1134
+
1135
+ } else {
1136
+
1137
+ if (values_num) {
1138
+
1139
+ if (this.options.decorate_both) {
1140
+ text_single = this.decorate(p_values[this.result.from]);
1141
+ text_single += this.options.values_separator;
1142
+ text_single += this.decorate(p_values[this.result.to]);
1143
+ } else {
1144
+ text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]);
1145
+ }
1146
+ text_from = this.decorate(p_values[this.result.from]);
1147
+ text_to = this.decorate(p_values[this.result.to]);
1148
+
1149
+ this.$cache.single.html(text_single);
1150
+ this.$cache.from.html(text_from);
1151
+ this.$cache.to.html(text_to);
1152
+
1153
+ } else {
1154
+
1155
+ if (this.options.decorate_both) {
1156
+ text_single = this.decorate(this._prettify(this.result.from), this.result.from);
1157
+ text_single += this.options.values_separator;
1158
+ text_single += this.decorate(this._prettify(this.result.to), this.result.to);
1159
+ } else {
1160
+ text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.to);
1161
+ }
1162
+ text_from = this.decorate(this._prettify(this.result.from), this.result.from);
1163
+ text_to = this.decorate(this._prettify(this.result.to), this.result.to);
1164
+
1165
+ this.$cache.single.html(text_single);
1166
+ this.$cache.from.html(text_from);
1167
+ this.$cache.to.html(text_to);
1168
+
1169
+ }
1170
+
1171
+ this.calcLabels();
1172
+
1173
+ var min = Math.min(this.labels.p_single_left, this.labels.p_from_left),
1174
+ single_left = this.labels.p_single_left + this.labels.p_single,
1175
+ to_left = this.labels.p_to_left + this.labels.p_to,
1176
+ max = Math.max(single_left, to_left);
1177
+
1178
+ if (this.labels.p_from_left + this.labels.p_from >= this.labels.p_to_left) {
1179
+ this.$cache.from[0].style.visibility = "hidden";
1180
+ this.$cache.to[0].style.visibility = "hidden";
1181
+ this.$cache.single[0].style.visibility = "visible";
1182
+
1183
+ if (this.result.from === this.result.to) {
1184
+ this.$cache.from[0].style.visibility = "visible";
1185
+ this.$cache.single[0].style.visibility = "hidden";
1186
+ max = to_left;
1187
+ } else {
1188
+ this.$cache.from[0].style.visibility = "hidden";
1189
+ this.$cache.single[0].style.visibility = "visible";
1190
+ max = Math.max(single_left, to_left);
1191
+ }
1192
+ } else {
1193
+ this.$cache.from[0].style.visibility = "visible";
1194
+ this.$cache.to[0].style.visibility = "visible";
1195
+ this.$cache.single[0].style.visibility = "hidden";
1196
+ }
1197
+
1198
+ if (min < this.labels.p_min + 1) {
1199
+ this.$cache.min[0].style.visibility = "hidden";
1200
+ } else {
1201
+ this.$cache.min[0].style.visibility = "visible";
1202
+ }
1203
+
1204
+ if (max > 100 - this.labels.p_max - 1) {
1205
+ this.$cache.max[0].style.visibility = "hidden";
1206
+ } else {
1207
+ this.$cache.max[0].style.visibility = "visible";
1208
+ }
1209
+
1210
+ }
1211
+ },
1212
+
1213
+ drawShadow: function () {
1214
+ var o = this.options,
1215
+ c = this.$cache,
1216
+
1217
+ is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min),
1218
+ is_from_max = typeof o.from_max === "number" && !isNaN(o.from_max),
1219
+ is_to_min = typeof o.to_min === "number" && !isNaN(o.to_min),
1220
+ is_to_max = typeof o.to_max === "number" && !isNaN(o.to_max),
1221
+
1222
+ from_min,
1223
+ from_max,
1224
+ to_min,
1225
+ to_max;
1226
+
1227
+ if (o.type === "single") {
1228
+ if (o.from_shadow && (is_from_min || is_from_max)) {
1229
+ from_min = this.calcPercent(o.from_min || o.min);
1230
+ from_max = this.calcPercent(o.from_max || o.max) - from_min;
1231
+ from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
1232
+ from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
1233
+ from_min = from_min + (this.coords.p_handle / 2);
1234
+
1235
+ c.shad_single[0].style.display = "block";
1236
+ c.shad_single[0].style.left = from_min + "%";
1237
+ c.shad_single[0].style.width = from_max + "%";
1238
+ } else {
1239
+ c.shad_single[0].style.display = "none";
1240
+ }
1241
+ } else {
1242
+ if (o.from_shadow && (is_from_min || is_from_max)) {
1243
+ from_min = this.calcPercent(o.from_min || o.min);
1244
+ from_max = this.calcPercent(o.from_max || o.max) - from_min;
1245
+ from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
1246
+ from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
1247
+ from_min = from_min + (this.coords.p_handle / 2);
1248
+
1249
+ c.shad_from[0].style.display = "block";
1250
+ c.shad_from[0].style.left = from_min + "%";
1251
+ c.shad_from[0].style.width = from_max + "%";
1252
+ } else {
1253
+ c.shad_from[0].style.display = "none";
1254
+ }
1255
+
1256
+ if (o.to_shadow && (is_to_min || is_to_max)) {
1257
+ to_min = this.calcPercent(o.to_min || o.min);
1258
+ to_max = this.calcPercent(o.to_max || o.max) - to_min;
1259
+ to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min));
1260
+ to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max));
1261
+ to_min = to_min + (this.coords.p_handle / 2);
1262
+
1263
+ c.shad_to[0].style.display = "block";
1264
+ c.shad_to[0].style.left = to_min + "%";
1265
+ c.shad_to[0].style.width = to_max + "%";
1266
+ } else {
1267
+ c.shad_to[0].style.display = "none";
1268
+ }
1269
+ }
1270
+ },
1271
+
1272
+
1273
+
1274
+ // =============================================================================================================
1275
+ // Service methods
1276
+
1277
+ toggleInput: function () {
1278
+ this.$cache.input.toggleClass("irs-hidden-input");
1279
+ },
1280
+
1281
+ calcPercent: function (num) {
1282
+ var w = (this.options.max - this.options.min) / 100,
1283
+ percent = (num - this.options.min) / w;
1284
+
1285
+ return this.toFixed(percent);
1286
+ },
1287
+
1288
+ calcReal: function (percent) {
1289
+ var min = this.options.min,
1290
+ max = this.options.max,
1291
+ min_decimals = min.toString().split(".")[1],
1292
+ max_decimals = max.toString().split(".")[1],
1293
+ min_length, max_length,
1294
+ avg_decimals = 0,
1295
+ abs = 0;
1296
+
1297
+ if (min_decimals) {
1298
+ min_length = min_decimals.length;
1299
+ avg_decimals = min_length;
1300
+ }
1301
+ if (max_decimals) {
1302
+ max_length = max_decimals.length;
1303
+ avg_decimals = max_length;
1304
+ }
1305
+ if (min_length && max_length) {
1306
+ avg_decimals = (min_length >= max_length) ? min_length : max_length;
1307
+ }
1308
+
1309
+ if (min < 0) {
1310
+ abs = Math.abs(min);
1311
+ min = +(min + abs).toFixed(avg_decimals);
1312
+ max = +(max + abs).toFixed(avg_decimals);
1313
+ }
1314
+
1315
+ var number = ((max - min) / 100 * percent) + min,
1316
+ string = this.options.step.toString().split(".")[1],
1317
+ result;
1318
+
1319
+ if (string) {
1320
+ if (number !== min && number !== max) {
1321
+ number = +number.toFixed(string.length);
1322
+ } else {
1323
+ number = +number.toFixed(avg_decimals);
1324
+ }
1325
+ } else {
1326
+ number = number / this.options.step;
1327
+ number = number * this.options.step;
1328
+ number = +number.toFixed(0);
1329
+ }
1330
+
1331
+ if (abs) {
1332
+ number -= abs;
1333
+ min = this.options.min;
1334
+ max = this.options.max;
1335
+ }
1336
+
1337
+ if (string) {
1338
+ if (number !== min && number !== max) {
1339
+ result = +number.toFixed(string.length);
1340
+ } else {
1341
+ result = +number.toFixed(avg_decimals);
1342
+ }
1343
+ } else {
1344
+ result = this.toFixed(number);
1345
+ }
1346
+
1347
+ if (result < this.options.min) {
1348
+ result = this.options.min;
1349
+ } else if (result > this.options.max) {
1350
+ result = this.options.max;
1351
+ }
1352
+
1353
+ return result;
1354
+ },
1355
+
1356
+ calcWithStep: function (percent) {
1357
+ var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step;
1358
+
1359
+ if (rounded > 100) {
1360
+ rounded = 100;
1361
+ }
1362
+ if (percent === 100) {
1363
+ rounded = 100;
1364
+ }
1365
+
1366
+ return this.toFixed(rounded);
1367
+ },
1368
+
1369
+ checkMinInterval: function (p_current, p_next, type) {
1370
+ var o = this.options,
1371
+ current,
1372
+ next;
1373
+
1374
+ if (!o.min_interval) {
1375
+ return p_current;
1376
+ }
1377
+
1378
+ current = this.calcReal(p_current);
1379
+ next = this.calcReal(p_next);
1380
+
1381
+ if (type === "from") {
1382
+
1383
+ if (next - current < o.min_interval) {
1384
+ current = next - o.min_interval;
1385
+ }
1386
+
1387
+ } else {
1388
+
1389
+ if (current - next < o.min_interval) {
1390
+ current = next + o.min_interval;
1391
+ }
1392
+
1393
+ }
1394
+
1395
+ return this.calcPercent(current);
1396
+ },
1397
+
1398
+ checkMaxInterval: function (p_current, p_next, type) {
1399
+ var o = this.options,
1400
+ current,
1401
+ next;
1402
+
1403
+ if (!o.max_interval) {
1404
+ return p_current;
1405
+ }
1406
+
1407
+ current = this.calcReal(p_current);
1408
+ next = this.calcReal(p_next);
1409
+
1410
+ if (type === "from") {
1411
+
1412
+ if (next - current > o.max_interval) {
1413
+ current = next - o.max_interval;
1414
+ }
1415
+
1416
+ } else {
1417
+
1418
+ if (current - next > o.max_interval) {
1419
+ current = next + o.max_interval;
1420
+ }
1421
+
1422
+ }
1423
+
1424
+ return this.calcPercent(current);
1425
+ },
1426
+
1427
+ checkDiapason: function (p_num, min, max) {
1428
+ var num = this.calcReal(p_num),
1429
+ o = this.options;
1430
+
1431
+ if (!min || typeof min !== "number") {
1432
+ min = o.min;
1433
+ }
1434
+
1435
+ if (!max || typeof max !== "number") {
1436
+ max = o.max;
1437
+ }
1438
+
1439
+ if (num < min) {
1440
+ num = min;
1441
+ }
1442
+
1443
+ if (num > max) {
1444
+ num = max;
1445
+ }
1446
+
1447
+ return this.calcPercent(num);
1448
+ },
1449
+
1450
+ toFixed: function (num) {
1451
+ num = num.toFixed(5);
1452
+ return +num;
1453
+ },
1454
+
1455
+ _prettify: function (num) {
1456
+ if (!this.options.prettify_enabled) {
1457
+ return num;
1458
+ }
1459
+
1460
+ if (this.options.prettify && typeof this.options.prettify === "function") {
1461
+ return this.options.prettify(num);
1462
+ } else {
1463
+ return this.prettify(num);
1464
+ }
1465
+ },
1466
+
1467
+ prettify: function (num) {
1468
+ var n = num.toString();
1469
+ return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, "$1" + this.options.prettify_separator);
1470
+ },
1471
+
1472
+ checkEdges: function (left, width) {
1473
+ if (!this.options.force_edges) {
1474
+ return this.toFixed(left);
1475
+ }
1476
+
1477
+ if (left < 0) {
1478
+ left = 0;
1479
+ } else if (left > 100 - width) {
1480
+ left = 100 - width;
1481
+ }
1482
+
1483
+ return this.toFixed(left);
1484
+ },
1485
+
1486
+ validate: function () {
1487
+ var o = this.options,
1488
+ r = this.result,
1489
+ v = o.values,
1490
+ vl = v.length,
1491
+ value,
1492
+ i;
1493
+
1494
+ if (typeof o.min === "string") o.min = +o.min;
1495
+ if (typeof o.max === "string") o.max = +o.max;
1496
+ if (typeof o.from === "string") o.from = +o.from;
1497
+ if (typeof o.to === "string") o.to = +o.to;
1498
+ if (typeof o.step === "string") o.step = +o.step;
1499
+
1500
+ if (typeof o.from_min === "string") o.from_min = +o.from_min;
1501
+ if (typeof o.from_max === "string") o.from_max = +o.from_max;
1502
+ if (typeof o.to_min === "string") o.to_min = +o.to_min;
1503
+ if (typeof o.to_max === "string") o.to_max = +o.to_max;
1504
+
1505
+ if (typeof o.keyboard_step === "string") o.keyboard_step = +o.keyboard_step;
1506
+ if (typeof o.grid_num === "string") o.grid_num = +o.grid_num;
1507
+
1508
+ if (o.max <= o.min) {
1509
+ if (o.min) {
1510
+ o.max = o.min * 2;
1511
+ } else {
1512
+ o.max = o.min + 1;
1513
+ }
1514
+ o.step = 1;
1515
+ }
1516
+
1517
+ if (vl) {
1518
+ o.p_values = [];
1519
+ o.min = 0;
1520
+ o.max = vl - 1;
1521
+ o.step = 1;
1522
+ o.grid_num = o.max;
1523
+ o.grid_snap = true;
1524
+
1525
+
1526
+ for (i = 0; i < vl; i++) {
1527
+ value = +v[i];
1528
+
1529
+ if (!isNaN(value)) {
1530
+ v[i] = value;
1531
+ value = this._prettify(value);
1532
+ } else {
1533
+ value = v[i];
1534
+ }
1535
+
1536
+ o.p_values.push(value);
1537
+ }
1538
+ }
1539
+
1540
+ if (typeof o.from !== "number" || isNaN(o.from)) {
1541
+ o.from = o.min;
1542
+ }
1543
+
1544
+ if (typeof o.to !== "number" || isNaN(o.from)) {
1545
+ o.to = o.max;
1546
+ }
1547
+
1548
+ if (o.type === "single") {
1549
+
1550
+ if (o.from < o.min) {
1551
+ o.from = o.min;
1552
+ }
1553
+
1554
+ if (o.from > o.max) {
1555
+ o.from = o.max;
1556
+ }
1557
+
1558
+ } else {
1559
+
1560
+ if (o.from < o.min || o.from > o.max) {
1561
+ o.from = o.min;
1562
+ }
1563
+ if (o.to > o.max || o.to < o.min) {
1564
+ o.to = o.max;
1565
+ }
1566
+ if (o.from > o.to) {
1567
+ o.from = o.to;
1568
+ }
1569
+
1570
+ }
1571
+
1572
+ if (typeof o.step !== "number" || isNaN(o.step) || !o.step || o.step < 0) {
1573
+ o.step = 1;
1574
+ }
1575
+
1576
+ if (typeof o.keyboard_step !== "number" || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) {
1577
+ o.keyboard_step = 5;
1578
+ }
1579
+
1580
+ if (o.from_min && o.from < o.from_min) {
1581
+ o.from = o.from_min;
1582
+ }
1583
+
1584
+ if (o.from_max && o.from > o.from_max) {
1585
+ o.from = o.from_max;
1586
+ }
1587
+
1588
+ if (o.to_min && o.to < o.to_min) {
1589
+ o.to = o.to_min;
1590
+ }
1591
+
1592
+ if (o.to_max && o.from > o.to_max) {
1593
+ o.to = o.to_max;
1594
+ }
1595
+
1596
+ if (r) {
1597
+ if (r.min !== o.min) {
1598
+ r.min = o.min;
1599
+ }
1600
+
1601
+ if (r.max !== o.max) {
1602
+ r.max = o.max;
1603
+ }
1604
+
1605
+ if (r.from < r.min || r.from > r.max) {
1606
+ r.from = o.from;
1607
+ }
1608
+
1609
+ if (r.to < r.min || r.to > r.max) {
1610
+ r.to = o.to;
1611
+ }
1612
+ }
1613
+
1614
+ if (typeof o.min_interval !== "number" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) {
1615
+ o.min_interval = 0;
1616
+ }
1617
+
1618
+ if (typeof o.max_interval !== "number" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) {
1619
+ o.max_interval = 0;
1620
+ }
1621
+
1622
+ if (o.min_interval && o.min_interval > o.max - o.min) {
1623
+ o.min_interval = o.max - o.min;
1624
+ }
1625
+
1626
+ if (o.max_interval && o.max_interval > o.max - o.min) {
1627
+ o.max_interval = o.max - o.min;
1628
+ }
1629
+ },
1630
+
1631
+ decorate: function (num, original) {
1632
+ var decorated = "",
1633
+ o = this.options;
1634
+
1635
+ if (o.prefix) {
1636
+ decorated += o.prefix;
1637
+ }
1638
+
1639
+ decorated += num;
1640
+
1641
+ if (o.max_postfix) {
1642
+ if (o.values.length && num === o.p_values[o.max]) {
1643
+ decorated += o.max_postfix;
1644
+ if (o.postfix) {
1645
+ decorated += " ";
1646
+ }
1647
+ } else if (original === o.max) {
1648
+ decorated += o.max_postfix;
1649
+ if (o.postfix) {
1650
+ decorated += " ";
1651
+ }
1652
+ }
1653
+ }
1654
+
1655
+ if (o.postfix) {
1656
+ decorated += o.postfix;
1657
+ }
1658
+
1659
+ return decorated;
1660
+ },
1661
+
1662
+ updateFrom: function () {
1663
+ this.result.from = this.options.from;
1664
+ this.result.from_percent = this.calcPercent(this.result.from);
1665
+ if (this.options.values) {
1666
+ this.result.from_value = this.options.values[this.result.from];
1667
+ }
1668
+ },
1669
+
1670
+ updateTo: function () {
1671
+ this.result.to = this.options.to;
1672
+ this.result.to_percent = this.calcPercent(this.result.to);
1673
+ if (this.options.values) {
1674
+ this.result.to_value = this.options.values[this.result.to];
1675
+ }
1676
+ },
1677
+
1678
+ updateResult: function () {
1679
+ this.result.min = this.options.min;
1680
+ this.result.max = this.options.max;
1681
+ this.updateFrom();
1682
+ this.updateTo();
1683
+ },
1684
+
1685
+
1686
+ // =============================================================================================================
1687
+ // Grid
1688
+
1689
+ appendGrid: function () {
1690
+ if (!this.options.grid) {
1691
+ return;
1692
+ }
1693
+
1694
+ var o = this.options,
1695
+ i, z,
1696
+
1697
+ total = o.max - o.min,
1698
+ big_num = o.grid_num,
1699
+ big_p = 0,
1700
+ big_w = 0,
1701
+
1702
+ small_max = 4,
1703
+ local_small_max,
1704
+ small_p,
1705
+ small_w = 0,
1706
+
1707
+ result,
1708
+ html = '';
1709
+
1710
+
1711
+
1712
+ this.calcGridMargin();
1713
+
1714
+ if (o.grid_snap) {
1715
+ big_num = total / o.step;
1716
+ big_p = this.toFixed(o.step / (total / 100));
1717
+ } else {
1718
+ big_p = this.toFixed(100 / big_num);
1719
+ }
1720
+
1721
+ if (big_num > 4) {
1722
+ small_max = 3;
1723
+ }
1724
+ if (big_num > 7) {
1725
+ small_max = 2;
1726
+ }
1727
+ if (big_num > 14) {
1728
+ small_max = 1;
1729
+ }
1730
+ if (big_num > 28) {
1731
+ small_max = 0;
1732
+ }
1733
+
1734
+ for (i = 0; i < big_num + 1; i++) {
1735
+ local_small_max = small_max;
1736
+
1737
+ big_w = this.toFixed(big_p * i);
1738
+
1739
+ if (big_w > 100) {
1740
+ big_w = 100;
1741
+
1742
+ local_small_max -= 2;
1743
+ if (local_small_max < 0) {
1744
+ local_small_max = 0;
1745
+ }
1746
+ }
1747
+ this.coords.big[i] = big_w;
1748
+
1749
+ small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1);
1750
+
1751
+ for (z = 1; z <= local_small_max; z++) {
1752
+ if (big_w === 0) {
1753
+ break;
1754
+ }
1755
+
1756
+ small_w = this.toFixed(big_w - (small_p * z));
1757
+
1758
+ html += '<span class="irs-grid-pol small" style="left: ' + small_w + '%"></span>';
1759
+ }
1760
+
1761
+ html += '<span class="irs-grid-pol" style="left: ' + big_w + '%"></span>';
1762
+
1763
+ result = this.calcReal(big_w);
1764
+ if (o.values.length) {
1765
+ result = o.p_values[result];
1766
+ } else {
1767
+ result = this._prettify(result);
1768
+ }
1769
+
1770
+ html += '<span class="irs-grid-text js-grid-text-' + i + '" style="left: ' + big_w + '%">' + result + '</span>';
1771
+ }
1772
+ this.coords.big_num = Math.ceil(big_num + 1);
1773
+
1774
+
1775
+
1776
+ this.$cache.cont.addClass("irs-with-grid");
1777
+ this.$cache.grid.html(html);
1778
+ this.cacheGridLabels();
1779
+ },
1780
+
1781
+ cacheGridLabels: function () {
1782
+ var $label, i,
1783
+ num = this.coords.big_num;
1784
+
1785
+ for (i = 0; i < num; i++) {
1786
+ $label = this.$cache.grid.find(".js-grid-text-" + i);
1787
+ this.$cache.grid_labels.push($label);
1788
+ }
1789
+
1790
+ this.calcGridLabels();
1791
+ },
1792
+
1793
+ calcGridLabels: function () {
1794
+ var i, label, start = [], finish = [],
1795
+ num = this.coords.big_num;
1796
+
1797
+ for (i = 0; i < num; i++) {
1798
+ this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false);
1799
+ this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100);
1800
+ this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2);
1801
+
1802
+ start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]);
1803
+ finish[i] = this.toFixed(start[i] + this.coords.big_p[i]);
1804
+ }
1805
+
1806
+ if (this.options.force_edges) {
1807
+ if (start[0] < -this.coords.grid_gap) {
1808
+ start[0] = -this.coords.grid_gap;
1809
+ finish[0] = this.toFixed(start[0] + this.coords.big_p[0]);
1810
+
1811
+ this.coords.big_x[0] = this.coords.grid_gap;
1812
+ }
1813
+
1814
+ if (finish[num - 1] > 100 + this.coords.grid_gap) {
1815
+ finish[num - 1] = 100 + this.coords.grid_gap;
1816
+ start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]);
1817
+
1818
+ this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap);
1819
+ }
1820
+ }
1821
+
1822
+ this.calcGridCollision(2, start, finish);
1823
+ this.calcGridCollision(4, start, finish);
1824
+
1825
+ for (i = 0; i < num; i++) {
1826
+ label = this.$cache.grid_labels[i][0];
1827
+ label.style.marginLeft = -this.coords.big_x[i] + "%";
1828
+ }
1829
+ },
1830
+
1831
+ // Collisions Calc Beta
1832
+ // TODO: Refactor then have plenty of time
1833
+ calcGridCollision: function (step, start, finish) {
1834
+ var i, next_i, label,
1835
+ num = this.coords.big_num;
1836
+
1837
+ for (i = 0; i < num; i += step) {
1838
+ next_i = i + (step / 2);
1839
+ if (next_i >= num) {
1840
+ break;
1841
+ }
1842
+
1843
+ label = this.$cache.grid_labels[next_i][0];
1844
+
1845
+ if (finish[i] <= start[next_i]) {
1846
+ label.style.visibility = "visible";
1847
+ } else {
1848
+ label.style.visibility = "hidden";
1849
+ }
1850
+ }
1851
+ },
1852
+
1853
+ calcGridMargin: function () {
1854
+ if (!this.options.grid_margin) {
1855
+ return;
1856
+ }
1857
+
1858
+ this.coords.w_rs = this.$cache.rs.outerWidth(false);
1859
+ if (!this.coords.w_rs) {
1860
+ return;
1861
+ }
1862
+
1863
+ if (this.options.type === "single") {
1864
+ this.coords.w_handle = this.$cache.s_single.outerWidth(false);
1865
+ } else {
1866
+ this.coords.w_handle = this.$cache.s_from.outerWidth(false);
1867
+ }
1868
+ this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);
1869
+ this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1);
1870
+
1871
+ this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%";
1872
+ this.$cache.grid[0].style.left = this.coords.grid_gap + "%";
1873
+ },
1874
+
1875
+
1876
+
1877
+ // =============================================================================================================
1878
+ // Public methods
1879
+
1880
+ update: function (options) {
1881
+ if (!this.input) {
1882
+ return;
1883
+ }
1884
+
1885
+ this.is_update = true;
1886
+
1887
+ this.options.from = this.result.from;
1888
+ this.options.to = this.result.to;
1889
+
1890
+ this.options = $.extend(this.options, options);
1891
+ this.validate();
1892
+ this.updateResult(options);
1893
+
1894
+ this.toggleInput();
1895
+ this.remove();
1896
+ this.init(true);
1897
+ },
1898
+
1899
+ reset: function () {
1900
+ if (!this.input) {
1901
+ return;
1902
+ }
1903
+
1904
+ this.updateResult();
1905
+ this.update();
1906
+ },
1907
+
1908
+ destroy: function () {
1909
+ if (!this.input) {
1910
+ return;
1911
+ }
1912
+
1913
+ this.toggleInput();
1914
+ this.$cache.input.prop("readonly", false);
1915
+ $.data(this.input, "ionRangeSlider", null);
1916
+
1917
+ this.remove();
1918
+ this.input = null;
1919
+ this.options = null;
1920
+ }
1921
+ };
1922
+
1923
+ $.fn.ionRangeSlider = function (options) {
1924
+ return this.each(function() {
1925
+ if (!$.data(this, "ionRangeSlider")) {
1926
+ $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++));
1927
+ }
1928
+ });
1929
+ };
1930
+
1931
+
1932
+
1933
+ // =================================================================================================================
1934
+ // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
1935
+ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
1936
+
1937
+ // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
1938
+
1939
+ // MIT license
1940
+
1941
+ (function() {
1942
+ var lastTime = 0;
1943
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
1944
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
1945
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
1946
+ window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
1947
+ || window[vendors[x]+'CancelRequestAnimationFrame'];
1948
+ }
1949
+
1950
+ if (!window.requestAnimationFrame)
1951
+ window.requestAnimationFrame = function(callback, element) {
1952
+ var currTime = new Date().getTime();
1953
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
1954
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); },
1955
+ timeToCall);
1956
+ lastTime = currTime + timeToCall;
1957
+ return id;
1958
+ };
1959
+
1960
+ if (!window.cancelAnimationFrame)
1961
+ window.cancelAnimationFrame = function(id) {
1962
+ clearTimeout(id);
1963
+ };
1964
+ }());
1965
+
1966
+ } (jQuery, document, window, navigator));