rails_marketplace 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (424) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/rails_marketplace/application.js +46 -0
  6. data/app/assets/javascripts/rails_marketplace/catalog.coffee +3 -0
  7. data/app/assets/javascripts/rails_marketplace/flash.js +6 -0
  8. data/app/assets/javascripts/rails_marketplace/footermanifest.js +1 -0
  9. data/app/assets/javascripts/rails_marketplace/js/autocomplete/countries.js +267 -0
  10. data/app/assets/javascripts/rails_marketplace/js/autocomplete/jquery.autocomplete.js +986 -0
  11. data/app/assets/javascripts/rails_marketplace/js/bootstrap.min.js +7 -0
  12. data/app/assets/javascripts/rails_marketplace/js/calendar/fullcalendar.min.js +9 -0
  13. data/app/assets/javascripts/rails_marketplace/js/chartjs/chart.min.js +14 -0
  14. data/app/assets/javascripts/rails_marketplace/js/colorpicker/bootstrap-colorpicker.min.js +1087 -0
  15. data/app/assets/javascripts/rails_marketplace/js/colorpicker/docs.js +17 -0
  16. data/app/assets/javascripts/rails_marketplace/js/cropping/cropper.min.js +10 -0
  17. data/app/assets/javascripts/rails_marketplace/js/cropping/main.js +321 -0
  18. data/app/assets/javascripts/rails_marketplace/js/cropping/main2.js +160 -0
  19. data/app/assets/javascripts/rails_marketplace/js/custom.js +380 -0
  20. data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.css +1 -0
  21. data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.bootstrap.min.js +6 -0
  22. data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.html5.min.js +22 -0
  23. data/app/assets/javascripts/rails_marketplace/js/datatables/buttons.print.min.js +4 -0
  24. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.bootstrap.js +8 -0
  25. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.buttons.min.js +36 -0
  26. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.fixedHeader.min.js +17 -0
  27. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.keyTable.min.js +18 -0
  28. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.responsive.min.js +25 -0
  29. data/app/assets/javascripts/rails_marketplace/js/datatables/dataTables.scroller.min.js +26 -0
  30. data/app/assets/javascripts/rails_marketplace/js/datatables/fixedHeader.bootstrap.min.css +1 -0
  31. data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.css +333 -0
  32. data/app/assets/javascripts/rails_marketplace/js/datatables/jquery.dataTables.min.js +166 -0
  33. data/app/assets/javascripts/rails_marketplace/js/datatables/json/scroller-demo.json +2502 -0
  34. data/app/assets/javascripts/rails_marketplace/js/datatables/jszip.min.js +14 -0
  35. data/app/assets/javascripts/rails_marketplace/js/datatables/pdfmake.min.js +22 -0
  36. data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.css +1 -0
  37. data/app/assets/javascripts/rails_marketplace/js/datatables/responsive.bootstrap.min.js +7 -0
  38. data/app/assets/javascripts/rails_marketplace/js/datatables/scroller.bootstrap.min.css +1 -0
  39. data/app/assets/javascripts/rails_marketplace/js/datatables/vfs_fonts.js +1 -0
  40. data/app/assets/javascripts/rails_marketplace/js/datepicker/daterangepicker.js +1 -0
  41. data/app/assets/javascripts/rails_marketplace/js/dropzone/dropzone.js +2 -0
  42. data/app/assets/javascripts/rails_marketplace/js/easypie/jquery.easypiechart.min.js +9 -0
  43. data/app/assets/javascripts/rails_marketplace/js/echart/echarts-all.js +35 -0
  44. data/app/assets/javascripts/rails_marketplace/js/echart/green.js +212 -0
  45. data/app/assets/javascripts/rails_marketplace/js/editor/bootstrap-wysiwyg.js +200 -0
  46. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-apollo.js +2 -0
  47. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-basic.js +3 -0
  48. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-clj.js +18 -0
  49. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-css.js +2 -0
  50. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-dart.js +3 -0
  51. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-erlang.js +2 -0
  52. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-go.js +1 -0
  53. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-hs.js +2 -0
  54. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lisp.js +3 -0
  55. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-llvm.js +1 -0
  56. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-lua.js +2 -0
  57. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-matlab.js +6 -0
  58. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-ml.js +2 -0
  59. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-mumps.js +2 -0
  60. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-n.js +4 -0
  61. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-pascal.js +3 -0
  62. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-proto.js +1 -0
  63. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-r.js +2 -0
  64. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-rd.js +1 -0
  65. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-scala.js +2 -0
  66. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-sql.js +2 -0
  67. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tcl.js +3 -0
  68. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-tex.js +1 -0
  69. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vb.js +2 -0
  70. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-vhdl.js +3 -0
  71. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-wiki.js +2 -0
  72. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-xq.js +3 -0
  73. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/lang-yaml.js +2 -0
  74. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/prettify.js +30 -0
  75. data/app/assets/javascripts/rails_marketplace/js/editor/external/google-code-prettify/run_prettify.js +34 -0
  76. data/app/assets/javascripts/rails_marketplace/js/editor/external/jquery.hotkeys.js +100 -0
  77. data/app/assets/javascripts/rails_marketplace/js/flot/curvedLines.js +483 -0
  78. data/app/assets/javascripts/rails_marketplace/js/flot/date.js +104 -0
  79. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.js +2 -0
  80. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.orderBars.js +201 -0
  81. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.pie.js +820 -0
  82. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.resize.js +57 -0
  83. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.spline.js +212 -0
  84. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.stack.js +188 -0
  85. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.time.min.js +1 -0
  86. data/app/assets/javascripts/rails_marketplace/js/flot/jquery.flot.tooltip.min.js +12 -0
  87. data/app/assets/javascripts/rails_marketplace/js/gauge/gauge.min.js +1 -0
  88. data/app/assets/javascripts/rails_marketplace/js/gauge/gauge_demo.js +21 -0
  89. data/app/assets/javascripts/rails_marketplace/js/icheck/icheck.min.js +11 -0
  90. data/app/assets/javascripts/rails_marketplace/js/input_mask/jquery.inputmask.js +2 -0
  91. data/app/assets/javascripts/rails_marketplace/js/ion_range/ion.rangeSlider.min.js +66 -0
  92. data/app/assets/javascripts/rails_marketplace/js/jquery.min.js +5 -0
  93. data/app/assets/javascripts/rails_marketplace/js/knob/jquery.knob.min.js +1 -0
  94. data/app/assets/javascripts/rails_marketplace/js/maps/gdp-data.js +185 -0
  95. data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-2.0.3.min.js +2 -0
  96. data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-us-aea-en.js +1 -0
  97. data/app/assets/javascripts/rails_marketplace/js/maps/jquery-jvectormap-world-mill-en.js +1 -0
  98. data/app/assets/javascripts/rails_marketplace/js/maps/us-unemployment.json +1 -0
  99. data/app/assets/javascripts/rails_marketplace/js/moment/moment.min.js +7 -0
  100. data/app/assets/javascripts/rails_marketplace/js/moris/example.js +127 -0
  101. data/app/assets/javascripts/rails_marketplace/js/moris/morris.min.js +7 -0
  102. data/app/assets/javascripts/rails_marketplace/js/moris/raphael-min.js +11 -0
  103. data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.buttons.js +132 -0
  104. data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.core.js +1 -0
  105. data/app/assets/javascripts/rails_marketplace/js/notify/pnotify.nonblock.js +151 -0
  106. data/app/assets/javascripts/rails_marketplace/js/nprogress.js +476 -0
  107. data/app/assets/javascripts/rails_marketplace/js/pace/pace.min.js +2 -0
  108. data/app/assets/javascripts/rails_marketplace/js/parsley/parsley.min.js +9 -0
  109. data/app/assets/javascripts/rails_marketplace/js/progressbar/bootstrap-progressbar.min.js +2 -0
  110. data/app/assets/javascripts/rails_marketplace/js/select/select2.full.js +2 -0
  111. data/app/assets/javascripts/rails_marketplace/js/sidebar/classie.js +80 -0
  112. data/app/assets/javascripts/rails_marketplace/js/sidebar/component.css +569 -0
  113. data/app/assets/javascripts/rails_marketplace/js/sidebar/modernizr.custom.js +4 -0
  114. data/app/assets/javascripts/rails_marketplace/js/sidebar/sidebarEffects.js +63 -0
  115. data/app/assets/javascripts/rails_marketplace/js/skycons/skycons.min.js +1 -0
  116. data/app/assets/javascripts/rails_marketplace/js/sparkline/jquery.sparkline.min.js +5 -0
  117. data/app/assets/javascripts/rails_marketplace/js/switchery/switchery.min.js +1 -0
  118. data/app/assets/javascripts/rails_marketplace/js/tags/jquery.tagsinput.min.js +1 -0
  119. data/app/assets/javascripts/rails_marketplace/js/textarea/autosize.min.js +6 -0
  120. data/app/assets/javascripts/rails_marketplace/js/validator/validator.js +411 -0
  121. data/app/assets/javascripts/rails_marketplace/js/wizard/jquery.smartWizard.js +489 -0
  122. data/app/assets/javascripts/rails_marketplace/less/custom.css +6355 -0
  123. data/app/assets/javascripts/rails_marketplace/marketplace.js +17 -0
  124. data/app/assets/javascripts/rails_marketplace/welcome.coffee +3 -0
  125. data/app/assets/stylesheets/rails_marketplace/application.scss +31 -0
  126. data/app/assets/stylesheets/rails_marketplace/catalog.scss +132 -0
  127. data/app/assets/stylesheets/rails_marketplace/css/animate.min.css +11 -0
  128. data/app/assets/stylesheets/rails_marketplace/css/bootstrap.min.css +6 -0
  129. data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.css +1116 -0
  130. data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.min.css +5 -0
  131. data/app/assets/stylesheets/rails_marketplace/css/calendar/fullcalendar.print.css +208 -0
  132. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/bootstrap-colorpicker.min.css +9 -0
  133. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  134. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/alpha.png +0 -0
  135. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
  136. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/hue.png +0 -0
  137. data/app/assets/stylesheets/rails_marketplace/css/colorpicker/img/bootstrap-colorpicker/saturation.png +0 -0
  138. data/app/assets/stylesheets/rails_marketplace/css/custom.css +5347 -0
  139. data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_page.css +103 -0
  140. data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table.css +258 -0
  141. data/app/assets/stylesheets/rails_marketplace/css/datatables/css/demo_table_jui.css +501 -0
  142. data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables.css +221 -0
  143. data/app/assets/stylesheets/rails_marketplace/css/datatables/css/jquery.dataTables_themeroller.css +244 -0
  144. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/Sorting icons.psd +0 -0
  145. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_disabled.png +0 -0
  146. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled.png +0 -0
  147. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/back_enabled_hover.png +0 -0
  148. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/favicon.ico +0 -0
  149. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_disabled.png +0 -0
  150. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled.png +0 -0
  151. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/forward_enabled_hover.png +0 -0
  152. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc.png +0 -0
  153. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_asc_disabled.png +0 -0
  154. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_both.png +0 -0
  155. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc.png +0 -0
  156. data/app/assets/stylesheets/rails_marketplace/css/datatables/images/sort_desc_disabled.png +0 -0
  157. data/app/assets/stylesheets/rails_marketplace/css/datatables/tools/css/dataTables.tableTools.css +336 -0
  158. data/app/assets/stylesheets/rails_marketplace/css/editor/external/google-code-prettify/prettify.css +1 -0
  159. data/app/assets/stylesheets/rails_marketplace/css/editor/index.css +42 -0
  160. data/app/assets/stylesheets/rails_marketplace/css/floatexamples.css +22 -0
  161. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/_all.css +530 -0
  162. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.css +53 -0
  163. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero.png +0 -0
  164. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/aero@2x.png +0 -0
  165. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.css +53 -0
  166. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue.png +0 -0
  167. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/blue@2x.png +0 -0
  168. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.css +53 -0
  169. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat.png +0 -0
  170. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/flat@2x.png +0 -0
  171. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.css +53 -0
  172. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green.png +0 -0
  173. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/green@2x.png +0 -0
  174. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.css +53 -0
  175. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey.png +0 -0
  176. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/grey@2x.png +0 -0
  177. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.css +53 -0
  178. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange.png +0 -0
  179. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/orange@2x.png +0 -0
  180. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.css +53 -0
  181. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink.png +0 -0
  182. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/pink@2x.png +0 -0
  183. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.css +53 -0
  184. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple.png +0 -0
  185. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/purple@2x.png +0 -0
  186. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.css +53 -0
  187. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red.png +0 -0
  188. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/red@2x.png +0 -0
  189. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.css +53 -0
  190. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow.png +0 -0
  191. data/app/assets/stylesheets/rails_marketplace/css/icheck/flat/yellow@2x.png +0 -0
  192. data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.css +146 -0
  193. data/app/assets/stylesheets/rails_marketplace/css/ion.rangeSlider.skinFlat.css +106 -0
  194. data/app/assets/stylesheets/rails_marketplace/css/maps/jquery-jvectormap-2.0.3.css +135 -0
  195. data/app/assets/stylesheets/rails_marketplace/css/normalize.css +421 -0
  196. data/app/assets/stylesheets/rails_marketplace/css/nprogress.css +74 -0
  197. data/app/assets/stylesheets/rails_marketplace/css/progressbar/bootstrap-progressbar-3.3.0.css +161 -0
  198. data/app/assets/stylesheets/rails_marketplace/css/select/select2.min.css +404 -0
  199. data/app/assets/stylesheets/rails_marketplace/css/switchery/switchery.min.css +1 -0
  200. data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.css +2086 -0
  201. data/app/assets/stylesheets/rails_marketplace/fonts/css/font-awesome.min.css +4 -0
  202. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/FontAwesome.otf +0 -0
  203. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.eot +0 -0
  204. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.svg +655 -0
  205. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.ttf +0 -0
  206. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff +0 -0
  207. data/app/assets/stylesheets/rails_marketplace/fonts/fonts/fontawesome-webfont.woff2 +0 -0
  208. data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.eot +0 -0
  209. data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.svg +288 -0
  210. data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.ttf +0 -0
  211. data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff +0 -0
  212. data/app/assets/stylesheets/rails_marketplace/fonts/glyphicons-halflings-regular.woff2 +0 -0
  213. data/app/assets/stylesheets/rails_marketplace/fonts/less/animated.less +34 -0
  214. data/app/assets/stylesheets/rails_marketplace/fonts/less/bordered-pulled.less +25 -0
  215. data/app/assets/stylesheets/rails_marketplace/fonts/less/core.less +12 -0
  216. data/app/assets/stylesheets/rails_marketplace/fonts/less/fixed-width.less +6 -0
  217. data/app/assets/stylesheets/rails_marketplace/fonts/less/font-awesome.less +17 -0
  218. data/app/assets/stylesheets/rails_marketplace/fonts/less/icons.less +697 -0
  219. data/app/assets/stylesheets/rails_marketplace/fonts/less/larger.less +13 -0
  220. data/app/assets/stylesheets/rails_marketplace/fonts/less/list.less +19 -0
  221. data/app/assets/stylesheets/rails_marketplace/fonts/less/mixins.less +26 -0
  222. data/app/assets/stylesheets/rails_marketplace/fonts/less/path.less +15 -0
  223. data/app/assets/stylesheets/rails_marketplace/fonts/less/rotated-flipped.less +20 -0
  224. data/app/assets/stylesheets/rails_marketplace/fonts/less/spinning.less +29 -0
  225. data/app/assets/stylesheets/rails_marketplace/fonts/less/stacked.less +20 -0
  226. data/app/assets/stylesheets/rails_marketplace/fonts/less/variables.less +708 -0
  227. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_animated.scss +34 -0
  228. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_bordered-pulled.scss +25 -0
  229. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_core.scss +12 -0
  230. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_fixed-width.scss +6 -0
  231. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_icons.scss +697 -0
  232. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_larger.scss +13 -0
  233. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_list.scss +19 -0
  234. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_mixins.scss +26 -0
  235. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_path.scss +15 -0
  236. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_rotated-flipped.scss +20 -0
  237. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_spinning.scss +29 -0
  238. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_stacked.scss +20 -0
  239. data/app/assets/stylesheets/rails_marketplace/fonts/scss/_variables.scss +708 -0
  240. data/app/assets/stylesheets/rails_marketplace/fonts/scss/font-awesome.scss +17 -0
  241. data/app/assets/stylesheets/rails_marketplace/images/1.png +0 -0
  242. data/app/assets/stylesheets/rails_marketplace/images/4.jpg +0 -0
  243. data/app/assets/stylesheets/rails_marketplace/images/american-express.png +0 -0
  244. data/app/assets/stylesheets/rails_marketplace/images/back_disabled.png +0 -0
  245. data/app/assets/stylesheets/rails_marketplace/images/back_enabled.png +0 -0
  246. data/app/assets/stylesheets/rails_marketplace/images/back_enabled_hover.png +0 -0
  247. data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  248. data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/alpha.png +0 -0
  249. data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  250. data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/hue.png +0 -0
  251. data/app/assets/stylesheets/rails_marketplace/images/bootstrap-colorpicker/saturation.png +0 -0
  252. data/app/assets/stylesheets/rails_marketplace/images/data.png +0 -0
  253. data/app/assets/stylesheets/rails_marketplace/images/favicon.ico +0 -0
  254. data/app/assets/stylesheets/rails_marketplace/images/forward_disabled.png +0 -0
  255. data/app/assets/stylesheets/rails_marketplace/images/forward_enabled.png +0 -0
  256. data/app/assets/stylesheets/rails_marketplace/images/forward_enabled_hover.png +0 -0
  257. data/app/assets/stylesheets/rails_marketplace/images/icons.png +0 -0
  258. data/app/assets/stylesheets/rails_marketplace/images/img.jpg +0 -0
  259. data/app/assets/stylesheets/rails_marketplace/images/loading.gif +0 -0
  260. data/app/assets/stylesheets/rails_marketplace/images/mastercard.png +0 -0
  261. data/app/assets/stylesheets/rails_marketplace/images/paypal2.png +0 -0
  262. data/app/assets/stylesheets/rails_marketplace/images/picture-2.jpg +0 -0
  263. data/app/assets/stylesheets/rails_marketplace/images/picture.jpg +0 -0
  264. data/app/assets/stylesheets/rails_marketplace/images/picture2.jpg +0 -0
  265. data/app/assets/stylesheets/rails_marketplace/images/prod1.jpg +0 -0
  266. data/app/assets/stylesheets/rails_marketplace/images/prod2.jpg +0 -0
  267. data/app/assets/stylesheets/rails_marketplace/images/prod3.jpg +0 -0
  268. data/app/assets/stylesheets/rails_marketplace/images/prod4.jpg +0 -0
  269. data/app/assets/stylesheets/rails_marketplace/images/prod5.jpg +0 -0
  270. data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-flat.png +0 -0
  271. data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-modern.png +0 -0
  272. data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-nice.png +0 -0
  273. data/app/assets/stylesheets/rails_marketplace/images/sprite-skin-simple.png +0 -0
  274. data/app/assets/stylesheets/rails_marketplace/images/user.png +0 -0
  275. data/app/assets/stylesheets/rails_marketplace/images/visa.png +0 -0
  276. data/app/assets/stylesheets/rails_marketplace/marketplace.scss +20 -0
  277. data/app/assets/stylesheets/rails_marketplace/pace.css +76 -0
  278. data/app/assets/stylesheets/rails_marketplace/welcome.scss +3 -0
  279. data/app/assets/stylesheets/scaffold.css +56 -0
  280. data/app/controllers/rails_marketplace/admin_controller.rb +151 -0
  281. data/app/controllers/rails_marketplace/application_controller.rb +4 -0
  282. data/app/controllers/rails_marketplace/catalog_controller.rb +172 -0
  283. data/app/controllers/rails_marketplace/seller_controller.rb +181 -0
  284. data/app/helpers/rails_marketplace/admin_helper.rb +16 -0
  285. data/app/helpers/rails_marketplace/application_helper.rb +4 -0
  286. data/app/helpers/rails_marketplace/catalog_helper.rb +4 -0
  287. data/app/helpers/rails_marketplace/plainpage_helper.rb +4 -0
  288. data/app/helpers/rails_marketplace/seller_helper.rb +16 -0
  289. data/app/models/rails_marketplace/admin.rb +10 -0
  290. data/app/models/rails_marketplace/admin_setting.rb +13 -0
  291. data/app/models/rails_marketplace/cart.rb +49 -0
  292. data/app/models/rails_marketplace/cart_product.rb +7 -0
  293. data/app/models/rails_marketplace/category.rb +22 -0
  294. data/app/models/rails_marketplace/category_product.rb +6 -0
  295. data/app/models/rails_marketplace/customer.rb +6 -0
  296. data/app/models/rails_marketplace/order.rb +22 -0
  297. data/app/models/rails_marketplace/order_product.rb +7 -0
  298. data/app/models/rails_marketplace/product.rb +34 -0
  299. data/app/models/rails_marketplace/seller.rb +13 -0
  300. data/app/models/rails_marketplace/seller_setting.rb +5 -0
  301. data/app/views/layouts/rails_marketplace/application.html.erb +37 -0
  302. data/app/views/layouts/rails_marketplace/seller_central.html.erb +58 -0
  303. data/app/views/layouts/rails_marketplace/super_admin.html.erb +58 -0
  304. data/app/views/rails_marketplace/admin/add_category.html.erb +63 -0
  305. data/app/views/rails_marketplace/admin/categories.html.erb +50 -0
  306. data/app/views/rails_marketplace/admin/category_products.html.erb +54 -0
  307. data/app/views/rails_marketplace/admin/dashboard.html.erb +50 -0
  308. data/app/views/rails_marketplace/admin/edit_category.html.erb +63 -0
  309. data/app/views/rails_marketplace/admin/login_form.html.erb +20 -0
  310. data/app/views/rails_marketplace/admin/products.html.erb +54 -0
  311. data/app/views/rails_marketplace/admin/seller_products.html.erb +54 -0
  312. data/app/views/rails_marketplace/admin/sellers.html.erb +48 -0
  313. data/app/views/rails_marketplace/admin/settings_form.html.erb +39 -0
  314. data/app/views/rails_marketplace/admin/signup_form.html.erb +25 -0
  315. data/app/views/rails_marketplace/catalog/cart.html.erb +80 -0
  316. data/app/views/rails_marketplace/catalog/category_products.html.erb +52 -0
  317. data/app/views/rails_marketplace/catalog/checkout.html.erb +207 -0
  318. data/app/views/rails_marketplace/catalog/checkout_success.html.erb +15 -0
  319. data/app/views/rails_marketplace/catalog/index.html.erb +1 -0
  320. data/app/views/rails_marketplace/catalog/product_detail.html.erb +88 -0
  321. data/app/views/rails_marketplace/partials/_admin_sidenav.html.erb +80 -0
  322. data/app/views/rails_marketplace/partials/_admin_topnav.html.erb +111 -0
  323. data/app/views/rails_marketplace/partials/_footer.html.erb +19 -0
  324. data/app/views/rails_marketplace/partials/_menu.html.erb +42 -0
  325. data/app/views/rails_marketplace/partials/_sidenav.html.erb +77 -0
  326. data/app/views/rails_marketplace/partials/_topnav.html.erb +105 -0
  327. data/app/views/rails_marketplace/seller/add_bulk_products.html.erb +0 -0
  328. data/app/views/rails_marketplace/seller/add_product.html.erb +67 -0
  329. data/app/views/rails_marketplace/seller/dashboard.html.erb +50 -0
  330. data/app/views/rails_marketplace/seller/edit_product.html.erb +69 -0
  331. data/app/views/rails_marketplace/seller/login_form.html.erb +36 -0
  332. data/app/views/rails_marketplace/seller/order_details.html.erb +69 -0
  333. data/app/views/rails_marketplace/seller/orders.html.erb +68 -0
  334. data/app/views/rails_marketplace/seller/products.html.erb +55 -0
  335. data/app/views/rails_marketplace/seller/settings_general.html.erb +64 -0
  336. data/app/views/rails_marketplace/seller/settings_payment.html.erb +34 -0
  337. data/app/views/rails_marketplace/seller/settings_shipping.html.erb +34 -0
  338. data/app/views/rails_marketplace/seller/settings_tax.html.erb +34 -0
  339. data/app/views/rails_marketplace/seller/signup_form.html.erb +28 -0
  340. data/app/views/rails_marketplace/seller/step_two.html.erb +17 -0
  341. data/app/views/rails_marketplace/shared/_admin_error_messages.html.erb +12 -0
  342. data/app/views/rails_marketplace/shared/_product_error_messages.html.erb +12 -0
  343. data/app/views/rails_marketplace/shared/_seller_error_messages.html.erb +12 -0
  344. data/config/routes.rb +58 -0
  345. data/db/migrate/20161013194852_create_sellers.rb +13 -0
  346. data/db/migrate/20161013195006_create_customers.rb +13 -0
  347. data/db/migrate/20161013195758_create_orders.rb +8 -0
  348. data/db/migrate/20161014013032_create_category_products.rb +10 -0
  349. data/db/migrate/20161014013058_create_order_products.rb +13 -0
  350. data/db/migrate/20161017185755_create_admins.rb +12 -0
  351. data/db/migrate/20161017232347_create_products.rb +14 -0
  352. data/db/migrate/20161019012043_add_reference_product_seller.rb +5 -0
  353. data/db/migrate/20161019013502_change_data_type_images_files.rb +6 -0
  354. data/db/migrate/20161019022020_add_reference_order_customers.rb +5 -0
  355. data/db/migrate/20161109191644_create_categories.rb +15 -0
  356. data/db/migrate/20161110021043_create_friendly_id_slugs.rb +15 -0
  357. data/db/migrate/20161110021131_add_slug_to_category.rb +6 -0
  358. data/db/migrate/20161110024118_add_slug_to_product.rb +6 -0
  359. data/db/migrate/20161111001446_create_carts.rb +8 -0
  360. data/db/migrate/20161111004451_create_cart_products.rb +12 -0
  361. data/db/migrate/20161115013956_add_currency_format_to_price.rb +6 -0
  362. data/db/migrate/20161115015227_monetize_product.rb +5 -0
  363. data/db/migrate/20161115032905_add_stripe_key_to_admin.rb +6 -0
  364. data/db/migrate/20161124015608_add_order_fields.rb +16 -0
  365. data/db/migrate/20161207193917_add_seller_to_orders.rb +6 -0
  366. data/db/migrate/20161208012601_add_price_to_cart_products.rb +6 -0
  367. data/db/migrate/20161208013402_add_money_to_cart_products.rb +6 -0
  368. data/db/migrate/20170217183953_create_seller_settings.rb +29 -0
  369. data/db/migrate/20170218003202_create_admin_settings.rb +24 -0
  370. data/db/migrate/20170224230449_create_stripe_managed_accounts.rb +9 -0
  371. data/db/migrate/20170224233736_add_stripe_to_admin_settings.rb +9 -0
  372. data/db/migrate/20170224235259_add_id_to_settings.rb +6 -0
  373. data/db/migrate/20170225002939_delete_stripe_accounts.rb +8 -0
  374. data/db/migrate/20170225003252_add_stripe_account_id_to_seller_settings.rb +5 -0
  375. data/lib/rails_marketplace.rb +4 -0
  376. data/lib/rails_marketplace/engine.rb +9 -0
  377. data/lib/rails_marketplace/version.rb +3 -0
  378. data/lib/tasks/rails_marketplace_tasks.rake +4 -0
  379. data/spec/controllers/rails_marketplace/catalog_controller_spec.rb +75 -0
  380. data/spec/dummy/README.rdoc +28 -0
  381. data/spec/dummy/Rakefile +6 -0
  382. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  383. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  384. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  385. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  386. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  387. data/spec/dummy/bin/bundle +3 -0
  388. data/spec/dummy/bin/rails +4 -0
  389. data/spec/dummy/bin/rake +4 -0
  390. data/spec/dummy/bin/setup +29 -0
  391. data/spec/dummy/config.ru +4 -0
  392. data/spec/dummy/config/application.rb +32 -0
  393. data/spec/dummy/config/boot.rb +5 -0
  394. data/spec/dummy/config/database.yml +25 -0
  395. data/spec/dummy/config/environment.rb +5 -0
  396. data/spec/dummy/config/environments/development.rb +41 -0
  397. data/spec/dummy/config/environments/production.rb +79 -0
  398. data/spec/dummy/config/environments/test.rb +42 -0
  399. data/spec/dummy/config/initializers/assets.rb +11 -0
  400. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  401. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  402. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  403. data/spec/dummy/config/initializers/inflections.rb +16 -0
  404. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  405. data/spec/dummy/config/initializers/session_store.rb +3 -0
  406. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  407. data/spec/dummy/config/locales/en.yml +23 -0
  408. data/spec/dummy/config/routes.rb +4 -0
  409. data/spec/dummy/config/secrets.yml +22 -0
  410. data/spec/dummy/db/schema.rb +194 -0
  411. data/spec/dummy/log/development.log +889 -0
  412. data/spec/dummy/log/test.log +1229 -0
  413. data/spec/dummy/public/404.html +67 -0
  414. data/spec/dummy/public/422.html +67 -0
  415. data/spec/dummy/public/500.html +66 -0
  416. data/spec/dummy/public/favicon.ico +0 -0
  417. data/spec/helpers/rails_marketplace/catalog_helper_spec.rb +17 -0
  418. data/spec/routing/rails_marketplace/catalog_routing_spec.rb +44 -0
  419. data/spec/spec_helper.rb +44 -0
  420. data/spec/views/rails_marketplace/catalog/edit.html.erb_spec.rb +15 -0
  421. data/spec/views/rails_marketplace/catalog/index.html.erb_spec.rb +15 -0
  422. data/spec/views/rails_marketplace/catalog/new.html.erb_spec.rb +15 -0
  423. data/spec/views/rails_marketplace/catalog/show.html.erb_spec.rb +12 -0
  424. metadata +595 -0
@@ -0,0 +1,380 @@
1
+ /**
2
+ * To change this license header, choose License Headers in Project Properties.
3
+ * To change this template file, choose Tools | Templates
4
+ * and open the template in the editor.
5
+ */
6
+
7
+ var URL = window.location,
8
+ $BODY = $('body'),
9
+ $MENU_TOGGLE = $('#menu_toggle'),
10
+ $SIDEBAR_MENU = $('#sidebar-menu'),
11
+ $SIDEBAR_FOOTER = $('.sidebar-footer'),
12
+ $LEFT_COL = $('.left_col'),
13
+ $RIGHT_COL = $('.right_col'),
14
+ $NAV_MENU = $('.nav_menu'),
15
+ $FOOTER = $('footer');
16
+
17
+ // Sidebar
18
+ $(function () {
19
+
20
+ // TODO: This is some kind of easy fix, maybe we can improve this
21
+ var setContentHeight = function () {
22
+ // reset height
23
+ $RIGHT_COL.css('min-height', $(window).height());
24
+
25
+ var bodyHeight = $BODY.height(),
26
+ leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(),
27
+ contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight;
28
+
29
+ // normalize content
30
+ contentHeight -= $NAV_MENU.height() + $FOOTER.height();
31
+
32
+ $RIGHT_COL.css('min-height', contentHeight);
33
+ };
34
+
35
+ $SIDEBAR_MENU.find('a').on('click', function(ev) {
36
+ var $li = $(this).parent();
37
+
38
+ if ($li.is('.active')) {
39
+ $li.removeClass('active');
40
+ $('ul:first', $li).slideUp(function() {
41
+ setContentHeight();
42
+ });
43
+ } else {
44
+ // prevent closing menu if we are on child menu
45
+ if (!$li.parent().is('.child_menu')) {
46
+ $SIDEBAR_MENU.find('li').removeClass('active');
47
+ $SIDEBAR_MENU.find('li ul').slideUp();
48
+ }
49
+
50
+ $li.addClass('active');
51
+
52
+ $('ul:first', $li).slideDown(function() {
53
+ setContentHeight();
54
+ });
55
+ }
56
+ });
57
+
58
+ // toggle small or large menu
59
+ $MENU_TOGGLE.on('click', function() {
60
+ if ($BODY.hasClass('nav-md')) {
61
+ $BODY.removeClass('nav-md').addClass('nav-sm');
62
+ $LEFT_COL.removeClass('scroll-view').removeAttr('style');
63
+
64
+ if ($SIDEBAR_MENU.find('li').hasClass('active')) {
65
+ $SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active');
66
+ }
67
+ } else {
68
+ $BODY.removeClass('nav-sm').addClass('nav-md');
69
+
70
+ if ($SIDEBAR_MENU.find('li').hasClass('active-sm')) {
71
+ $SIDEBAR_MENU.find('li.active-sm').addClass('active').removeClass('active-sm');
72
+ }
73
+ }
74
+
75
+ setContentHeight();
76
+ });
77
+
78
+ // check active menu
79
+ $SIDEBAR_MENU.find('a[href="' + URL + '"]').parent('li').addClass('current-page');
80
+
81
+ $SIDEBAR_MENU.find('a').filter(function () {
82
+ return this.href == URL;
83
+ }).parent('li').addClass('current-page').parents('ul').slideDown(function() {
84
+ setContentHeight();
85
+ }).parent().addClass('active');
86
+
87
+ // recompute content when resizing
88
+ $(window).smartresize(function(){
89
+ setContentHeight();
90
+ });
91
+
92
+ });
93
+
94
+ // Panel toolbox
95
+ $(function () {
96
+ $('.collapse-link').on('click', function() {
97
+ var $BOX_PANEL = $(this).closest('.x_panel'),
98
+ $ICON = $(this).find('i'),
99
+ $BOX_CONTENT = $BOX_PANEL.find('.x_content');
100
+
101
+ // fix for some div with hardcoded fix class
102
+ if ($BOX_PANEL.attr('style')) {
103
+ $BOX_CONTENT.slideToggle(200, function(){
104
+ $BOX_PANEL.removeAttr('style');
105
+ });
106
+ } else {
107
+ $BOX_CONTENT.slideToggle(200);
108
+ $BOX_PANEL.css('height', 'auto');
109
+ }
110
+
111
+ $ICON.toggleClass('fa-chevron-up fa-chevron-down');
112
+ });
113
+
114
+ $('.close-link').click(function () {
115
+ var $BOX_PANEL = $(this).closest('.x_panel');
116
+
117
+ $BOX_PANEL.remove();
118
+ });
119
+ });
120
+
121
+ // Tooltip
122
+ $(function () {
123
+ $('[data-toggle="tooltip"]').tooltip();
124
+ });
125
+
126
+ // Progressbar
127
+ if ($(".progress .progress-bar")[0]) {
128
+ $('.progress .progress-bar').progressbar(); // bootstrap 3
129
+ }
130
+
131
+ // Switchery
132
+ if ($(".js-switch")[0]) {
133
+ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
134
+ elems.forEach(function (html) {
135
+ var switchery = new Switchery(html, {
136
+ color: '#26B99A'
137
+ });
138
+ });
139
+ }
140
+
141
+ // iCheck
142
+ if ($("input.flat")[0]) {
143
+ $(document).ready(function () {
144
+ $('input.flat').iCheck({
145
+ checkboxClass: 'icheckbox_flat-green',
146
+ radioClass: 'iradio_flat-green'
147
+ });
148
+ });
149
+ }
150
+
151
+ // Starrr
152
+ var __slice = [].slice;
153
+
154
+ (function ($, window) {
155
+ var Starrr;
156
+
157
+ Starrr = (function () {
158
+ Starrr.prototype.defaults = {
159
+ rating: void 0,
160
+ numStars: 5,
161
+ change: function (e, value) {
162
+ }
163
+ };
164
+
165
+ function Starrr($el, options) {
166
+ var i, _, _ref,
167
+ _this = this;
168
+
169
+ this.options = $.extend({}, this.defaults, options);
170
+ this.$el = $el;
171
+ _ref = this.defaults;
172
+ for (i in _ref) {
173
+ _ = _ref[i];
174
+ if (this.$el.data(i) !== null) {
175
+ this.options[i] = this.$el.data(i);
176
+ }
177
+ }
178
+ this.createStars();
179
+ this.syncRating();
180
+ this.$el.on('mouseover.starrr', 'span', function (e) {
181
+ return _this.syncRating(_this.$el.find('span').index(e.currentTarget) + 1);
182
+ });
183
+ this.$el.on('mouseout.starrr', function () {
184
+ return _this.syncRating();
185
+ });
186
+ this.$el.on('click.starrr', 'span', function (e) {
187
+ return _this.setRating(_this.$el.find('span').index(e.currentTarget) + 1);
188
+ });
189
+ this.$el.on('starrr:change', this.options.change);
190
+ }
191
+
192
+ Starrr.prototype.createStars = function () {
193
+ var _i, _ref, _results;
194
+
195
+ _results = [];
196
+ for (_i = 1, _ref = this.options.numStars; 1 <= _ref ? _i <= _ref : _i >= _ref; 1 <= _ref ? _i++ : _i--) {
197
+ _results.push(this.$el.append("<span class='glyphicon .glyphicon-star-empty'></span>"));
198
+ }
199
+ return _results;
200
+ };
201
+
202
+ Starrr.prototype.setRating = function (rating) {
203
+ if (this.options.rating === rating) {
204
+ rating = void 0;
205
+ }
206
+ this.options.rating = rating;
207
+ this.syncRating();
208
+ return this.$el.trigger('starrr:change', rating);
209
+ };
210
+
211
+ Starrr.prototype.syncRating = function (rating) {
212
+ var i, _i, _j, _ref;
213
+
214
+ rating || (rating = this.options.rating);
215
+ if (rating) {
216
+ for (i = _i = 0, _ref = rating - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
217
+ this.$el.find('span').eq(i).removeClass('glyphicon-star-empty').addClass('glyphicon-star');
218
+ }
219
+ }
220
+ if (rating && rating < 5) {
221
+ for (i = _j = rating; rating <= 4 ? _j <= 4 : _j >= 4; i = rating <= 4 ? ++_j : --_j) {
222
+ this.$el.find('span').eq(i).removeClass('glyphicon-star').addClass('glyphicon-star-empty');
223
+ }
224
+ }
225
+ if (!rating) {
226
+ return this.$el.find('span').removeClass('glyphicon-star').addClass('glyphicon-star-empty');
227
+ }
228
+ };
229
+
230
+ return Starrr;
231
+
232
+ })();
233
+ return $.fn.extend({
234
+ starrr: function () {
235
+ var args, option;
236
+
237
+ option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
238
+ return this.each(function () {
239
+ var data;
240
+
241
+ data = $(this).data('star-rating');
242
+ if (!data) {
243
+ $(this).data('star-rating', (data = new Starrr($(this), option)));
244
+ }
245
+ if (typeof option === 'string') {
246
+ return data[option].apply(data, args);
247
+ }
248
+ });
249
+ }
250
+ });
251
+ })(window.jQuery, window);
252
+
253
+ $(function () {
254
+ return $(".starrr").starrr();
255
+ });
256
+
257
+ $(document).ready(function () {
258
+
259
+ $('#stars').on('starrr:change', function (e, value) {
260
+ $('#count').html(value);
261
+ });
262
+
263
+
264
+ $('#stars-existing').on('starrr:change', function (e, value) {
265
+ $('#count-existing').html(value);
266
+ });
267
+
268
+ });
269
+
270
+ // Table
271
+ $('table input').on('ifChecked', function () {
272
+ check_state = '';
273
+ $(this).parent().parent().parent().addClass('selected');
274
+ countChecked();
275
+ });
276
+ $('table input').on('ifUnchecked', function () {
277
+ check_state = '';
278
+ $(this).parent().parent().parent().removeClass('selected');
279
+ countChecked();
280
+ });
281
+
282
+ var check_state = '';
283
+ $('.bulk_action input').on('ifChecked', function () {
284
+ check_state = '';
285
+ $(this).parent().parent().parent().addClass('selected');
286
+ countChecked();
287
+ });
288
+ $('.bulk_action input').on('ifUnchecked', function () {
289
+ check_state = '';
290
+ $(this).parent().parent().parent().removeClass('selected');
291
+ countChecked();
292
+ });
293
+ $('.bulk_action input#check-all').on('ifChecked', function () {
294
+ check_state = 'check_all';
295
+ countChecked();
296
+ });
297
+ $('.bulk_action input#check-all').on('ifUnchecked', function () {
298
+ check_state = 'uncheck_all';
299
+ countChecked();
300
+ });
301
+
302
+ function countChecked() {
303
+ if (check_state == 'check_all') {
304
+ $(".bulk_action input[name='table_records']").iCheck('check');
305
+ }
306
+ if (check_state == 'uncheck_all') {
307
+ $(".bulk_action input[name='table_records']").iCheck('uncheck');
308
+ }
309
+ var n = $(".bulk_action input[name='table_records']:checked").length;
310
+ if (n > 0) {
311
+ $('.column-title').hide();
312
+ $('.bulk-actions').show();
313
+ $('.action-cnt').html(n + ' Records Selected');
314
+ } else {
315
+ $('.column-title').show();
316
+ $('.bulk-actions').hide();
317
+ }
318
+ }
319
+
320
+ // Accordion
321
+ $(function () {
322
+ $(".expand").on("click", function () {
323
+ $(this).next().slideToggle(200);
324
+ $expand = $(this).find(">:first-child");
325
+
326
+ if ($expand.text() == "+") {
327
+ $expand.text("-");
328
+ } else {
329
+ $expand.text("+");
330
+ }
331
+ });
332
+ });
333
+
334
+
335
+ // NProgress
336
+ if (typeof NProgress != 'undefined') {
337
+ $(document).ready(function () {
338
+ NProgress.start();
339
+ });
340
+
341
+ $(window).load(function () {
342
+ NProgress.done();
343
+ });
344
+ }
345
+
346
+ /**
347
+ * Resize function without multiple trigger
348
+ *
349
+ * Usage:
350
+ * $(window).smartresize(function(){
351
+ * // code here
352
+ * });
353
+ */
354
+ (function($,sr){
355
+ // debouncing function from John Hann
356
+ // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
357
+ var debounce = function (func, threshold, execAsap) {
358
+ var timeout;
359
+
360
+ return function debounced () {
361
+ var obj = this, args = arguments;
362
+ function delayed () {
363
+ if (!execAsap)
364
+ func.apply(obj, args);
365
+ timeout = null;
366
+ }
367
+
368
+ if (timeout)
369
+ clearTimeout(timeout);
370
+ else if (execAsap)
371
+ func.apply(obj, args);
372
+
373
+ timeout = setTimeout(delayed, threshold || 100);
374
+ };
375
+ };
376
+
377
+ // smartresize
378
+ jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
379
+
380
+ })(jQuery,'smartresize');
@@ -0,0 +1 @@
1
+ div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}ul.dt-button-collection.dropdown-menu{display:block;z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.dropdown-menu.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.dropdown-menu.fixed.two-column{margin-left:-150px}ul.dt-button-collection.dropdown-menu.fixed.three-column{margin-left:-225px}ul.dt-button-collection.dropdown-menu.fixed.four-column{margin-left:-300px}ul.dt-button-collection.dropdown-menu>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.dropdown-menu.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.dropdown-menu.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.dropdown-menu.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ Bootstrap integration for DataTables' Buttons
3
+ ©2015 SpryMedia Ltd - datatables.net/license
4
+ */
5
+ (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs")(a,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"},
6
+ button:{className:"btn btn-default"},collection:{tag:"ul",className:"dt-button-collection dropdown-menu",button:{tag:"li",className:"dt-button"},buttonLiner:{tag:"a",className:""}}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection <span class="caret"/>')};return a.Buttons});
@@ -0,0 +1,22 @@
1
+ (function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(d){return g(d,window,document)}):"object"===typeof exports?module.exports=function(d,f){d||(d=window);if(!f||!f.fn.dataTable)f=require("datatables.net")(d,f).$;f.fn.dataTable.Buttons||require("datatables.net-buttons")(d,f);return g(f,d,d.document)}:g(jQuery,window,document)})(function(g,d,f,k){var l=g.fn.dataTable,j;if("undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))j=
2
+ void 0;else{var x=d.document,q=x.createElementNS("http://www.w3.org/1999/xhtml","a"),E="download"in q,r=d.webkitRequestFileSystem,y=d.requestFileSystem||r||d.mozRequestFileSystem,F=function(a){(d.setImmediate||d.setTimeout)(function(){throw a;},0)},s=0,t=function(a){var b=function(){"string"===typeof a?(d.URL||d.webkitURL||d).revokeObjectURL(a):a.remove()};d.chrome?b():setTimeout(b,500)},u=function(a,b,e){for(var b=[].concat(b),c=b.length;c--;){var d=a["on"+b[c]];if("function"===typeof d)try{d.call(a,
3
+ e||a)}catch(i){F(i)}}},A=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["",a],{type:a.type}):a},B=function(a,b){var a=A(a),e=this,c=a.type,z=!1,i,g,m=function(){u(e,["writestart","progress","write","writeend"])},o=function(){if(z||!i)i=(d.URL||d.webkitURL||d).createObjectURL(a);g?g.location.href=i:d.open(i,"_blank")===k&&"undefined"!==typeof safari&&(d.location.href=i);e.readyState=e.DONE;m();t(i)},n=function(a){return function(){if(e.readyState!==
4
+ e.DONE)return a.apply(this,arguments)}},f={create:!0,exclusive:!1},h;e.readyState=e.INIT;b||(b="download");if(E)i=(d.URL||d.webkitURL||d).createObjectURL(a),q.href=i,q.download=b,c=x.createEvent("MouseEvents"),c.initMouseEvent("click",!0,!1,d,0,0,0,0,0,!1,!1,!1,!1,0,null),q.dispatchEvent(c),e.readyState=e.DONE,m(),t(i);else{d.chrome&&(c&&"application/octet-stream"!==c)&&(h=a.slice||a.webkitSlice,a=h.call(a,0,a.size,"application/octet-stream"),z=!0);r&&"download"!==b&&(b+=".download");if("application/octet-stream"===
5
+ c||r)g=d;y?(s+=a.size,y(d.TEMPORARY,s,n(function(c){c.root.getDirectory("saved",f,n(function(c){var d=function(){c.getFile(b,f,n(function(b){b.createWriter(n(function(c){c.onwriteend=function(a){g.location.href=b.toURL();e.readyState=e.DONE;u(e,"writeend",a);t(b)};c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&o()};["writestart","progress","write","abort"].forEach(function(a){c["on"+a]=e["on"+a]});c.write(a);e.abort=function(){c.abort();e.readyState=e.DONE};e.readyState=e.WRITING}),o)}),
6
+ o)};c.getFile(b,{create:false},n(function(a){a.remove();d()}),n(function(a){a.code===a.NOT_FOUND_ERR?d():o()}))}),o)}),o)):o()}},h=B.prototype;"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob?j=function(a,b){return navigator.msSaveOrOpenBlob(A(a),b)}:(h.abort=function(){this.readyState=this.DONE;u(this,"abort")},h.readyState=h.INIT=0,h.WRITING=1,h.DONE=2,h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null,j=function(a,b){return new B(a,b)})}var v=function(a,
7
+ b){var e="*"===a.filename&&"*"!==a.title&&a.title!==k?a.title:a.filename;"function"===typeof e&&(e=e());-1!==e.indexOf("*")&&(e=e.replace("*",g("title").text()));e=e.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"");return b===k||!0===b?e+a.extension:e},G=function(a){var b="Sheet1";a.sheetName&&(b=a.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""));return b},H=function(a){a=a.title;"function"===typeof a&&(a=a());return-1!==a.indexOf("*")?a.replace("*",g("title").text()):a},w=function(a){return a.newline?
8
+ a.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},C=function(a,b){for(var e=w(b),c=a.buttons.exportData(b.exportOptions),d=b.fieldBoundary,i=b.fieldSeparator,g=RegExp(d,"g"),m=b.escapeChar!==k?b.escapeChar:"\\",f=function(a){for(var b="",c=0,e=a.length;c<e;c++)0<c&&(b+=i),b+=d?d+(""+a[c]).replace(g,m+d)+d:a[c];return b},n=b.header?f(c.header)+e:"",h=b.footer&&c.footer?e+f(c.footer):"",j=[],l=0,p=c.body.length;l<p;l++)j.push(f(c.body[l]));return{str:n+j.join(e)+h,rows:j.length}},D=function(){return-1!==
9
+ navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Opera")},p={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\t<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\t<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/></Relationships>',
10
+ "[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\t<Default Extension="xml" ContentType="application/xml"/>\t<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>\t<Default Extension="jpeg" ContentType="image/jpeg"/>\t<Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>\t<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/></Types>',
11
+ "xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\t<fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/>\t<workbookPr showInkAnnotation="0" autoCompressPictures="0"/>\t<bookViews>\t\t<workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/>\t</bookViews>\t<sheets>\t\t<sheet name="__SHEET_NAME__" sheetId="1" r:id="rId1"/>\t</sheets></workbook>',
12
+ "xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">\t<sheetData>\t\t__DATA__\t</sheetData></worksheet>'};l.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",
13
+ text:function(a){return a.i18n("buttons.copy","Copy")},action:function(a,b,e,c){var a=C(b,c),d=a.str,e=g("<div/>").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});c.customize&&(d=c.customize(d,c));c=g("<textarea readonly/>").val(d).appendTo(e);if(f.queryCommandSupported("copy")){e.appendTo(b.table().container());c[0].focus();c[0].select();try{f.execCommand("copy");e.remove();b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),b.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",
14
+ _:"Copied %d rows to clipboard"},a.rows),2E3);return}catch(i){}}a=g("<span>"+b.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(e);b.buttons.info(b.i18n("buttons.copyTitle","Copy to clipboard"),a,0);c[0].focus();c[0].select();var h=g(a).closest(".dt-button-info"),m=function(){h.off("click.buttons-copy");g(f).off(".buttons-copy");b.buttons.info(!1)};h.on("click.buttons-copy",
15
+ m);g(f).on("keydown.buttons-copy",function(a){27===a.keyCode&&m()}).on("copy.buttons-copy cut.buttons-copy",function(){m()})},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1};l.ext.buttons.csvHtml5={className:"buttons-csv buttons-html5",available:function(){return d.FileReader!==k&&d.Blob},text:function(a){return a.i18n("buttons.csv","CSV")},action:function(a,b,d,c){w(c);a=C(b,c).str;b=c.charset;c.customize&&(a=c.customize(a,c));!1!==b?(b||(b=f.characterSet||f.charset),b&&
16
+ (b=";charset="+b)):b="";j(new Blob([a],{type:"text/csv"+b}),v(c))},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1};l.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return d.FileReader!==k&&d.JSZip!==k&&!D()},text:function(a){return a.i18n("buttons.excel","Excel")},action:function(a,b,e,c){a="";b=b.buttons.exportData(c.exportOptions);e=function(a){for(var b=[],c=0,d=a.length;c<
17
+ d;c++){if(null===a[c]||a[c]===k)a[c]="";b.push("number"===typeof a[c]||a[c].match&&g.trim(a[c]).match(/^-?\d+(\.\d+)?$/)&&"0"!==a[c].charAt(0)?'<c t="n"><v>'+a[c]+"</v></c>":'<c t="inlineStr"><is><t>'+(!a[c].replace?a[c]:a[c].replace(/&(?!amp;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""))+"</t></is></c>")}return"<row>"+b.join("")+"</row>"};c.header&&(a+=e(b.header));for(var f=0,i=b.body.length;f<i;f++)a+=e(b.body[f]);c.footer&&(a+=e(b.footer));
18
+ var b=new d.JSZip,e=b.folder("_rels"),f=b.folder("xl"),i=b.folder("xl/_rels"),h=b.folder("xl/worksheets");b.file("[Content_Types].xml",p["[Content_Types].xml"]);e.file(".rels",p["_rels/.rels"]);f.file("workbook.xml",p["xl/workbook.xml"].replace("__SHEET_NAME__",G(c)));i.file("workbook.xml.rels",p["xl/_rels/workbook.xml.rels"]);h.file("sheet1.xml",p["xl/worksheets/sheet1.xml"].replace("__DATA__",a));j(b.generate({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),
19
+ v(c))},filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!1};l.ext.buttons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return d.FileReader!==k&&d.pdfMake},text:function(a){return a.i18n("buttons.pdf","PDF")},action:function(a,b,e,c){w(c);a=b.buttons.exportData(c.exportOptions);b=[];c.header&&b.push(g.map(a.header,function(a){return{text:"string"===typeof a?a:a+"",style:"tableHeader"}}));for(var f=0,e=a.body.length;f<e;f++)b.push(g.map(a.body[f],function(a){return{text:"string"===
20
+ typeof a?a:a+"",style:f%2?"tableBodyEven":"tableBodyOdd"}}));c.footer&&b.push(g.map(a.footer,function(a){return{text:"string"===typeof a?a:a+"",style:"tableFooter"}}));a={pageSize:c.pageSize,pageOrientation:c.orientation,content:[{table:{headerRows:1,body:b},layout:"noBorders"}],styles:{tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center"},tableBodyEven:{},tableBodyOdd:{fillColor:"#f3f3f3"},tableFooter:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154"},title:{alignment:"center",
21
+ fontSize:15},message:{}},defaultStyle:{fontSize:10}};c.message&&a.content.unshift({text:c.message,style:"message",margin:[0,0,0,12]});c.title&&a.content.unshift({text:H(c,!1),style:"title",margin:[0,0,0,12]});c.customize&&c.customize(a,c);a=d.pdfMake.createPdf(a);"open"===c.download&&!D()?a.open():a.getBuffer(function(a){a=new Blob([a],{type:"application/pdf"});j(a,v(c))})},title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"A4",header:!0,footer:!1,message:null,
22
+ customize:null,download:"download"};return l.Buttons});
@@ -0,0 +1,4 @@
1
+ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(e){return d(e,window,document)}):"object"===typeof exports?module.exports=function(e,a){e||(e=window);if(!a||!a.fn.dataTable)a=require("datatables.net")(e,a).$;a.fn.dataTable.Buttons||require("datatables.net-buttons")(e,a);return d(a,e,e.document)}:d(jQuery,window,document)})(function(d,e,a){var i=d.fn.dataTable,g=a.createElement("a");i.ext.buttons.print={className:"buttons-print",
2
+ text:function(c){return c.i18n("buttons.print","Print")},action:function(c,b,a,f){c=b.buttons.exportData(f.exportOptions);a=function(c,a){for(var b="<tr>",d=0,e=c.length;d<e;d++)b+="<"+a+">"+c[d]+"</"+a+">";return b+"</tr>"};b='<table class="'+b.table().node().className+'">';f.header&&(b+="<thead>"+a(c.header,"th")+"</thead>");for(var b=b+"<tbody>",j=0,i=c.body.length;j<i;j++)b+=a(c.body[j],"td");b+="</tbody>";f.footer&&(b+="<tfoot>"+a(c.footer,"th")+"</tfoot>");var h=e.open("",""),c=f.title;"function"===
3
+ typeof c&&(c=c());-1!==c.indexOf("*")&&(c=c.replace("*",d("title").text()));h.document.close();var k="<title>"+c+"</title>";d("style, link").each(function(){var c=k,b=d(this).clone()[0],a;"link"===b.nodeName.toLowerCase()&&(g.href=b.href,a=g.host,-1===a.indexOf("/")&&0!==g.pathname.indexOf("/")&&(a+="/"),b.href=g.protocol+"//"+a+g.pathname+g.search);k=c+b.outerHTML});d(h.document.head).html(k);d(h.document.body).html("<h1>"+c+"</h1><div>"+f.message+"</div>"+b);f.customize&&f.customize(h);setTimeout(function(){f.autoPrint&&
4
+ (h.print(),h.close())},250)},title:"*",message:"",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null};return i.Buttons});
@@ -0,0 +1,8 @@
1
+ /*!
2
+ DataTables Bootstrap 3 integration
3
+ ©2011-2015 SpryMedia Ltd - datatables.net/license
4
+ */
5
+ (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes,
6
+ {sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
7
+ l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){case "ellipsis":e="&#x2026;";g="disabled";break;case "first":e=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":e=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
8
+ "aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
@@ -0,0 +1,36 @@
1
+ /*!
2
+ Buttons for DataTables 1.1.2
3
+ ©2015 SpryMedia Ltd - datatables.net/license
4
+ */
5
+ (function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(p){return e(p,window,document)}):"object"===typeof exports?module.exports=function(p,o){p||(p=window);if(!o||!o.fn.dataTable)o=require("datatables.net")(p,o).$;return e(o,p,p.document)}:e(jQuery,window,document)})(function(e,p,o,n){var j=e.fn.dataTable,t=0,u=0,l=j.ext.buttons,m=function(a,b){!0===b&&(b={});e.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},m.defaults,b);b.buttons&&(this.c.buttons=b.buttons);
6
+ this.s={dt:new j.Api(a),buttons:[],subButtons:[],listenKeys:"",namespace:"dtb"+t++};this.dom={container:e("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(m.prototype,{action:function(a,b){var c=this._indexToButton(a).conf;if(b===n)return c.action;c.action=b;return this},active:function(a,b){var c=this._indexToButton(a),d=this.c.dom.button.active;if(b===n)return c.node.hasClass(d);c.node.toggleClass(d,b===n?!0:b);return this},add:function(a,
7
+ b){if("string"===typeof a&&-1!==a.indexOf("-")){var c=a.split("-");this.c.buttons[1*c[0]].buttons.splice(1*c[1],0,b)}else this.c.buttons.splice(1*a,0,b);this.dom.container.empty();this._buildButtons(this.c.buttons);return this},container:function(){return this.dom.container},disable:function(a){this._indexToButton(a).node.addClass(this.c.dom.button.disabled);return this},destroy:function(){e("body").off("keyup."+this.s.namespace);var a=this.s.buttons,b=this.s.subButtons,c,d,f;c=0;for(a=a.length;c<
8
+ a;c++){this.removePrep(c);d=0;for(f=b[c].length;d<f;d++)this.removePrep(c+"-"+d)}this.removeCommit();this.dom.container.remove();b=this.s.dt.settings()[0];c=0;for(a=b.length;c<a;c++)if(b.inst===this){b.splice(c,1);break}return this},enable:function(a,b){if(!1===b)return this.disable(a);this._indexToButton(a).node.removeClass(this.c.dom.button.disabled);return this},name:function(){return this.c.name},node:function(a){return this._indexToButton(a).node},removeCommit:function(){var a=this.s.buttons,
9
+ b=this.s.subButtons,c,d;for(c=a.length-1;0<=c;c--)null===a[c]&&(a.splice(c,1),b.splice(c,1),this.c.buttons.splice(c,1));c=0;for(a=b.length;c<a;c++)for(d=b[c].length-1;0<=d;d--)null===b[c][d]&&(b[c].splice(d,1),this.c.buttons[c].buttons.splice(d,1));return this},removePrep:function(a){var b,c=this.s.dt;if("number"===typeof a||-1===a.indexOf("-"))b=this.s.buttons[1*a],b.conf.destroy&&b.conf.destroy.call(c.button(a),c,b,b.conf),b.node.remove(),this._removeKey(b.conf),this.s.buttons[1*a]=null;else{var d=
10
+ a.split("-");b=this.s.subButtons[1*d[0]][1*d[1]];b.conf.destroy&&b.conf.destroy.call(c.button(a),c,b,b.conf);b.node.remove();this._removeKey(b.conf);this.s.subButtons[1*d[0]][1*d[1]]=null}return this},text:function(a,b){var c=this._indexToButton(a),d=this.c.dom.collection.buttonLiner,d="string"===typeof a&&-1!==a.indexOf("-")&&d&&d.tag?d.tag:this.c.dom.buttonLiner.tag,e=this.s.dt,h=function(a){return"function"===typeof a?a(e,c.node,c.conf):a};if(b===n)return h(c.conf.text);c.conf.text=b;d?c.node.children(d).html(h(b)):
11
+ c.node.html(h(b));return this},toIndex:function(a){var b,c,d,e;d=this.s.buttons;var h=this.s.subButtons;b=0;for(c=d.length;b<c;b++)if(d[b].node[0]===a)return b+"";b=0;for(c=h.length;b<c;b++){d=0;for(e=h[b].length;d<e;d++)if(h[b][d].node[0]===a)return b+"-"+d}},_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0];c._buttons||(c._buttons=[]);c._buttons.push({inst:this,name:this.c.name});this._buildButtons(this.c.buttons);b.on("destroy",function(){a.destroy()});e("body").on("keyup."+this.s.namespace,
12
+ function(b){if(!o.activeElement||o.activeElement===o.body){var c=String.fromCharCode(b.keyCode).toLowerCase();a.s.listenKeys.toLowerCase().indexOf(c)!==-1&&a._keypress(c,b)}})},_addKey:function(a){a.key&&(this.s.listenKeys+=e.isPlainObject(a.key)?a.key.key:a.key)},_buildButtons:function(a,b,c){var d=this.s.dt,f=0;b||(b=this.dom.container,this.s.buttons=[],this.s.subButtons=[]);for(var h=0,i=a.length;h<i;h++){var k=this._resolveExtends(a[h]);if(k)if(e.isArray(k))this._buildButtons(k,b,c);else{var g=
13
+ this._buildButton(k,c!==n?!0:!1);if(g){var r=g.node;b.append(g.inserter);c===n?(this.s.buttons.push({node:r,conf:k,inserter:g.inserter}),this.s.subButtons.push([])):this.s.subButtons[c].push({node:r,conf:k,inserter:g.inserter});k.buttons&&(g=this.c.dom.collection,k._collection=e("<"+g.tag+"/>").addClass(g.className),this._buildButtons(k.buttons,k._collection,f));k.init&&k.init.call(d.button(r),d,r,k);f++}}}},_buildButton:function(a,b){var c=this.c.dom.button,d=this.c.dom.buttonLiner,f=this.c.dom.collection,
14
+ h=this.s.dt,i=function(b){return"function"===typeof b?b(h,g,a):b};b&&f.button&&(c=f.button);b&&f.buttonLiner&&(d=f.buttonLiner);if(a.available&&!a.available(h,a))return!1;var k=function(a,b,c,d){d.action.call(b.button(c),a,b,c,d);e(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c),b,c,d])},g=e("<"+c.tag+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(b){b.preventDefault();!g.hasClass(c.disabled)&&
15
+ a.action&&k(b,h,g,a);g.blur()}).on("keyup.dtb",function(b){b.keyCode===13&&!g.hasClass(c.disabled)&&a.action&&k(b,h,g,a)});d.tag?g.append(e("<"+d.tag+"/>").html(i(a.text)).addClass(d.className)):g.html(i(a.text));!1===a.enabled&&g.addClass(c.disabled);a.className&&g.addClass(a.className);a.titleAttr&&g.attr("title",a.titleAttr);a.namespace||(a.namespace=".dt-button-"+u++);d=(d=this.c.dom.buttonContainer)&&d.tag?e("<"+d.tag+"/>").addClass(d.className).append(g):g;this._addKey(a);return{node:g,inserter:d}},
16
+ _indexToButton:function(a){if("number"===typeof a||-1===a.indexOf("-"))return this.s.buttons[1*a];a=a.split("-");return this.s.subButtons[1*a[0]][1*a[1]]},_keypress:function(a,b){var c,d,f,h;f=this.s.buttons;var i=this.s.subButtons,k=function(c,d){if(c.key)if(c.key===a)d.click();else if(e.isPlainObject(c.key)&&c.key.key===a&&(!c.key.shiftKey||b.shiftKey))if(!c.key.altKey||b.altKey)if(!c.key.ctrlKey||b.ctrlKey)(!c.key.metaKey||b.metaKey)&&d.click()};c=0;for(d=f.length;c<d;c++)k(f[c].conf,f[c].node);
17
+ c=0;for(d=i.length;c<d;c++){f=0;for(h=i[c].length;f<h;f++)k(i[c][f].conf,i[c][f].node)}},_removeKey:function(a){if(a.key){var b=e.isPlainObject(a.key)?a.key.key:a.key,a=this.s.listenKeys.split(""),b=e.inArray(b,a);a.splice(b,1);this.s.listenKeys=a.join("")}},_resolveExtends:function(a){for(var b=this.s.dt,c,d,f=function(c){for(var d=0;!e.isPlainObject(c)&&!e.isArray(c);){if(c===n)return;if("function"===typeof c){if(c=c(b,a),!c)return!1}else if("string"===typeof c){if(!l[c])throw"Unknown button type: "+
18
+ c;c=l[c]}d++;if(30<d)throw"Buttons: Too many iterations";}return e.isArray(c)?c:e.extend({},c)},a=f(a);a&&a.extend;){if(!l[a.extend])throw"Cannot extend unknown button type: "+a.extend;var h=f(l[a.extend]);if(e.isArray(h))return h;if(!h)return!1;c=h.className;a=e.extend({},h,a);c&&a.className!==c&&(a.className=c+" "+a.className);var i=a.postfixButtons;if(i){a.buttons||(a.buttons=[]);c=0;for(d=i.length;c<d;c++)a.buttons.push(i[c]);a.postfixButtons=null}if(i=a.prefixButtons){a.buttons||(a.buttons=[]);
19
+ c=0;for(d=i.length;c<d;c++)a.buttons.splice(c,0,i[c]);a.prefixButtons=null}a.extend=h.extend}return a}});m.background=function(a,b,c){c===n&&(c=400);a?e("<div/>").addClass(b).css("display","none").appendTo("body").fadeIn(c):e("body > div."+b).fadeOut(c,function(){e(this).remove()})};m.instanceSelector=function(a,b){if(!a)return e.map(b,function(a){return a.inst});var c=[],d=e.map(b,function(a){return a.name}),f=function(a){if(e.isArray(a))for(var i=0,k=a.length;i<k;i++)f(a[i]);else"string"===typeof a?
20
+ -1!==a.indexOf(",")?f(a.split(",")):(a=e.inArray(e.trim(a),d),-1!==a&&c.push(b[a].inst)):"number"===typeof a&&c.push(b[a].inst)};f(a);return c};m.buttonSelector=function(a,b){for(var c=[],d=function(a,b){var g,f,h=[];e.each(b.s.buttons,function(a,b){null!==b&&h.push({node:b.node[0],name:b.conf.name})});e.each(b.s.subButtons,function(a,b){e.each(b,function(a,b){null!==b&&h.push({node:b.node[0],name:b.conf.name})})});g=e.map(h,function(a){return a.node});if(e.isArray(a)||a instanceof e){g=0;for(f=a.length;g<
21
+ f;g++)d(a[g],b)}else if(null===a||a===n||"*"===a){g=0;for(f=h.length;g<f;g++)c.push({inst:b,idx:b.toIndex(h[g].node)})}else if("number"===typeof a)c.push({inst:b,idx:a});else if("string"===typeof a)if(-1!==a.indexOf(",")){var j=a.split(",");g=0;for(f=j.length;g<f;g++)d(e.trim(j[g]),b)}else if(a.match(/^\d+(\-\d+)?$/))c.push({inst:b,idx:a});else if(-1!==a.indexOf(":name")){j=a.replace(":name","");g=0;for(f=h.length;g<f;g++)h[g].name===j&&c.push({inst:b,idx:b.toIndex(h[g].node)})}else e(g).filter(a).each(function(){c.push({inst:b,
22
+ idx:b.toIndex(this)})});else"object"===typeof a&&a.nodeName&&(f=e.inArray(a,g),-1!==f&&c.push({inst:b,idx:b.toIndex(g[f])}))},f=0,h=a.length;f<h;f++)d(b,a[f]);return c};m.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:"dt-button-collection"},button:{tag:"a",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}};m.version="1.1.2";e.extend(l,{collection:{text:function(a){return a.i18n("buttons.collection",
23
+ "Collection")},className:"buttons-collection",action:function(a,b,c,d){var a=c.offset(),f=e(b.table().container()),h=!1;e("div.dt-button-background").length&&(h=e("div.dt-button-collection").offset(),e(o).trigger("click.dtb-collection"));d._collection.addClass(d.collectionLayout).css("display","none").appendTo("body").fadeIn(d.fade);var i=d._collection.css("position");h&&"absolute"===i?d._collection.css({top:h.top+5,left:h.left+5}):"absolute"===i?(d._collection.css({top:a.top+c.outerHeight(),left:a.left}),
24
+ c=a.left+d._collection.outerWidth(),f=f.offset().left+f.width(),c>f&&d._collection.css("left",a.left-(c-f))):(a=d._collection.height()/2,a>e(p).height()/2&&(a=e(p).height()/2),d._collection.css("marginTop",-1*a));d.background&&m.background(!0,d.backgroundClassName,d.fade);setTimeout(function(){e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection",function(a){if(!e(a.target).parents().andSelf().filter(d._collection).length){d._collection.fadeOut(d.fade,
25
+ function(){d._collection.detach()});e("div.dt-button-background").off("click.dtb-collection");m.background(false,d.backgroundClassName,d.fade);e("body").off("click.dtb-collection");b.off("buttons-action.b-internal")}})},10);if(d.autoClose)b.on("buttons-action.b-internal",function(){e("div.dt-button-background").click()})},background:!0,collectionLayout:"",backgroundClassName:"dt-button-background",autoClose:!1,fade:400},copy:function(a,b){if(l.copyHtml5)return"copyHtml5";if(l.copyFlash&&l.copyFlash.available(a,
26
+ b))return"copyFlash"},csv:function(a,b){if(l.csvHtml5&&l.csvHtml5.available(a,b))return"csvHtml5";if(l.csvFlash&&l.csvFlash.available(a,b))return"csvFlash"},excel:function(a,b){if(l.excelHtml5&&l.excelHtml5.available(a,b))return"excelHtml5";if(l.excelFlash&&l.excelFlash.available(a,b))return"excelFlash"},pdf:function(a,b){if(l.pdfHtml5&&l.pdfHtml5.available(a,b))return"pdfHtml5";if(l.pdfFlash&&l.pdfFlash.available(a,b))return"pdfFlash"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=e.isArray(a[0])?
27
+ a[0]:a,c=e.isArray(a[0])?a[1]:a,d=function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())};return{extend:"collection",text:d,className:"buttons-page-length",autoClose:!0,buttons:e.map(b,function(a,b){return{text:c[b],action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var e=this,c=function(){e.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}),init:function(a,b,c){var e=
28
+ this;a.on("length.dt"+c.namespace,function(){e.text(d(a))})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});j.Api.register("buttons()",function(a,b){b===n&&(b=a,a=n);return this.iterator(!0,"table",function(c){if(c._buttons)return m.buttonSelector(m.instanceSelector(a,c._buttons),b)},!0)});j.Api.register("button()",function(a,b){var c=this.buttons(a,b);1<c.length&&c.splice(1,c.length);return c});j.Api.registerPlural("buttons().active()","button().active()",function(a){return a===n?this.map(function(a){return a.inst.active(a.idx)}):
29
+ this.each(function(b){b.inst.active(b.idx,a)})});j.Api.registerPlural("buttons().action()","button().action()",function(a){return a===n?this.map(function(a){return a.inst.action(a.idx)}):this.each(function(b){b.inst.action(b.idx,a)})});j.Api.register(["buttons().enable()","button().enable()"],function(a){return this.each(function(b){b.inst.enable(b.idx,a)})});j.Api.register(["buttons().disable()","button().disable()"],function(){return this.each(function(a){a.inst.disable(a.idx)})});j.Api.registerPlural("buttons().nodes()",
30
+ "button().node()",function(){var a=e();e(this.each(function(b){a=a.add(b.inst.node(b.idx))}));return a});j.Api.registerPlural("buttons().text()","button().text()",function(a){return a===n?this.map(function(a){return a.inst.text(a.idx)}):this.each(function(b){b.inst.text(b.idx,a)})});j.Api.registerPlural("buttons().trigger()","button().trigger()",function(){return this.each(function(a){a.inst.node(a.idx).trigger("click")})});j.Api.registerPlural("buttons().containers()","buttons().container()",function(){var a=
31
+ e();e(this.each(function(b){a=a.add(b.inst.container())}));return a});j.Api.register("button().add()",function(a,b){1===this.length&&this[0].inst.add(a,b);return this.button(a)});j.Api.register("buttons().destroy()",function(){this.pluck("inst").unique().each(function(a){a.destroy()});return this});j.Api.registerPlural("buttons().remove()","buttons().remove()",function(){this.each(function(a){a.inst.removePrep(a.idx)});this.pluck("inst").unique().each(function(a){a.removeCommit()});return this});
32
+ var q;j.Api.register("buttons.info()",function(a,b,c){var d=this;if(!1===a)return e("#datatables_buttons_info").fadeOut(function(){e(this).remove()}),clearTimeout(q),q=null,this;q&&clearTimeout(q);e("#datatables_buttons_info").length&&e("#datatables_buttons_info").remove();e('<div id="datatables_buttons_info" class="dt-button-info"/>').html(a?"<h2>"+a+"</h2>":"").append(e("<div/>")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body").fadeIn();c!==n&&0!==c&&(q=setTimeout(function(){d.buttons.info(!1)},
33
+ c));return this});j.Api.register("buttons.exportData()",function(a){if(this.context.length){for(var b=new j.Api(this.context[0]),c=e.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return d(a)},footer:function(a){return d(a)},body:function(a){return d(a)}}},a),d=function(a){if("string"!==typeof a)return a;c.stripHtml&&(a=a.replace(/<.*?>/g,""));c.trim&&(a=a.replace(/^\s+|\s+$/g,
34
+ ""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(s.innerHTML=a,a=s.value);return a},a=b.columns(c.columns).indexes().map(function(a){return c.format.header(b.column(a).header().innerHTML,a)}).toArray(),f=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a)}).toArray():null,h=b.rows(c.rows,c.modifier).indexes().toArray(),h=b.cells(h,c.columns).render(c.orthogonal).toArray(),i=a.length,k=0<i?h.length/
35
+ i:0,g=Array(k),l=0,m=0;m<k;m++){for(var n=Array(i),o=0;o<i;o++)n[o]=c.format.body(h[l],o,m),l++;g[m]=n}return{header:a,footer:f,body:g}}});var s=e("<textarea/>")[0];e.fn.dataTable.Buttons=m;e.fn.DataTable.Buttons=m;e(o).on("init.dt plugin-init.dt",function(a,b){if("dt"===a.namespace){var c=b.oInit.buttons||j.defaults.buttons;c&&!b._buttons&&(new m(b,c)).container()}});j.ext.feature.push({fnInit:function(a){var a=new j.Api(a),b=a.init().buttons||j.defaults.buttons;return(new m(a,b)).container()},cFeature:"B"});
36
+ return m});