action_ui 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (386) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/lib/cre_pro-rails.rb +8 -0
  4. data/lib/cre_pro/rails.rb +7 -0
  5. data/lib/cre_pro/rails/version.rb +5 -0
  6. data/vendor/assets/javascripts/gp/gp.js +292 -0
  7. data/vendor/assets/javascripts/ld/bootstrap-checkbox-radio-switch-tags.js +869 -0
  8. data/vendor/assets/javascripts/ld/bootstrap-datetimepicker.js +2573 -0
  9. data/vendor/assets/javascripts/ld/bootstrap-notify.js +379 -0
  10. data/vendor/assets/javascripts/ld/bootstrap-selectpicker.js +1711 -0
  11. data/vendor/assets/javascripts/ld/bootstrap-table.js +2484 -0
  12. data/vendor/assets/javascripts/ld/chartist.min.js +8 -0
  13. data/vendor/assets/javascripts/ld/demo.js +731 -0
  14. data/vendor/assets/javascripts/ld/fullcalendar.min.js +9 -0
  15. data/vendor/assets/javascripts/ld/jquery-jvectormap.js +3381 -0
  16. data/vendor/assets/javascripts/ld/jquery-ui.min.js +24 -0
  17. data/vendor/assets/javascripts/ld/jquery.bootstrap.wizard.min.js +22 -0
  18. data/vendor/assets/javascripts/ld/jquery.datatables.js +15498 -0
  19. data/vendor/assets/javascripts/ld/jquery.min.js +5 -0
  20. data/vendor/assets/javascripts/ld/jquery.validate.min.js +4 -0
  21. data/vendor/assets/javascripts/ld/ld.js +422 -0
  22. data/vendor/assets/javascripts/ld/moment.min.js +7 -0
  23. data/vendor/assets/javascripts/ld/sweetalert2.js +877 -0
  24. data/vendor/assets/javascripts/mk/bootstrap-datepicker.js +474 -0
  25. data/vendor/assets/javascripts/mk/bootstrap.min.js +7 -0
  26. data/vendor/assets/javascripts/mk/jasny-bootstrap.min.js +6 -0
  27. data/vendor/assets/javascripts/mk/jquery.dropdown.js +378 -0
  28. data/vendor/assets/javascripts/mk/jquery.flexisel.js +342 -0
  29. data/vendor/assets/javascripts/mk/jquery.min.js +3 -0
  30. data/vendor/assets/javascripts/mk/jquery.tagsinput.js +355 -0
  31. data/vendor/assets/javascripts/mk/mk.js +191 -0
  32. data/vendor/assets/javascripts/mk/mk.min.js +1 -0
  33. data/vendor/assets/javascripts/mk/nouislider.min.js +31 -0
  34. data/vendor/assets/javascripts/pd/bootstrap-checkbox-radio-switch-tags.js +869 -0
  35. data/vendor/assets/javascripts/pd/bootstrap-datetimepicker.js +2576 -0
  36. data/vendor/assets/javascripts/pd/bootstrap-notify.js +379 -0
  37. data/vendor/assets/javascripts/pd/bootstrap-selectpicker.js +1711 -0
  38. data/vendor/assets/javascripts/pd/bootstrap-table.js +2484 -0
  39. data/vendor/assets/javascripts/pd/bootstrap.min.js +12 -0
  40. data/vendor/assets/javascripts/pd/chartist.min.js +9 -0
  41. data/vendor/assets/javascripts/pd/demo.js +911 -0
  42. data/vendor/assets/javascripts/pd/fullcalendar.min.js +9 -0
  43. data/vendor/assets/javascripts/pd/jquery-1.10.2.js +9789 -0
  44. data/vendor/assets/javascripts/pd/jquery-1.10.2.min.js +3 -0
  45. data/vendor/assets/javascripts/pd/jquery-jvectormap.js +3381 -0
  46. data/vendor/assets/javascripts/pd/jquery-ui.min.js +24 -0
  47. data/vendor/assets/javascripts/pd/jquery.bootstrap.wizard.min.js +22 -0
  48. data/vendor/assets/javascripts/pd/jquery.datatables.js +15498 -0
  49. data/vendor/assets/javascripts/pd/jquery.easypiechart.min.js +9 -0
  50. data/vendor/assets/javascripts/pd/jquery.min.js +5 -0
  51. data/vendor/assets/javascripts/pd/jquery.tagsinput.js +355 -0
  52. data/vendor/assets/javascripts/pd/jquery.validate.min.js +4 -0
  53. data/vendor/assets/javascripts/pd/moment.min.js +7 -0
  54. data/vendor/assets/javascripts/pd/pd.js +335 -0
  55. data/vendor/assets/javascripts/pd/sweetalert2.js +877 -0
  56. data/vendor/assets/javascripts/pk/bootstrap-datepicker.js +492 -0
  57. data/vendor/assets/javascripts/pk/bootstrap-select.js +1711 -0
  58. data/vendor/assets/javascripts/pk/chartist.min.js +8 -0
  59. data/vendor/assets/javascripts/pk/ct-pk-bootstrapswitch.js +249 -0
  60. data/vendor/assets/javascripts/pk/ct-pk-checkbox.js +109 -0
  61. data/vendor/assets/javascripts/pk/ct-pk-radio.js +140 -0
  62. data/vendor/assets/javascripts/pk/ct-pk.js +305 -0
  63. data/vendor/assets/javascripts/pk/demo.js +289 -0
  64. data/vendor/assets/javascripts/pk/jasny-bootstrap.min.js +6 -0
  65. data/vendor/assets/javascripts/pk/jquery-1.10.2.js +9789 -0
  66. data/vendor/assets/javascripts/pk/jquery-ui-1.10.4.custom.min.js +6 -0
  67. data/vendor/assets/javascripts/pk/jquery.tagsinput.js +355 -0
  68. data/vendor/assets/javascripts/pk/photo_swipe/init-gallery.js +205 -0
  69. data/vendor/assets/javascripts/pk/photo_swipe/photoswipe-ui-default.min.js +4 -0
  70. data/vendor/assets/javascripts/pk/photo_swipe/photoswipe.min.js +4 -0
  71. data/vendor/assets/javascripts/pk/presentation-page/atv-img-min.js +233 -0
  72. data/vendor/assets/javascripts/pk/presentation-page/jquery.sharrre.js +585 -0
  73. data/vendor/assets/javascripts/sd/bootstrap-datepicker.js +492 -0
  74. data/vendor/assets/javascripts/sd/bootstrap-select.js +1711 -0
  75. data/vendor/assets/javascripts/sd/chartist.min.js +8 -0
  76. data/vendor/assets/javascripts/sd/demo.js +227 -0
  77. data/vendor/assets/javascripts/sd/jquery-ui.custom.min.js +7 -0
  78. data/vendor/assets/javascripts/sd/jquery.flexisel.js +342 -0
  79. data/vendor/assets/javascripts/sd/jquery.js +9789 -0
  80. data/vendor/assets/javascripts/sd/jquery.tagsinput.js +355 -0
  81. data/vendor/assets/javascripts/sd/retina.min.js +10 -0
  82. data/vendor/assets/javascripts/sd/sd-bootstrapswitch.js +249 -0
  83. data/vendor/assets/javascripts/sd/sd-checkbox.js +109 -0
  84. data/vendor/assets/javascripts/sd/sd-morphing.js +89 -0
  85. data/vendor/assets/javascripts/sd/sd-radio.js +140 -0
  86. data/vendor/assets/javascripts/sd/sd.js +398 -0
  87. data/vendor/assets/stylesheets/gp/components/_buttons.scss +121 -0
  88. data/vendor/assets/stylesheets/gp/components/_cards.scss +271 -0
  89. data/vendor/assets/stylesheets/gp/components/_carousel.scss +15 -0
  90. data/vendor/assets/stylesheets/gp/components/_clients.scss +172 -0
  91. data/vendor/assets/stylesheets/gp/components/_closure.scss +19 -0
  92. data/vendor/assets/stylesheets/gp/components/_contact.scss +93 -0
  93. data/vendor/assets/stylesheets/gp/components/_dropdown.scss +173 -0
  94. data/vendor/assets/stylesheets/gp/components/_example-pages.scss +524 -0
  95. data/vendor/assets/stylesheets/gp/components/_footers.scss +191 -0
  96. data/vendor/assets/stylesheets/gp/components/_headers.scss +72 -0
  97. data/vendor/assets/stylesheets/gp/components/_inputs.scss +145 -0
  98. data/vendor/assets/stylesheets/gp/components/_labels.scss +15 -0
  99. data/vendor/assets/stylesheets/gp/components/_misc.scss +332 -0
  100. data/vendor/assets/stylesheets/gp/components/_mixins.scss +11 -0
  101. data/vendor/assets/stylesheets/gp/components/_navbars.scss +252 -0
  102. data/vendor/assets/stylesheets/gp/components/_numbers.scss +61 -0
  103. data/vendor/assets/stylesheets/gp/components/_projects.scss +279 -0
  104. data/vendor/assets/stylesheets/gp/components/_responsive.scss +950 -0
  105. data/vendor/assets/stylesheets/gp/components/_sections.scss +328 -0
  106. data/vendor/assets/stylesheets/gp/components/_social-buttons.scss +30 -0
  107. data/vendor/assets/stylesheets/gp/components/_team.scss +182 -0
  108. data/vendor/assets/stylesheets/gp/components/_theme.scss +22 -0
  109. data/vendor/assets/stylesheets/gp/components/_typography.scss +252 -0
  110. data/vendor/assets/stylesheets/gp/components/_variables.scss +267 -0
  111. data/vendor/assets/stylesheets/gp/components/mixins/_buttons.scss +61 -0
  112. data/vendor/assets/stylesheets/gp/components/mixins/_cards.scss +8 -0
  113. data/vendor/assets/stylesheets/gp/components/mixins/_inputs.scss +17 -0
  114. data/vendor/assets/stylesheets/gp/components/mixins/_navbars.scss +11 -0
  115. data/vendor/assets/stylesheets/gp/components/mixins/_transparency.scss +20 -0
  116. data/vendor/assets/stylesheets/gp/components/mixins/_vendor-prefixes.scss +284 -0
  117. data/vendor/assets/stylesheets/gp/gp.scss +30 -0
  118. data/vendor/assets/stylesheets/ld/ld.scss +53 -0
  119. data/vendor/assets/stylesheets/ld/ld/_alerts.scss +82 -0
  120. data/vendor/assets/stylesheets/ld/ld/_buttons.scss +123 -0
  121. data/vendor/assets/stylesheets/ld/ld/_cards.scss +315 -0
  122. data/vendor/assets/stylesheets/ld/ld/_carousel.scss +15 -0
  123. data/vendor/assets/stylesheets/ld/ld/_checkbox-radio-switch.scss +253 -0
  124. data/vendor/assets/stylesheets/ld/ld/_collapse.scss +49 -0
  125. data/vendor/assets/stylesheets/ld/ld/_dropdown.scss +176 -0
  126. data/vendor/assets/stylesheets/ld/ld/_footers.scss +155 -0
  127. data/vendor/assets/stylesheets/ld/ld/_forms.scss +41 -0
  128. data/vendor/assets/stylesheets/ld/ld/_inputs.scss +170 -0
  129. data/vendor/assets/stylesheets/ld/ld/_labels.scss +54 -0
  130. data/vendor/assets/stylesheets/ld/ld/_media.scss +80 -0
  131. data/vendor/assets/stylesheets/ld/ld/_misc.scss +87 -0
  132. data/vendor/assets/stylesheets/ld/ld/_mixins.scss +22 -0
  133. data/vendor/assets/stylesheets/ld/ld/_modal.scss +79 -0
  134. data/vendor/assets/stylesheets/ld/ld/_navbars.scss +362 -0
  135. data/vendor/assets/stylesheets/ld/ld/_pages.scss +215 -0
  136. data/vendor/assets/stylesheets/ld/ld/_progress-bars.scss +26 -0
  137. data/vendor/assets/stylesheets/ld/ld/_responsive.scss +647 -0
  138. data/vendor/assets/stylesheets/ld/ld/_sidebar-and-main-panel.scss +576 -0
  139. data/vendor/assets/stylesheets/ld/ld/_sliders.scss +219 -0
  140. data/vendor/assets/stylesheets/ld/ld/_social-buttons.scss +77 -0
  141. data/vendor/assets/stylesheets/ld/ld/_tables.scss +120 -0
  142. data/vendor/assets/stylesheets/ld/ld/_tabs-navs-pagination.scss +302 -0
  143. data/vendor/assets/stylesheets/ld/ld/_tags.scss +123 -0
  144. data/vendor/assets/stylesheets/ld/ld/_tooltips-and-popovers.scss +156 -0
  145. data/vendor/assets/stylesheets/ld/ld/_typography.scss +93 -0
  146. data/vendor/assets/stylesheets/ld/ld/_variables.scss +319 -0
  147. data/vendor/assets/stylesheets/ld/ld/mixins/_buttons.scss +74 -0
  148. data/vendor/assets/stylesheets/ld/ld/mixins/_cards.scss +8 -0
  149. data/vendor/assets/stylesheets/ld/ld/mixins/_chartist.scss +85 -0
  150. data/vendor/assets/stylesheets/ld/ld/mixins/_icons.scss +13 -0
  151. data/vendor/assets/stylesheets/ld/ld/mixins/_inputs.scss +17 -0
  152. data/vendor/assets/stylesheets/ld/ld/mixins/_labels.scss +21 -0
  153. data/vendor/assets/stylesheets/ld/ld/mixins/_morphing-buttons.scss +34 -0
  154. data/vendor/assets/stylesheets/ld/ld/mixins/_navbars.scss +11 -0
  155. data/vendor/assets/stylesheets/ld/ld/mixins/_social-buttons.scss +43 -0
  156. data/vendor/assets/stylesheets/ld/ld/mixins/_table-row.scss +22 -0
  157. data/vendor/assets/stylesheets/ld/ld/mixins/_tabs.scss +4 -0
  158. data/vendor/assets/stylesheets/ld/ld/mixins/_transparency.scss +20 -0
  159. data/vendor/assets/stylesheets/ld/ld/mixins/_vendor-prefixes.scss +197 -0
  160. data/vendor/assets/stylesheets/ld/ld/plugins/_animate.scss +188 -0
  161. data/vendor/assets/stylesheets/ld/ld/plugins/_bootstrap-select.scss +308 -0
  162. data/vendor/assets/stylesheets/ld/ld/plugins/_bootstrap-table.scss +328 -0
  163. data/vendor/assets/stylesheets/ld/ld/plugins/_chartist.scss +247 -0
  164. data/vendor/assets/stylesheets/ld/ld/plugins/_datatables.net.scss +513 -0
  165. data/vendor/assets/stylesheets/ld/ld/plugins/_datetime-picker.scss +440 -0
  166. data/vendor/assets/stylesheets/ld/ld/plugins/_fullcalendar.scss +1114 -0
  167. data/vendor/assets/stylesheets/ld/ld/plugins/_jquery.jvectormap.scss +135 -0
  168. data/vendor/assets/stylesheets/ld/ld/plugins/_perfect-scrollbar.scss +111 -0
  169. data/vendor/assets/stylesheets/ld/ld/plugins/_sweetalert2.scss +531 -0
  170. data/vendor/assets/stylesheets/mk/mk.scss +50 -0
  171. data/vendor/assets/stylesheets/mk/mk/_alerts.scss +41 -0
  172. data/vendor/assets/stylesheets/mk/mk/_buttons.scss +283 -0
  173. data/vendor/assets/stylesheets/mk/mk/_cards.scss +576 -0
  174. data/vendor/assets/stylesheets/mk/mk/_carousel.scss +86 -0
  175. data/vendor/assets/stylesheets/mk/mk/_checkboxes.scss +195 -0
  176. data/vendor/assets/stylesheets/mk/mk/_colors.scss +326 -0
  177. data/vendor/assets/stylesheets/mk/mk/_dialogs.scss +99 -0
  178. data/vendor/assets/stylesheets/mk/mk/_dividers.scss +73 -0
  179. data/vendor/assets/stylesheets/mk/mk/_dropdown.scss +86 -0
  180. data/vendor/assets/stylesheets/mk/mk/_example-pages.scss +775 -0
  181. data/vendor/assets/stylesheets/mk/mk/_fileupload.scss +115 -0
  182. data/vendor/assets/stylesheets/mk/mk/_flexisel.scss +54 -0
  183. data/vendor/assets/stylesheets/mk/mk/_form.scss +58 -0
  184. data/vendor/assets/stylesheets/mk/mk/_images.scss +6 -0
  185. data/vendor/assets/stylesheets/mk/mk/_import-bs-less.scss +4 -0
  186. data/vendor/assets/stylesheets/mk/mk/_import-bs-sass.scss +2 -0
  187. data/vendor/assets/stylesheets/mk/mk/_info-areas.scss +57 -0
  188. data/vendor/assets/stylesheets/mk/mk/_inputs-size.scss +223 -0
  189. data/vendor/assets/stylesheets/mk/mk/_inputs.scss +394 -0
  190. data/vendor/assets/stylesheets/mk/mk/_labels.scss +10 -0
  191. data/vendor/assets/stylesheets/mk/mk/_lists.scss +104 -0
  192. data/vendor/assets/stylesheets/mk/mk/_media.scss +47 -0
  193. data/vendor/assets/stylesheets/mk/mk/_misc.scss +94 -0
  194. data/vendor/assets/stylesheets/mk/mk/_mixins.scss +413 -0
  195. data/vendor/assets/stylesheets/mk/mk/_navbar.scss +311 -0
  196. data/vendor/assets/stylesheets/mk/mk/_pagination.scss +91 -0
  197. data/vendor/assets/stylesheets/mk/mk/_panels.scss +47 -0
  198. data/vendor/assets/stylesheets/mk/mk/_pills.scss +128 -0
  199. data/vendor/assets/stylesheets/mk/mk/_popups.scss +77 -0
  200. data/vendor/assets/stylesheets/mk/mk/_progress.scss +33 -0
  201. data/vendor/assets/stylesheets/mk/mk/_radios.scss +114 -0
  202. data/vendor/assets/stylesheets/mk/mk/_responsive.scss +115 -0
  203. data/vendor/assets/stylesheets/mk/mk/_ripples.scss +40 -0
  204. data/vendor/assets/stylesheets/mk/mk/_sections.scss +131 -0
  205. data/vendor/assets/stylesheets/mk/mk/_select.scss +108 -0
  206. data/vendor/assets/stylesheets/mk/mk/_shadows.scss +138 -0
  207. data/vendor/assets/stylesheets/mk/mk/_tables.scss +104 -0
  208. data/vendor/assets/stylesheets/mk/mk/_tabs.scss +53 -0
  209. data/vendor/assets/stylesheets/mk/mk/_tags.scss +97 -0
  210. data/vendor/assets/stylesheets/mk/mk/_togglebutton.scss +87 -0
  211. data/vendor/assets/stylesheets/mk/mk/_typography.scss +75 -0
  212. data/vendor/assets/stylesheets/mk/mk/_variables.scss +224 -0
  213. data/vendor/assets/stylesheets/mk/mk/_variables_bootstrap.scss +883 -0
  214. data/vendor/assets/stylesheets/mk/mk/_welljumbo.scss +28 -0
  215. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-datepicker.scss +204 -0
  216. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-nouislider.scss +161 -0
  217. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-selectize.scss +93 -0
  218. data/vendor/assets/stylesheets/mk/mk/plugins/_plugin-snackbarjs.scss +34 -0
  219. data/vendor/assets/stylesheets/mk/mk/sections/_blogs.scss +17 -0
  220. data/vendor/assets/stylesheets/mk/mk/sections/_contactus.scss +51 -0
  221. data/vendor/assets/stylesheets/mk/mk/sections/_features.scss +92 -0
  222. data/vendor/assets/stylesheets/mk/mk/sections/_footers.scss +163 -0
  223. data/vendor/assets/stylesheets/mk/mk/sections/_headers.scss +125 -0
  224. data/vendor/assets/stylesheets/mk/mk/sections/_pricing.scss +40 -0
  225. data/vendor/assets/stylesheets/mk/mk/sections/_projects.scss +75 -0
  226. data/vendor/assets/stylesheets/mk/mk/sections/_social-subscribe-lines.scss +71 -0
  227. data/vendor/assets/stylesheets/mk/mk/sections/_team.scss +53 -0
  228. data/vendor/assets/stylesheets/mk/mk/sections/_testimonials.scss +5 -0
  229. data/vendor/assets/stylesheets/pd/pd.scss +51 -0
  230. data/vendor/assets/stylesheets/pd/pd/_alerts.scss +60 -0
  231. data/vendor/assets/stylesheets/pd/pd/_animated-buttons.scss +61 -0
  232. data/vendor/assets/stylesheets/pd/pd/_buttons.scss +173 -0
  233. data/vendor/assets/stylesheets/pd/pd/_cards.scss +546 -0
  234. data/vendor/assets/stylesheets/pd/pd/_carousel.scss +15 -0
  235. data/vendor/assets/stylesheets/pd/pd/_chat-message.scss +206 -0
  236. data/vendor/assets/stylesheets/pd/pd/_checkbox-radio.scss +126 -0
  237. data/vendor/assets/stylesheets/pd/pd/_circlechart.scss +18 -0
  238. data/vendor/assets/stylesheets/pd/pd/_collapse.scss +40 -0
  239. data/vendor/assets/stylesheets/pd/pd/_dropdown.scss +413 -0
  240. data/vendor/assets/stylesheets/pd/pd/_footers.scss +87 -0
  241. data/vendor/assets/stylesheets/pd/pd/_forms.scss +43 -0
  242. data/vendor/assets/stylesheets/pd/pd/_inputs.scss +190 -0
  243. data/vendor/assets/stylesheets/pd/pd/_labels.scss +29 -0
  244. data/vendor/assets/stylesheets/pd/pd/_media.scss +80 -0
  245. data/vendor/assets/stylesheets/pd/pd/_misc.scss +104 -0
  246. data/vendor/assets/stylesheets/pd/pd/_mixins.scss +17 -0
  247. data/vendor/assets/stylesheets/pd/pd/_modal.scss +79 -0
  248. data/vendor/assets/stylesheets/pd/pd/_navbars.scss +289 -0
  249. data/vendor/assets/stylesheets/pd/pd/_pages.scss +196 -0
  250. data/vendor/assets/stylesheets/pd/pd/_progress-bars.scss +27 -0
  251. data/vendor/assets/stylesheets/pd/pd/_responsive.scss +666 -0
  252. data/vendor/assets/stylesheets/pd/pd/_sidebar-and-main-panel.scss +514 -0
  253. data/vendor/assets/stylesheets/pd/pd/_sliders.scss +222 -0
  254. data/vendor/assets/stylesheets/pd/pd/_social.scss +130 -0
  255. data/vendor/assets/stylesheets/pd/pd/_switch.scss +145 -0
  256. data/vendor/assets/stylesheets/pd/pd/_tables.scss +194 -0
  257. data/vendor/assets/stylesheets/pd/pd/_tabs-navs-pagination.scss +341 -0
  258. data/vendor/assets/stylesheets/pd/pd/_tags.scss +104 -0
  259. data/vendor/assets/stylesheets/pd/pd/_timeline.scss +178 -0
  260. data/vendor/assets/stylesheets/pd/pd/_tooltips-and-popovers.scss +156 -0
  261. data/vendor/assets/stylesheets/pd/pd/_typography.scss +117 -0
  262. data/vendor/assets/stylesheets/pd/pd/_variables.scss +367 -0
  263. data/vendor/assets/stylesheets/pd/pd/mixins/_alerts.scss +13 -0
  264. data/vendor/assets/stylesheets/pd/pd/mixins/_buttons.scss +89 -0
  265. data/vendor/assets/stylesheets/pd/pd/mixins/_cards.scss +7 -0
  266. data/vendor/assets/stylesheets/pd/pd/mixins/_chartist.scss +104 -0
  267. data/vendor/assets/stylesheets/pd/pd/mixins/_icons.scss +13 -0
  268. data/vendor/assets/stylesheets/pd/pd/mixins/_inputs.scss +17 -0
  269. data/vendor/assets/stylesheets/pd/pd/mixins/_labels.scss +10 -0
  270. data/vendor/assets/stylesheets/pd/pd/mixins/_navbars.scss +11 -0
  271. data/vendor/assets/stylesheets/pd/pd/mixins/_sidebar.scss +54 -0
  272. data/vendor/assets/stylesheets/pd/pd/mixins/_social.scss +68 -0
  273. data/vendor/assets/stylesheets/pd/pd/mixins/_table-row.scss +22 -0
  274. data/vendor/assets/stylesheets/pd/pd/mixins/_tabs.scss +4 -0
  275. data/vendor/assets/stylesheets/pd/pd/mixins/_transparency.scss +20 -0
  276. data/vendor/assets/stylesheets/pd/pd/mixins/_vendor-prefixes.scss +254 -0
  277. data/vendor/assets/stylesheets/pd/pd/plugins/_animate.scss +189 -0
  278. data/vendor/assets/stylesheets/pd/pd/plugins/_bootstrap-select.scss +313 -0
  279. data/vendor/assets/stylesheets/pd/pd/plugins/_bootstrap-table.scss +375 -0
  280. data/vendor/assets/stylesheets/pd/pd/plugins/_chartist.scss +246 -0
  281. data/vendor/assets/stylesheets/pd/pd/plugins/_datatables.net.scss +504 -0
  282. data/vendor/assets/stylesheets/pd/pd/plugins/_datetime-picker.scss +418 -0
  283. data/vendor/assets/stylesheets/pd/pd/plugins/_fullcalendar.scss +1124 -0
  284. data/vendor/assets/stylesheets/pd/pd/plugins/_jquery.jvectormap.scss +135 -0
  285. data/vendor/assets/stylesheets/pd/pd/plugins/_perfect-scrollbar.scss +112 -0
  286. data/vendor/assets/stylesheets/pd/pd/plugins/_sweetalert2.scss +531 -0
  287. data/vendor/assets/stylesheets/pk/ct-pk.scss +64 -0
  288. data/vendor/assets/stylesheets/pk/ct-pk/_alerts.scss +69 -0
  289. data/vendor/assets/stylesheets/pk/ct-pk/_animated-buttons.scss +63 -0
  290. data/vendor/assets/stylesheets/pk/ct-pk/_bootstrap-select.scss +320 -0
  291. data/vendor/assets/stylesheets/pk/ct-pk/_buttons.scss +161 -0
  292. data/vendor/assets/stylesheets/pk/ct-pk/_cards.scss +570 -0
  293. data/vendor/assets/stylesheets/pk/ct-pk/_carousel.scss +59 -0
  294. data/vendor/assets/stylesheets/pk/ct-pk/_chartist.scss +354 -0
  295. data/vendor/assets/stylesheets/pk/ct-pk/_checkbox-radio.scss +129 -0
  296. data/vendor/assets/stylesheets/pk/ct-pk/_collapse.scss +40 -0
  297. data/vendor/assets/stylesheets/pk/ct-pk/_datepicker.scss +198 -0
  298. data/vendor/assets/stylesheets/pk/ct-pk/_dropdown.scss +291 -0
  299. data/vendor/assets/stylesheets/pk/ct-pk/_fileupload.scss +112 -0
  300. data/vendor/assets/stylesheets/pk/ct-pk/_footers.scss +193 -0
  301. data/vendor/assets/stylesheets/pk/ct-pk/_headers.scss +85 -0
  302. data/vendor/assets/stylesheets/pk/ct-pk/_images.scss +28 -0
  303. data/vendor/assets/stylesheets/pk/ct-pk/_info-areas.scss +62 -0
  304. data/vendor/assets/stylesheets/pk/ct-pk/_inputs.scss +171 -0
  305. data/vendor/assets/stylesheets/pk/ct-pk/_labels.scss +29 -0
  306. data/vendor/assets/stylesheets/pk/ct-pk/_media.scss +82 -0
  307. data/vendor/assets/stylesheets/pk/ct-pk/_misc.scss +124 -0
  308. data/vendor/assets/stylesheets/pk/ct-pk/_mixins.scss +16 -0
  309. data/vendor/assets/stylesheets/pk/ct-pk/_modal.scss +91 -0
  310. data/vendor/assets/stylesheets/pk/ct-pk/_navbars.scss +285 -0
  311. data/vendor/assets/stylesheets/pk/ct-pk/_preloaders.scss +282 -0
  312. data/vendor/assets/stylesheets/pk/ct-pk/_progress-bars.scss +27 -0
  313. data/vendor/assets/stylesheets/pk/ct-pk/_responsive.scss +411 -0
  314. data/vendor/assets/stylesheets/pk/ct-pk/_sections.scss +45 -0
  315. data/vendor/assets/stylesheets/pk/ct-pk/_sidebar.scss +206 -0
  316. data/vendor/assets/stylesheets/pk/ct-pk/_sliders.scss +222 -0
  317. data/vendor/assets/stylesheets/pk/ct-pk/_social.scss +130 -0
  318. data/vendor/assets/stylesheets/pk/ct-pk/_switch.scss +145 -0
  319. data/vendor/assets/stylesheets/pk/ct-pk/_tables.scss +135 -0
  320. data/vendor/assets/stylesheets/pk/ct-pk/_tabs-navs-pagination.scss +311 -0
  321. data/vendor/assets/stylesheets/pk/ct-pk/_tags.scss +108 -0
  322. data/vendor/assets/stylesheets/pk/ct-pk/_tooltips-and-popovers.scss +188 -0
  323. data/vendor/assets/stylesheets/pk/ct-pk/_typography.scss +106 -0
  324. data/vendor/assets/stylesheets/pk/ct-pk/_variables.scss +301 -0
  325. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_alerts.scss +11 -0
  326. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_buttons.scss +104 -0
  327. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_inputs.scss +17 -0
  328. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_labels.scss +10 -0
  329. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_navbars.scss +11 -0
  330. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_popovers.scss +21 -0
  331. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_social.scss +68 -0
  332. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_tabs.scss +4 -0
  333. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_transparency.scss +17 -0
  334. data/vendor/assets/stylesheets/pk/ct-pk/mixins/_vendor-prefixes.scss +233 -0
  335. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_default-skin.scss +592 -0
  336. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_gallery.scss +27 -0
  337. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_main-settings.scss +11 -0
  338. data/vendor/assets/stylesheets/pk/ct-pk/plugins/photo-swipe/_main.scss +213 -0
  339. data/vendor/assets/stylesheets/pk/examples.scss +1083 -0
  340. data/vendor/assets/stylesheets/sd/examples.scss +403 -0
  341. data/vendor/assets/stylesheets/sd/sd.scss +41 -0
  342. data/vendor/assets/stylesheets/sd/sd/_alerts.scss +37 -0
  343. data/vendor/assets/stylesheets/sd/sd/_bootstrap-select.scss +307 -0
  344. data/vendor/assets/stylesheets/sd/sd/_buttons.scss +108 -0
  345. data/vendor/assets/stylesheets/sd/sd/_cards.scss +462 -0
  346. data/vendor/assets/stylesheets/sd/sd/_carousel.scss +15 -0
  347. data/vendor/assets/stylesheets/sd/sd/_chartist.scss +335 -0
  348. data/vendor/assets/stylesheets/sd/sd/_checkbox-radio-switch.scss +246 -0
  349. data/vendor/assets/stylesheets/sd/sd/_collapse.scss +33 -0
  350. data/vendor/assets/stylesheets/sd/sd/_datepicker.scss +199 -0
  351. data/vendor/assets/stylesheets/sd/sd/_dropdown.scss +98 -0
  352. data/vendor/assets/stylesheets/sd/sd/_flexisel.scss +53 -0
  353. data/vendor/assets/stylesheets/sd/sd/_footers.scss +216 -0
  354. data/vendor/assets/stylesheets/sd/sd/_icons.scss +127 -0
  355. data/vendor/assets/stylesheets/sd/sd/_inputs.scss +141 -0
  356. data/vendor/assets/stylesheets/sd/sd/_labels.scss +54 -0
  357. data/vendor/assets/stylesheets/sd/sd/_media.scss +80 -0
  358. data/vendor/assets/stylesheets/sd/sd/_misc.scss +115 -0
  359. data/vendor/assets/stylesheets/sd/sd/_mixins.scss +20 -0
  360. data/vendor/assets/stylesheets/sd/sd/_modal.scss +79 -0
  361. data/vendor/assets/stylesheets/sd/sd/_morphing-buttons.scss +161 -0
  362. data/vendor/assets/stylesheets/sd/sd/_navbars.scss +293 -0
  363. data/vendor/assets/stylesheets/sd/sd/_progress-bars.scss +9 -0
  364. data/vendor/assets/stylesheets/sd/sd/_responsive.scss +302 -0
  365. data/vendor/assets/stylesheets/sd/sd/_sections.scss +12 -0
  366. data/vendor/assets/stylesheets/sd/sd/_sidebar-menu.scss +232 -0
  367. data/vendor/assets/stylesheets/sd/sd/_sliders.scss +218 -0
  368. data/vendor/assets/stylesheets/sd/sd/_social-buttons.scss +76 -0
  369. data/vendor/assets/stylesheets/sd/sd/_tables.scss +110 -0
  370. data/vendor/assets/stylesheets/sd/sd/_tabs-navs-pagination.scss +217 -0
  371. data/vendor/assets/stylesheets/sd/sd/_tags.scss +220 -0
  372. data/vendor/assets/stylesheets/sd/sd/_tooltips-and-popovers.scss +156 -0
  373. data/vendor/assets/stylesheets/sd/sd/_typography.scss +73 -0
  374. data/vendor/assets/stylesheets/sd/sd/_variables.scss +249 -0
  375. data/vendor/assets/stylesheets/sd/sd/mixins/_buttons.scss +76 -0
  376. data/vendor/assets/stylesheets/sd/sd/mixins/_cards.scss +8 -0
  377. data/vendor/assets/stylesheets/sd/sd/mixins/_icons.scss +13 -0
  378. data/vendor/assets/stylesheets/sd/sd/mixins/_inputs.scss +17 -0
  379. data/vendor/assets/stylesheets/sd/sd/mixins/_labels.scss +21 -0
  380. data/vendor/assets/stylesheets/sd/sd/mixins/_morphing-buttons.scss +34 -0
  381. data/vendor/assets/stylesheets/sd/sd/mixins/_navbars.scss +11 -0
  382. data/vendor/assets/stylesheets/sd/sd/mixins/_social-buttons.scss +43 -0
  383. data/vendor/assets/stylesheets/sd/sd/mixins/_tabs.scss +4 -0
  384. data/vendor/assets/stylesheets/sd/sd/mixins/_transparency.scss +20 -0
  385. data/vendor/assets/stylesheets/sd/sd/mixins/_vendor-prefixes.scss +177 -0
  386. metadata +484 -0
@@ -0,0 +1,877 @@
1
+ // SweetAlert2
2
+ // github.com/limonte/sweetalert2
3
+
4
+ ;(function(window, document) {
5
+ 'use strict';
6
+
7
+ window.swalClasses = {
8
+ modal: 'sweet-alert',
9
+ overlay: 'sweet-overlay',
10
+ confirm: 'sweet-confirm',
11
+ cancel: 'sweet-cancel'
12
+ };
13
+
14
+ var mediaqueryId = 'sweet-alert-mediaquery';
15
+ var alertTypes = ['error', 'warning', 'info', 'success'];
16
+ var defaultParams = {
17
+ title: '',
18
+ text: '',
19
+ html: '',
20
+ type: null,
21
+ animation: true,
22
+ allowOutsideClick: true,
23
+ allowEscapeKey: true,
24
+ showConfirmButton: true,
25
+ showCancelButton: false,
26
+ closeOnConfirm: true,
27
+ closeOnCancel: true,
28
+ confirmButtonText: 'OK',
29
+ confirmButtonColor: '#3085d6',
30
+ confirmButtonClass: 'btn btn-info btn-fill',
31
+ cancelButtonText: 'Cancel',
32
+ cancelButtonColor: '#aaa',
33
+ cancelButtonClass: 'btn btn-danger btn-fill',
34
+ buttonsStyling: false,
35
+ reverseButtons: false,
36
+ imageUrl: null,
37
+ imageWidth: null,
38
+ imageHeight: null,
39
+ imageClass: null,
40
+ timer: null,
41
+ width: 500,
42
+ padding: 20,
43
+ background: '#fff'
44
+ };
45
+
46
+ /*
47
+ * Manipulate DOM
48
+ */
49
+ var getModal = function() {
50
+ return document.querySelector('.' + window.swalClasses.modal);
51
+ };
52
+
53
+ var getOverlay = function() {
54
+ return document.querySelector('.' + window.swalClasses.overlay);
55
+ };
56
+
57
+ var hasClass = function(elem, className) {
58
+ return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' ');
59
+ };
60
+
61
+ var addClass = function(elem, className) {
62
+ if (className && !hasClass(elem, className)) {
63
+ elem.className += ' ' + className;
64
+ }
65
+ };
66
+
67
+ var removeClass = function(elem, className) {
68
+ var newClass = ' ' + elem.className.replace(/[\t\r\n]/g, ' ') + ' ';
69
+ if (hasClass(elem, className)) {
70
+ while (newClass.indexOf(' ' + className + ' ') >= 0) {
71
+ newClass = newClass.replace(' ' + className + ' ', ' ');
72
+ }
73
+ elem.className = newClass.replace(/^\s+|\s+$/g, '');
74
+ }
75
+ };
76
+
77
+ var escapeHtml = function(str) {
78
+ var div = document.createElement('div');
79
+ div.appendChild(document.createTextNode(str));
80
+ return div.innerHTML;
81
+ };
82
+
83
+ var _show = function(elem) {
84
+ elem.style.opacity = '';
85
+ elem.style.display = 'block';
86
+ };
87
+
88
+ var show = function(elems) {
89
+ if (elems && !elems.length) {
90
+ return _show(elems);
91
+ }
92
+ for (var i = 0; i < elems.length; ++i) {
93
+ _show(elems[i]);
94
+ }
95
+ };
96
+
97
+ var _hide = function(elem) {
98
+ elem.style.opacity = '';
99
+ elem.style.display = 'none';
100
+ };
101
+
102
+ var hide = function(elems) {
103
+ if (elems && !elems.length) {
104
+ return _hide(elems);
105
+ }
106
+ for (var i = 0; i < elems.length; ++i) {
107
+ _hide(elems[i]);
108
+ }
109
+ };
110
+
111
+ var removeStyleProperty = function(elem, property) {
112
+ if (elem.style.removeProperty) {
113
+ elem.style.removeProperty(property);
114
+ } else {
115
+ elem.style.removeAttribute(property);
116
+ }
117
+ }
118
+
119
+ var isDescendant = function(parent, child) {
120
+ var node = child.parentNode;
121
+ while (node !== null) {
122
+ if (node === parent) {
123
+ return true;
124
+ }
125
+ node = node.parentNode;
126
+ }
127
+ return false;
128
+ };
129
+
130
+ var getTopMargin = function(elem) {
131
+ elem.style.left = '-9999px';
132
+ elem.style.display = 'block';
133
+
134
+ var height = elem.clientHeight;
135
+ var padding = parseInt(getComputedStyle(elem).getPropertyValue('padding'), 10);
136
+
137
+ elem.style.left = '';
138
+ elem.style.display = 'none';
139
+ return ('-' + parseInt(height / 2 + padding) + 'px');
140
+ };
141
+
142
+ var fadeIn = function(elem, interval) {
143
+ if (+elem.style.opacity < 1) {
144
+ interval = interval || 16;
145
+ elem.style.opacity = 0;
146
+ elem.style.display = 'block';
147
+ var last = +new Date();
148
+ var tick = function() {
149
+ elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100;
150
+ last = +new Date();
151
+
152
+ if (+elem.style.opacity < 1) {
153
+ setTimeout(tick, interval);
154
+ }
155
+ };
156
+ tick();
157
+ }
158
+ elem.style.display = 'block'; //fallback IE8
159
+ };
160
+
161
+ var fireClick = function(node) {
162
+ // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
163
+ // Then fixed for today's Chrome browser.
164
+ if (typeof MouseEvent === 'function') {
165
+ // Up-to-date approach
166
+ var mevt = new MouseEvent('click', {
167
+ view: window,
168
+ bubbles: false,
169
+ cancelable: true
170
+ });
171
+ node.dispatchEvent(mevt);
172
+ } else if (document.createEvent) {
173
+ // Fallback
174
+ var evt = document.createEvent('MouseEvents');
175
+ evt.initEvent('click', false, false);
176
+ node.dispatchEvent(evt);
177
+ } else if (document.createEventObject) {
178
+ node.fireEvent('onclick') ;
179
+ } else if (typeof node.onclick === 'function') {
180
+ node.onclick();
181
+ }
182
+ };
183
+
184
+ var stopEventPropagation = function(e) {
185
+ // In particular, make sure the space bar doesn't scroll the main window.
186
+ if (typeof e.stopPropagation === 'function') {
187
+ e.stopPropagation();
188
+ e.preventDefault();
189
+ } else if (window.event && window.event.hasOwnProperty('cancelBubble')) {
190
+ window.event.cancelBubble = true;
191
+ }
192
+ };
193
+
194
+ // Remember state in cases where opening and handling a modal will fiddle with it.
195
+ var previousActiveElement;
196
+ var previousDocumentClick;
197
+ var previousWindowKeyDown;
198
+ var lastFocusedButton;
199
+
200
+ /*
201
+ * Global sweetAlert function
202
+ */
203
+ window.sweetAlert = window.swal = function() {
204
+ // Copy arguments to the local args variable
205
+ var args = arguments;
206
+ var modal = getModal();
207
+ if (modal !== null) {
208
+ if (hasClass(modal, 'visible')) {
209
+ resetPrevState();
210
+ }
211
+ // If getModal returns values then continue
212
+ modalDependant.apply(this, args);
213
+ } else {
214
+ // If getModal returns null i.e. no matches, then set up a interval event to check the return value until it is not null
215
+ var modalCheckInterval = setInterval(function() {
216
+ if (getModal() !== null) {
217
+ clearInterval(modalCheckInterval);
218
+ modalDependant.apply(this, args);
219
+ }
220
+ }, 100);
221
+ }
222
+ };
223
+
224
+ /*
225
+ * Global function to close sweetAlert
226
+ */
227
+ window.sweetAlert.closeModal = window.swal.closeModal = function() {
228
+ closeModal();
229
+ };
230
+
231
+ /*
232
+ * Global function to click 'Confirm' button
233
+ */
234
+ window.sweetAlert.clickConfirm = window.swal.clickConfirm = function() {
235
+ var modal = getModal();
236
+ var $confirmButton = modal.querySelector('button.' + window.swalClasses.confirm);
237
+ $confirmButton.click();
238
+ };
239
+
240
+ /*
241
+ * Global function to click 'Cancel' button
242
+ */
243
+ window.sweetAlert.clickCancel = window.swal.clickCancel = function() {
244
+ var modal = getModal();
245
+ var $cancelButton = modal.querySelector('button.' + window.swalClasses.cancel);
246
+ $cancelButton.click();
247
+ };
248
+
249
+ function modalDependant() {
250
+
251
+ if (arguments[0] === undefined) {
252
+ window.console.error('sweetAlert expects at least 1 attribute!');
253
+ return false;
254
+ }
255
+
256
+ var params = extend({}, defaultParams);
257
+
258
+ switch (typeof arguments[0]) {
259
+
260
+ case 'string':
261
+ params.title = arguments[0];
262
+ params.text = arguments[1] || '';
263
+ params.type = arguments[2] || '';
264
+
265
+ break;
266
+
267
+ case 'object':
268
+ params.title = arguments[0].title || defaultParams.title;
269
+ params.text = arguments[0].text || defaultParams.text;
270
+ params.html = arguments[0].html || defaultParams.html;
271
+ params.type = arguments[0].type || defaultParams.type;
272
+ params.animation = arguments[0].animation !== undefined ? arguments[0].animation : defaultParams.animation;
273
+ params.customClass = arguments[0].customClass || params.customClass;
274
+ params.allowOutsideClick = arguments[0].allowOutsideClick !== undefined ? arguments[0].allowOutsideClick : defaultParams.allowOutsideClick;
275
+ params.allowEscapeKey = arguments[0].allowEscapeKey !== undefined ? arguments[0].allowEscapeKey : defaultParams.allowEscapeKey;
276
+ params.showConfirmButton = arguments[0].showConfirmButton !== undefined ? arguments[0].showConfirmButton : defaultParams.showConfirmButton;
277
+ params.showCancelButton = arguments[0].showCancelButton !== undefined ? arguments[0].showCancelButton : defaultParams.showCancelButton;
278
+ params.closeOnConfirm = arguments[0].closeOnConfirm !== undefined ? arguments[0].closeOnConfirm : defaultParams.closeOnConfirm;
279
+ params.closeOnCancel = arguments[0].closeOnCancel !== undefined ? arguments[0].closeOnCancel : defaultParams.closeOnCancel;
280
+ params.timer = parseInt(arguments[0].timer) || defaultParams.timer;
281
+ params.width = parseInt(arguments[0].width) || defaultParams.width;
282
+ params.padding = parseInt(arguments[0].padding) || defaultParams.padding;
283
+ params.background = arguments[0].background !== undefined ? arguments[0].background : defaultParams.background;
284
+
285
+ params.confirmButtonText = arguments[0].confirmButtonText || defaultParams.confirmButtonText;
286
+ params.confirmButtonColor = arguments[0].confirmButtonColor || defaultParams.confirmButtonColor;
287
+ params.confirmButtonClass = arguments[0].confirmButtonClass || params.confirmButtonClass;
288
+ params.cancelButtonText = arguments[0].cancelButtonText || defaultParams.cancelButtonText;
289
+ params.cancelButtonColor = arguments[0].cancelButtonColor || defaultParams.cancelButtonColor;
290
+ params.cancelButtonClass = arguments[0].cancelButtonClass || params.cancelButtonClass;
291
+ params.buttonsStyling = arguments[0].buttonsStyling !== undefined ? arguments[0].buttonsStyling : defaultParams.buttonsStyling;
292
+ params.reverseButtons = arguments[0].reverseButtons !== undefined ? arguments[0].reverseButtons : defaultParams.reverseButtons;
293
+ params.imageUrl = arguments[0].imageUrl || defaultParams.imageUrl;
294
+ params.imageWidth = arguments[0].imageWidth || defaultParams.imageWidth;
295
+ params.imageHeight = arguments[0].imageHeight || defaultParams.imageHeight;
296
+ params.imageClass = arguments[0].imageClass || defaultParams.imageClass;
297
+ params.callback = arguments[1] || null;
298
+
299
+ /*
300
+ * Global function to call sweetAlert callback
301
+ */
302
+ window.sweetAlert.callback = window.swal.callback = function(isConfirm) {
303
+ if (typeof params.callback === 'function') {
304
+ params.callback(isConfirm);
305
+ }
306
+ };
307
+
308
+ break;
309
+
310
+ default:
311
+ window.console.error('Unexpected type of argument! Expected "string" or "object", got ' + typeof arguments[0]);
312
+ return false;
313
+
314
+ }
315
+
316
+ setParameters(params);
317
+ fixVerticalPosition();
318
+ openModal();
319
+
320
+ // Modal interactions
321
+ var modal = getModal();
322
+
323
+ // Close on timer
324
+ if (params.timer) {
325
+ modal.timeout = setTimeout(function() {
326
+ closeModal();
327
+ if (typeof params.callback === 'function') {
328
+ params.callback();
329
+ }
330
+ }, params.timer);
331
+ }
332
+
333
+ // Mouse interactions
334
+ var onButtonEvent = function(event) {
335
+ var e = event || window.event;
336
+ var target = e.target || e.srcElement;
337
+ var targetedConfirm = hasClass(target, window.swalClasses.confirm);
338
+ var targetedCancel = hasClass(target, window.swalClasses.cancel);
339
+ var modalIsVisible = hasClass(modal, 'visible');
340
+
341
+ switch (e.type) {
342
+ case 'mouseover':
343
+ case 'mouseup':
344
+ case 'focus':
345
+ if (params.buttonsStyling) {
346
+ if (targetedConfirm) {
347
+ target.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.1);
348
+ } else if (targetedCancel) {
349
+ target.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.1);
350
+ }
351
+ }
352
+ break;
353
+ case 'mouseout':
354
+ case 'blur':
355
+ if (params.buttonsStyling) {
356
+ if (targetedConfirm) {
357
+ target.style.backgroundColor = params.confirmButtonColor;
358
+ } else if (targetedCancel) {
359
+ target.style.backgroundColor = params.cancelButtonColor;
360
+ }
361
+ }
362
+ break;
363
+ case 'mousedown':
364
+ if (params.buttonsStyling) {
365
+ if (targetedConfirm) {
366
+ target.style.backgroundColor = colorLuminance(params.confirmButtonColor, -0.2);
367
+ } else if (targetedCancel) {
368
+ target.style.backgroundColor = colorLuminance(params.cancelButtonColor, -0.2);
369
+ }
370
+ }
371
+ break;
372
+ case 'click':
373
+ // Clicked 'confirm'
374
+ if (targetedConfirm && params.callback && modalIsVisible) {
375
+ params.callback(true);
376
+
377
+ if (params.closeOnConfirm) {
378
+ closeModal();
379
+ }
380
+
381
+ // Clicked 'cancel'
382
+ } else if (params.callback && modalIsVisible) {
383
+
384
+ // Check if callback function expects a parameter (to track cancel actions)
385
+ if (params.callback.length > 0) {
386
+ params.callback(false);
387
+ }
388
+
389
+ if (params.closeOnCancel) {
390
+ closeModal();
391
+ }
392
+ } else {
393
+ closeModal();
394
+ }
395
+
396
+ break;
397
+ }
398
+ };
399
+
400
+ var $buttons = modal.querySelectorAll('button');
401
+ var i;
402
+ for (i = 0; i < $buttons.length; i++) {
403
+ $buttons[i].onclick = onButtonEvent;
404
+ $buttons[i].onmouseover = onButtonEvent;
405
+ $buttons[i].onmouseout = onButtonEvent;
406
+ $buttons[i].onmousedown = onButtonEvent;
407
+ }
408
+
409
+ // Remember the current document.onclick event.
410
+ previousDocumentClick = document.onclick;
411
+ document.onclick = function(event) {
412
+ var e = event || window.event;
413
+ var target = e.target || e.srcElement;
414
+
415
+ if (target === getOverlay() && params.allowOutsideClick) {
416
+ closeModal();
417
+ if (typeof params.callback === 'function') {
418
+ params.callback();
419
+ }
420
+ }
421
+ };
422
+
423
+ // Keyboard interactions
424
+ var $confirmButton = modal.querySelector('button.' + window.swalClasses.confirm);
425
+ var $cancelButton = modal.querySelector('button.' + window.swalClasses.cancel);
426
+ var $modalElements = modal.querySelectorAll('button, input:not([type=hidden]), textarea, select');
427
+ for (i = 0; i < $modalElements.length; i++) {
428
+ $modalElements[i].onfocus = onButtonEvent;
429
+ $modalElements[i].onblur = onButtonEvent;
430
+ }
431
+
432
+ // Reverse buttons if needed
433
+ if (params.reverseButtons) {
434
+ $confirmButton.parentNode.insertBefore($cancelButton, $confirmButton);
435
+ }
436
+
437
+ // Focus the first element (input or button)
438
+ setFocus(-1, 1);
439
+
440
+ function setFocus(index, increment) {
441
+ // search for visible elements and select the next possible match
442
+ for (var i = 0; i < $modalElements.length; i++) {
443
+ index = index + increment;
444
+
445
+ // rollover to first item
446
+ if (index === $modalElements.length) {
447
+ index = 0;
448
+
449
+ // go to last item
450
+ } else if (index === -1) {
451
+ index = $modalElements.length - 1;
452
+ }
453
+
454
+ // determine if element is visible, the following is borrowed from jqeury $(elem).is(':visible') implementation
455
+ if (
456
+ $modalElements[index].offsetWidth ||
457
+ $modalElements[index].offsetHeight ||
458
+ $modalElements[index].getClientRects().length
459
+ ) {
460
+ $modalElements[index].focus();
461
+ return;
462
+ }
463
+ }
464
+ }
465
+
466
+ function handleKeyDown(event) {
467
+ var e = event || window.event;
468
+ var keyCode = e.keyCode || e.which;
469
+ var modalIsVisible = hasClass(modal, 'visible');
470
+
471
+ if ([9,13,32,27].indexOf(keyCode) === -1) {
472
+ // Don't do work on keys we don't care about.
473
+ return;
474
+ }
475
+
476
+ var $targetElement = e.target || e.srcElement;
477
+
478
+ var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
479
+ for (var i = 0; i < $modalElements.length; i++) {
480
+ if ($targetElement === $modalElements[i]) {
481
+ btnIndex = i;
482
+ break;
483
+ }
484
+ }
485
+
486
+ if (keyCode === 9) {
487
+ // TAB
488
+
489
+ // Should only happen if modal is visible
490
+ if (!modalIsVisible) {
491
+ return;
492
+ }
493
+
494
+ if (!e.shiftKey) {
495
+ // Cycle to the next button
496
+ setFocus(btnIndex, 1);
497
+ } else {
498
+ // Cycle to the prev button
499
+ setFocus(btnIndex, -1);
500
+ }
501
+
502
+ stopEventPropagation(e);
503
+
504
+ } else {
505
+ if (keyCode === 13 || keyCode === 32) {
506
+ if (btnIndex === -1) {
507
+ // ENTER/SPACE clicked outside of a button.
508
+ fireClick($confirmButton, e);
509
+ }
510
+ } else if (keyCode === 27 && params.allowEscapeKey === true) {
511
+ fireClick($cancelButton, e);
512
+ }
513
+ }
514
+ }
515
+
516
+ previousWindowKeyDown = window.onkeydown;
517
+ window.onkeydown = handleKeyDown;
518
+
519
+ // Loading state
520
+ if (params.buttonsStyling) {
521
+ $confirmButton.style.borderLeftColor = params.confirmButtonColor;
522
+ $confirmButton.style.borderRightColor = params.confirmButtonColor;
523
+ }
524
+
525
+ window.swal.toggleLoading = function() {
526
+ $confirmButton.disabled = !$confirmButton.disabled;
527
+ $cancelButton.disabled = !$cancelButton.disabled;
528
+ };
529
+
530
+ window.swal.enableButtons = function() {
531
+ $confirmButton.disabled = false;
532
+ $cancelButton.disabled = false;
533
+ };
534
+
535
+ window.swal.disableButtons = function() {
536
+ $confirmButton.disabled = true;
537
+ $cancelButton.disabled = true;
538
+ };
539
+
540
+ swal.enableButtons();
541
+
542
+ window.onfocus = function() {
543
+ // When the user has focused away and focused back from the whole window.
544
+ window.setTimeout(function() {
545
+ // Put in a timeout to jump out of the event sequence. Calling focus() in the event
546
+ // sequence confuses things.
547
+ if (lastFocusedButton !== undefined) {
548
+ lastFocusedButton.focus();
549
+ lastFocusedButton = undefined;
550
+ }
551
+ }, 0);
552
+ };
553
+ }
554
+
555
+ /*
556
+ * Add modal + overlay to DOM
557
+ */
558
+ window.swal.init = function() {
559
+ var sweetHTML = '<div class="' + window.swalClasses.overlay + '" tabIndex="-1"></div><div class="' + window.swalClasses.modal + '" style="display: none" tabIndex="-1"><div class="icon error"><span class="x-mark"><span class="line left"></span><span class="line right"></span></span></div><div class="icon warning"> <span class="body"></span> <span class="dot"></span> </div> <div class="icon info"></div> <div class="icon success"> <span class="line tip"></span> <span class="line long"></span> <div class="placeholder"></div> <div class="fix"></div> </div> <img class="sweet-image"> <h2>Title</h2><div class="sweet-content">Text</div><hr class="sweet-spacer"><button class="' + window.swalClasses.confirm + '">OK</button><button class="' + window.swalClasses.cancel + '">Cancel</button></div>';
560
+ var sweetWrap = document.createElement('div');
561
+ sweetWrap.className = 'sweet-container';
562
+
563
+ sweetWrap.innerHTML = sweetHTML;
564
+
565
+ document.body.appendChild(sweetWrap);
566
+ };
567
+
568
+ /**
569
+ * Set default params for each popup
570
+ * @param {Object} userParams
571
+ */
572
+ window.swal.setDefaults = function(userParams) {
573
+ if (!userParams) {
574
+ throw new Error('userParams is required');
575
+ }
576
+ if (typeof userParams !== 'object') {
577
+ throw new Error('userParams has to be a object');
578
+ }
579
+
580
+ extend(defaultParams, userParams);
581
+ };
582
+
583
+ /*
584
+ * Set type, text and actions on modal
585
+ */
586
+ function setParameters(params) {
587
+ var modal = getModal();
588
+
589
+ // set modal width, padding and margin-left
590
+ modal.style.width = params.width + 'px';
591
+ modal.style.padding = params.padding + 'px';
592
+ modal.style.marginLeft = -params.width / 2 + 'px';
593
+ modal.style.background = params.background;
594
+
595
+ // add dynamic media query css
596
+ var head = document.getElementsByTagName('head')[0];
597
+ var cssNode = document.createElement('style');
598
+ cssNode.type = 'text/css';
599
+ cssNode.id = mediaqueryId;
600
+ cssNode.innerHTML =
601
+ '@media screen and (max-width: ' + '550' + 'px) {' +
602
+ '.' + window.swalClasses.modal + ' {' +
603
+ 'max-width: 92%;' +
604
+ 'left: 0 !important;' +
605
+ 'margin-left: 4% !important;' +
606
+ '}' +
607
+ '}';
608
+ head.appendChild(cssNode);
609
+
610
+ var $title = modal.querySelector('h2');
611
+ var $content = modal.querySelector('div.sweet-content');
612
+ var $confirmBtn = modal.querySelector('button.' + window.swalClasses.confirm);
613
+ var $cancelBtn = modal.querySelector('button.' + window.swalClasses.cancel);
614
+ var $btnSpacer = modal.querySelector('hr.sweet-spacer');
615
+
616
+ // Title
617
+ $title.innerHTML = escapeHtml(params.title).split('\n').join('<br>');
618
+
619
+ // Content
620
+ if (window.jQuery) {
621
+ $content = $($content).html(params.html || ('<p>' + escapeHtml(params.text.split('\n').join('<br>'))) + '</p>');
622
+ } else {
623
+ $content.innerHTML = params.html || ('<p>' + escapeHtml(params.text.split('\n').join('<br>')) + '</p>');
624
+ if ($content.innerHTML) {
625
+ show($content);
626
+ }
627
+ }
628
+
629
+ // Custom Class
630
+ modal.className = window.swalClasses.modal;
631
+ if (params.customClass) {
632
+ addClass(modal, params.customClass);
633
+ }
634
+
635
+ // Icon
636
+ hide(modal.querySelectorAll('.icon'));
637
+ if (params.type) {
638
+ var validType = false;
639
+ for (var i = 0; i < alertTypes.length; i++) {
640
+ if (params.type === alertTypes[i]) {
641
+ validType = true;
642
+ break;
643
+ }
644
+ }
645
+ if (!validType) {
646
+ window.console.error('Unknown alert type: ' + params.type);
647
+ return false;
648
+ }
649
+ var $icon = modal.querySelector('.icon.' + params.type);
650
+ show($icon);
651
+
652
+ // Animate icon
653
+ switch (params.type) {
654
+ case 'success':
655
+ addClass($icon, 'animate');
656
+ addClass($icon.querySelector('.tip'), 'animate-success-tip');
657
+ addClass($icon.querySelector('.long'), 'animate-success-long');
658
+ break;
659
+ case 'error':
660
+ addClass($icon, 'animate-error-icon');
661
+ addClass($icon.querySelector('.x-mark'), 'animate-x-mark');
662
+ break;
663
+ case 'warning':
664
+ addClass($icon, 'pulse-warning');
665
+ addClass($icon.querySelector('.body'), 'pulse-warning-ins');
666
+ addClass($icon.querySelector('.dot'), 'pulse-warning-ins');
667
+ break;
668
+ }
669
+
670
+ }
671
+
672
+ // Custom image
673
+ var $customImage = modal.querySelector('.sweet-image');
674
+ if (params.imageUrl) {
675
+ $customImage.setAttribute('src', params.imageUrl);
676
+ show($customImage);
677
+
678
+ if (params.imageWidth) {
679
+ $customImage.setAttribute('width', params.imageWidth);
680
+ }
681
+
682
+ if (params.imageHeight) {
683
+ $customImage.setAttribute('height', params.imageHeight);
684
+ }
685
+
686
+ if (params.imageClass) {
687
+ addClass($customImage, params.imageClass);
688
+ }
689
+ } else {
690
+ hide($customImage);
691
+ }
692
+
693
+ // Cancel button
694
+ if (params.showCancelButton) {
695
+ $cancelBtn.style.display = 'inline-block';
696
+ } else {
697
+ hide($cancelBtn);
698
+ }
699
+
700
+ // Confirm button
701
+ if (params.showConfirmButton) {
702
+ removeStyleProperty($confirmBtn, 'display');
703
+ } else {
704
+ hide($confirmBtn);
705
+ }
706
+
707
+ // Buttons spacer
708
+ if (!params.showConfirmButton && !params.showCancelButton) {
709
+ hide($btnSpacer);
710
+ } else {
711
+ show($btnSpacer);
712
+ }
713
+
714
+ // Edit text on cancel and confirm buttons
715
+ $confirmBtn.innerHTML = escapeHtml(params.confirmButtonText);
716
+ $cancelBtn.innerHTML = escapeHtml(params.cancelButtonText);
717
+
718
+ // Set buttons to selected background colors
719
+ if (params.buttonsStyling) {
720
+ $confirmBtn.style.backgroundColor = params.confirmButtonColor;
721
+ $cancelBtn.style.backgroundColor = params.cancelButtonColor;
722
+ }
723
+
724
+ // Add buttons custom classes
725
+ $confirmBtn.className = window.swalClasses.confirm;
726
+ addClass($confirmBtn, params.confirmButtonClass);
727
+ $cancelBtn.className = window.swalClasses.cancel;
728
+ addClass($cancelBtn, params.cancelButtonClass);
729
+
730
+ // Buttons styling
731
+ if (params.buttonsStyling) {
732
+ addClass($confirmBtn, 'styled');
733
+ addClass($cancelBtn, 'styled');
734
+ } else {
735
+ removeClass($confirmBtn, 'styled');
736
+ removeClass($cancelBtn, 'styled');
737
+
738
+ $confirmBtn.style.backgroundColor = $confirmBtn.style.borderLeftColor = $confirmBtn.style.borderRightColor = '';
739
+ $cancelBtn.style.backgroundColor = $cancelBtn.style.borderLeftColor = $cancelBtn.style.borderRightColor = '';
740
+ }
741
+
742
+ // CSS animation
743
+ if (params.animation === true) {
744
+ removeClass(modal, 'no-animation');
745
+ } else {
746
+ addClass(modal, 'no-animation');
747
+ }
748
+ }
749
+
750
+ /*
751
+ * Set hover, active and focus-states for buttons (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
752
+ */
753
+ function colorLuminance(hex, lum) {
754
+ // Validate hex string
755
+ hex = String(hex).replace(/[^0-9a-f]/gi, '');
756
+ if (hex.length < 6) {
757
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
758
+ }
759
+ lum = lum || 0;
760
+
761
+ // Convert to decimal and change luminosity
762
+ var rgb = '#';
763
+ for (var i = 0; i < 3; i++) {
764
+ var c = parseInt(hex.substr(i * 2,2), 16);
765
+ c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);
766
+ rgb += ('00' + c).substr(c.length);
767
+ }
768
+
769
+ return rgb;
770
+ }
771
+
772
+ function extend(a, b) {
773
+ for (var key in b) {
774
+ if (b.hasOwnProperty(key)) {
775
+ a[key] = b[key];
776
+ }
777
+ }
778
+
779
+ return a;
780
+ }
781
+
782
+ /*
783
+ * Animations
784
+ */
785
+ function openModal() {
786
+ var modal = getModal();
787
+ fadeIn(getOverlay(), 10);
788
+ show(modal);
789
+ addClass(modal, 'show-sweet-alert');
790
+ removeClass(modal, 'hide-sweet-alert');
791
+
792
+ previousActiveElement = document.activeElement;
793
+
794
+ setTimeout(function() {
795
+ addClass(modal, 'visible');
796
+ }, 500);
797
+ }
798
+
799
+ function closeModal() {
800
+ var modal = getModal();
801
+ _hide(getOverlay());
802
+ _hide(modal);
803
+ removeClass(modal, 'showSweetAlert');
804
+ addClass(modal, 'hideSweetAlert');
805
+ removeClass(modal, 'visible');
806
+
807
+ // Reset icon animations
808
+
809
+ var $successIcon = modal.querySelector('.icon.success');
810
+ removeClass($successIcon, 'animate');
811
+ removeClass($successIcon.querySelector('.tip'), 'animate-success-tip');
812
+ removeClass($successIcon.querySelector('.long'), 'animate-success-long');
813
+
814
+ var $errorIcon = modal.querySelector('.icon.error');
815
+ removeClass($errorIcon, 'animate-error-icon');
816
+ removeClass($errorIcon.querySelector('.x-mark'), 'animate-x-mark');
817
+
818
+ var $warningIcon = modal.querySelector('.icon.warning');
819
+ removeClass($warningIcon, 'pulse-warning');
820
+ removeClass($warningIcon.querySelector('.body'), 'pulse-warning-ins');
821
+ removeClass($warningIcon.querySelector('.dot'), 'pulse-warning-ins');
822
+
823
+ resetPrevState();
824
+ }
825
+
826
+ // Reset the page to its previous state
827
+ function resetPrevState() {
828
+ var modal = getModal();
829
+ window.onkeydown = previousWindowKeyDown;
830
+ document.onclick = previousDocumentClick;
831
+ if (previousActiveElement) {
832
+ previousActiveElement.focus();
833
+ }
834
+ lastFocusedButton = undefined;
835
+ clearTimeout(modal.timeout);
836
+
837
+ // Remove dynamically created media query
838
+ var head = document.getElementsByTagName('head')[0];
839
+ var mediaquery = document.getElementById(mediaqueryId);
840
+ if (mediaquery) {
841
+ head.removeChild(mediaquery);
842
+ }
843
+ }
844
+
845
+ /*
846
+ * Set 'margin-top'-property on modal based on its computed height
847
+ */
848
+ function fixVerticalPosition() {
849
+ var modal = getModal();
850
+
851
+ modal.style.marginTop = getTopMargin(getModal());
852
+ }
853
+
854
+ /*
855
+ * If library is injected after page has loaded
856
+ */
857
+ (function() {
858
+ if (document.readyState === 'complete' || document.readyState === 'interactive' && document.body) {
859
+ swal.init();
860
+ } else {
861
+ if (document.addEventListener) {
862
+ document.addEventListener('DOMContentLoaded', function onDomContentLoaded() {
863
+ document.removeEventListener('DOMContentLoaded', onDomContentLoaded, false);
864
+ swal.init();
865
+ }, false);
866
+ } else if (document.attachEvent) {
867
+ document.attachEvent('onreadystatechange', function onReadyStateChange() {
868
+ if (document.readyState === 'complete') {
869
+ document.detachEvent('onreadystatechange', onReadyStateChange);
870
+ swal.init();
871
+ }
872
+ });
873
+ }
874
+ }
875
+ })();
876
+
877
+ })(window, document);