kiso_themes 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (944) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +12 -0
  3. data/LICENSE +170 -0
  4. data/README.rdoc +6 -0
  5. data/Rakefile +516 -0
  6. data/VERSION +1 -0
  7. data/app/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  8. data/app/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  9. data/app/assets/fonts/font-awesome/fontawesome-webfont.svg +2671 -0
  10. data/app/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  11. data/app/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  12. data/app/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
  13. data/app/assets/fonts/ionicons/ionicons.eot +0 -0
  14. data/app/assets/fonts/ionicons/ionicons.svg +2230 -0
  15. data/app/assets/fonts/ionicons/ionicons.ttf +0 -0
  16. data/app/assets/fonts/ionicons/ionicons.woff +0 -0
  17. data/app/assets/fonts/mdiicons/LICENSE.txt +428 -0
  18. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.eot +0 -0
  19. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.ijmap +1 -0
  20. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.svg +2373 -0
  21. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.ttf +0 -0
  22. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.woff +0 -0
  23. data/app/assets/fonts/mdiicons/MaterialIcons-Regular.woff2 +0 -0
  24. data/app/assets/fonts/mdiicons/README.md +9 -0
  25. data/app/assets/fonts/mdiicons/codepoints +932 -0
  26. data/app/assets/fonts/themify/themify.eot +0 -0
  27. data/app/assets/fonts/themify/themify.svg +362 -0
  28. data/app/assets/fonts/themify/themify.ttf +0 -0
  29. data/app/assets/fonts/themify/themify.woff +0 -0
  30. data/app/assets/images/kiso_themes/app_video_placeholder.png +0 -0
  31. data/app/assets/images/kiso_themes/arrow-1.svg +8 -0
  32. data/app/assets/images/kiso_themes/arrow-2.svg +7 -0
  33. data/app/assets/images/kiso_themes/creditcards/amex.png +0 -0
  34. data/app/assets/images/kiso_themes/creditcards/credit.png +0 -0
  35. data/app/assets/images/kiso_themes/creditcards/dankort.png +0 -0
  36. data/app/assets/images/kiso_themes/creditcards/diners.png +0 -0
  37. data/app/assets/images/kiso_themes/creditcards/discover.png +0 -0
  38. data/app/assets/images/kiso_themes/creditcards/forbru.png +0 -0
  39. data/app/assets/images/kiso_themes/creditcards/google.png +0 -0
  40. data/app/assets/images/kiso_themes/creditcards/jcb.png +0 -0
  41. data/app/assets/images/kiso_themes/creditcards/laser.png +0 -0
  42. data/app/assets/images/kiso_themes/creditcards/maestro.png +0 -0
  43. data/app/assets/images/kiso_themes/creditcards/mastercard.png +0 -0
  44. data/app/assets/images/kiso_themes/creditcards/money.png +0 -0
  45. data/app/assets/images/kiso_themes/creditcards/paypa.png +0 -0
  46. data/app/assets/images/kiso_themes/creditcards/shopify.png +0 -0
  47. data/app/assets/images/kiso_themes/creditcards/solo.png +0 -0
  48. data/app/assets/images/kiso_themes/creditcards/visa.png +0 -0
  49. data/app/assets/images/kiso_themes/header_1.jpg +0 -0
  50. data/app/assets/images/kiso_themes/icons/check.png +0 -0
  51. data/app/assets/images/kiso_themes/landing_bg.jpg +0 -0
  52. data/app/assets/images/kiso_themes/pyrrmid_128.png +0 -0
  53. data/app/assets/images/kiso_themes/pyrrmid_200.png +0 -0
  54. data/app/assets/images/kiso_themes/pyrrmid_32.png +0 -0
  55. data/app/assets/images/kiso_themes/pyrrmid_64.png +0 -0
  56. data/app/assets/images/kiso_themes/stock/1.jpg +0 -0
  57. data/app/assets/images/kiso_themes/stock/2.jpg +0 -0
  58. data/app/assets/images/kiso_themes/stock/3.jpg +0 -0
  59. data/app/assets/images/kiso_themes/stock/4.jpg +0 -0
  60. data/app/assets/images/kiso_themes/stock/acme_1.png +0 -0
  61. data/app/assets/images/kiso_themes/stock/acme_2.png +0 -0
  62. data/app/assets/images/kiso_themes/stock/acme_3.png +0 -0
  63. data/app/assets/images/kiso_themes/stock/acme_4.png +0 -0
  64. data/app/assets/images/kiso_themes/stock/acme_5.png +0 -0
  65. data/app/assets/images/kiso_themes/stock/acme_6.png +0 -0
  66. data/app/assets/images/kiso_themes/stock/acme_7.png +0 -0
  67. data/app/assets/images/kiso_themes/stock/acme_8.png +0 -0
  68. data/app/assets/images/kiso_themes/stock/landscape_1.jpg +0 -0
  69. data/app/assets/images/kiso_themes/stock/landscape_10.jpg +0 -0
  70. data/app/assets/images/kiso_themes/stock/landscape_12.jpg +0 -0
  71. data/app/assets/images/kiso_themes/stock/landscape_13.jpg +0 -0
  72. data/app/assets/images/kiso_themes/stock/landscape_14.jpg +0 -0
  73. data/app/assets/images/kiso_themes/stock/landscape_2.jpg +0 -0
  74. data/app/assets/images/kiso_themes/stock/landscape_3.jpg +0 -0
  75. data/app/assets/images/kiso_themes/stock/landscape_4.jpg +0 -0
  76. data/app/assets/images/kiso_themes/stock/landscape_5.jpg +0 -0
  77. data/app/assets/images/kiso_themes/stock/landscape_6.jpg +0 -0
  78. data/app/assets/images/kiso_themes/stock/landscape_7.jpg +0 -0
  79. data/app/assets/images/kiso_themes/stock/landscape_8.jpg +0 -0
  80. data/app/assets/images/kiso_themes/stock/landscape_9.jpg +0 -0
  81. data/app/assets/images/kiso_themes/stock/us_landscape_1.jpg +0 -0
  82. data/app/assets/images/kiso_themes/stock/us_landscape_2.jpg +0 -0
  83. data/app/assets/images/kiso_themes/ui_placeholder_desktop.png +0 -0
  84. data/app/assets/javascripts/kiso_themes/bootstrap.js +20 -0
  85. data/app/assets/javascripts/kiso_themes/bootstrap_switch.js +23 -0
  86. data/app/assets/javascripts/kiso_themes/chartjs.js +11 -0
  87. data/app/assets/javascripts/kiso_themes/clipboard.js +12 -0
  88. data/app/assets/javascripts/kiso_themes/countTo.js +1 -0
  89. data/app/assets/javascripts/kiso_themes/countdown.js +28 -0
  90. data/app/assets/javascripts/kiso_themes/demo/chartjs.js +102 -0
  91. data/app/assets/javascripts/kiso_themes/demo/dashboard.js +229 -0
  92. data/app/assets/javascripts/kiso_themes/demo/data_generator.js +25 -0
  93. data/app/assets/javascripts/kiso_themes/demo/easypiechart.js +41 -0
  94. data/app/assets/javascripts/kiso_themes/demo/flot.js +258 -0
  95. data/app/assets/javascripts/kiso_themes/demo/gmaps.js +163 -0
  96. data/app/assets/javascripts/kiso_themes/demo/jqvectormap.js +65 -0
  97. data/app/assets/javascripts/kiso_themes/demo/sparklines.js +156 -0
  98. data/app/assets/javascripts/kiso_themes/easypiechart.js +12 -0
  99. data/app/assets/javascripts/kiso_themes/fastclick.js +16 -0
  100. data/app/assets/javascripts/kiso_themes/fitie.js +14 -0
  101. data/app/assets/javascripts/kiso_themes/flot.js +11 -0
  102. data/app/assets/javascripts/kiso_themes/forms.js +13 -0
  103. data/app/assets/javascripts/kiso_themes/gmaps.js +9 -0
  104. data/app/assets/javascripts/kiso_themes/header.js +33 -0
  105. data/app/assets/javascripts/kiso_themes/inspect_mode/inspect_mode.js +581 -0
  106. data/app/assets/javascripts/kiso_themes/jasny.js +13 -0
  107. data/app/assets/javascripts/kiso_themes/jqvectormaps.js +24 -0
  108. data/app/assets/javascripts/kiso_themes/kernel.js +48 -0
  109. data/app/assets/javascripts/kiso_themes/metis_menu.js +16 -0
  110. data/app/assets/javascripts/kiso_themes/parallax.js +14 -0
  111. data/app/assets/javascripts/kiso_themes/popper.js +1 -0
  112. data/app/assets/javascripts/kiso_themes/prettify.js +12 -0
  113. data/app/assets/javascripts/kiso_themes/prism.js +10 -0
  114. data/app/assets/javascripts/kiso_themes/sheets.js +98 -0
  115. data/app/assets/javascripts/kiso_themes/sidenav.js +77 -0
  116. data/app/assets/javascripts/kiso_themes/slimscroll.js +1 -0
  117. data/app/assets/javascripts/kiso_themes/sparklines.js +1 -0
  118. data/app/assets/javascripts/kiso_themes.js +39 -0
  119. data/app/assets/javascripts/vendor/bootstrap/bootstrap/alert.js +198 -0
  120. data/app/assets/javascripts/vendor/bootstrap/bootstrap/button.js +186 -0
  121. data/app/assets/javascripts/vendor/bootstrap/bootstrap/carousel.js +667 -0
  122. data/app/assets/javascripts/vendor/bootstrap/bootstrap/collapse.js +427 -0
  123. data/app/assets/javascripts/vendor/bootstrap/bootstrap/dropdown.js +594 -0
  124. data/app/assets/javascripts/vendor/bootstrap/bootstrap/index.js +22 -0
  125. data/app/assets/javascripts/vendor/bootstrap/bootstrap/modal.js +649 -0
  126. data/app/assets/javascripts/vendor/bootstrap/bootstrap/popover.js +260 -0
  127. data/app/assets/javascripts/vendor/bootstrap/bootstrap/scrollspy.js +374 -0
  128. data/app/assets/javascripts/vendor/bootstrap/bootstrap/tab.js +268 -0
  129. data/app/assets/javascripts/vendor/bootstrap/bootstrap/toast.js +282 -0
  130. data/app/assets/javascripts/vendor/bootstrap/bootstrap/tooltip.js +906 -0
  131. data/app/assets/javascripts/vendor/bootstrap/bootstrap/util.js +171 -0
  132. data/app/assets/javascripts/vendor/bootstrap/bootstrap.js +13 -0
  133. data/app/assets/javascripts/vendor/bootstrap_switch/bootstrap_switch.js +744 -0
  134. data/app/assets/javascripts/vendor/chartjs/Chart.bundle.min.js +10 -0
  135. data/app/assets/javascripts/vendor/chartjs/Chart.min.js +10 -0
  136. data/app/assets/javascripts/vendor/clipboardjs/clipboard.js +7 -0
  137. data/app/assets/javascripts/vendor/countTo/countTo.js +130 -0
  138. data/app/assets/javascripts/vendor/countdown/countdown.js +22 -0
  139. data/app/assets/javascripts/vendor/easypiechart/jquery.easypiechart.js +364 -0
  140. data/app/assets/javascripts/vendor/fastclick/fastclick.js +841 -0
  141. data/app/assets/javascripts/vendor/fitie/fitie.js +1 -0
  142. data/app/assets/javascripts/vendor/flot/flot-chart-resize.js +59 -0
  143. data/app/assets/javascripts/vendor/flot/flot-chart-stack.js +188 -0
  144. data/app/assets/javascripts/vendor/flot/flot-chart-time.js +432 -0
  145. data/app/assets/javascripts/vendor/flot/flot-chart.js +3168 -0
  146. data/app/assets/javascripts/vendor/gmaps/gmaps.js +2418 -0
  147. data/app/assets/javascripts/vendor/jasny/jasny_bootstrap.js +1020 -0
  148. data/app/assets/javascripts/vendor/jqvectormaps/jquery-jvectormap.css +135 -0
  149. data/app/assets/javascripts/vendor/jqvectormaps/jquery-jvectormap.js +3375 -0
  150. data/app/assets/javascripts/vendor/jqvectormaps/maps/More maps.txt +1 -0
  151. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-au-mill-en.js +1 -0
  152. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-ca-mill.js +1 -0
  153. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-cn-mill-en.js +1 -0
  154. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-de-mill-en.js +1 -0
  155. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-europe-mill-en.js +1 -0
  156. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-fr-mill-en.js +1 -0
  157. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-in-mill-en.js +1 -0
  158. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-us-aea-en.js +1 -0
  159. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-world-mill-en.js +1 -0
  160. data/app/assets/javascripts/vendor/jqvectormaps/maps/jquery-jvectormap-za-mill-en.js +1 -0
  161. data/app/assets/javascripts/vendor/metis_menu/metis_menu.js +337 -0
  162. data/app/assets/javascripts/vendor/modernizr/modernizr.2.8.3.min.js +1 -0
  163. data/app/assets/javascripts/vendor/parallax/parallax.js +6 -0
  164. data/app/assets/javascripts/vendor/popper/popper.js +4 -0
  165. data/app/assets/javascripts/vendor/prettify/prettify.js +1655 -0
  166. data/app/assets/javascripts/vendor/prism/prism-normalize-whitespace.js +190 -0
  167. data/app/assets/javascripts/vendor/prism/prism.js +819 -0
  168. data/app/assets/javascripts/vendor/slimscroll/slimscroll.js +288 -0
  169. data/app/assets/javascripts/vendor/sparklines/jquery.sparkline.js +3054 -0
  170. data/app/assets/stylesheets/kiso_themes/auriga/blue.css.erb +31497 -0
  171. data/app/assets/stylesheets/kiso_themes/auriga/green.css.erb +31497 -0
  172. data/app/assets/stylesheets/kiso_themes/auriga/red.css.erb +31497 -0
  173. data/app/assets/stylesheets/kiso_themes/auriga/yellow.css.erb +31497 -0
  174. data/app/assets/stylesheets/kiso_themes/carbon/black.css.erb +0 -0
  175. data/app/assets/stylesheets/kiso_themes/gemini/amber.css.erb +31469 -0
  176. data/app/assets/stylesheets/kiso_themes/gemini/blue.css.erb +31469 -0
  177. data/app/assets/stylesheets/kiso_themes/gemini/granite.css.erb +31469 -0
  178. data/app/assets/stylesheets/kiso_themes/gemini/ocean.css.erb +31469 -0
  179. data/app/assets/stylesheets/kiso_themes/lyra/azure.css.erb +31469 -0
  180. data/app/assets/stylesheets/kiso_themes/lyra/charcoal.css.erb +31469 -0
  181. data/app/assets/stylesheets/kiso_themes/lyra/lime.css.erb +31469 -0
  182. data/app/assets/stylesheets/kiso_themes/lyra/raspberry.css.erb +31469 -0
  183. data/app/assets/stylesheets/kiso_themes/orion/blue.css.erb +31469 -0
  184. data/app/assets/stylesheets/kiso_themes/orion/green.css.erb +31469 -0
  185. data/app/assets/stylesheets/kiso_themes/orion/orange.css.erb +31464 -0
  186. data/app/assets/stylesheets/kiso_themes/orion/purple.css.erb +31469 -0
  187. data/app/helpers/content_block_helper.rb +2 -0
  188. data/app/helpers/devices_helper.rb +67 -0
  189. data/app/helpers/dropdown_helper.rb +50 -0
  190. data/app/helpers/email_template_helper.rb +66 -0
  191. data/app/helpers/form_errors_helper.rb +50 -0
  192. data/app/helpers/form_group_helper.rb +48 -0
  193. data/app/helpers/html_helper.rb +57 -0
  194. data/app/helpers/icons_helper.rb +56 -0
  195. data/app/helpers/metrics_helper.rb +90 -0
  196. data/app/views/content_blocks/app_navs/_1.html.erb +124 -0
  197. data/app/views/content_blocks/app_navs/_1.html.haml +83 -0
  198. data/app/views/content_blocks/app_navs/_1.html.slim +83 -0
  199. data/app/views/content_blocks/app_navs/_2.html.erb +124 -0
  200. data/app/views/content_blocks/app_navs/_2.html.haml +81 -0
  201. data/app/views/content_blocks/app_navs/_2.html.slim +81 -0
  202. data/app/views/content_blocks/app_navs/_3.html.erb +129 -0
  203. data/app/views/content_blocks/app_navs/_3.html.haml +84 -0
  204. data/app/views/content_blocks/app_navs/_3.html.slim +84 -0
  205. data/app/views/content_blocks/app_navs/_4.html.erb +127 -0
  206. data/app/views/content_blocks/app_navs/_4.html.haml +82 -0
  207. data/app/views/content_blocks/app_navs/_4.html.slim +82 -0
  208. data/app/views/content_blocks/app_navs/_5.html.erb +47 -0
  209. data/app/views/content_blocks/app_navs/_5.html.haml +30 -0
  210. data/app/views/content_blocks/app_navs/_5.html.slim +30 -0
  211. data/app/views/content_blocks/basic/_1.html.erb +12 -0
  212. data/app/views/content_blocks/basic/_1.html.haml +8 -0
  213. data/app/views/content_blocks/basic/_1.html.slim +8 -0
  214. data/app/views/content_blocks/basic/_2.html.erb +12 -0
  215. data/app/views/content_blocks/basic/_2.html.haml +8 -0
  216. data/app/views/content_blocks/basic/_2.html.slim +8 -0
  217. data/app/views/content_blocks/basic/_3.html.erb +12 -0
  218. data/app/views/content_blocks/basic/_3.html.haml +8 -0
  219. data/app/views/content_blocks/basic/_3.html.slim +8 -0
  220. data/app/views/content_blocks/basic/_4.html.erb +20 -0
  221. data/app/views/content_blocks/basic/_4.html.haml +14 -0
  222. data/app/views/content_blocks/basic/_4.html.slim +14 -0
  223. data/app/views/content_blocks/basic/_5.html.erb +16 -0
  224. data/app/views/content_blocks/basic/_5.html.haml +11 -0
  225. data/app/views/content_blocks/basic/_5.html.slim +11 -0
  226. data/app/views/content_blocks/basic/_6.html.erb +11 -0
  227. data/app/views/content_blocks/basic/_6.html.haml +7 -0
  228. data/app/views/content_blocks/basic/_6.html.slim +7 -0
  229. data/app/views/content_blocks/basic/_7.html.erb +11 -0
  230. data/app/views/content_blocks/basic/_7.html.haml +7 -0
  231. data/app/views/content_blocks/basic/_7.html.slim +7 -0
  232. data/app/views/content_blocks/basic/_8.html.erb +19 -0
  233. data/app/views/content_blocks/basic/_8.html.haml +14 -0
  234. data/app/views/content_blocks/basic/_8.html.slim +14 -0
  235. data/app/views/content_blocks/general/_1.html.erb +14 -0
  236. data/app/views/content_blocks/general/_1.html.haml +14 -0
  237. data/app/views/content_blocks/general/_1.html.slim +14 -0
  238. data/app/views/content_blocks/general/_10.html.erb +11 -0
  239. data/app/views/content_blocks/general/_10.html.haml +9 -0
  240. data/app/views/content_blocks/general/_10.html.slim +9 -0
  241. data/app/views/content_blocks/general/_11.html.erb +11 -0
  242. data/app/views/content_blocks/general/_11.html.haml +9 -0
  243. data/app/views/content_blocks/general/_11.html.slim +9 -0
  244. data/app/views/content_blocks/general/_12.html.erb +60 -0
  245. data/app/views/content_blocks/general/_12.html.haml +40 -0
  246. data/app/views/content_blocks/general/_12.html.slim +40 -0
  247. data/app/views/content_blocks/general/_13.html.erb +11 -0
  248. data/app/views/content_blocks/general/_13.html.haml +8 -0
  249. data/app/views/content_blocks/general/_13.html.slim +8 -0
  250. data/app/views/content_blocks/general/_14.html.erb +18 -0
  251. data/app/views/content_blocks/general/_14.html.haml +11 -0
  252. data/app/views/content_blocks/general/_14.html.slim +11 -0
  253. data/app/views/content_blocks/general/_15.html.erb +50 -0
  254. data/app/views/content_blocks/general/_15.html.haml +30 -0
  255. data/app/views/content_blocks/general/_15.html.slim +30 -0
  256. data/app/views/content_blocks/general/_16.html.erb +54 -0
  257. data/app/views/content_blocks/general/_16.html.haml +34 -0
  258. data/app/views/content_blocks/general/_16.html.slim +34 -0
  259. data/app/views/content_blocks/general/_17.html.erb +11 -0
  260. data/app/views/content_blocks/general/_17.html.haml +9 -0
  261. data/app/views/content_blocks/general/_17.html.slim +9 -0
  262. data/app/views/content_blocks/general/_18.html.erb +11 -0
  263. data/app/views/content_blocks/general/_18.html.haml +10 -0
  264. data/app/views/content_blocks/general/_18.html.slim +10 -0
  265. data/app/views/content_blocks/general/_19.html.erb +11 -0
  266. data/app/views/content_blocks/general/_19.html.haml +9 -0
  267. data/app/views/content_blocks/general/_19.html.slim +9 -0
  268. data/app/views/content_blocks/general/_2.html.erb +14 -0
  269. data/app/views/content_blocks/general/_2.html.haml +14 -0
  270. data/app/views/content_blocks/general/_2.html.slim +14 -0
  271. data/app/views/content_blocks/general/_20.html.erb +9 -0
  272. data/app/views/content_blocks/general/_20.html.haml +6 -0
  273. data/app/views/content_blocks/general/_20.html.slim +6 -0
  274. data/app/views/content_blocks/general/_21.html.erb +9 -0
  275. data/app/views/content_blocks/general/_21.html.haml +6 -0
  276. data/app/views/content_blocks/general/_21.html.slim +6 -0
  277. data/app/views/content_blocks/general/_22.html.erb +13 -0
  278. data/app/views/content_blocks/general/_22.html.haml +8 -0
  279. data/app/views/content_blocks/general/_22.html.slim +8 -0
  280. data/app/views/content_blocks/general/_23.html.erb +13 -0
  281. data/app/views/content_blocks/general/_23.html.haml +8 -0
  282. data/app/views/content_blocks/general/_23.html.slim +8 -0
  283. data/app/views/content_blocks/general/_24.html.erb +60 -0
  284. data/app/views/content_blocks/general/_24.html.haml +40 -0
  285. data/app/views/content_blocks/general/_24.html.slim +40 -0
  286. data/app/views/content_blocks/general/_25.html.erb +60 -0
  287. data/app/views/content_blocks/general/_25.html.haml +40 -0
  288. data/app/views/content_blocks/general/_25.html.slim +40 -0
  289. data/app/views/content_blocks/general/_26.html.erb +11 -0
  290. data/app/views/content_blocks/general/_26.html.haml +7 -0
  291. data/app/views/content_blocks/general/_26.html.slim +7 -0
  292. data/app/views/content_blocks/general/_27.html.erb +13 -0
  293. data/app/views/content_blocks/general/_27.html.haml +8 -0
  294. data/app/views/content_blocks/general/_27.html.slim +8 -0
  295. data/app/views/content_blocks/general/_28.html.erb +13 -0
  296. data/app/views/content_blocks/general/_28.html.haml +8 -0
  297. data/app/views/content_blocks/general/_28.html.slim +8 -0
  298. data/app/views/content_blocks/general/_29.html.erb +13 -0
  299. data/app/views/content_blocks/general/_29.html.haml +8 -0
  300. data/app/views/content_blocks/general/_29.html.slim +8 -0
  301. data/app/views/content_blocks/general/_3.html.erb +12 -0
  302. data/app/views/content_blocks/general/_3.html.haml +8 -0
  303. data/app/views/content_blocks/general/_3.html.slim +8 -0
  304. data/app/views/content_blocks/general/_30.html.erb +40 -0
  305. data/app/views/content_blocks/general/_30.html.haml +38 -0
  306. data/app/views/content_blocks/general/_30.html.slim +38 -0
  307. data/app/views/content_blocks/general/_31.html.erb +19 -0
  308. data/app/views/content_blocks/general/_31.html.haml +17 -0
  309. data/app/views/content_blocks/general/_31.html.slim +17 -0
  310. data/app/views/content_blocks/general/_32.html.erb +51 -0
  311. data/app/views/content_blocks/general/_32.html.haml +45 -0
  312. data/app/views/content_blocks/general/_32.html.slim +45 -0
  313. data/app/views/content_blocks/general/_33.html.erb +10 -0
  314. data/app/views/content_blocks/general/_33.html.haml +6 -0
  315. data/app/views/content_blocks/general/_33.html.slim +6 -0
  316. data/app/views/content_blocks/general/_34.html.erb +23 -0
  317. data/app/views/content_blocks/general/_34.html.haml +18 -0
  318. data/app/views/content_blocks/general/_34.html.slim +18 -0
  319. data/app/views/content_blocks/general/_35.html.erb +86 -0
  320. data/app/views/content_blocks/general/_35.html.haml +63 -0
  321. data/app/views/content_blocks/general/_35.html.slim +63 -0
  322. data/app/views/content_blocks/general/_36.html.erb +87 -0
  323. data/app/views/content_blocks/general/_36.html.haml +67 -0
  324. data/app/views/content_blocks/general/_36.html.slim +67 -0
  325. data/app/views/content_blocks/general/_37.html.erb +68 -0
  326. data/app/views/content_blocks/general/_37.html.haml +52 -0
  327. data/app/views/content_blocks/general/_37.html.slim +52 -0
  328. data/app/views/content_blocks/general/_38.html.erb +61 -0
  329. data/app/views/content_blocks/general/_38.html.haml +54 -0
  330. data/app/views/content_blocks/general/_38.html.slim +54 -0
  331. data/app/views/content_blocks/general/_39.html.erb +16 -0
  332. data/app/views/content_blocks/general/_39.html.haml +10 -0
  333. data/app/views/content_blocks/general/_39.html.slim +10 -0
  334. data/app/views/content_blocks/general/_4.html.erb +12 -0
  335. data/app/views/content_blocks/general/_4.html.haml +8 -0
  336. data/app/views/content_blocks/general/_4.html.slim +8 -0
  337. data/app/views/content_blocks/general/_40!dark.html.erb +9 -0
  338. data/app/views/content_blocks/general/_40!dark.html.haml +6 -0
  339. data/app/views/content_blocks/general/_40!dark.html.slim +6 -0
  340. data/app/views/content_blocks/general/_5.html.erb +28 -0
  341. data/app/views/content_blocks/general/_5.html.haml +19 -0
  342. data/app/views/content_blocks/general/_5.html.slim +19 -0
  343. data/app/views/content_blocks/general/_6.html.erb +49 -0
  344. data/app/views/content_blocks/general/_6.html.haml +34 -0
  345. data/app/views/content_blocks/general/_6.html.slim +34 -0
  346. data/app/views/content_blocks/general/_7.html.erb +21 -0
  347. data/app/views/content_blocks/general/_7.html.haml +14 -0
  348. data/app/views/content_blocks/general/_7.html.slim +14 -0
  349. data/app/views/content_blocks/general/_8.html.erb +21 -0
  350. data/app/views/content_blocks/general/_8.html.haml +14 -0
  351. data/app/views/content_blocks/general/_8.html.slim +14 -0
  352. data/app/views/content_blocks/general/_9.html.erb +31 -0
  353. data/app/views/content_blocks/general/_9.html.haml +21 -0
  354. data/app/views/content_blocks/general/_9.html.slim +21 -0
  355. data/app/views/content_blocks/headers/_1.html.erb +59 -0
  356. data/app/views/content_blocks/headers/_1.html.haml +42 -0
  357. data/app/views/content_blocks/headers/_1.html.slim +42 -0
  358. data/app/views/content_blocks/headers/_10.html.erb +57 -0
  359. data/app/views/content_blocks/headers/_10.html.haml +41 -0
  360. data/app/views/content_blocks/headers/_10.html.slim +41 -0
  361. data/app/views/content_blocks/headers/_2.html.erb +51 -0
  362. data/app/views/content_blocks/headers/_2.html.haml +37 -0
  363. data/app/views/content_blocks/headers/_2.html.slim +37 -0
  364. data/app/views/content_blocks/headers/_3.html.erb +51 -0
  365. data/app/views/content_blocks/headers/_3.html.haml +37 -0
  366. data/app/views/content_blocks/headers/_3.html.slim +37 -0
  367. data/app/views/content_blocks/headers/_4.html.erb +78 -0
  368. data/app/views/content_blocks/headers/_4.html.haml +55 -0
  369. data/app/views/content_blocks/headers/_4.html.slim +55 -0
  370. data/app/views/content_blocks/headers/_5.html.erb +77 -0
  371. data/app/views/content_blocks/headers/_5.html.haml +55 -0
  372. data/app/views/content_blocks/headers/_5.html.slim +55 -0
  373. data/app/views/content_blocks/headers/_6.html.erb +50 -0
  374. data/app/views/content_blocks/headers/_6.html.haml +37 -0
  375. data/app/views/content_blocks/headers/_6.html.slim +37 -0
  376. data/app/views/content_blocks/headers/_7.html.erb +54 -0
  377. data/app/views/content_blocks/headers/_7.html.haml +39 -0
  378. data/app/views/content_blocks/headers/_7.html.slim +39 -0
  379. data/app/views/content_blocks/headers/_8.html.erb +77 -0
  380. data/app/views/content_blocks/headers/_8.html.haml +56 -0
  381. data/app/views/content_blocks/headers/_8.html.slim +56 -0
  382. data/app/views/content_blocks/headers/_9.html.erb +76 -0
  383. data/app/views/content_blocks/headers/_9.html.haml +53 -0
  384. data/app/views/content_blocks/headers/_9.html.slim +53 -0
  385. data/app/views/content_blocks/landing_navs/_1.html.erb +22 -0
  386. data/app/views/content_blocks/landing_navs/_1.html.haml +16 -0
  387. data/app/views/content_blocks/landing_navs/_1.html.slim +16 -0
  388. data/app/views/content_blocks/landing_navs/_2.html.erb +25 -0
  389. data/app/views/content_blocks/landing_navs/_2.html.haml +18 -0
  390. data/app/views/content_blocks/landing_navs/_2.html.slim +18 -0
  391. data/app/views/content_blocks/landing_navs/_3.html.erb +28 -0
  392. data/app/views/content_blocks/landing_navs/_3.html.haml +20 -0
  393. data/app/views/content_blocks/landing_navs/_3.html.slim +20 -0
  394. data/app/views/content_blocks/landing_navs/_4.html.erb +31 -0
  395. data/app/views/content_blocks/landing_navs/_4.html.haml +24 -0
  396. data/app/views/content_blocks/landing_navs/_4.html.slim +24 -0
  397. data/app/views/content_blocks/landing_navs/_5.html.erb +31 -0
  398. data/app/views/content_blocks/landing_navs/_5.html.haml +24 -0
  399. data/app/views/content_blocks/landing_navs/_5.html.slim +24 -0
  400. data/app/views/devise/erb/confirmations/new.html.erb +36 -0
  401. data/app/views/devise/erb/invitations/edit.html.erb +41 -0
  402. data/app/views/devise/erb/invitations/new.html.erb +37 -0
  403. data/app/views/devise/erb/mailer/confirmation_instructions.html.erb +18 -0
  404. data/app/views/devise/erb/mailer/invitation_instructions.html.erb +20 -0
  405. data/app/views/devise/erb/mailer/reset_password_instructions.html.erb +18 -0
  406. data/app/views/devise/erb/mailer/unlock_instructions.html.erb +19 -0
  407. data/app/views/devise/erb/passwords/edit.html.erb +44 -0
  408. data/app/views/devise/erb/passwords/new.html.erb +37 -0
  409. data/app/views/devise/erb/registrations/edit.html.erb +73 -0
  410. data/app/views/devise/erb/registrations/new.html.erb +48 -0
  411. data/app/views/devise/erb/sessions/new.html.erb +79 -0
  412. data/app/views/devise/erb/unlocks/new.html.erb +36 -0
  413. data/app/views/devise/haml/confirmations/new.html.haml +22 -0
  414. data/app/views/devise/haml/invitations/edit.html.haml +29 -0
  415. data/app/views/devise/haml/invitations/new.html.haml +21 -0
  416. data/app/views/devise/haml/mailer/confirmation_instructions.html.haml +10 -0
  417. data/app/views/devise/haml/mailer/invitation_instructions.html.haml +11 -0
  418. data/app/views/devise/haml/mailer/reset_password_instructions.html.haml +10 -0
  419. data/app/views/devise/haml/mailer/unlock_instructions.html.haml +10 -0
  420. data/app/views/devise/haml/passwords/edit.html.haml +27 -0
  421. data/app/views/devise/haml/passwords/new.html.haml +22 -0
  422. data/app/views/devise/haml/registrations/edit.html.haml +44 -0
  423. data/app/views/devise/haml/registrations/new.html.haml +30 -0
  424. data/app/views/devise/haml/sessions/new.html.haml +44 -0
  425. data/app/views/devise/haml/unlocks/new.html.haml +23 -0
  426. data/app/views/devise/slim/confirmations/new.html.haml +24 -0
  427. data/app/views/devise/slim/invitations/edit.html.haml +24 -0
  428. data/app/views/devise/slim/invitations/new.html.haml +20 -0
  429. data/app/views/devise/slim/mailer/confirmation_instructions.html.haml +26 -0
  430. data/app/views/devise/slim/mailer/invitation_instructions.html.haml +25 -0
  431. data/app/views/devise/slim/mailer/reset_password_instructions.html.haml +27 -0
  432. data/app/views/devise/slim/mailer/unlock_instructions.html.haml +27 -0
  433. data/app/views/devise/slim/passwords/edit.html.haml +26 -0
  434. data/app/views/devise/slim/passwords/new.html.haml +25 -0
  435. data/app/views/devise/slim/registrations/edit.html.haml +40 -0
  436. data/app/views/devise/slim/registrations/new.html.haml +32 -0
  437. data/app/views/devise/slim/sessions/new.html.haml +43 -0
  438. data/app/views/devise/slim/unlocks/new.html.haml +24 -0
  439. data/app/views/kaminari/_first_page.html.erb +15 -0
  440. data/app/views/kaminari/_gap.html.erb +8 -0
  441. data/app/views/kaminari/_gap.html.haml +2 -0
  442. data/app/views/kaminari/_last_page.html.erb +15 -0
  443. data/app/views/kaminari/_next_page.html.erb +15 -0
  444. data/app/views/kaminari/_next_page.html.haml +2 -0
  445. data/app/views/kaminari/_page.html.erb +12 -0
  446. data/app/views/kaminari/_page.html.haml +2 -0
  447. data/app/views/kaminari/_paginator.html.erb +27 -0
  448. data/app/views/kaminari/_paginator.html.haml +10 -0
  449. data/app/views/kaminari/_prev_page.html.erb +15 -0
  450. data/app/views/kaminari/_prev_page.html.haml +2 -0
  451. data/kiso_themes.gemspec +37 -0
  452. data/lib/generators/kiso_themes/analytics_dashboard_pages_generator.rb +16 -0
  453. data/lib/generators/kiso_themes/analytics_detail_pages_generator.rb +16 -0
  454. data/lib/generators/kiso_themes/app_pages_generator.rb +33 -0
  455. data/lib/generators/kiso_themes/blog_archive_pages_generator.rb +16 -0
  456. data/lib/generators/kiso_themes/blog_post_pages_generator.rb +16 -0
  457. data/lib/generators/kiso_themes/content_blocks_generator.rb +30 -0
  458. data/lib/generators/kiso_themes/customize_generator.rb +52 -0
  459. data/lib/generators/kiso_themes/dashboard_pages_generator.rb +37 -0
  460. data/lib/generators/kiso_themes/devise_generator.rb +45 -0
  461. data/lib/generators/kiso_themes/email_layout_generator.rb +41 -0
  462. data/lib/generators/kiso_themes/error_pages_generator.rb +19 -0
  463. data/lib/generators/kiso_themes/faq_pages_generator.rb +17 -0
  464. data/lib/generators/kiso_themes/handler_support.rb +27 -0
  465. data/lib/generators/kiso_themes/install_generator.rb +246 -0
  466. data/lib/generators/kiso_themes/landing_pages_generator.rb +16 -0
  467. data/lib/generators/kiso_themes/legal_pages_generator.rb +25 -0
  468. data/lib/generators/kiso_themes/page_generator.rb +37 -0
  469. data/lib/generators/kiso_themes/pricing_pages_generator.rb +10 -0
  470. data/lib/generators/kiso_themes/templates/README.tt +58 -0
  471. data/lib/generators/kiso_themes/templates/README_CUSTOMIZE +38 -0
  472. data/lib/generators/kiso_themes/templates/customizations/styles/auriga/blue.css.scss +120 -0
  473. data/lib/generators/kiso_themes/templates/customizations/styles/auriga/green.css.scss +120 -0
  474. data/lib/generators/kiso_themes/templates/customizations/styles/auriga/red.css.scss +120 -0
  475. data/lib/generators/kiso_themes/templates/customizations/styles/auriga/yellow.css.scss +120 -0
  476. data/lib/generators/kiso_themes/templates/customizations/styles/gemini/amber.css.scss +118 -0
  477. data/lib/generators/kiso_themes/templates/customizations/styles/gemini/blue.css.scss +118 -0
  478. data/lib/generators/kiso_themes/templates/customizations/styles/gemini/granite.css.scss +118 -0
  479. data/lib/generators/kiso_themes/templates/customizations/styles/gemini/ocean.css.scss +118 -0
  480. data/lib/generators/kiso_themes/templates/customizations/styles/lyra/azure.css.scss +119 -0
  481. data/lib/generators/kiso_themes/templates/customizations/styles/lyra/charcoal.css.scss +119 -0
  482. data/lib/generators/kiso_themes/templates/customizations/styles/lyra/lime.css.scss +119 -0
  483. data/lib/generators/kiso_themes/templates/customizations/styles/lyra/raspberry.css.scss +119 -0
  484. data/lib/generators/kiso_themes/templates/customizations/styles/orion/blue.css.scss +118 -0
  485. data/lib/generators/kiso_themes/templates/customizations/styles/orion/green.css.scss +118 -0
  486. data/lib/generators/kiso_themes/templates/customizations/styles/orion/orange.css.scss +118 -0
  487. data/lib/generators/kiso_themes/templates/customizations/styles/orion/purple.css.scss +118 -0
  488. data/lib/generators/kiso_themes/templates/error_pages/403.html.erb +66 -0
  489. data/lib/generators/kiso_themes/templates/error_pages/404.html.erb +67 -0
  490. data/lib/generators/kiso_themes/templates/error_pages/422.html.erb +66 -0
  491. data/lib/generators/kiso_themes/templates/error_pages/500.html.erb +67 -0
  492. data/lib/generators/kiso_themes/templates/kiso_themes.css +31 -0
  493. data/lib/generators/kiso_themes/templates/layouts/_app_nav.html.erb +124 -0
  494. data/lib/generators/kiso_themes/templates/layouts/_app_nav.html.haml +81 -0
  495. data/lib/generators/kiso_themes/templates/layouts/_app_nav.html.slim +81 -0
  496. data/lib/generators/kiso_themes/templates/layouts/_base.html.erb +34 -0
  497. data/lib/generators/kiso_themes/templates/layouts/_base.html.haml +19 -0
  498. data/lib/generators/kiso_themes/templates/layouts/_base.html.slim +19 -0
  499. data/lib/generators/kiso_themes/templates/layouts/_dashboard_top_nav.html.erb +134 -0
  500. data/lib/generators/kiso_themes/templates/layouts/_dashboard_top_nav.html.haml +87 -0
  501. data/lib/generators/kiso_themes/templates/layouts/_dashboard_top_nav.html.slim +87 -0
  502. data/lib/generators/kiso_themes/templates/layouts/_external_js_libs.html.erb +30 -0
  503. data/lib/generators/kiso_themes/templates/layouts/_external_js_libs.html.haml +17 -0
  504. data/lib/generators/kiso_themes/templates/layouts/_external_js_libs.html.slim +17 -0
  505. data/lib/generators/kiso_themes/templates/layouts/_flashes.html.erb +13 -0
  506. data/lib/generators/kiso_themes/templates/layouts/_flashes.html.haml +10 -0
  507. data/lib/generators/kiso_themes/templates/layouts/_flashes.html.slim +10 -0
  508. data/lib/generators/kiso_themes/templates/layouts/_side_menu.html.erb +66 -0
  509. data/lib/generators/kiso_themes/templates/layouts/_side_menu.html.haml +42 -0
  510. data/lib/generators/kiso_themes/templates/layouts/_side_menu.html.slim +42 -0
  511. data/lib/generators/kiso_themes/templates/layouts/_side_menu_header.html.erb +25 -0
  512. data/lib/generators/kiso_themes/templates/layouts/_side_menu_header.html.haml +16 -0
  513. data/lib/generators/kiso_themes/templates/layouts/_side_menu_header.html.slim +16 -0
  514. data/lib/generators/kiso_themes/templates/layouts/_side_menu_main_content.html.erb +0 -0
  515. data/lib/generators/kiso_themes/templates/layouts/_side_menu_main_content.html.haml +0 -0
  516. data/lib/generators/kiso_themes/templates/layouts/_side_menu_main_content.html.slim +1 -0
  517. data/lib/generators/kiso_themes/templates/layouts/application.html.erb +4 -0
  518. data/lib/generators/kiso_themes/templates/layouts/application.html.haml +3 -0
  519. data/lib/generators/kiso_themes/templates/layouts/application.html.slim +3 -0
  520. data/lib/generators/kiso_themes/templates/layouts/devise.html.erb +3 -0
  521. data/lib/generators/kiso_themes/templates/layouts/devise.html.haml +5 -0
  522. data/lib/generators/kiso_themes/templates/layouts/devise.html.slim +5 -0
  523. data/lib/generators/kiso_themes/templates/layouts/email.html.erb +68 -0
  524. data/lib/generators/kiso_themes/templates/layouts/email.html.haml +40 -0
  525. data/lib/generators/kiso_themes/templates/layouts/email.html.slim +40 -0
  526. data/lib/generators/kiso_themes/templates/layouts/landing.html.erb +3 -0
  527. data/lib/generators/kiso_themes/templates/layouts/landing.html.haml +2 -0
  528. data/lib/generators/kiso_themes/templates/layouts/landing.html.slim +2 -0
  529. data/lib/generators/kiso_themes/templates/layouts/scaffold.html.erb +25 -0
  530. data/lib/generators/kiso_themes/templates/layouts/scaffold.html.haml +15 -0
  531. data/lib/generators/kiso_themes/templates/layouts/scaffold.html.slim +15 -0
  532. data/lib/generators/kiso_themes/templates/layouts/sidenav.html.erb +33 -0
  533. data/lib/generators/kiso_themes/templates/layouts/sidenav.html.haml +19 -0
  534. data/lib/generators/kiso_themes/templates/layouts/sidenav.html.slim +19 -0
  535. data/lib/generators/kiso_themes/templates/rails6/index.js +39 -0
  536. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/bootstrap.js +20 -0
  537. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/bootstrap_switch.js +23 -0
  538. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/chartjs.js +11 -0
  539. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/clipboard.js +12 -0
  540. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/countTo.js +1 -0
  541. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/countdown.js +28 -0
  542. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/chartjs.js +101 -0
  543. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/dashboard.js +229 -0
  544. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/data_generator.js +27 -0
  545. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/easypiechart.js +41 -0
  546. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/flot.js +258 -0
  547. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/gmaps.js +163 -0
  548. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/jqvectormap.js +65 -0
  549. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/demo/sparklines.js +156 -0
  550. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/easypiechart.js +12 -0
  551. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/fastclick.js +16 -0
  552. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/fitie.js +14 -0
  553. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/flot.js +11 -0
  554. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/forms.js +13 -0
  555. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/gmaps.js +9 -0
  556. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/header.js +33 -0
  557. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/inspect_mode/inspect_mode.js +580 -0
  558. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/jasny.js +13 -0
  559. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/jqvectormaps.js +24 -0
  560. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/kernel.js +48 -0
  561. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/metis_menu.js +16 -0
  562. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/parallax.js +14 -0
  563. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/popper.js +1 -0
  564. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/prettify.js +12 -0
  565. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/prism.js +10 -0
  566. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/sheets.js +98 -0
  567. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/sidenav.js +77 -0
  568. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/slimscroll.js +1 -0
  569. data/lib/generators/kiso_themes/templates/rails6/kiso_themes/sparklines.js +1 -0
  570. data/lib/generators/kiso_themes/templates/views/analytics/analytics_dashboard_1.html.erb +55 -0
  571. data/lib/generators/kiso_themes/templates/views/analytics/analytics_dashboard_1.html.haml +36 -0
  572. data/lib/generators/kiso_themes/templates/views/analytics/analytics_dashboard_1.html.slim +36 -0
  573. data/lib/generators/kiso_themes/templates/views/analytics/analytics_detail_1.html.erb +52 -0
  574. data/lib/generators/kiso_themes/templates/views/analytics/analytics_detail_1.html.haml +44 -0
  575. data/lib/generators/kiso_themes/templates/views/analytics/analytics_detail_1.html.slim +44 -0
  576. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_avatar_upload.html.erb +15 -0
  577. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_avatar_upload.html.haml +10 -0
  578. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_avatar_upload.html.slim +10 -0
  579. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_billing.html.erb +48 -0
  580. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_billing.html.haml +34 -0
  581. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_billing.html.slim +34 -0
  582. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_notifications.html.erb +59 -0
  583. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_notifications.html.haml +42 -0
  584. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_notifications.html.slim +42 -0
  585. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_plan.html.erb +70 -0
  586. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_plan.html.haml +47 -0
  587. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_plan.html.slim +47 -0
  588. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_profile.html.erb +65 -0
  589. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_profile.html.haml +51 -0
  590. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_profile.html.slim +51 -0
  591. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_support.html.erb +76 -0
  592. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_support.html.haml +50 -0
  593. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/_user_account/_support.html.slim +50 -0
  594. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/billing.html.erb +76 -0
  595. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/billing.html.haml +41 -0
  596. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/billing.html.slim +41 -0
  597. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/notifications.html.erb +76 -0
  598. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/notifications.html.haml +41 -0
  599. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/notifications.html.slim +41 -0
  600. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/plan.html.erb +76 -0
  601. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/plan.html.haml +41 -0
  602. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/plan.html.slim +41 -0
  603. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/profile.html.erb +75 -0
  604. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/profile.html.haml +41 -0
  605. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/profile.html.slim +41 -0
  606. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/support.html.erb +76 -0
  607. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/support.html.haml +41 -0
  608. data/lib/generators/kiso_themes/templates/views/app_pages/user_account/support.html.slim +41 -0
  609. data/lib/generators/kiso_themes/templates/views/dashboards/_bs_table.html.erb +61 -0
  610. data/lib/generators/kiso_themes/templates/views/dashboards/_bs_table.html.haml +50 -0
  611. data/lib/generators/kiso_themes/templates/views/dashboards/_bs_table.html.slim +50 -0
  612. data/lib/generators/kiso_themes/templates/views/dashboards/_metric_charts.html.erb +38 -0
  613. data/lib/generators/kiso_themes/templates/views/dashboards/_metric_charts.html.haml +25 -0
  614. data/lib/generators/kiso_themes/templates/views/dashboards/_metric_charts.html.slim +25 -0
  615. data/lib/generators/kiso_themes/templates/views/dashboards/_metrics_cards.html.erb +74 -0
  616. data/lib/generators/kiso_themes/templates/views/dashboards/_metrics_cards.html.haml +45 -0
  617. data/lib/generators/kiso_themes/templates/views/dashboards/_metrics_cards.html.slim +45 -0
  618. data/lib/generators/kiso_themes/templates/views/dashboards/_most_active_users.html.erb +137 -0
  619. data/lib/generators/kiso_themes/templates/views/dashboards/_most_active_users.html.haml +135 -0
  620. data/lib/generators/kiso_themes/templates/views/dashboards/_most_active_users.html.slim +135 -0
  621. data/lib/generators/kiso_themes/templates/views/dashboards/_online_users.html.erb +11 -0
  622. data/lib/generators/kiso_themes/templates/views/dashboards/_online_users.html.haml +7 -0
  623. data/lib/generators/kiso_themes/templates/views/dashboards/_online_users.html.slim +7 -0
  624. data/lib/generators/kiso_themes/templates/views/dashboards/_sales_refunds.html.erb +54 -0
  625. data/lib/generators/kiso_themes/templates/views/dashboards/_sales_refunds.html.haml +36 -0
  626. data/lib/generators/kiso_themes/templates/views/dashboards/_sales_refunds.html.slim +36 -0
  627. data/lib/generators/kiso_themes/templates/views/dashboards/_server_activity.html.erb +102 -0
  628. data/lib/generators/kiso_themes/templates/views/dashboards/_server_activity.html.haml +80 -0
  629. data/lib/generators/kiso_themes/templates/views/dashboards/_server_activity.html.slim +80 -0
  630. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_1.html.erb +11 -0
  631. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_1.html.haml +321 -0
  632. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_1.html.slim +321 -0
  633. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_2.html.erb +437 -0
  634. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_2.html.haml +306 -0
  635. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_2.html.slim +306 -0
  636. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_3.html.erb +148 -0
  637. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_3.html.haml +96 -0
  638. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_3.html.slim +96 -0
  639. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_4.html.erb +126 -0
  640. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_4.html.haml +77 -0
  641. data/lib/generators/kiso_themes/templates/views/dashboards/dashboard_4.html.slim +77 -0
  642. data/lib/generators/kiso_themes/templates/views/emails/_email_footer.html.erb +16 -0
  643. data/lib/generators/kiso_themes/templates/views/emails/_email_footer.html.haml +15 -0
  644. data/lib/generators/kiso_themes/templates/views/emails/_email_footer.html.slim +15 -0
  645. data/lib/generators/kiso_themes/templates/views/emails/_email_header.html.erb +20 -0
  646. data/lib/generators/kiso_themes/templates/views/emails/_email_header.html.haml +13 -0
  647. data/lib/generators/kiso_themes/templates/views/emails/_email_header.html.slim +13 -0
  648. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_archive_1.html.erb +92 -0
  649. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_archive_1.html.haml +80 -0
  650. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_archive_1.html.slim +80 -0
  651. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_post_1.html.erb +227 -0
  652. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_post_1.html.haml +168 -0
  653. data/lib/generators/kiso_themes/templates/views/frontend_pages/blog_pages/blog_post_1.html.slim +168 -0
  654. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/403.html.erb +17 -0
  655. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/403.html.haml +11 -0
  656. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/403.html.slim +11 -0
  657. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/404.html.erb +18 -0
  658. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/404.html.haml +11 -0
  659. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/404.html.slim +11 -0
  660. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/422.html.erb +18 -0
  661. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/422.html.haml +11 -0
  662. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/422.html.slim +11 -0
  663. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/500.html.erb +16 -0
  664. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/500.html.haml +10 -0
  665. data/lib/generators/kiso_themes/templates/views/frontend_pages/error_pages/500.html.slim +10 -0
  666. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_1.html.erb +103 -0
  667. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_1.html.haml +88 -0
  668. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_1.html.slim +88 -0
  669. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_2.html.erb +89 -0
  670. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_2.html.haml +57 -0
  671. data/lib/generators/kiso_themes/templates/views/frontend_pages/faq_pages/faq_page_2.html.slim +57 -0
  672. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_1.html.erb +41 -0
  673. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_1.html.haml +26 -0
  674. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_1.html.slim +26 -0
  675. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_2.html.erb +38 -0
  676. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_2.html.haml +23 -0
  677. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_2.html.slim +23 -0
  678. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_3.html.erb +185 -0
  679. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_3.html.haml +138 -0
  680. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_3.html.slim +138 -0
  681. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_4.html.erb +96 -0
  682. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_4.html.haml +58 -0
  683. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_4.html.slim +58 -0
  684. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_5.html.erb +26 -0
  685. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_5.html.haml +13 -0
  686. data/lib/generators/kiso_themes/templates/views/frontend_pages/landing_pages/landing_page_5.html.slim +13 -0
  687. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/privacy_page.html.erb +159 -0
  688. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/privacy_page.html.haml +100 -0
  689. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/privacy_page.html.slim +100 -0
  690. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/terms_of_service_page.html.erb +205 -0
  691. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/terms_of_service_page.html.haml +206 -0
  692. data/lib/generators/kiso_themes/templates/views/frontend_pages/legal_pages/terms_of_service_page.html.slim +206 -0
  693. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_1.html.erb +64 -0
  694. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_1.html.haml +37 -0
  695. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_1.html.slim +37 -0
  696. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_2.html.erb +63 -0
  697. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_2.html.haml +36 -0
  698. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_2.html.slim +36 -0
  699. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_3.html.erb +63 -0
  700. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_3.html.haml +36 -0
  701. data/lib/generators/kiso_themes/templates/views/frontend_pages/pricing_pages/pricing_page_3.html.slim +36 -0
  702. data/lib/generators/kiso_themes/user_account_pages_generator.rb +47 -0
  703. data/lib/generators/rails/scaffold_controller_generator.rb +37 -0
  704. data/lib/generators/rails/templates/controller.rb +70 -0
  705. data/lib/kiso_themes/compatibility.rb +9 -0
  706. data/lib/kiso_themes/engine.rb +87 -0
  707. data/lib/kiso_themes/extensions/simple_form/errors_component.rb +13 -0
  708. data/lib/kiso_themes/extensions/simple_form/form_builder.rb +17 -0
  709. data/lib/kiso_themes/extensions/simple_form/required_component.rb +21 -0
  710. data/lib/kiso_themes/extensions/simple_form/setup.rb +201 -0
  711. data/lib/kiso_themes/extensions/simple_form.rb +4 -0
  712. data/lib/kiso_themes/extensions/will_paginate.rb +30 -0
  713. data/lib/kiso_themes/kiso_themes.rb +3 -0
  714. data/lib/kiso_themes/railtie.rb +7 -0
  715. data/lib/kiso_themes/version.rb +41 -0
  716. data/lib/kiso_themes.rb +1 -0
  717. data/lib/sass/kiso_themes/_core/_accordion.scss +27 -0
  718. data/lib/sass/kiso_themes/_core/_alerts.scss +150 -0
  719. data/lib/sass/kiso_themes/_core/_backgrounds.scss +108 -0
  720. data/lib/sass/kiso_themes/_core/_badges.scss +45 -0
  721. data/lib/sass/kiso_themes/_core/_blog.scss +17 -0
  722. data/lib/sass/kiso_themes/_core/_borders.scss +34 -0
  723. data/lib/sass/kiso_themes/_core/_breadcrumbs.scss +82 -0
  724. data/lib/sass/kiso_themes/_core/_buttons.scss +202 -0
  725. data/lib/sass/kiso_themes/_core/_cards.scss +166 -0
  726. data/lib/sass/kiso_themes/_core/_carousel.scss +15 -0
  727. data/lib/sass/kiso_themes/_core/_checkboxes-radio.scss +240 -0
  728. data/lib/sass/kiso_themes/_core/_dropdown.scss +225 -0
  729. data/lib/sass/kiso_themes/_core/_font_family.scss +1 -0
  730. data/lib/sass/kiso_themes/_core/_footers.scss +44 -0
  731. data/lib/sass/kiso_themes/_core/_grid.scss +9 -0
  732. data/lib/sass/kiso_themes/_core/_images.scss +7 -0
  733. data/lib/sass/kiso_themes/_core/_input_groups.scss +139 -0
  734. data/lib/sass/kiso_themes/_core/_inputs.scss +280 -0
  735. data/lib/sass/kiso_themes/_core/_landing_headers.scss +15 -0
  736. data/lib/sass/kiso_themes/_core/_listgroups.scss +16 -0
  737. data/lib/sass/kiso_themes/_core/_loaders.scss +690 -0
  738. data/lib/sass/kiso_themes/_core/_misc.scss +239 -0
  739. data/lib/sass/kiso_themes/_core/_mixins.scss +18 -0
  740. data/lib/sass/kiso_themes/_core/_modals.scss +190 -0
  741. data/lib/sass/kiso_themes/_core/_navbar.scss +260 -0
  742. data/lib/sass/kiso_themes/_core/_navs.scss +123 -0
  743. data/lib/sass/kiso_themes/_core/_page_components.scss +275 -0
  744. data/lib/sass/kiso_themes/_core/_pagination.scss +152 -0
  745. data/lib/sass/kiso_themes/_core/_pills.scss +131 -0
  746. data/lib/sass/kiso_themes/_core/_popover.scss +59 -0
  747. data/lib/sass/kiso_themes/_core/_pricing_tables.scss +111 -0
  748. data/lib/sass/kiso_themes/_core/_progress.scss +138 -0
  749. data/lib/sass/kiso_themes/_core/_responsive.scss +237 -0
  750. data/lib/sass/kiso_themes/_core/_scaffold.scss +6 -0
  751. data/lib/sass/kiso_themes/_core/_sidenav.scss +433 -0
  752. data/lib/sass/kiso_themes/_core/_simple_animations.scss +116 -0
  753. data/lib/sass/kiso_themes/_core/_tables.scss +22 -0
  754. data/lib/sass/kiso_themes/_core/_tabs.scss +162 -0
  755. data/lib/sass/kiso_themes/_core/_timelines.scss +54 -0
  756. data/lib/sass/kiso_themes/_core/_tooltips.scss +28 -0
  757. data/lib/sass/kiso_themes/_core/_typography.scss +400 -0
  758. data/lib/sass/kiso_themes/_core/_variables.scss +431 -0
  759. data/lib/sass/kiso_themes/_core/cards/_card_activity_feed.scss +84 -0
  760. data/lib/sass/kiso_themes/_core/cards/_card_chat.scss +93 -0
  761. data/lib/sass/kiso_themes/_core/cards/_card_images.scss +114 -0
  762. data/lib/sass/kiso_themes/_core/cards/_card_items.scss +72 -0
  763. data/lib/sass/kiso_themes/_core/cards/_card_metric.scss +134 -0
  764. data/lib/sass/kiso_themes/_core/cards/_card_sheet.scss +31 -0
  765. data/lib/sass/kiso_themes/_core/cards/_card_table.scss +28 -0
  766. data/lib/sass/kiso_themes/_core/cards/_card_tiles.scss +27 -0
  767. data/lib/sass/kiso_themes/_core/cards/_cards_mini.scss +142 -0
  768. data/lib/sass/kiso_themes/_core/devise/1.scss +40 -0
  769. data/lib/sass/kiso_themes/_core/landing_pages/landing_1.scss +6 -0
  770. data/lib/sass/kiso_themes/_core/landing_pages/landing_2.scss +35 -0
  771. data/lib/sass/kiso_themes/_core/landing_pages/landing_3.scss +11 -0
  772. data/lib/sass/kiso_themes/_core/landing_pages/landing_4.scss +10 -0
  773. data/lib/sass/kiso_themes/_core/landing_pages/landing_5.scss +11 -0
  774. data/lib/sass/kiso_themes/_core/mixins/_badges.scss +4 -0
  775. data/lib/sass/kiso_themes/_core/mixins/_buttons.scss +128 -0
  776. data/lib/sass/kiso_themes/_core/mixins/_colors.scss +17 -0
  777. data/lib/sass/kiso_themes/_core/mixins/_datepicker.scss +121 -0
  778. data/lib/sass/kiso_themes/_core/mixins/_dropdown.scss +30 -0
  779. data/lib/sass/kiso_themes/_core/mixins/_inputs.scss +117 -0
  780. data/lib/sass/kiso_themes/_core/mixins/_modals.scss +12 -0
  781. data/lib/sass/kiso_themes/_core/mixins/_navbar.scss +261 -0
  782. data/lib/sass/kiso_themes/_core/mixins/_pages.scss +7 -0
  783. data/lib/sass/kiso_themes/_core/mixins/_popovers.scss +29 -0
  784. data/lib/sass/kiso_themes/_core/mixins/_theme.scss +239 -0
  785. data/lib/sass/kiso_themes/_core/mixins/_transparency.scss +8 -0
  786. data/lib/sass/kiso_themes/_core/mixins/_vendor-prefixes.scss +317 -0
  787. data/lib/sass/kiso_themes/_core/plugins/_easy_pie_chart.scss +21 -0
  788. data/lib/sass/kiso_themes/_core/plugins/_jasny_bootstrap.scss +7 -0
  789. data/lib/sass/kiso_themes/_core/plugins/_jquery_sparklines.scss +6 -0
  790. data/lib/sass/kiso_themes/_core/plugins/_jqvectormap.scss +135 -0
  791. data/lib/sass/kiso_themes/_core/plugins/_plugin-bootstrap-switch.scss +220 -0
  792. data/lib/sass/kiso_themes/_core/plugins/_plugin-datepicker.scss +554 -0
  793. data/lib/sass/kiso_themes/_core/plugins/_plugin-nouislider.scss +351 -0
  794. data/lib/sass/kiso_themes/auriga/_cards.scss +3 -0
  795. data/lib/sass/kiso_themes/auriga/_font_family.scss +1 -0
  796. data/lib/sass/kiso_themes/auriga/_tables.scss +54 -0
  797. data/lib/sass/kiso_themes/auriga/styles/_blue_variables.scss +102 -0
  798. data/lib/sass/kiso_themes/auriga/styles/_green_variables.scss +82 -0
  799. data/lib/sass/kiso_themes/auriga/styles/_red_variables.scss +82 -0
  800. data/lib/sass/kiso_themes/auriga/styles/_yellow_variables.scss +82 -0
  801. data/lib/sass/kiso_themes/gemini/_font_family.scss +1 -0
  802. data/lib/sass/kiso_themes/gemini/styles/_amber_variables.scss +54 -0
  803. data/lib/sass/kiso_themes/gemini/styles/_blue_variables.scss +52 -0
  804. data/lib/sass/kiso_themes/gemini/styles/_granite_variables.scss +55 -0
  805. data/lib/sass/kiso_themes/gemini/styles/_ocean_variables.scss +54 -0
  806. data/lib/sass/kiso_themes/lyra/_font_family.scss +1 -0
  807. data/lib/sass/kiso_themes/lyra/styles/_azure_variables.scss +56 -0
  808. data/lib/sass/kiso_themes/lyra/styles/_charcoal_variables.scss +56 -0
  809. data/lib/sass/kiso_themes/lyra/styles/_lime_variables.scss +56 -0
  810. data/lib/sass/kiso_themes/lyra/styles/_raspberry_variables.scss +56 -0
  811. data/lib/sass/kiso_themes/orion/_font_family.scss +1 -0
  812. data/lib/sass/kiso_themes/orion/styles/_blue_variables.scss +71 -0
  813. data/lib/sass/kiso_themes/orion/styles/_green_variables.scss +56 -0
  814. data/lib/sass/kiso_themes/orion/styles/_orange_variables.scss +48 -0
  815. data/lib/sass/kiso_themes/orion/styles/_purple_variables.scss +57 -0
  816. data/lib/sass/vendor/bootstrap/_alert.scss +51 -0
  817. data/lib/sass/vendor/bootstrap/_badge.scss +54 -0
  818. data/lib/sass/vendor/bootstrap/_breadcrumb.scss +41 -0
  819. data/lib/sass/vendor/bootstrap/_button-group.scss +163 -0
  820. data/lib/sass/vendor/bootstrap/_buttons.scss +137 -0
  821. data/lib/sass/vendor/bootstrap/_card.scss +289 -0
  822. data/lib/sass/vendor/bootstrap/_carousel.scss +197 -0
  823. data/lib/sass/vendor/bootstrap/_close.scss +41 -0
  824. data/lib/sass/vendor/bootstrap/_code.scss +48 -0
  825. data/lib/sass/vendor/bootstrap/_custom-forms.scss +507 -0
  826. data/lib/sass/vendor/bootstrap/_dropdown.scss +191 -0
  827. data/lib/sass/vendor/bootstrap/_forms.scss +330 -0
  828. data/lib/sass/vendor/bootstrap/_functions.scss +86 -0
  829. data/lib/sass/vendor/bootstrap/_grid.scss +52 -0
  830. data/lib/sass/vendor/bootstrap/_images.scss +42 -0
  831. data/lib/sass/vendor/bootstrap/_input-group.scss +193 -0
  832. data/lib/sass/vendor/bootstrap/_jumbotron.scss +17 -0
  833. data/lib/sass/vendor/bootstrap/_list-group.scss +149 -0
  834. data/lib/sass/vendor/bootstrap/_media.scss +8 -0
  835. data/lib/sass/vendor/bootstrap/_mixins.scss +47 -0
  836. data/lib/sass/vendor/bootstrap/_modal.scss +229 -0
  837. data/lib/sass/vendor/bootstrap/_nav.scss +120 -0
  838. data/lib/sass/vendor/bootstrap/_navbar.scss +294 -0
  839. data/lib/sass/vendor/bootstrap/_pagination.scss +83 -0
  840. data/lib/sass/vendor/bootstrap/_popover.scss +171 -0
  841. data/lib/sass/vendor/bootstrap/_print.scss +141 -0
  842. data/lib/sass/vendor/bootstrap/_progress.scss +43 -0
  843. data/lib/sass/vendor/bootstrap/_reboot.scss +483 -0
  844. data/lib/sass/vendor/bootstrap/_root.scss +19 -0
  845. data/lib/sass/vendor/bootstrap/_spinners.scss +55 -0
  846. data/lib/sass/vendor/bootstrap/_tables.scss +185 -0
  847. data/lib/sass/vendor/bootstrap/_toasts.scss +44 -0
  848. data/lib/sass/vendor/bootstrap/_tooltip.scss +115 -0
  849. data/lib/sass/vendor/bootstrap/_transitions.scss +20 -0
  850. data/lib/sass/vendor/bootstrap/_type.scss +125 -0
  851. data/lib/sass/vendor/bootstrap/_utilities.scss +17 -0
  852. data/lib/sass/vendor/bootstrap/_variables.scss +1123 -0
  853. data/lib/sass/vendor/bootstrap/bootstrap-grid.scss +29 -0
  854. data/lib/sass/vendor/bootstrap/bootstrap-reboot.scss +12 -0
  855. data/lib/sass/vendor/bootstrap/bootstrap.scss +44 -0
  856. data/lib/sass/vendor/bootstrap/mixins/_alert.scss +13 -0
  857. data/lib/sass/vendor/bootstrap/mixins/_background-variant.scss +21 -0
  858. data/lib/sass/vendor/bootstrap/mixins/_badge.scss +17 -0
  859. data/lib/sass/vendor/bootstrap/mixins/_border-radius.scss +63 -0
  860. data/lib/sass/vendor/bootstrap/mixins/_box-shadow.scss +20 -0
  861. data/lib/sass/vendor/bootstrap/mixins/_breakpoints.scss +123 -0
  862. data/lib/sass/vendor/bootstrap/mixins/_buttons.scss +107 -0
  863. data/lib/sass/vendor/bootstrap/mixins/_caret.scss +62 -0
  864. data/lib/sass/vendor/bootstrap/mixins/_clearfix.scss +7 -0
  865. data/lib/sass/vendor/bootstrap/mixins/_deprecate.scss +10 -0
  866. data/lib/sass/vendor/bootstrap/mixins/_float.scss +14 -0
  867. data/lib/sass/vendor/bootstrap/mixins/_forms.scss +192 -0
  868. data/lib/sass/vendor/bootstrap/mixins/_gradients.scss +45 -0
  869. data/lib/sass/vendor/bootstrap/mixins/_grid-framework.scss +66 -0
  870. data/lib/sass/vendor/bootstrap/mixins/_grid.scss +51 -0
  871. data/lib/sass/vendor/bootstrap/mixins/_hover.scss +37 -0
  872. data/lib/sass/vendor/bootstrap/mixins/_image.scss +36 -0
  873. data/lib/sass/vendor/bootstrap/mixins/_list-group.scss +21 -0
  874. data/lib/sass/vendor/bootstrap/mixins/_lists.scss +7 -0
  875. data/lib/sass/vendor/bootstrap/mixins/_nav-divider.scss +10 -0
  876. data/lib/sass/vendor/bootstrap/mixins/_pagination.scss +22 -0
  877. data/lib/sass/vendor/bootstrap/mixins/_reset-text.scss +17 -0
  878. data/lib/sass/vendor/bootstrap/mixins/_resize.scss +6 -0
  879. data/lib/sass/vendor/bootstrap/mixins/_screen-reader.scss +33 -0
  880. data/lib/sass/vendor/bootstrap/mixins/_size.scss +7 -0
  881. data/lib/sass/vendor/bootstrap/mixins/_table-row.scss +39 -0
  882. data/lib/sass/vendor/bootstrap/mixins/_text-emphasis.scss +16 -0
  883. data/lib/sass/vendor/bootstrap/mixins/_text-hide.scss +11 -0
  884. data/lib/sass/vendor/bootstrap/mixins/_text-truncate.scss +8 -0
  885. data/lib/sass/vendor/bootstrap/mixins/_transition.scss +16 -0
  886. data/lib/sass/vendor/bootstrap/mixins/_visibility.scss +8 -0
  887. data/lib/sass/vendor/bootstrap/utilities/_align.scss +8 -0
  888. data/lib/sass/vendor/bootstrap/utilities/_background.scss +19 -0
  889. data/lib/sass/vendor/bootstrap/utilities/_borders.scss +75 -0
  890. data/lib/sass/vendor/bootstrap/utilities/_clearfix.scss +3 -0
  891. data/lib/sass/vendor/bootstrap/utilities/_display.scss +26 -0
  892. data/lib/sass/vendor/bootstrap/utilities/_embed.scss +39 -0
  893. data/lib/sass/vendor/bootstrap/utilities/_flex.scss +51 -0
  894. data/lib/sass/vendor/bootstrap/utilities/_float.scss +11 -0
  895. data/lib/sass/vendor/bootstrap/utilities/_overflow.scss +5 -0
  896. data/lib/sass/vendor/bootstrap/utilities/_position.scss +32 -0
  897. data/lib/sass/vendor/bootstrap/utilities/_screenreaders.scss +11 -0
  898. data/lib/sass/vendor/bootstrap/utilities/_shadows.scss +6 -0
  899. data/lib/sass/vendor/bootstrap/utilities/_sizing.scss +20 -0
  900. data/lib/sass/vendor/bootstrap/utilities/_spacing.scss +73 -0
  901. data/lib/sass/vendor/bootstrap/utilities/_stretched-link.scss +19 -0
  902. data/lib/sass/vendor/bootstrap/utilities/_text.scss +72 -0
  903. data/lib/sass/vendor/bootstrap/utilities/_visibility.scss +13 -0
  904. data/lib/sass/vendor/bootstrap/vendor/_rfs.scss +204 -0
  905. data/lib/sass/vendor/font_awesome/_animated.scss +34 -0
  906. data/lib/sass/vendor/font_awesome/_bordered-pulled.scss +25 -0
  907. data/lib/sass/vendor/font_awesome/_core.scss +12 -0
  908. data/lib/sass/vendor/font_awesome/_fixed-width.scss +6 -0
  909. data/lib/sass/vendor/font_awesome/_icons.scss +789 -0
  910. data/lib/sass/vendor/font_awesome/_larger.scss +13 -0
  911. data/lib/sass/vendor/font_awesome/_list.scss +19 -0
  912. data/lib/sass/vendor/font_awesome/_mixins.scss +60 -0
  913. data/lib/sass/vendor/font_awesome/_path.scss +14 -0
  914. data/lib/sass/vendor/font_awesome/_rotated-flipped.scss +20 -0
  915. data/lib/sass/vendor/font_awesome/_screen-reader.scss +5 -0
  916. data/lib/sass/vendor/font_awesome/_stacked.scss +20 -0
  917. data/lib/sass/vendor/font_awesome/_variables.scss +800 -0
  918. data/lib/sass/vendor/font_awesome/font-awesome.scss +18 -0
  919. data/lib/sass/vendor/ionicons/_ionicons-font.scss +27 -0
  920. data/lib/sass/vendor/ionicons/_ionicons-icons.scss +1473 -0
  921. data/lib/sass/vendor/ionicons/_ionicons-variables.scss +741 -0
  922. data/lib/sass/vendor/ionicons/ionicons.scss +15 -0
  923. data/lib/sass/vendor/mdiicons/_icons-material-design.scss +42 -0
  924. data/lib/sass/vendor/prism/twilight.css +198 -0
  925. data/lib/sass/vendor/themify/themify-icons.css +1082 -0
  926. data/lib/templates/erb/scaffold/_form.html.erb +50 -0
  927. data/lib/templates/erb/scaffold/edit.html.erb +37 -0
  928. data/lib/templates/erb/scaffold/index.html.erb +80 -0
  929. data/lib/templates/erb/scaffold/new.html.erb +37 -0
  930. data/lib/templates/erb/scaffold/show.html.erb +53 -0
  931. data/lib/templates/haml/scaffold/_form.html.haml +29 -0
  932. data/lib/templates/haml/scaffold/edit.html.haml +6 -0
  933. data/lib/templates/haml/scaffold/index.html.haml +41 -0
  934. data/lib/templates/haml/scaffold/new.html.haml +6 -0
  935. data/lib/templates/haml/scaffold/show.html.haml +16 -0
  936. data/lib/templates/slim/scaffold/_form.html.haml +29 -0
  937. data/lib/templates/slim/scaffold/edit.html.haml +6 -0
  938. data/lib/templates/slim/scaffold/index.html.haml +41 -0
  939. data/lib/templates/slim/scaffold/new.html.haml +6 -0
  940. data/lib/templates/slim/scaffold/show.html.haml +16 -0
  941. data/support/content_block_rewriter.rb +25 -0
  942. data/support/css_rewriter.rb +76 -0
  943. data/support/page_rewriter.rb +27 -0
  944. metadata +1091 -0
@@ -0,0 +1,2418 @@
1
+ "use strict";
2
+ (function(root, factory) {
3
+ if(typeof exports === 'object') {
4
+ module.exports = factory();
5
+ }
6
+ else if(typeof define === 'function' && define.amd) {
7
+ define(['jquery', 'googlemaps!'], factory);
8
+ }
9
+ else {
10
+ root.GMaps = factory();
11
+ }
12
+
13
+
14
+ }(this, function() {
15
+
16
+ /*!
17
+ * GMaps.js v0.4.25
18
+ * http://hpneo.github.com/gmaps/
19
+ *
20
+ * Copyright 2017, Gustavo Leon
21
+ * Released under the MIT License.
22
+ */
23
+
24
+ var extend_object = function(obj, new_obj) {
25
+ var name;
26
+
27
+ if (obj === new_obj) {
28
+ return obj;
29
+ }
30
+
31
+ for (name in new_obj) {
32
+ if (new_obj[name] !== undefined) {
33
+ obj[name] = new_obj[name];
34
+ }
35
+ }
36
+
37
+ return obj;
38
+ };
39
+
40
+ var replace_object = function(obj, replace) {
41
+ var name;
42
+
43
+ if (obj === replace) {
44
+ return obj;
45
+ }
46
+
47
+ for (name in replace) {
48
+ if (obj[name] != undefined) {
49
+ obj[name] = replace[name];
50
+ }
51
+ }
52
+
53
+ return obj;
54
+ };
55
+
56
+ var array_map = function(array, callback) {
57
+ var original_callback_params = Array.prototype.slice.call(arguments, 2),
58
+ array_return = [],
59
+ array_length = array.length,
60
+ i;
61
+
62
+ if (Array.prototype.map && array.map === Array.prototype.map) {
63
+ array_return = Array.prototype.map.call(array, function(item) {
64
+ var callback_params = original_callback_params.slice(0);
65
+ callback_params.splice(0, 0, item);
66
+
67
+ return callback.apply(this, callback_params);
68
+ });
69
+ }
70
+ else {
71
+ for (i = 0; i < array_length; i++) {
72
+ callback_params = original_callback_params;
73
+ callback_params.splice(0, 0, array[i]);
74
+ array_return.push(callback.apply(this, callback_params));
75
+ }
76
+ }
77
+
78
+ return array_return;
79
+ };
80
+
81
+ var array_flat = function(array) {
82
+ var new_array = [],
83
+ i;
84
+
85
+ for (i = 0; i < array.length; i++) {
86
+ new_array = new_array.concat(array[i]);
87
+ }
88
+
89
+ return new_array;
90
+ };
91
+
92
+ var coordsToLatLngs = function(coords, useGeoJSON) {
93
+ var first_coord = coords[0],
94
+ second_coord = coords[1];
95
+
96
+ if (useGeoJSON) {
97
+ first_coord = coords[1];
98
+ second_coord = coords[0];
99
+ }
100
+
101
+ return new google.maps.LatLng(first_coord, second_coord);
102
+ };
103
+
104
+ var arrayToLatLng = function(coords, useGeoJSON) {
105
+ var i;
106
+
107
+ for (i = 0; i < coords.length; i++) {
108
+ if (!(coords[i] instanceof google.maps.LatLng)) {
109
+ if (coords[i].length > 0 && typeof(coords[i][0]) === "object") {
110
+ coords[i] = arrayToLatLng(coords[i], useGeoJSON);
111
+ }
112
+ else {
113
+ coords[i] = coordsToLatLngs(coords[i], useGeoJSON);
114
+ }
115
+ }
116
+ }
117
+
118
+ return coords;
119
+ };
120
+
121
+ var getElementsByClassName = function (class_name, context) {
122
+ var element,
123
+ _class = class_name.replace('.', '');
124
+
125
+ if ('jQuery' in this && context) {
126
+ element = $("." + _class, context)[0];
127
+ } else {
128
+ element = document.getElementsByClassName(_class)[0];
129
+ }
130
+ return element;
131
+
132
+ };
133
+
134
+ var getElementById = function(id, context) {
135
+ var element,
136
+ id = id.replace('#', '');
137
+
138
+ if ('jQuery' in window && context) {
139
+ element = $('#' + id, context)[0];
140
+ } else {
141
+ element = document.getElementById(id);
142
+ };
143
+
144
+ return element;
145
+ };
146
+
147
+ var findAbsolutePosition = function(obj) {
148
+ var curleft = 0,
149
+ curtop = 0;
150
+
151
+ if (obj.getBoundingClientRect) {
152
+ var rect = obj.getBoundingClientRect();
153
+ var sx = -(window.scrollX ? window.scrollX : window.pageXOffset);
154
+ var sy = -(window.scrollY ? window.scrollY : window.pageYOffset);
155
+
156
+ return [(rect.left - sx), (rect.top - sy)];
157
+ }
158
+
159
+ if (obj.offsetParent) {
160
+ do {
161
+ curleft += obj.offsetLeft;
162
+ curtop += obj.offsetTop;
163
+ } while (obj = obj.offsetParent);
164
+ }
165
+
166
+ return [curleft, curtop];
167
+ };
168
+
169
+ var GMaps = (function(global) {
170
+ "use strict";
171
+
172
+ var doc = document;
173
+ /**
174
+ * Creates a new GMaps instance, including a Google Maps map.
175
+ * @class GMaps
176
+ * @constructs
177
+ * @param {object} options - `options` accepts all the [MapOptions](https://developers.google.com/maps/documentation/javascript/reference#MapOptions) and [events](https://developers.google.com/maps/documentation/javascript/reference#Map) listed in the Google Maps API. Also accepts:
178
+ * * `lat` (number): Latitude of the map's center
179
+ * * `lng` (number): Longitude of the map's center
180
+ * * `el` (string or HTMLElement): container where the map will be rendered
181
+ * * `markerClusterer` (function): A function to create a marker cluster. You can use MarkerClusterer or MarkerClustererPlus.
182
+ */
183
+ var GMaps = function(options) {
184
+
185
+ if (!(typeof window.google === 'object' && window.google.maps)) {
186
+ if (typeof window.console === 'object' && window.console.error) {
187
+ console.error('Google Maps API is required. Please register the following JavaScript library https://maps.googleapis.com/maps/api/js.');
188
+ }
189
+
190
+ return function() {};
191
+ }
192
+
193
+ if (!this) return new GMaps(options);
194
+
195
+ options.zoom = options.zoom || 15;
196
+ options.mapType = options.mapType || 'roadmap';
197
+
198
+ var valueOrDefault = function(value, defaultValue) {
199
+ return value === undefined ? defaultValue : value;
200
+ };
201
+
202
+ var self = this,
203
+ i,
204
+ events_that_hide_context_menu = [
205
+ 'bounds_changed', 'center_changed', 'click', 'dblclick', 'drag',
206
+ 'dragend', 'dragstart', 'idle', 'maptypeid_changed', 'projection_changed',
207
+ 'resize', 'tilesloaded', 'zoom_changed'
208
+ ],
209
+ events_that_doesnt_hide_context_menu = ['mousemove', 'mouseout', 'mouseover'],
210
+ options_to_be_deleted = ['el', 'lat', 'lng', 'mapType', 'width', 'height', 'markerClusterer', 'enableNewStyle'],
211
+ identifier = options.el || options.div,
212
+ markerClustererFunction = options.markerClusterer,
213
+ mapType = google.maps.MapTypeId[options.mapType.toUpperCase()],
214
+ map_center = new google.maps.LatLng(options.lat, options.lng),
215
+ zoomControl = valueOrDefault(options.zoomControl, true),
216
+ zoomControlOpt = options.zoomControlOpt || {
217
+ style: 'DEFAULT',
218
+ position: 'TOP_LEFT'
219
+ },
220
+ zoomControlStyle = zoomControlOpt.style || 'DEFAULT',
221
+ zoomControlPosition = zoomControlOpt.position || 'TOP_LEFT',
222
+ panControl = valueOrDefault(options.panControl, true),
223
+ mapTypeControl = valueOrDefault(options.mapTypeControl, true),
224
+ scaleControl = valueOrDefault(options.scaleControl, true),
225
+ streetViewControl = valueOrDefault(options.streetViewControl, true),
226
+ overviewMapControl = valueOrDefault(overviewMapControl, true),
227
+ map_options = {},
228
+ map_base_options = {
229
+ zoom: this.zoom,
230
+ center: map_center,
231
+ mapTypeId: mapType
232
+ },
233
+ map_controls_options = {
234
+ panControl: panControl,
235
+ zoomControl: zoomControl,
236
+ zoomControlOptions: {
237
+ style: google.maps.ZoomControlStyle[zoomControlStyle],
238
+ position: google.maps.ControlPosition[zoomControlPosition]
239
+ },
240
+ mapTypeControl: mapTypeControl,
241
+ scaleControl: scaleControl,
242
+ streetViewControl: streetViewControl,
243
+ overviewMapControl: overviewMapControl
244
+ };
245
+
246
+ if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {
247
+ if (identifier.indexOf("#") > -1) {
248
+ /**
249
+ * Container element
250
+ *
251
+ * @type {HTMLElement}
252
+ */
253
+ this.el = getElementById(identifier, options.context);
254
+ } else {
255
+ this.el = getElementsByClassName.apply(this, [identifier, options.context]);
256
+ }
257
+ } else {
258
+ this.el = identifier;
259
+ }
260
+
261
+ if (typeof(this.el) === 'undefined' || this.el === null) {
262
+ throw 'No element defined.';
263
+ }
264
+
265
+ window.context_menu = window.context_menu || {};
266
+ window.context_menu[self.el.id] = {};
267
+
268
+ /**
269
+ * Collection of custom controls in the map UI
270
+ *
271
+ * @type {array}
272
+ */
273
+ this.controls = [];
274
+ /**
275
+ * Collection of map's overlays
276
+ *
277
+ * @type {array}
278
+ */
279
+ this.overlays = [];
280
+ /**
281
+ * Collection of KML/GeoRSS and FusionTable layers
282
+ *
283
+ * @type {array}
284
+ */
285
+ this.layers = [];
286
+ /**
287
+ * Collection of data layers (See {@link GMaps#addLayer})
288
+ *
289
+ * @type {object}
290
+ */
291
+ this.singleLayers = {};
292
+ /**
293
+ * Collection of map's markers
294
+ *
295
+ * @type {array}
296
+ */
297
+ this.markers = [];
298
+ /**
299
+ * Collection of map's lines
300
+ *
301
+ * @type {array}
302
+ */
303
+ this.polylines = [];
304
+ /**
305
+ * Collection of map's routes requested by {@link GMaps#getRoutes}, {@link GMaps#renderRoute}, {@link GMaps#drawRoute}, {@link GMaps#travelRoute} or {@link GMaps#drawSteppedRoute}
306
+ *
307
+ * @type {array}
308
+ */
309
+ this.routes = [];
310
+ /**
311
+ * Collection of map's polygons
312
+ *
313
+ * @type {array}
314
+ */
315
+ this.polygons = [];
316
+ this.infoWindow = null;
317
+ this.overlay_el = null;
318
+ /**
319
+ * Current map's zoom
320
+ *
321
+ * @type {number}
322
+ */
323
+ this.zoom = options.zoom;
324
+ this.registered_events = {};
325
+
326
+ this.el.style.width = options.width || this.el.scrollWidth || this.el.offsetWidth;
327
+ this.el.style.height = options.height || this.el.scrollHeight || this.el.offsetHeight;
328
+
329
+ google.maps.visualRefresh = options.enableNewStyle;
330
+
331
+ for (i = 0; i < options_to_be_deleted.length; i++) {
332
+ delete options[options_to_be_deleted[i]];
333
+ }
334
+
335
+ if(options.disableDefaultUI != true) {
336
+ map_base_options = extend_object(map_base_options, map_controls_options);
337
+ }
338
+
339
+ map_options = extend_object(map_base_options, options);
340
+
341
+ for (i = 0; i < events_that_hide_context_menu.length; i++) {
342
+ delete map_options[events_that_hide_context_menu[i]];
343
+ }
344
+
345
+ for (i = 0; i < events_that_doesnt_hide_context_menu.length; i++) {
346
+ delete map_options[events_that_doesnt_hide_context_menu[i]];
347
+ }
348
+
349
+ /**
350
+ * Google Maps map instance
351
+ *
352
+ * @type {google.maps.Map}
353
+ */
354
+ this.map = new google.maps.Map(this.el, map_options);
355
+
356
+ if (markerClustererFunction) {
357
+ /**
358
+ * Marker Clusterer instance
359
+ *
360
+ * @type {object}
361
+ */
362
+ this.markerClusterer = markerClustererFunction.apply(this, [this.map]);
363
+ }
364
+
365
+ var buildContextMenuHTML = function(control, e) {
366
+ var html = '',
367
+ options = window.context_menu[self.el.id][control];
368
+
369
+ for (var i in options){
370
+ if (options.hasOwnProperty(i)) {
371
+ var option = options[i];
372
+
373
+ html += '<li><a id="' + control + '_' + i + '" href="#">' + option.title + '</a></li>';
374
+ }
375
+ }
376
+
377
+ if (!getElementById('gmaps_context_menu')) return;
378
+
379
+ var context_menu_element = getElementById('gmaps_context_menu');
380
+
381
+ context_menu_element.innerHTML = html;
382
+
383
+ var context_menu_items = context_menu_element.getElementsByTagName('a'),
384
+ context_menu_items_count = context_menu_items.length,
385
+ i;
386
+
387
+ for (i = 0; i < context_menu_items_count; i++) {
388
+ var context_menu_item = context_menu_items[i];
389
+
390
+ var assign_menu_item_action = function(ev){
391
+ ev.preventDefault();
392
+
393
+ options[this.id.replace(control + '_', '')].action.apply(self, [e]);
394
+ self.hideContextMenu();
395
+ };
396
+
397
+ google.maps.event.clearListeners(context_menu_item, 'click');
398
+ google.maps.event.addDomListenerOnce(context_menu_item, 'click', assign_menu_item_action, false);
399
+ }
400
+
401
+ var position = findAbsolutePosition.apply(this, [self.el]),
402
+ left = position[0] + e.pixel.x - 15,
403
+ top = position[1] + e.pixel.y- 15;
404
+
405
+ context_menu_element.style.left = left + "px";
406
+ context_menu_element.style.top = top + "px";
407
+
408
+ // context_menu_element.style.display = 'block';
409
+ };
410
+
411
+ this.buildContextMenu = function(control, e) {
412
+ if (control === 'marker') {
413
+ e.pixel = {};
414
+
415
+ var overlay = new google.maps.OverlayView();
416
+ overlay.setMap(self.map);
417
+
418
+ overlay.draw = function() {
419
+ var projection = overlay.getProjection(),
420
+ position = e.marker.getPosition();
421
+
422
+ e.pixel = projection.fromLatLngToContainerPixel(position);
423
+
424
+ buildContextMenuHTML(control, e);
425
+ };
426
+ }
427
+ else {
428
+ buildContextMenuHTML(control, e);
429
+ }
430
+
431
+ var context_menu_element = getElementById('gmaps_context_menu');
432
+
433
+ setTimeout(function() {
434
+ context_menu_element.style.display = 'block';
435
+ }, 0);
436
+ };
437
+
438
+ /**
439
+ * Add a context menu for a map or a marker.
440
+ *
441
+ * @param {object} options - The `options` object should contain:
442
+ * * `control` (string): Kind of control the context menu will be attached. Can be "map" or "marker".
443
+ * * `options` (array): A collection of context menu items:
444
+ * * `title` (string): Item's title shown in the context menu.
445
+ * * `name` (string): Item's identifier.
446
+ * * `action` (function): Function triggered after selecting the context menu item.
447
+ */
448
+ this.setContextMenu = function(options) {
449
+ window.context_menu[self.el.id][options.control] = {};
450
+
451
+ var i,
452
+ ul = doc.createElement('ul');
453
+
454
+ for (i in options.options) {
455
+ if (options.options.hasOwnProperty(i)) {
456
+ var option = options.options[i];
457
+
458
+ window.context_menu[self.el.id][options.control][option.name] = {
459
+ title: option.title,
460
+ action: option.action
461
+ };
462
+ }
463
+ }
464
+
465
+ ul.id = 'gmaps_context_menu';
466
+ ul.style.display = 'none';
467
+ ul.style.position = 'absolute';
468
+ ul.style.minWidth = '100px';
469
+ ul.style.background = 'white';
470
+ ul.style.listStyle = 'none';
471
+ ul.style.padding = '8px';
472
+ ul.style.boxShadow = '2px 2px 6px #ccc';
473
+
474
+ if (!getElementById('gmaps_context_menu')) {
475
+ doc.body.appendChild(ul);
476
+ }
477
+
478
+ var context_menu_element = getElementById('gmaps_context_menu');
479
+
480
+ google.maps.event.addDomListener(context_menu_element, 'mouseout', function(ev) {
481
+ if (!ev.relatedTarget || !this.contains(ev.relatedTarget)) {
482
+ window.setTimeout(function(){
483
+ context_menu_element.style.display = 'none';
484
+ }, 400);
485
+ }
486
+ }, false);
487
+ };
488
+
489
+ /**
490
+ * Hide the current context menu
491
+ */
492
+ this.hideContextMenu = function() {
493
+ var context_menu_element = getElementById('gmaps_context_menu');
494
+
495
+ if (context_menu_element) {
496
+ context_menu_element.style.display = 'none';
497
+ }
498
+ };
499
+
500
+ var setupListener = function(object, name) {
501
+ google.maps.event.addListener(object, name, function(e){
502
+ if (e == undefined) {
503
+ e = this;
504
+ }
505
+
506
+ options[name].apply(this, [e]);
507
+
508
+ self.hideContextMenu();
509
+ });
510
+ };
511
+
512
+ //google.maps.event.addListener(this.map, 'idle', this.hideContextMenu);
513
+ google.maps.event.addListener(this.map, 'zoom_changed', this.hideContextMenu);
514
+
515
+ for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) {
516
+ var name = events_that_hide_context_menu[ev];
517
+
518
+ if (name in options) {
519
+ setupListener(this.map, name);
520
+ }
521
+ }
522
+
523
+ for (var ev = 0; ev < events_that_doesnt_hide_context_menu.length; ev++) {
524
+ var name = events_that_doesnt_hide_context_menu[ev];
525
+
526
+ if (name in options) {
527
+ setupListener(this.map, name);
528
+ }
529
+ }
530
+
531
+ google.maps.event.addListener(this.map, 'rightclick', function(e) {
532
+ if (options.rightclick) {
533
+ options.rightclick.apply(this, [e]);
534
+ }
535
+
536
+ if(window.context_menu[self.el.id]['map'] != undefined) {
537
+ self.buildContextMenu('map', e);
538
+ }
539
+ });
540
+
541
+ /**
542
+ * Trigger a `resize` event, useful if you need to repaint the current map (for changes in the viewport or display / hide actions).
543
+ */
544
+ this.refresh = function() {
545
+ google.maps.event.trigger(this.map, 'resize');
546
+ };
547
+
548
+ /**
549
+ * Adjust the map zoom to include all the markers added in the map.
550
+ */
551
+ this.fitZoom = function() {
552
+ var latLngs = [],
553
+ markers_length = this.markers.length,
554
+ i;
555
+
556
+ for (i = 0; i < markers_length; i++) {
557
+ if(typeof(this.markers[i].visible) === 'boolean' && this.markers[i].visible) {
558
+ latLngs.push(this.markers[i].getPosition());
559
+ }
560
+ }
561
+
562
+ this.fitLatLngBounds(latLngs);
563
+ };
564
+
565
+ /**
566
+ * Adjust the map zoom to include all the coordinates in the `latLngs` array.
567
+ *
568
+ * @param {array} latLngs - Collection of `google.maps.LatLng` objects.
569
+ */
570
+ this.fitLatLngBounds = function(latLngs) {
571
+ var total = latLngs.length,
572
+ bounds = new google.maps.LatLngBounds(),
573
+ i;
574
+
575
+ for(i = 0; i < total; i++) {
576
+ bounds.extend(latLngs[i]);
577
+ }
578
+
579
+ this.map.fitBounds(bounds);
580
+ };
581
+
582
+ /**
583
+ * Center the map using the `lat` and `lng` coordinates.
584
+ *
585
+ * @param {number} lat - Latitude of the coordinate.
586
+ * @param {number} lng - Longitude of the coordinate.
587
+ * @param {function} [callback] - Callback that will be executed after the map is centered.
588
+ */
589
+ this.setCenter = function(lat, lng, callback) {
590
+ this.map.panTo(new google.maps.LatLng(lat, lng));
591
+
592
+ if (callback) {
593
+ callback();
594
+ }
595
+ };
596
+
597
+ /**
598
+ * Return the HTML element container of the map.
599
+ *
600
+ * @returns {HTMLElement} the element container.
601
+ */
602
+ this.getElement = function() {
603
+ return this.el;
604
+ };
605
+
606
+ /**
607
+ * Increase the map's zoom.
608
+ *
609
+ * @param {number} [magnitude] - The number of times the map will be zoomed in.
610
+ */
611
+ this.zoomIn = function(value) {
612
+ value = value || 1;
613
+
614
+ this.zoom = this.map.getZoom() + value;
615
+ this.map.setZoom(this.zoom);
616
+ };
617
+
618
+ /**
619
+ * Decrease the map's zoom.
620
+ *
621
+ * @param {number} [magnitude] - The number of times the map will be zoomed out.
622
+ */
623
+ this.zoomOut = function(value) {
624
+ value = value || 1;
625
+
626
+ this.zoom = this.map.getZoom() - value;
627
+ this.map.setZoom(this.zoom);
628
+ };
629
+
630
+ var native_methods = [],
631
+ method;
632
+
633
+ for (method in this.map) {
634
+ if (typeof(this.map[method]) == 'function' && !this[method]) {
635
+ native_methods.push(method);
636
+ }
637
+ }
638
+
639
+ for (i = 0; i < native_methods.length; i++) {
640
+ (function(gmaps, scope, method_name) {
641
+ gmaps[method_name] = function(){
642
+ return scope[method_name].apply(scope, arguments);
643
+ };
644
+ })(this, this.map, native_methods[i]);
645
+ }
646
+ };
647
+
648
+ return GMaps;
649
+ })(this);
650
+
651
+ GMaps.prototype.createControl = function(options) {
652
+ var control = document.createElement('div');
653
+
654
+ control.style.cursor = 'pointer';
655
+
656
+ if (options.disableDefaultStyles !== true) {
657
+ control.style.fontFamily = 'Roboto, Arial, sans-serif';
658
+ control.style.fontSize = '11px';
659
+ control.style.boxShadow = 'rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px';
660
+ }
661
+
662
+ for (var option in options.style) {
663
+ control.style[option] = options.style[option];
664
+ }
665
+
666
+ if (options.id) {
667
+ control.id = options.id;
668
+ }
669
+
670
+ if (options.title) {
671
+ control.title = options.title;
672
+ }
673
+
674
+ if (options.classes) {
675
+ control.className = options.classes;
676
+ }
677
+
678
+ if (options.content) {
679
+ if (typeof options.content === 'string') {
680
+ control.innerHTML = options.content;
681
+ }
682
+ else if (options.content instanceof HTMLElement) {
683
+ control.appendChild(options.content);
684
+ }
685
+ }
686
+
687
+ if (options.position) {
688
+ control.position = google.maps.ControlPosition[options.position.toUpperCase()];
689
+ }
690
+
691
+ for (var ev in options.events) {
692
+ (function(object, name) {
693
+ google.maps.event.addDomListener(object, name, function(){
694
+ options.events[name].apply(this, [this]);
695
+ });
696
+ })(control, ev);
697
+ }
698
+
699
+ control.index = 1;
700
+
701
+ return control;
702
+ };
703
+
704
+ /**
705
+ * Add a custom control to the map UI.
706
+ *
707
+ * @param {object} options - The `options` object should contain:
708
+ * * `style` (object): The keys and values of this object should be valid CSS properties and values.
709
+ * * `id` (string): The HTML id for the custom control.
710
+ * * `classes` (string): A string containing all the HTML classes for the custom control.
711
+ * * `content` (string or HTML element): The content of the custom control.
712
+ * * `position` (string): Any valid [`google.maps.ControlPosition`](https://developers.google.com/maps/documentation/javascript/controls#ControlPositioning) value, in lower or upper case.
713
+ * * `events` (object): The keys of this object should be valid DOM events. The values should be functions.
714
+ * * `disableDefaultStyles` (boolean): If false, removes the default styles for the controls like font (family and size), and box shadow.
715
+ * @returns {HTMLElement}
716
+ */
717
+ GMaps.prototype.addControl = function(options) {
718
+ var control = this.createControl(options);
719
+
720
+ this.controls.push(control);
721
+ this.map.controls[control.position].push(control);
722
+
723
+ return control;
724
+ };
725
+
726
+ /**
727
+ * Remove a control from the map. `control` should be a control returned by `addControl()`.
728
+ *
729
+ * @param {HTMLElement} control - One of the controls returned by `addControl()`.
730
+ * @returns {HTMLElement} the removed control.
731
+ */
732
+ GMaps.prototype.removeControl = function(control) {
733
+ var position = null,
734
+ i;
735
+
736
+ for (i = 0; i < this.controls.length; i++) {
737
+ if (this.controls[i] == control) {
738
+ position = this.controls[i].position;
739
+ this.controls.splice(i, 1);
740
+ }
741
+ }
742
+
743
+ if (position) {
744
+ for (i = 0; i < this.map.controls.length; i++) {
745
+ var controlsForPosition = this.map.controls[control.position];
746
+
747
+ if (controlsForPosition.getAt(i) == control) {
748
+ controlsForPosition.removeAt(i);
749
+
750
+ break;
751
+ }
752
+ }
753
+ }
754
+
755
+ return control;
756
+ };
757
+
758
+ GMaps.prototype.createMarker = function(options) {
759
+ if (options.lat == undefined && options.lng == undefined && options.position == undefined) {
760
+ throw 'No latitude or longitude defined.';
761
+ }
762
+
763
+ var self = this,
764
+ details = options.details,
765
+ fences = options.fences,
766
+ outside = options.outside,
767
+ base_options = {
768
+ position: new google.maps.LatLng(options.lat, options.lng),
769
+ map: null
770
+ },
771
+ marker_options = extend_object(base_options, options);
772
+
773
+ delete marker_options.lat;
774
+ delete marker_options.lng;
775
+ delete marker_options.fences;
776
+ delete marker_options.outside;
777
+
778
+ var marker = new google.maps.Marker(marker_options);
779
+
780
+ marker.fences = fences;
781
+
782
+ if (options.infoWindow) {
783
+ marker.infoWindow = new google.maps.InfoWindow(options.infoWindow);
784
+
785
+ var info_window_events = ['closeclick', 'content_changed', 'domready', 'position_changed', 'zindex_changed'];
786
+
787
+ for (var ev = 0; ev < info_window_events.length; ev++) {
788
+ (function(object, name) {
789
+ if (options.infoWindow[name]) {
790
+ google.maps.event.addListener(object, name, function(e){
791
+ options.infoWindow[name].apply(this, [e]);
792
+ });
793
+ }
794
+ })(marker.infoWindow, info_window_events[ev]);
795
+ }
796
+ }
797
+
798
+ var marker_events = ['animation_changed', 'clickable_changed', 'cursor_changed', 'draggable_changed', 'flat_changed', 'icon_changed', 'position_changed', 'shadow_changed', 'shape_changed', 'title_changed', 'visible_changed', 'zindex_changed'];
799
+
800
+ var marker_events_with_mouse = ['dblclick', 'drag', 'dragend', 'dragstart', 'mousedown', 'mouseout', 'mouseover', 'mouseup'];
801
+
802
+ for (var ev = 0; ev < marker_events.length; ev++) {
803
+ (function(object, name) {
804
+ if (options[name]) {
805
+ google.maps.event.addListener(object, name, function(){
806
+ options[name].apply(this, [this]);
807
+ });
808
+ }
809
+ })(marker, marker_events[ev]);
810
+ }
811
+
812
+ for (var ev = 0; ev < marker_events_with_mouse.length; ev++) {
813
+ (function(map, object, name) {
814
+ if (options[name]) {
815
+ google.maps.event.addListener(object, name, function(me){
816
+ if(!me.pixel){
817
+ me.pixel = map.getProjection().fromLatLngToPoint(me.latLng)
818
+ }
819
+
820
+ options[name].apply(this, [me]);
821
+ });
822
+ }
823
+ })(this.map, marker, marker_events_with_mouse[ev]);
824
+ }
825
+
826
+ google.maps.event.addListener(marker, 'click', function() {
827
+ this.details = details;
828
+
829
+ if (options.click) {
830
+ options.click.apply(this, [this]);
831
+ }
832
+
833
+ if (marker.infoWindow) {
834
+ self.hideInfoWindows();
835
+ marker.infoWindow.open(self.map, marker);
836
+ }
837
+ });
838
+
839
+ google.maps.event.addListener(marker, 'rightclick', function(e) {
840
+ e.marker = this;
841
+
842
+ if (options.rightclick) {
843
+ options.rightclick.apply(this, [e]);
844
+ }
845
+
846
+ if (window.context_menu[self.el.id]['marker'] != undefined) {
847
+ self.buildContextMenu('marker', e);
848
+ }
849
+ });
850
+
851
+ if (marker.fences) {
852
+ google.maps.event.addListener(marker, 'dragend', function() {
853
+ self.checkMarkerGeofence(marker, function(m, f) {
854
+ outside(m, f);
855
+ });
856
+ });
857
+ }
858
+
859
+ return marker;
860
+ };
861
+
862
+ GMaps.prototype.addMarker = function(options) {
863
+ var marker;
864
+ if(options.hasOwnProperty('gm_accessors_')) {
865
+ // Native google.maps.Marker object
866
+ marker = options;
867
+ }
868
+ else {
869
+ if ((options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) || options.position) {
870
+ marker = this.createMarker(options);
871
+ }
872
+ else {
873
+ throw 'No latitude or longitude defined.';
874
+ }
875
+ }
876
+
877
+ marker.setMap(this.map);
878
+
879
+ if(this.markerClusterer) {
880
+ this.markerClusterer.addMarker(marker);
881
+ }
882
+
883
+ this.markers.push(marker);
884
+
885
+ GMaps.fire('marker_added', marker, this);
886
+
887
+ return marker;
888
+ };
889
+
890
+ GMaps.prototype.addMarkers = function(array) {
891
+ for (var i = 0, marker; marker=array[i]; i++) {
892
+ this.addMarker(marker);
893
+ }
894
+
895
+ return this.markers;
896
+ };
897
+
898
+ GMaps.prototype.hideInfoWindows = function() {
899
+ for (var i = 0, marker; marker = this.markers[i]; i++){
900
+ if (marker.infoWindow) {
901
+ marker.infoWindow.close();
902
+ }
903
+ }
904
+ };
905
+
906
+ GMaps.prototype.removeMarker = function(marker) {
907
+ for (var i = 0; i < this.markers.length; i++) {
908
+ if (this.markers[i] === marker) {
909
+ this.markers[i].setMap(null);
910
+ this.markers.splice(i, 1);
911
+
912
+ if(this.markerClusterer) {
913
+ this.markerClusterer.removeMarker(marker);
914
+ }
915
+
916
+ GMaps.fire('marker_removed', marker, this);
917
+
918
+ break;
919
+ }
920
+ }
921
+
922
+ return marker;
923
+ };
924
+
925
+ GMaps.prototype.removeMarkers = function (collection) {
926
+ var new_markers = [];
927
+
928
+ if (typeof collection == 'undefined') {
929
+ for (var i = 0; i < this.markers.length; i++) {
930
+ var marker = this.markers[i];
931
+ marker.setMap(null);
932
+
933
+ GMaps.fire('marker_removed', marker, this);
934
+ }
935
+
936
+ if(this.markerClusterer && this.markerClusterer.clearMarkers) {
937
+ this.markerClusterer.clearMarkers();
938
+ }
939
+
940
+ this.markers = new_markers;
941
+ }
942
+ else {
943
+ for (var i = 0; i < collection.length; i++) {
944
+ var index = this.markers.indexOf(collection[i]);
945
+
946
+ if (index > -1) {
947
+ var marker = this.markers[index];
948
+ marker.setMap(null);
949
+
950
+ if(this.markerClusterer) {
951
+ this.markerClusterer.removeMarker(marker);
952
+ }
953
+
954
+ GMaps.fire('marker_removed', marker, this);
955
+ }
956
+ }
957
+
958
+ for (var i = 0; i < this.markers.length; i++) {
959
+ var marker = this.markers[i];
960
+ if (marker.getMap() != null) {
961
+ new_markers.push(marker);
962
+ }
963
+ }
964
+
965
+ this.markers = new_markers;
966
+ }
967
+ };
968
+
969
+ GMaps.prototype.drawOverlay = function(options) {
970
+ var overlay = new google.maps.OverlayView(),
971
+ auto_show = true;
972
+
973
+ overlay.setMap(this.map);
974
+
975
+ if (options.auto_show != null) {
976
+ auto_show = options.auto_show;
977
+ }
978
+
979
+ overlay.onAdd = function() {
980
+ var el = document.createElement('div');
981
+
982
+ el.style.borderStyle = "none";
983
+ el.style.borderWidth = "0px";
984
+ el.style.position = "absolute";
985
+ el.style.zIndex = 100;
986
+ el.innerHTML = options.content;
987
+
988
+ overlay.el = el;
989
+
990
+ if (!options.layer) {
991
+ options.layer = 'overlayLayer';
992
+ }
993
+
994
+ var panes = this.getPanes(),
995
+ overlayLayer = panes[options.layer],
996
+ stop_overlay_events = ['contextmenu', 'DOMMouseScroll', 'dblclick', 'mousedown'];
997
+
998
+ overlayLayer.appendChild(el);
999
+
1000
+ for (var ev = 0; ev < stop_overlay_events.length; ev++) {
1001
+ (function(object, name) {
1002
+ google.maps.event.addDomListener(object, name, function(e){
1003
+ if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {
1004
+ e.cancelBubble = true;
1005
+ e.returnValue = false;
1006
+ }
1007
+ else {
1008
+ e.stopPropagation();
1009
+ }
1010
+ });
1011
+ })(el, stop_overlay_events[ev]);
1012
+ }
1013
+
1014
+ if (options.click) {
1015
+ panes.overlayMouseTarget.appendChild(overlay.el);
1016
+ google.maps.event.addDomListener(overlay.el, 'click', function() {
1017
+ options.click.apply(overlay, [overlay]);
1018
+ });
1019
+ }
1020
+
1021
+ google.maps.event.trigger(this, 'ready');
1022
+ };
1023
+
1024
+ overlay.draw = function() {
1025
+ var projection = this.getProjection(),
1026
+ pixel = projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat, options.lng));
1027
+
1028
+ options.horizontalOffset = options.horizontalOffset || 0;
1029
+ options.verticalOffset = options.verticalOffset || 0;
1030
+
1031
+ var el = overlay.el,
1032
+ content = el.children[0],
1033
+ content_height = content.clientHeight,
1034
+ content_width = content.clientWidth;
1035
+
1036
+ switch (options.verticalAlign) {
1037
+ case 'top':
1038
+ el.style.top = (pixel.y - content_height + options.verticalOffset) + 'px';
1039
+ break;
1040
+ default:
1041
+ case 'middle':
1042
+ el.style.top = (pixel.y - (content_height / 2) + options.verticalOffset) + 'px';
1043
+ break;
1044
+ case 'bottom':
1045
+ el.style.top = (pixel.y + options.verticalOffset) + 'px';
1046
+ break;
1047
+ }
1048
+
1049
+ switch (options.horizontalAlign) {
1050
+ case 'left':
1051
+ el.style.left = (pixel.x - content_width + options.horizontalOffset) + 'px';
1052
+ break;
1053
+ default:
1054
+ case 'center':
1055
+ el.style.left = (pixel.x - (content_width / 2) + options.horizontalOffset) + 'px';
1056
+ break;
1057
+ case 'right':
1058
+ el.style.left = (pixel.x + options.horizontalOffset) + 'px';
1059
+ break;
1060
+ }
1061
+
1062
+ el.style.display = auto_show ? 'block' : 'none';
1063
+
1064
+ if (!auto_show) {
1065
+ options.show.apply(this, [el]);
1066
+ }
1067
+ };
1068
+
1069
+ overlay.onRemove = function() {
1070
+ var el = overlay.el;
1071
+
1072
+ if (options.remove) {
1073
+ options.remove.apply(this, [el]);
1074
+ }
1075
+ else {
1076
+ overlay.el.parentNode.removeChild(overlay.el);
1077
+ overlay.el = null;
1078
+ }
1079
+ };
1080
+
1081
+ this.overlays.push(overlay);
1082
+ return overlay;
1083
+ };
1084
+
1085
+ GMaps.prototype.removeOverlay = function(overlay) {
1086
+ for (var i = 0; i < this.overlays.length; i++) {
1087
+ if (this.overlays[i] === overlay) {
1088
+ this.overlays[i].setMap(null);
1089
+ this.overlays.splice(i, 1);
1090
+
1091
+ break;
1092
+ }
1093
+ }
1094
+ };
1095
+
1096
+ GMaps.prototype.removeOverlays = function() {
1097
+ for (var i = 0, item; item = this.overlays[i]; i++) {
1098
+ item.setMap(null);
1099
+ }
1100
+
1101
+ this.overlays = [];
1102
+ };
1103
+
1104
+ GMaps.prototype.drawPolyline = function(options) {
1105
+ var path = [],
1106
+ points = options.path;
1107
+
1108
+ if (points.length) {
1109
+ if (points[0][0] === undefined) {
1110
+ path = points;
1111
+ }
1112
+ else {
1113
+ for (var i = 0, latlng; latlng = points[i]; i++) {
1114
+ path.push(new google.maps.LatLng(latlng[0], latlng[1]));
1115
+ }
1116
+ }
1117
+ }
1118
+
1119
+ var polyline_options = {
1120
+ map: this.map,
1121
+ path: path,
1122
+ strokeColor: options.strokeColor,
1123
+ strokeOpacity: options.strokeOpacity,
1124
+ strokeWeight: options.strokeWeight,
1125
+ geodesic: options.geodesic,
1126
+ clickable: true,
1127
+ editable: false,
1128
+ visible: true
1129
+ };
1130
+
1131
+ if (options.hasOwnProperty("clickable")) {
1132
+ polyline_options.clickable = options.clickable;
1133
+ }
1134
+
1135
+ if (options.hasOwnProperty("editable")) {
1136
+ polyline_options.editable = options.editable;
1137
+ }
1138
+
1139
+ if (options.hasOwnProperty("icons")) {
1140
+ polyline_options.icons = options.icons;
1141
+ }
1142
+
1143
+ if (options.hasOwnProperty("zIndex")) {
1144
+ polyline_options.zIndex = options.zIndex;
1145
+ }
1146
+
1147
+ var polyline = new google.maps.Polyline(polyline_options);
1148
+
1149
+ var polyline_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
1150
+
1151
+ for (var ev = 0; ev < polyline_events.length; ev++) {
1152
+ (function(object, name) {
1153
+ if (options[name]) {
1154
+ google.maps.event.addListener(object, name, function(e){
1155
+ options[name].apply(this, [e]);
1156
+ });
1157
+ }
1158
+ })(polyline, polyline_events[ev]);
1159
+ }
1160
+
1161
+ this.polylines.push(polyline);
1162
+
1163
+ GMaps.fire('polyline_added', polyline, this);
1164
+
1165
+ return polyline;
1166
+ };
1167
+
1168
+ GMaps.prototype.removePolyline = function(polyline) {
1169
+ for (var i = 0; i < this.polylines.length; i++) {
1170
+ if (this.polylines[i] === polyline) {
1171
+ this.polylines[i].setMap(null);
1172
+ this.polylines.splice(i, 1);
1173
+
1174
+ GMaps.fire('polyline_removed', polyline, this);
1175
+
1176
+ break;
1177
+ }
1178
+ }
1179
+ };
1180
+
1181
+ GMaps.prototype.removePolylines = function() {
1182
+ for (var i = 0, item; item = this.polylines[i]; i++) {
1183
+ item.setMap(null);
1184
+ }
1185
+
1186
+ this.polylines = [];
1187
+ };
1188
+
1189
+ GMaps.prototype.drawCircle = function(options) {
1190
+ options = extend_object({
1191
+ map: this.map,
1192
+ center: new google.maps.LatLng(options.lat, options.lng)
1193
+ }, options);
1194
+
1195
+ delete options.lat;
1196
+ delete options.lng;
1197
+
1198
+ var polygon = new google.maps.Circle(options),
1199
+ polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
1200
+
1201
+ for (var ev = 0; ev < polygon_events.length; ev++) {
1202
+ (function(object, name) {
1203
+ if (options[name]) {
1204
+ google.maps.event.addListener(object, name, function(e){
1205
+ options[name].apply(this, [e]);
1206
+ });
1207
+ }
1208
+ })(polygon, polygon_events[ev]);
1209
+ }
1210
+
1211
+ this.polygons.push(polygon);
1212
+
1213
+ return polygon;
1214
+ };
1215
+
1216
+ GMaps.prototype.drawRectangle = function(options) {
1217
+ options = extend_object({
1218
+ map: this.map
1219
+ }, options);
1220
+
1221
+ var latLngBounds = new google.maps.LatLngBounds(
1222
+ new google.maps.LatLng(options.bounds[0][0], options.bounds[0][1]),
1223
+ new google.maps.LatLng(options.bounds[1][0], options.bounds[1][1])
1224
+ );
1225
+
1226
+ options.bounds = latLngBounds;
1227
+
1228
+ var polygon = new google.maps.Rectangle(options),
1229
+ polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
1230
+
1231
+ for (var ev = 0; ev < polygon_events.length; ev++) {
1232
+ (function(object, name) {
1233
+ if (options[name]) {
1234
+ google.maps.event.addListener(object, name, function(e){
1235
+ options[name].apply(this, [e]);
1236
+ });
1237
+ }
1238
+ })(polygon, polygon_events[ev]);
1239
+ }
1240
+
1241
+ this.polygons.push(polygon);
1242
+
1243
+ return polygon;
1244
+ };
1245
+
1246
+ GMaps.prototype.drawPolygon = function(options) {
1247
+ var useGeoJSON = false;
1248
+
1249
+ if(options.hasOwnProperty("useGeoJSON")) {
1250
+ useGeoJSON = options.useGeoJSON;
1251
+ }
1252
+
1253
+ delete options.useGeoJSON;
1254
+
1255
+ options = extend_object({
1256
+ map: this.map
1257
+ }, options);
1258
+
1259
+ if (useGeoJSON == false) {
1260
+ options.paths = [options.paths.slice(0)];
1261
+ }
1262
+
1263
+ if (options.paths.length > 0) {
1264
+ if (options.paths[0].length > 0) {
1265
+ options.paths = array_flat(array_map(options.paths, arrayToLatLng, useGeoJSON));
1266
+ }
1267
+ }
1268
+
1269
+ var polygon = new google.maps.Polygon(options),
1270
+ polygon_events = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'rightclick'];
1271
+
1272
+ for (var ev = 0; ev < polygon_events.length; ev++) {
1273
+ (function(object, name) {
1274
+ if (options[name]) {
1275
+ google.maps.event.addListener(object, name, function(e){
1276
+ options[name].apply(this, [e]);
1277
+ });
1278
+ }
1279
+ })(polygon, polygon_events[ev]);
1280
+ }
1281
+
1282
+ this.polygons.push(polygon);
1283
+
1284
+ GMaps.fire('polygon_added', polygon, this);
1285
+
1286
+ return polygon;
1287
+ };
1288
+
1289
+ GMaps.prototype.removePolygon = function(polygon) {
1290
+ for (var i = 0; i < this.polygons.length; i++) {
1291
+ if (this.polygons[i] === polygon) {
1292
+ this.polygons[i].setMap(null);
1293
+ this.polygons.splice(i, 1);
1294
+
1295
+ GMaps.fire('polygon_removed', polygon, this);
1296
+
1297
+ break;
1298
+ }
1299
+ }
1300
+ };
1301
+
1302
+ GMaps.prototype.removePolygons = function() {
1303
+ for (var i = 0, item; item = this.polygons[i]; i++) {
1304
+ item.setMap(null);
1305
+ }
1306
+
1307
+ this.polygons = [];
1308
+ };
1309
+
1310
+ GMaps.prototype.getFromFusionTables = function(options) {
1311
+ var events = options.events;
1312
+
1313
+ delete options.events;
1314
+
1315
+ var fusion_tables_options = options,
1316
+ layer = new google.maps.FusionTablesLayer(fusion_tables_options);
1317
+
1318
+ for (var ev in events) {
1319
+ (function(object, name) {
1320
+ google.maps.event.addListener(object, name, function(e) {
1321
+ events[name].apply(this, [e]);
1322
+ });
1323
+ })(layer, ev);
1324
+ }
1325
+
1326
+ this.layers.push(layer);
1327
+
1328
+ return layer;
1329
+ };
1330
+
1331
+ GMaps.prototype.loadFromFusionTables = function(options) {
1332
+ var layer = this.getFromFusionTables(options);
1333
+ layer.setMap(this.map);
1334
+
1335
+ return layer;
1336
+ };
1337
+
1338
+ GMaps.prototype.getFromKML = function(options) {
1339
+ var url = options.url,
1340
+ events = options.events;
1341
+
1342
+ delete options.url;
1343
+ delete options.events;
1344
+
1345
+ var kml_options = options,
1346
+ layer = new google.maps.KmlLayer(url, kml_options);
1347
+
1348
+ for (var ev in events) {
1349
+ (function(object, name) {
1350
+ google.maps.event.addListener(object, name, function(e) {
1351
+ events[name].apply(this, [e]);
1352
+ });
1353
+ })(layer, ev);
1354
+ }
1355
+
1356
+ this.layers.push(layer);
1357
+
1358
+ return layer;
1359
+ };
1360
+
1361
+ GMaps.prototype.loadFromKML = function(options) {
1362
+ var layer = this.getFromKML(options);
1363
+ layer.setMap(this.map);
1364
+
1365
+ return layer;
1366
+ };
1367
+
1368
+ GMaps.prototype.addLayer = function(layerName, options) {
1369
+ //var default_layers = ['weather', 'clouds', 'traffic', 'transit', 'bicycling', 'panoramio', 'places'];
1370
+ options = options || {};
1371
+ var layer;
1372
+
1373
+ switch(layerName) {
1374
+ case 'weather': this.singleLayers.weather = layer = new google.maps.weather.WeatherLayer();
1375
+ break;
1376
+ case 'clouds': this.singleLayers.clouds = layer = new google.maps.weather.CloudLayer();
1377
+ break;
1378
+ case 'traffic': this.singleLayers.traffic = layer = new google.maps.TrafficLayer();
1379
+ break;
1380
+ case 'transit': this.singleLayers.transit = layer = new google.maps.TransitLayer();
1381
+ break;
1382
+ case 'bicycling': this.singleLayers.bicycling = layer = new google.maps.BicyclingLayer();
1383
+ break;
1384
+ case 'panoramio':
1385
+ this.singleLayers.panoramio = layer = new google.maps.panoramio.PanoramioLayer();
1386
+ layer.setTag(options.filter);
1387
+ delete options.filter;
1388
+
1389
+ //click event
1390
+ if (options.click) {
1391
+ google.maps.event.addListener(layer, 'click', function(event) {
1392
+ options.click(event);
1393
+ delete options.click;
1394
+ });
1395
+ }
1396
+ break;
1397
+ case 'places':
1398
+ this.singleLayers.places = layer = new google.maps.places.PlacesService(this.map);
1399
+
1400
+ //search, nearbySearch, radarSearch callback, Both are the same
1401
+ if (options.search || options.nearbySearch || options.radarSearch) {
1402
+ var placeSearchRequest = {
1403
+ bounds : options.bounds || null,
1404
+ keyword : options.keyword || null,
1405
+ location : options.location || null,
1406
+ name : options.name || null,
1407
+ radius : options.radius || null,
1408
+ rankBy : options.rankBy || null,
1409
+ types : options.types || null
1410
+ };
1411
+
1412
+ if (options.radarSearch) {
1413
+ layer.radarSearch(placeSearchRequest, options.radarSearch);
1414
+ }
1415
+
1416
+ if (options.search) {
1417
+ layer.search(placeSearchRequest, options.search);
1418
+ }
1419
+
1420
+ if (options.nearbySearch) {
1421
+ layer.nearbySearch(placeSearchRequest, options.nearbySearch);
1422
+ }
1423
+ }
1424
+
1425
+ //textSearch callback
1426
+ if (options.textSearch) {
1427
+ var textSearchRequest = {
1428
+ bounds : options.bounds || null,
1429
+ location : options.location || null,
1430
+ query : options.query || null,
1431
+ radius : options.radius || null
1432
+ };
1433
+
1434
+ layer.textSearch(textSearchRequest, options.textSearch);
1435
+ }
1436
+ break;
1437
+ }
1438
+
1439
+ if (layer !== undefined) {
1440
+ if (typeof layer.setOptions == 'function') {
1441
+ layer.setOptions(options);
1442
+ }
1443
+ if (typeof layer.setMap == 'function') {
1444
+ layer.setMap(this.map);
1445
+ }
1446
+
1447
+ return layer;
1448
+ }
1449
+ };
1450
+
1451
+ GMaps.prototype.removeLayer = function(layer) {
1452
+ if (typeof(layer) == "string" && this.singleLayers[layer] !== undefined) {
1453
+ this.singleLayers[layer].setMap(null);
1454
+
1455
+ delete this.singleLayers[layer];
1456
+ }
1457
+ else {
1458
+ for (var i = 0; i < this.layers.length; i++) {
1459
+ if (this.layers[i] === layer) {
1460
+ this.layers[i].setMap(null);
1461
+ this.layers.splice(i, 1);
1462
+
1463
+ break;
1464
+ }
1465
+ }
1466
+ }
1467
+ };
1468
+
1469
+ var travelMode, unitSystem;
1470
+
1471
+ GMaps.prototype.getRoutes = function(options) {
1472
+ switch (options.travelMode) {
1473
+ case 'bicycling':
1474
+ travelMode = google.maps.TravelMode.BICYCLING;
1475
+ break;
1476
+ case 'transit':
1477
+ travelMode = google.maps.TravelMode.TRANSIT;
1478
+ break;
1479
+ case 'driving':
1480
+ travelMode = google.maps.TravelMode.DRIVING;
1481
+ break;
1482
+ default:
1483
+ travelMode = google.maps.TravelMode.WALKING;
1484
+ break;
1485
+ }
1486
+
1487
+ if (options.unitSystem === 'imperial') {
1488
+ unitSystem = google.maps.UnitSystem.IMPERIAL;
1489
+ }
1490
+ else {
1491
+ unitSystem = google.maps.UnitSystem.METRIC;
1492
+ }
1493
+
1494
+ var base_options = {
1495
+ avoidHighways: false,
1496
+ avoidTolls: false,
1497
+ optimizeWaypoints: false,
1498
+ waypoints: []
1499
+ },
1500
+ request_options = extend_object(base_options, options);
1501
+
1502
+ request_options.origin = /string/.test(typeof options.origin) ? options.origin : new google.maps.LatLng(options.origin[0], options.origin[1]);
1503
+ request_options.destination = /string/.test(typeof options.destination) ? options.destination : new google.maps.LatLng(options.destination[0], options.destination[1]);
1504
+ request_options.travelMode = travelMode;
1505
+ request_options.unitSystem = unitSystem;
1506
+
1507
+ delete request_options.callback;
1508
+ delete request_options.error;
1509
+
1510
+ var self = this,
1511
+ routes = [],
1512
+ service = new google.maps.DirectionsService();
1513
+
1514
+ service.route(request_options, function(result, status) {
1515
+ if (status === google.maps.DirectionsStatus.OK) {
1516
+ for (var r in result.routes) {
1517
+ if (result.routes.hasOwnProperty(r)) {
1518
+ routes.push(result.routes[r]);
1519
+ }
1520
+ }
1521
+
1522
+ if (options.callback) {
1523
+ options.callback(routes, result, status);
1524
+ }
1525
+ }
1526
+ else {
1527
+ if (options.error) {
1528
+ options.error(result, status);
1529
+ }
1530
+ }
1531
+ });
1532
+ };
1533
+
1534
+ GMaps.prototype.removeRoutes = function() {
1535
+ this.routes.length = 0;
1536
+ };
1537
+
1538
+ GMaps.prototype.getElevations = function(options) {
1539
+ options = extend_object({
1540
+ locations: [],
1541
+ path : false,
1542
+ samples : 256
1543
+ }, options);
1544
+
1545
+ if (options.locations.length > 0) {
1546
+ if (options.locations[0].length > 0) {
1547
+ options.locations = array_flat(array_map([options.locations], arrayToLatLng, false));
1548
+ }
1549
+ }
1550
+
1551
+ var callback = options.callback;
1552
+ delete options.callback;
1553
+
1554
+ var service = new google.maps.ElevationService();
1555
+
1556
+ //location request
1557
+ if (!options.path) {
1558
+ delete options.path;
1559
+ delete options.samples;
1560
+
1561
+ service.getElevationForLocations(options, function(result, status) {
1562
+ if (callback && typeof(callback) === "function") {
1563
+ callback(result, status);
1564
+ }
1565
+ });
1566
+ //path request
1567
+ } else {
1568
+ var pathRequest = {
1569
+ path : options.locations,
1570
+ samples : options.samples
1571
+ };
1572
+
1573
+ service.getElevationAlongPath(pathRequest, function(result, status) {
1574
+ if (callback && typeof(callback) === "function") {
1575
+ callback(result, status);
1576
+ }
1577
+ });
1578
+ }
1579
+ };
1580
+
1581
+ GMaps.prototype.cleanRoute = GMaps.prototype.removePolylines;
1582
+
1583
+ GMaps.prototype.renderRoute = function(options, renderOptions) {
1584
+ var self = this,
1585
+ panel = ((typeof renderOptions.panel === 'string') ? document.getElementById(renderOptions.panel.replace('#', '')) : renderOptions.panel),
1586
+ display;
1587
+
1588
+ renderOptions.panel = panel;
1589
+ renderOptions = extend_object({
1590
+ map: this.map
1591
+ }, renderOptions);
1592
+ display = new google.maps.DirectionsRenderer(renderOptions);
1593
+
1594
+ this.getRoutes({
1595
+ origin: options.origin,
1596
+ destination: options.destination,
1597
+ travelMode: options.travelMode,
1598
+ waypoints: options.waypoints,
1599
+ unitSystem: options.unitSystem,
1600
+ error: options.error,
1601
+ avoidHighways: options.avoidHighways,
1602
+ avoidTolls: options.avoidTolls,
1603
+ optimizeWaypoints: options.optimizeWaypoints,
1604
+ callback: function(routes, response, status) {
1605
+ if (status === google.maps.DirectionsStatus.OK) {
1606
+ display.setDirections(response);
1607
+ }
1608
+ }
1609
+ });
1610
+ };
1611
+
1612
+ GMaps.prototype.drawRoute = function(options) {
1613
+ var self = this;
1614
+
1615
+ this.getRoutes({
1616
+ origin: options.origin,
1617
+ destination: options.destination,
1618
+ travelMode: options.travelMode,
1619
+ waypoints: options.waypoints,
1620
+ unitSystem: options.unitSystem,
1621
+ error: options.error,
1622
+ avoidHighways: options.avoidHighways,
1623
+ avoidTolls: options.avoidTolls,
1624
+ optimizeWaypoints: options.optimizeWaypoints,
1625
+ callback: function(routes) {
1626
+ if (routes.length > 0) {
1627
+ var polyline_options = {
1628
+ path: routes[routes.length - 1].overview_path,
1629
+ strokeColor: options.strokeColor,
1630
+ strokeOpacity: options.strokeOpacity,
1631
+ strokeWeight: options.strokeWeight
1632
+ };
1633
+
1634
+ if (options.hasOwnProperty("icons")) {
1635
+ polyline_options.icons = options.icons;
1636
+ }
1637
+
1638
+ self.drawPolyline(polyline_options);
1639
+
1640
+ if (options.callback) {
1641
+ options.callback(routes[routes.length - 1]);
1642
+ }
1643
+ }
1644
+ }
1645
+ });
1646
+ };
1647
+
1648
+ GMaps.prototype.travelRoute = function(options) {
1649
+ if (options.origin && options.destination) {
1650
+ this.getRoutes({
1651
+ origin: options.origin,
1652
+ destination: options.destination,
1653
+ travelMode: options.travelMode,
1654
+ waypoints : options.waypoints,
1655
+ unitSystem: options.unitSystem,
1656
+ error: options.error,
1657
+ callback: function(e) {
1658
+ //start callback
1659
+ if (e.length > 0 && options.start) {
1660
+ options.start(e[e.length - 1]);
1661
+ }
1662
+
1663
+ //step callback
1664
+ if (e.length > 0 && options.step) {
1665
+ var route = e[e.length - 1];
1666
+ if (route.legs.length > 0) {
1667
+ var steps = route.legs[0].steps;
1668
+ for (var i = 0, step; step = steps[i]; i++) {
1669
+ step.step_number = i;
1670
+ options.step(step, (route.legs[0].steps.length - 1));
1671
+ }
1672
+ }
1673
+ }
1674
+
1675
+ //end callback
1676
+ if (e.length > 0 && options.end) {
1677
+ options.end(e[e.length - 1]);
1678
+ }
1679
+ }
1680
+ });
1681
+ }
1682
+ else if (options.route) {
1683
+ if (options.route.legs.length > 0) {
1684
+ var steps = options.route.legs[0].steps;
1685
+ for (var i = 0, step; step = steps[i]; i++) {
1686
+ step.step_number = i;
1687
+ options.step(step);
1688
+ }
1689
+ }
1690
+ }
1691
+ };
1692
+
1693
+ GMaps.prototype.drawSteppedRoute = function(options) {
1694
+ var self = this;
1695
+
1696
+ if (options.origin && options.destination) {
1697
+ this.getRoutes({
1698
+ origin: options.origin,
1699
+ destination: options.destination,
1700
+ travelMode: options.travelMode,
1701
+ waypoints : options.waypoints,
1702
+ error: options.error,
1703
+ callback: function(e) {
1704
+ //start callback
1705
+ if (e.length > 0 && options.start) {
1706
+ options.start(e[e.length - 1]);
1707
+ }
1708
+
1709
+ //step callback
1710
+ if (e.length > 0 && options.step) {
1711
+ var route = e[e.length - 1];
1712
+ if (route.legs.length > 0) {
1713
+ var steps = route.legs[0].steps;
1714
+ for (var i = 0, step; step = steps[i]; i++) {
1715
+ step.step_number = i;
1716
+ var polyline_options = {
1717
+ path: step.path,
1718
+ strokeColor: options.strokeColor,
1719
+ strokeOpacity: options.strokeOpacity,
1720
+ strokeWeight: options.strokeWeight
1721
+ };
1722
+
1723
+ if (options.hasOwnProperty("icons")) {
1724
+ polyline_options.icons = options.icons;
1725
+ }
1726
+
1727
+ self.drawPolyline(polyline_options);
1728
+ options.step(step, (route.legs[0].steps.length - 1));
1729
+ }
1730
+ }
1731
+ }
1732
+
1733
+ //end callback
1734
+ if (e.length > 0 && options.end) {
1735
+ options.end(e[e.length - 1]);
1736
+ }
1737
+ }
1738
+ });
1739
+ }
1740
+ else if (options.route) {
1741
+ if (options.route.legs.length > 0) {
1742
+ var steps = options.route.legs[0].steps;
1743
+ for (var i = 0, step; step = steps[i]; i++) {
1744
+ step.step_number = i;
1745
+ var polyline_options = {
1746
+ path: step.path,
1747
+ strokeColor: options.strokeColor,
1748
+ strokeOpacity: options.strokeOpacity,
1749
+ strokeWeight: options.strokeWeight
1750
+ };
1751
+
1752
+ if (options.hasOwnProperty("icons")) {
1753
+ polyline_options.icons = options.icons;
1754
+ }
1755
+
1756
+ self.drawPolyline(polyline_options);
1757
+ options.step(step);
1758
+ }
1759
+ }
1760
+ }
1761
+ };
1762
+
1763
+ GMaps.Route = function(options) {
1764
+ this.origin = options.origin;
1765
+ this.destination = options.destination;
1766
+ this.waypoints = options.waypoints;
1767
+
1768
+ this.map = options.map;
1769
+ this.route = options.route;
1770
+ this.step_count = 0;
1771
+ this.steps = this.route.legs[0].steps;
1772
+ this.steps_length = this.steps.length;
1773
+
1774
+ var polyline_options = {
1775
+ path: new google.maps.MVCArray(),
1776
+ strokeColor: options.strokeColor,
1777
+ strokeOpacity: options.strokeOpacity,
1778
+ strokeWeight: options.strokeWeight
1779
+ };
1780
+
1781
+ if (options.hasOwnProperty("icons")) {
1782
+ polyline_options.icons = options.icons;
1783
+ }
1784
+
1785
+ this.polyline = this.map.drawPolyline(polyline_options).getPath();
1786
+ };
1787
+
1788
+ GMaps.Route.prototype.getRoute = function(options) {
1789
+ var self = this;
1790
+
1791
+ this.map.getRoutes({
1792
+ origin : this.origin,
1793
+ destination : this.destination,
1794
+ travelMode : options.travelMode,
1795
+ waypoints : this.waypoints || [],
1796
+ error: options.error,
1797
+ callback : function() {
1798
+ self.route = e[0];
1799
+
1800
+ if (options.callback) {
1801
+ options.callback.call(self);
1802
+ }
1803
+ }
1804
+ });
1805
+ };
1806
+
1807
+ GMaps.Route.prototype.back = function() {
1808
+ if (this.step_count > 0) {
1809
+ this.step_count--;
1810
+ var path = this.route.legs[0].steps[this.step_count].path;
1811
+
1812
+ for (var p in path){
1813
+ if (path.hasOwnProperty(p)){
1814
+ this.polyline.pop();
1815
+ }
1816
+ }
1817
+ }
1818
+ };
1819
+
1820
+ GMaps.Route.prototype.forward = function() {
1821
+ if (this.step_count < this.steps_length) {
1822
+ var path = this.route.legs[0].steps[this.step_count].path;
1823
+
1824
+ for (var p in path){
1825
+ if (path.hasOwnProperty(p)){
1826
+ this.polyline.push(path[p]);
1827
+ }
1828
+ }
1829
+ this.step_count++;
1830
+ }
1831
+ };
1832
+
1833
+ GMaps.prototype.checkGeofence = function(lat, lng, fence) {
1834
+ return fence.containsLatLng(new google.maps.LatLng(lat, lng));
1835
+ };
1836
+
1837
+ GMaps.prototype.checkMarkerGeofence = function(marker, outside_callback) {
1838
+ if (marker.fences) {
1839
+ for (var i = 0, fence; fence = marker.fences[i]; i++) {
1840
+ var pos = marker.getPosition();
1841
+ if (!this.checkGeofence(pos.lat(), pos.lng(), fence)) {
1842
+ outside_callback(marker, fence);
1843
+ }
1844
+ }
1845
+ }
1846
+ };
1847
+
1848
+ GMaps.prototype.toImage = function(options) {
1849
+ var options = options || {},
1850
+ static_map_options = {};
1851
+
1852
+ static_map_options['size'] = options['size'] || [this.el.clientWidth, this.el.clientHeight];
1853
+ static_map_options['lat'] = this.getCenter().lat();
1854
+ static_map_options['lng'] = this.getCenter().lng();
1855
+
1856
+ if (this.markers.length > 0) {
1857
+ static_map_options['markers'] = [];
1858
+
1859
+ for (var i = 0; i < this.markers.length; i++) {
1860
+ static_map_options['markers'].push({
1861
+ lat: this.markers[i].getPosition().lat(),
1862
+ lng: this.markers[i].getPosition().lng()
1863
+ });
1864
+ }
1865
+ }
1866
+
1867
+ if (this.polylines.length > 0) {
1868
+ var polyline = this.polylines[0];
1869
+
1870
+ static_map_options['polyline'] = {};
1871
+ static_map_options['polyline']['path'] = google.maps.geometry.encoding.encodePath(polyline.getPath());
1872
+ static_map_options['polyline']['strokeColor'] = polyline.strokeColor
1873
+ static_map_options['polyline']['strokeOpacity'] = polyline.strokeOpacity
1874
+ static_map_options['polyline']['strokeWeight'] = polyline.strokeWeight
1875
+ }
1876
+
1877
+ return GMaps.staticMapURL(static_map_options);
1878
+ };
1879
+
1880
+ GMaps.staticMapURL = function(options){
1881
+ var parameters = [],
1882
+ data,
1883
+ static_root = (location.protocol === 'file:' ? 'http:' : location.protocol ) + '//maps.googleapis.com/maps/api/staticmap';
1884
+
1885
+ if (options.url) {
1886
+ static_root = options.url;
1887
+ delete options.url;
1888
+ }
1889
+
1890
+ static_root += '?';
1891
+
1892
+ var markers = options.markers;
1893
+
1894
+ delete options.markers;
1895
+
1896
+ if (!markers && options.marker) {
1897
+ markers = [options.marker];
1898
+ delete options.marker;
1899
+ }
1900
+
1901
+ var styles = options.styles;
1902
+
1903
+ delete options.styles;
1904
+
1905
+ var polyline = options.polyline;
1906
+ delete options.polyline;
1907
+
1908
+ /** Map options **/
1909
+ if (options.center) {
1910
+ parameters.push('center=' + options.center);
1911
+ delete options.center;
1912
+ }
1913
+ else if (options.address) {
1914
+ parameters.push('center=' + options.address);
1915
+ delete options.address;
1916
+ }
1917
+ else if (options.lat) {
1918
+ parameters.push(['center=', options.lat, ',', options.lng].join(''));
1919
+ delete options.lat;
1920
+ delete options.lng;
1921
+ }
1922
+ else if (options.visible) {
1923
+ var visible = encodeURI(options.visible.join('|'));
1924
+ parameters.push('visible=' + visible);
1925
+ }
1926
+
1927
+ var size = options.size;
1928
+ if (size) {
1929
+ if (size.join) {
1930
+ size = size.join('x');
1931
+ }
1932
+ delete options.size;
1933
+ }
1934
+ else {
1935
+ size = '630x300';
1936
+ }
1937
+ parameters.push('size=' + size);
1938
+
1939
+ if (!options.zoom && options.zoom !== false) {
1940
+ options.zoom = 15;
1941
+ }
1942
+
1943
+ var sensor = options.hasOwnProperty('sensor') ? !!options.sensor : true;
1944
+ delete options.sensor;
1945
+ parameters.push('sensor=' + sensor);
1946
+
1947
+ for (var param in options) {
1948
+ if (options.hasOwnProperty(param)) {
1949
+ parameters.push(param + '=' + options[param]);
1950
+ }
1951
+ }
1952
+
1953
+ /** Markers **/
1954
+ if (markers) {
1955
+ var marker, loc;
1956
+
1957
+ for (var i = 0; data = markers[i]; i++) {
1958
+ marker = [];
1959
+
1960
+ if (data.size && data.size !== 'normal') {
1961
+ marker.push('size:' + data.size);
1962
+ delete data.size;
1963
+ }
1964
+ else if (data.icon) {
1965
+ marker.push('icon:' + encodeURI(data.icon));
1966
+ delete data.icon;
1967
+ }
1968
+
1969
+ if (data.color) {
1970
+ marker.push('color:' + data.color.replace('#', '0x'));
1971
+ delete data.color;
1972
+ }
1973
+
1974
+ if (data.label) {
1975
+ marker.push('label:' + data.label[0].toUpperCase());
1976
+ delete data.label;
1977
+ }
1978
+
1979
+ loc = (data.address ? data.address : data.lat + ',' + data.lng);
1980
+ delete data.address;
1981
+ delete data.lat;
1982
+ delete data.lng;
1983
+
1984
+ for(var param in data){
1985
+ if (data.hasOwnProperty(param)) {
1986
+ marker.push(param + ':' + data[param]);
1987
+ }
1988
+ }
1989
+
1990
+ if (marker.length || i === 0) {
1991
+ marker.push(loc);
1992
+ marker = marker.join('|');
1993
+ parameters.push('markers=' + encodeURI(marker));
1994
+ }
1995
+ // New marker without styles
1996
+ else {
1997
+ marker = parameters.pop() + encodeURI('|' + loc);
1998
+ parameters.push(marker);
1999
+ }
2000
+ }
2001
+ }
2002
+
2003
+ /** Map Styles **/
2004
+ if (styles) {
2005
+ for (var i = 0; i < styles.length; i++) {
2006
+ var styleRule = [];
2007
+ if (styles[i].featureType){
2008
+ styleRule.push('feature:' + styles[i].featureType.toLowerCase());
2009
+ }
2010
+
2011
+ if (styles[i].elementType) {
2012
+ styleRule.push('element:' + styles[i].elementType.toLowerCase());
2013
+ }
2014
+
2015
+ for (var j = 0; j < styles[i].stylers.length; j++) {
2016
+ for (var p in styles[i].stylers[j]) {
2017
+ var ruleArg = styles[i].stylers[j][p];
2018
+ if (p == 'hue' || p == 'color') {
2019
+ ruleArg = '0x' + ruleArg.substring(1);
2020
+ }
2021
+ styleRule.push(p + ':' + ruleArg);
2022
+ }
2023
+ }
2024
+
2025
+ var rule = styleRule.join('|');
2026
+ if (rule != '') {
2027
+ parameters.push('style=' + rule);
2028
+ }
2029
+ }
2030
+ }
2031
+
2032
+ /** Polylines **/
2033
+ function parseColor(color, opacity) {
2034
+ if (color[0] === '#'){
2035
+ color = color.replace('#', '0x');
2036
+
2037
+ if (opacity) {
2038
+ opacity = parseFloat(opacity);
2039
+ opacity = Math.min(1, Math.max(opacity, 0));
2040
+ if (opacity === 0) {
2041
+ return '0x00000000';
2042
+ }
2043
+ opacity = (opacity * 255).toString(16);
2044
+ if (opacity.length === 1) {
2045
+ opacity += opacity;
2046
+ }
2047
+
2048
+ color = color.slice(0,8) + opacity;
2049
+ }
2050
+ }
2051
+ return color;
2052
+ }
2053
+
2054
+ if (polyline) {
2055
+ data = polyline;
2056
+ polyline = [];
2057
+
2058
+ if (data.strokeWeight) {
2059
+ polyline.push('weight:' + parseInt(data.strokeWeight, 10));
2060
+ }
2061
+
2062
+ if (data.strokeColor) {
2063
+ var color = parseColor(data.strokeColor, data.strokeOpacity);
2064
+ polyline.push('color:' + color);
2065
+ }
2066
+
2067
+ if (data.fillColor) {
2068
+ var fillcolor = parseColor(data.fillColor, data.fillOpacity);
2069
+ polyline.push('fillcolor:' + fillcolor);
2070
+ }
2071
+
2072
+ var path = data.path;
2073
+ if (path.join) {
2074
+ for (var j=0, pos; pos=path[j]; j++) {
2075
+ polyline.push(pos.join(','));
2076
+ }
2077
+ }
2078
+ else {
2079
+ polyline.push('enc:' + path);
2080
+ }
2081
+
2082
+ polyline = polyline.join('|');
2083
+ parameters.push('path=' + encodeURI(polyline));
2084
+ }
2085
+
2086
+ /** Retina support **/
2087
+ var dpi = window.devicePixelRatio || 1;
2088
+ parameters.push('scale=' + dpi);
2089
+
2090
+ parameters = parameters.join('&');
2091
+ return static_root + parameters;
2092
+ };
2093
+
2094
+ GMaps.prototype.addMapType = function(mapTypeId, options) {
2095
+ if (options.hasOwnProperty("getTileUrl") && typeof(options["getTileUrl"]) == "function") {
2096
+ options.tileSize = options.tileSize || new google.maps.Size(256, 256);
2097
+
2098
+ var mapType = new google.maps.ImageMapType(options);
2099
+
2100
+ this.map.mapTypes.set(mapTypeId, mapType);
2101
+ }
2102
+ else {
2103
+ throw "'getTileUrl' function required.";
2104
+ }
2105
+ };
2106
+
2107
+ GMaps.prototype.addOverlayMapType = function(options) {
2108
+ if (options.hasOwnProperty("getTile") && typeof(options["getTile"]) == "function") {
2109
+ var overlayMapTypeIndex = options.index;
2110
+
2111
+ delete options.index;
2112
+
2113
+ this.map.overlayMapTypes.insertAt(overlayMapTypeIndex, options);
2114
+ }
2115
+ else {
2116
+ throw "'getTile' function required.";
2117
+ }
2118
+ };
2119
+
2120
+ GMaps.prototype.removeOverlayMapType = function(overlayMapTypeIndex) {
2121
+ this.map.overlayMapTypes.removeAt(overlayMapTypeIndex);
2122
+ };
2123
+
2124
+ GMaps.prototype.addStyle = function(options) {
2125
+ var styledMapType = new google.maps.StyledMapType(options.styles, { name: options.styledMapName });
2126
+
2127
+ this.map.mapTypes.set(options.mapTypeId, styledMapType);
2128
+ };
2129
+
2130
+ GMaps.prototype.setStyle = function(mapTypeId) {
2131
+ this.map.setMapTypeId(mapTypeId);
2132
+ };
2133
+
2134
+ GMaps.prototype.createPanorama = function(streetview_options) {
2135
+ if (!streetview_options.hasOwnProperty('lat') || !streetview_options.hasOwnProperty('lng')) {
2136
+ streetview_options.lat = this.getCenter().lat();
2137
+ streetview_options.lng = this.getCenter().lng();
2138
+ }
2139
+
2140
+ this.panorama = GMaps.createPanorama(streetview_options);
2141
+
2142
+ this.map.setStreetView(this.panorama);
2143
+
2144
+ return this.panorama;
2145
+ };
2146
+
2147
+ GMaps.createPanorama = function(options) {
2148
+ var el = getElementById(options.el, options.context);
2149
+
2150
+ options.position = new google.maps.LatLng(options.lat, options.lng);
2151
+
2152
+ delete options.el;
2153
+ delete options.context;
2154
+ delete options.lat;
2155
+ delete options.lng;
2156
+
2157
+ var streetview_events = ['closeclick', 'links_changed', 'pano_changed', 'position_changed', 'pov_changed', 'resize', 'visible_changed'],
2158
+ streetview_options = extend_object({visible : true}, options);
2159
+
2160
+ for (var i = 0; i < streetview_events.length; i++) {
2161
+ delete streetview_options[streetview_events[i]];
2162
+ }
2163
+
2164
+ var panorama = new google.maps.StreetViewPanorama(el, streetview_options);
2165
+
2166
+ for (var i = 0; i < streetview_events.length; i++) {
2167
+ (function(object, name) {
2168
+ if (options[name]) {
2169
+ google.maps.event.addListener(object, name, function(){
2170
+ options[name].apply(this);
2171
+ });
2172
+ }
2173
+ })(panorama, streetview_events[i]);
2174
+ }
2175
+
2176
+ return panorama;
2177
+ };
2178
+
2179
+ GMaps.prototype.on = function(event_name, handler) {
2180
+ return GMaps.on(event_name, this, handler);
2181
+ };
2182
+
2183
+ GMaps.prototype.off = function(event_name) {
2184
+ GMaps.off(event_name, this);
2185
+ };
2186
+
2187
+ GMaps.prototype.once = function(event_name, handler) {
2188
+ return GMaps.once(event_name, this, handler);
2189
+ };
2190
+
2191
+ GMaps.custom_events = ['marker_added', 'marker_removed', 'polyline_added', 'polyline_removed', 'polygon_added', 'polygon_removed', 'geolocated', 'geolocation_failed'];
2192
+
2193
+ GMaps.on = function(event_name, object, handler) {
2194
+ if (GMaps.custom_events.indexOf(event_name) == -1) {
2195
+ if(object instanceof GMaps) object = object.map;
2196
+ return google.maps.event.addListener(object, event_name, handler);
2197
+ }
2198
+ else {
2199
+ var registered_event = {
2200
+ handler : handler,
2201
+ eventName : event_name
2202
+ };
2203
+
2204
+ object.registered_events[event_name] = object.registered_events[event_name] || [];
2205
+ object.registered_events[event_name].push(registered_event);
2206
+
2207
+ return registered_event;
2208
+ }
2209
+ };
2210
+
2211
+ GMaps.off = function(event_name, object) {
2212
+ if (GMaps.custom_events.indexOf(event_name) == -1) {
2213
+ if(object instanceof GMaps) object = object.map;
2214
+ google.maps.event.clearListeners(object, event_name);
2215
+ }
2216
+ else {
2217
+ object.registered_events[event_name] = [];
2218
+ }
2219
+ };
2220
+
2221
+ GMaps.once = function(event_name, object, handler) {
2222
+ if (GMaps.custom_events.indexOf(event_name) == -1) {
2223
+ if(object instanceof GMaps) object = object.map;
2224
+ return google.maps.event.addListenerOnce(object, event_name, handler);
2225
+ }
2226
+ };
2227
+
2228
+ GMaps.fire = function(event_name, object, scope) {
2229
+ if (GMaps.custom_events.indexOf(event_name) == -1) {
2230
+ google.maps.event.trigger(object, event_name, Array.prototype.slice.apply(arguments).slice(2));
2231
+ }
2232
+ else {
2233
+ if(event_name in scope.registered_events) {
2234
+ var firing_events = scope.registered_events[event_name];
2235
+
2236
+ for(var i = 0; i < firing_events.length; i++) {
2237
+ (function(handler, scope, object) {
2238
+ handler.apply(scope, [object]);
2239
+ })(firing_events[i]['handler'], scope, object);
2240
+ }
2241
+ }
2242
+ }
2243
+ };
2244
+
2245
+ GMaps.geolocate = function(options) {
2246
+ var complete_callback = options.always || options.complete;
2247
+
2248
+ if (navigator.geolocation) {
2249
+ navigator.geolocation.getCurrentPosition(function(position) {
2250
+ options.success(position);
2251
+
2252
+ if (complete_callback) {
2253
+ complete_callback();
2254
+ }
2255
+ }, function(error) {
2256
+ options.error(error);
2257
+
2258
+ if (complete_callback) {
2259
+ complete_callback();
2260
+ }
2261
+ }, options.options);
2262
+ }
2263
+ else {
2264
+ options.not_supported();
2265
+
2266
+ if (complete_callback) {
2267
+ complete_callback();
2268
+ }
2269
+ }
2270
+ };
2271
+
2272
+ GMaps.geocode = function(options) {
2273
+ this.geocoder = new google.maps.Geocoder();
2274
+ var callback = options.callback;
2275
+ if (options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) {
2276
+ options.latLng = new google.maps.LatLng(options.lat, options.lng);
2277
+ }
2278
+
2279
+ delete options.lat;
2280
+ delete options.lng;
2281
+ delete options.callback;
2282
+
2283
+ this.geocoder.geocode(options, function(results, status) {
2284
+ callback(results, status);
2285
+ });
2286
+ };
2287
+
2288
+ if (typeof window.google === 'object' && window.google.maps) {
2289
+ //==========================
2290
+ // Polygon containsLatLng
2291
+ // https://github.com/tparkin/Google-Maps-Point-in-Polygon
2292
+ // Poygon getBounds extension - google-maps-extensions
2293
+ // http://code.google.com/p/google-maps-extensions/source/browse/google.maps.Polygon.getBounds.js
2294
+ if (!google.maps.Polygon.prototype.getBounds) {
2295
+ google.maps.Polygon.prototype.getBounds = function(latLng) {
2296
+ var bounds = new google.maps.LatLngBounds();
2297
+ var paths = this.getPaths();
2298
+ var path;
2299
+
2300
+ for (var p = 0; p < paths.getLength(); p++) {
2301
+ path = paths.getAt(p);
2302
+ for (var i = 0; i < path.getLength(); i++) {
2303
+ bounds.extend(path.getAt(i));
2304
+ }
2305
+ }
2306
+
2307
+ return bounds;
2308
+ };
2309
+ }
2310
+
2311
+ if (!google.maps.Polygon.prototype.containsLatLng) {
2312
+ // Polygon containsLatLng - method to determine if a latLng is within a polygon
2313
+ google.maps.Polygon.prototype.containsLatLng = function(latLng) {
2314
+ // Exclude points outside of bounds as there is no way they are in the poly
2315
+ var bounds = this.getBounds();
2316
+
2317
+ if (bounds !== null && !bounds.contains(latLng)) {
2318
+ return false;
2319
+ }
2320
+
2321
+ // Raycast point in polygon method
2322
+ var inPoly = false;
2323
+
2324
+ var numPaths = this.getPaths().getLength();
2325
+ for (var p = 0; p < numPaths; p++) {
2326
+ var path = this.getPaths().getAt(p);
2327
+ var numPoints = path.getLength();
2328
+ var j = numPoints - 1;
2329
+
2330
+ for (var i = 0; i < numPoints; i++) {
2331
+ var vertex1 = path.getAt(i);
2332
+ var vertex2 = path.getAt(j);
2333
+
2334
+ if (vertex1.lng() < latLng.lng() && vertex2.lng() >= latLng.lng() || vertex2.lng() < latLng.lng() && vertex1.lng() >= latLng.lng()) {
2335
+ if (vertex1.lat() + (latLng.lng() - vertex1.lng()) / (vertex2.lng() - vertex1.lng()) * (vertex2.lat() - vertex1.lat()) < latLng.lat()) {
2336
+ inPoly = !inPoly;
2337
+ }
2338
+ }
2339
+
2340
+ j = i;
2341
+ }
2342
+ }
2343
+
2344
+ return inPoly;
2345
+ };
2346
+ }
2347
+
2348
+ if (!google.maps.Circle.prototype.containsLatLng) {
2349
+ google.maps.Circle.prototype.containsLatLng = function(latLng) {
2350
+ if (google.maps.geometry) {
2351
+ return google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(), latLng) <= this.getRadius();
2352
+ }
2353
+ else {
2354
+ return true;
2355
+ }
2356
+ };
2357
+ }
2358
+
2359
+ google.maps.Rectangle.prototype.containsLatLng = function(latLng) {
2360
+ return this.getBounds().contains(latLng);
2361
+ };
2362
+
2363
+ google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {
2364
+ return this.contains(latLng);
2365
+ };
2366
+
2367
+ google.maps.Marker.prototype.setFences = function(fences) {
2368
+ this.fences = fences;
2369
+ };
2370
+
2371
+ google.maps.Marker.prototype.addFence = function(fence) {
2372
+ this.fences.push(fence);
2373
+ };
2374
+
2375
+ google.maps.Marker.prototype.getId = function() {
2376
+ return this['__gm_id'];
2377
+ };
2378
+ }
2379
+
2380
+ //==========================
2381
+ // Array indexOf
2382
+ // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf
2383
+ if (!Array.prototype.indexOf) {
2384
+ Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
2385
+ "use strict";
2386
+ if (this == null) {
2387
+ throw new TypeError();
2388
+ }
2389
+ var t = Object(this);
2390
+ var len = t.length >>> 0;
2391
+ if (len === 0) {
2392
+ return -1;
2393
+ }
2394
+ var n = 0;
2395
+ if (arguments.length > 1) {
2396
+ n = Number(arguments[1]);
2397
+ if (n != n) { // shortcut for verifying if it's NaN
2398
+ n = 0;
2399
+ } else if (n != 0 && n != Infinity && n != -Infinity) {
2400
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
2401
+ }
2402
+ }
2403
+ if (n >= len) {
2404
+ return -1;
2405
+ }
2406
+ var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
2407
+ for (; k < len; k++) {
2408
+ if (k in t && t[k] === searchElement) {
2409
+ return k;
2410
+ }
2411
+ }
2412
+ return -1;
2413
+ }
2414
+ }
2415
+
2416
+ return GMaps;
2417
+ }));
2418
+