mechanize_store 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (383) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +60 -0
  4. data/Rakefile +28 -0
  5. data/app/assets/javascripts/mechanize_store/application.js +22 -0
  6. data/app/assets/javascripts/mechanize_store/sb-admin/bootstrap.js +1951 -0
  7. data/app/assets/javascripts/mechanize_store/sb-admin/custom.js +58 -0
  8. data/app/assets/javascripts/mechanize_store/sb-admin/flot/excanvas.min.js +1 -0
  9. data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.js +3137 -0
  10. data/app/assets/javascripts/mechanize_store/sb-admin/flot/jquery.flot.pie.js +817 -0
  11. data/app/assets/javascripts/mechanize_store/sb-admin/flot/main.js +20 -0
  12. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/canvas-to-blob.min.js +1 -0
  13. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.blueimp-gallery.min.js +1 -0
  14. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-angular.js +429 -0
  15. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-audio.js +106 -0
  16. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-image.js +309 -0
  17. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-jquery-ui.js +152 -0
  18. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-process.js +172 -0
  19. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-ui.js +699 -0
  20. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-validate.js +119 -0
  21. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload-video.js +106 -0
  22. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.fileupload.js +1426 -0
  23. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.iframe-transport.js +214 -0
  24. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/jquery.ui.widget.js +530 -0
  25. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/load-image.min.js +1 -0
  26. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/main.js +14 -0
  27. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-file-upload/tmpl.min.js +1 -0
  28. data/app/assets/javascripts/mechanize_store/sb-admin/jquery-ui.js +2256 -0
  29. data/app/assets/javascripts/mechanize_store/sb-admin/jquery.activity-indicator-1.0.0.min.js +223 -0
  30. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.js +245 -0
  31. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/dataTables/jquery.dataTables.js +14013 -0
  32. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/excanvas.min.js +1 -0
  33. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.js +2599 -0
  34. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.pie.js +750 -0
  35. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.resize.js +60 -0
  36. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/flot/jquery.flot.tooltip.min.js +12 -0
  37. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/metisMenu/jquery.metisMenu.js +45 -0
  38. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/morris.js +1888 -0
  39. data/app/assets/javascripts/mechanize_store/sb-admin/plugins/morris/raphael-2.1.0.min.js +10 -0
  40. data/app/assets/javascripts/mechanize_store/sb-admin/sb-admin.js +18 -0
  41. data/app/assets/stylesheets/mechanize_store/application.css +197 -0
  42. data/app/assets/stylesheets/mechanize_store/sb-admin/bootstrap.css +5831 -0
  43. data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/dataTables/dataTables.bootstrap.css +233 -0
  44. data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/morris/morris-0.4.3.min.css +2 -0
  45. data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/social-buttons/social-buttons.css +68 -0
  46. data/app/assets/stylesheets/mechanize_store/sb-admin/plugins/timeline/timeline.css +144 -0
  47. data/app/assets/stylesheets/mechanize_store/sb-admin/sb-admin.css +307 -0
  48. data/app/controllers/mechanize_store/application_controller.rb +4 -0
  49. data/app/controllers/mechanize_store/flags_controller.rb +77 -0
  50. data/app/controllers/mechanize_store/order_statuses_controller.rb +77 -0
  51. data/app/controllers/mechanize_store/orders_controller.rb +28 -0
  52. data/app/controllers/mechanize_store/payment_statuses_controller.rb +77 -0
  53. data/app/controllers/mechanize_store/payment_types_controller.rb +77 -0
  54. data/app/controllers/mechanize_store/product_categories_controller.rb +77 -0
  55. data/app/controllers/mechanize_store/product_photos_controller.rb +49 -0
  56. data/app/controllers/mechanize_store/products_controller.rb +77 -0
  57. data/app/helpers/mechanize_store/application_helper.rb +7 -0
  58. data/app/models/mechanize_store/flag.rb +4 -0
  59. data/app/models/mechanize_store/freight.rb +5 -0
  60. data/app/models/mechanize_store/order.rb +47 -0
  61. data/app/models/mechanize_store/order_item.rb +10 -0
  62. data/app/models/mechanize_store/order_status.rb +10 -0
  63. data/app/models/mechanize_store/payment.rb +8 -0
  64. data/app/models/mechanize_store/payment_status.rb +19 -0
  65. data/app/models/mechanize_store/payment_type.rb +5 -0
  66. data/app/models/mechanize_store/product.rb +11 -0
  67. data/app/models/mechanize_store/product_category.rb +5 -0
  68. data/app/models/mechanize_store/product_photo.rb +16 -0
  69. data/app/views/mechanize_store/flags/_form.html.erb +11 -0
  70. data/app/views/mechanize_store/flags/edit.html.erb +12 -0
  71. data/app/views/mechanize_store/flags/index.html.erb +46 -0
  72. data/app/views/mechanize_store/flags/new.html.erb +9 -0
  73. data/app/views/mechanize_store/flags/show.html.erb +15 -0
  74. data/app/views/mechanize_store/order_statuses/_form.html.erb +11 -0
  75. data/app/views/mechanize_store/order_statuses/edit.html.erb +12 -0
  76. data/app/views/mechanize_store/order_statuses/index.html.erb +46 -0
  77. data/app/views/mechanize_store/order_statuses/new.html.erb +9 -0
  78. data/app/views/mechanize_store/order_statuses/show.html.erb +15 -0
  79. data/app/views/mechanize_store/orders/index.html.erb +84 -0
  80. data/app/views/mechanize_store/orders/show.html.erb +0 -0
  81. data/app/views/mechanize_store/payment_statuses/_form.html.erb +11 -0
  82. data/app/views/mechanize_store/payment_statuses/edit.html.erb +12 -0
  83. data/app/views/mechanize_store/payment_statuses/index.html.erb +46 -0
  84. data/app/views/mechanize_store/payment_statuses/new.html.erb +9 -0
  85. data/app/views/mechanize_store/payment_statuses/show.html.erb +15 -0
  86. data/app/views/mechanize_store/payment_types/_form.html.erb +11 -0
  87. data/app/views/mechanize_store/payment_types/edit.html.erb +12 -0
  88. data/app/views/mechanize_store/payment_types/index.html.erb +46 -0
  89. data/app/views/mechanize_store/payment_types/new.html.erb +9 -0
  90. data/app/views/mechanize_store/payment_types/show.html.erb +15 -0
  91. data/app/views/mechanize_store/product_categories/_form.html.erb +12 -0
  92. data/app/views/mechanize_store/product_categories/edit.html.erb +12 -0
  93. data/app/views/mechanize_store/product_categories/index.html.erb +46 -0
  94. data/app/views/mechanize_store/product_categories/new.html.erb +9 -0
  95. data/app/views/mechanize_store/product_categories/show.html.erb +19 -0
  96. data/app/views/mechanize_store/product_photos/create.json.jbuilder +9 -0
  97. data/app/views/mechanize_store/product_photos/index.json.jbuilder +9 -0
  98. data/app/views/mechanize_store/products/_form.html.erb +18 -0
  99. data/app/views/mechanize_store/products/edit.html.erb +12 -0
  100. data/app/views/mechanize_store/products/index.html.erb +50 -0
  101. data/app/views/mechanize_store/products/new.html.erb +9 -0
  102. data/app/views/mechanize_store/products/show.html.erb +197 -0
  103. data/app/views/shared/_flashes.html.erb +8 -0
  104. data/config/locales/mechanize_store.pt-BR.yml +65 -0
  105. data/config/routes.rb +11 -0
  106. data/db/migrate/20140401203200_create_mechanize_store_freights.rb +12 -0
  107. data/db/migrate/20140401203246_create_mechanize_store_order_statuses.rb +9 -0
  108. data/db/migrate/20140402140318_create_mechanize_store_payment_statuses.rb +9 -0
  109. data/db/migrate/20140402140325_create_mechanize_store_payment_types.rb +9 -0
  110. data/db/migrate/20140402140539_create_mechanize_store_payments.rb +15 -0
  111. data/db/migrate/20140402140549_create_mechanize_store_flags.rb +9 -0
  112. data/db/migrate/20140402140832_create_mechanize_store_products.rb +16 -0
  113. data/db/migrate/20140402140942_create_mechanize_store_product_photos.rb +10 -0
  114. data/db/migrate/20140402153139_create_mechanize_store_orders.rb +11 -0
  115. data/db/migrate/20140402192058_create_mechanize_store_product_categories.rb +10 -0
  116. data/db/migrate/20140407193412_add_width_to_mechanize_store_product.rb +6 -0
  117. data/db/migrate/20140409191426_create_mechanize_store_order_items.rb +12 -0
  118. data/db/migrate/20140416123100_add_payment_type_id_to_payment.rb +6 -0
  119. data/db/migrate/20140417200520_add_time_to_freight.rb +5 -0
  120. data/lib/mechanize_store.rb +4 -0
  121. data/lib/mechanize_store/engine.rb +17 -0
  122. data/lib/mechanize_store/version.rb +3 -0
  123. data/lib/tasks/mechanize_store_tasks.rake +4 -0
  124. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  125. data/lib/templates/erb/scaffold/edit.html.erb +12 -0
  126. data/lib/templates/erb/scaffold/index.html.erb +50 -0
  127. data/lib/templates/erb/scaffold/new.html.erb +9 -0
  128. data/lib/templates/erb/scaffold/show.html.erb +17 -0
  129. data/lib/templates/rails/scaffold_controller/controller.rb +79 -0
  130. data/spec/controllers/mechanize_store/flags_controller_spec.rb +138 -0
  131. data/spec/controllers/mechanize_store/order_statuses_controller_spec.rb +138 -0
  132. data/spec/controllers/mechanize_store/orders_controller_spec.rb +29 -0
  133. data/spec/controllers/mechanize_store/payment_statuses_controller_spec.rb +139 -0
  134. data/spec/controllers/mechanize_store/payment_types_controller_spec.rb +139 -0
  135. data/spec/controllers/mechanize_store/product_categories_controller_spec.rb +138 -0
  136. data/spec/controllers/mechanize_store/product_photos_controller_spec.rb +75 -0
  137. data/spec/controllers/mechanize_store/products_controller_spec.rb +135 -0
  138. data/spec/dummy/README.rdoc +28 -0
  139. data/spec/dummy/Rakefile +6 -0
  140. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  141. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  142. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  143. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  144. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  145. data/spec/dummy/bin/bundle +3 -0
  146. data/spec/dummy/bin/rails +4 -0
  147. data/spec/dummy/bin/rake +4 -0
  148. data/spec/dummy/config.ru +4 -0
  149. data/spec/dummy/config/application.rb +25 -0
  150. data/spec/dummy/config/boot.rb +5 -0
  151. data/spec/dummy/config/database.yml +25 -0
  152. data/spec/dummy/config/environment.rb +5 -0
  153. data/spec/dummy/config/environments/development.rb +29 -0
  154. data/spec/dummy/config/environments/production.rb +80 -0
  155. data/spec/dummy/config/environments/test.rb +36 -0
  156. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  157. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  158. data/spec/dummy/config/initializers/inflections.rb +16 -0
  159. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  160. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  161. data/spec/dummy/config/initializers/session_store.rb +3 -0
  162. data/spec/dummy/config/initializers/simple_form.rb +145 -0
  163. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  164. data/spec/dummy/config/locales/en.yml +23 -0
  165. data/spec/dummy/config/locales/pt-BR.yml +23 -0
  166. data/spec/dummy/config/routes.rb +3 -0
  167. data/spec/dummy/db/development.sqlite3 +0 -0
  168. data/spec/dummy/db/migrate/20140407144119_create_mechanize_store_freights.mechanize_store.rb +13 -0
  169. data/spec/dummy/db/migrate/20140407144120_create_mechanize_store_order_statuses.mechanize_store.rb +10 -0
  170. data/spec/dummy/db/migrate/20140407144121_create_mechanize_store_payment_statuses.mechanize_store.rb +10 -0
  171. data/spec/dummy/db/migrate/20140407144122_create_mechanize_store_payment_types.mechanize_store.rb +10 -0
  172. data/spec/dummy/db/migrate/20140407144123_create_mechanize_store_payments.mechanize_store.rb +17 -0
  173. data/spec/dummy/db/migrate/20140407144124_create_mechanize_store_flags.mechanize_store.rb +10 -0
  174. data/spec/dummy/db/migrate/20140407144125_create_mechanize_store_products.mechanize_store.rb +17 -0
  175. data/spec/dummy/db/migrate/20140407144126_create_mechanize_store_product_photos.mechanize_store.rb +11 -0
  176. data/spec/dummy/db/migrate/20140407144127_create_mechanize_store_orders.mechanize_store.rb +12 -0
  177. data/spec/dummy/db/migrate/20140407144128_create_mechanize_store_product_categories.mechanize_store.rb +11 -0
  178. data/spec/dummy/db/migrate/20140407193949_add_width_to_mechanize_store_product.mechanize_store.rb +7 -0
  179. data/spec/dummy/db/migrate/20140409191457_create_mechanize_store_order_items.mechanize_store.rb +13 -0
  180. data/spec/dummy/db/schema.rb +125 -0
  181. data/spec/dummy/db/test.sqlite3 +0 -0
  182. data/spec/dummy/log/development.log +24931 -0
  183. data/spec/dummy/log/test.log +42225 -0
  184. data/spec/dummy/public/404.html +58 -0
  185. data/spec/dummy/public/422.html +58 -0
  186. data/spec/dummy/public/500.html +57 -0
  187. data/spec/dummy/public/favicon.ico +0 -0
  188. data/spec/dummy/tmp/cache/assets/development/sprockets/015a50b3ac7ad70aa90ce0a95c99df04 +0 -0
  189. data/spec/dummy/tmp/cache/assets/development/sprockets/020540bcd9f6782692071f17f50f43b0 +0 -0
  190. data/spec/dummy/tmp/cache/assets/development/sprockets/0378e5799bf84efc4c9b8ac61252a081 +0 -0
  191. data/spec/dummy/tmp/cache/assets/development/sprockets/04032662bf2ebfb00b4218e459ab14bf +0 -0
  192. data/spec/dummy/tmp/cache/assets/development/sprockets/043663643ec7f44e8f7baeb7856605bb +0 -0
  193. data/spec/dummy/tmp/cache/assets/development/sprockets/059883583379e5e373caaa73ac8f18ca +0 -0
  194. data/spec/dummy/tmp/cache/assets/development/sprockets/05f7ba95ff1ffeab9cb378fcb7b0289f +0 -0
  195. data/spec/dummy/tmp/cache/assets/development/sprockets/069b62a9f82e145a95c6dbcada54860d +0 -0
  196. data/spec/dummy/tmp/cache/assets/development/sprockets/06ce3d4f3b99f90fa0ced1db38c5fb13 +0 -0
  197. data/spec/dummy/tmp/cache/assets/development/sprockets/0a70c895b23487214ec56a6cd4bd9552 +0 -0
  198. data/spec/dummy/tmp/cache/assets/development/sprockets/0e42ab04670f4d8017b5eeb5ec7f080b +0 -0
  199. data/spec/dummy/tmp/cache/assets/development/sprockets/0f2edd5bf10b0d769d20d28769abf705 +0 -0
  200. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  201. data/spec/dummy/tmp/cache/assets/development/sprockets/14464296f672d2910982229137d66535 +0 -0
  202. data/spec/dummy/tmp/cache/assets/development/sprockets/19456f04c83f78d9ab6e5d57031015ef +0 -0
  203. data/spec/dummy/tmp/cache/assets/development/sprockets/1a5faaf1e18d5f49d129459ae565f1af +0 -0
  204. data/spec/dummy/tmp/cache/assets/development/sprockets/1a78a9c2facea31464f84e54fdc36059 +0 -0
  205. data/spec/dummy/tmp/cache/assets/development/sprockets/1da2c163f7f6bbd029786010cd788bce +0 -0
  206. data/spec/dummy/tmp/cache/assets/development/sprockets/250ad25722c066145272032ad82f4561 +0 -0
  207. data/spec/dummy/tmp/cache/assets/development/sprockets/2593c6406f0e0ba8eb5271badc1fbef1 +0 -0
  208. data/spec/dummy/tmp/cache/assets/development/sprockets/262f77e6bb6c8e1453f5477c82a17b11 +0 -0
  209. data/spec/dummy/tmp/cache/assets/development/sprockets/27479abec405e7ea5ee309699b19c495 +0 -0
  210. data/spec/dummy/tmp/cache/assets/development/sprockets/2b16e3dfbce9d1bb0de91f424f03694a +0 -0
  211. data/spec/dummy/tmp/cache/assets/development/sprockets/2b89581781ce2529d6435ae4a831dcb9 +0 -0
  212. data/spec/dummy/tmp/cache/assets/development/sprockets/2c8d436d977e56045cd16cc55f33e24f +0 -0
  213. data/spec/dummy/tmp/cache/assets/development/sprockets/2d8950ff6bb73413e9deb6e196bfffd0 +0 -0
  214. data/spec/dummy/tmp/cache/assets/development/sprockets/2dc34152e91278da6990e448dccf297a +0 -0
  215. data/spec/dummy/tmp/cache/assets/development/sprockets/2e2c50f356deda30cee516e501b1eb70 +0 -0
  216. data/spec/dummy/tmp/cache/assets/development/sprockets/2ee1b9592bbe1ba628925e28b31fdc2a +0 -0
  217. data/spec/dummy/tmp/cache/assets/development/sprockets/2f378010bb54f8ca9c2a38c7df245b26 +0 -0
  218. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  219. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  220. data/spec/dummy/tmp/cache/assets/development/sprockets/38aa872dea852cc952801236dfc073fc +0 -0
  221. data/spec/dummy/tmp/cache/assets/development/sprockets/3c562eb64c2c0fc045f18356d3ddd84e +0 -0
  222. data/spec/dummy/tmp/cache/assets/development/sprockets/3daa6dd7a3804d55f1896a2d40ccea5f +0 -0
  223. data/spec/dummy/tmp/cache/assets/development/sprockets/436e4923cef6508f9572309894ad3afb +0 -0
  224. data/spec/dummy/tmp/cache/assets/development/sprockets/43db98f3f4043e28dd241d4bcf40a382 +0 -0
  225. data/spec/dummy/tmp/cache/assets/development/sprockets/4517526bf21c2e0d4475812a0801ff73 +0 -0
  226. data/spec/dummy/tmp/cache/assets/development/sprockets/45e8f86d32c088635371e9d83d481ff0 +0 -0
  227. data/spec/dummy/tmp/cache/assets/development/sprockets/46c7525f809be6b9a6da46ec5281b90d +0 -0
  228. data/spec/dummy/tmp/cache/assets/development/sprockets/48710380827190cf4c297aeb8ff8f521 +0 -0
  229. data/spec/dummy/tmp/cache/assets/development/sprockets/48c25b92a4e1841bd519a77588afb5df +0 -0
  230. data/spec/dummy/tmp/cache/assets/development/sprockets/4b3b499b73fde3f086615d203a4cd9ee +0 -0
  231. data/spec/dummy/tmp/cache/assets/development/sprockets/4c1f9a5156d1c8724067d833a65dc486 +0 -0
  232. data/spec/dummy/tmp/cache/assets/development/sprockets/4e1d544283e15d5f8e7575f717a440a4 +0 -0
  233. data/spec/dummy/tmp/cache/assets/development/sprockets/54843f9a3a2ac75ad7ebde3307ce8606 +0 -0
  234. data/spec/dummy/tmp/cache/assets/development/sprockets/55116814eac2aaa3b60343e4269a18f9 +0 -0
  235. data/spec/dummy/tmp/cache/assets/development/sprockets/55d45208b6b824293fd70642ec435749 +0 -0
  236. data/spec/dummy/tmp/cache/assets/development/sprockets/593ece65492f611f990932db9d09f2c7 +0 -0
  237. data/spec/dummy/tmp/cache/assets/development/sprockets/59bb66920183998fcca5f2c787d0180e +0 -0
  238. data/spec/dummy/tmp/cache/assets/development/sprockets/5c19a1c0836acd88cf90128587c8a9f2 +0 -0
  239. data/spec/dummy/tmp/cache/assets/development/sprockets/5cbd47d1e56ce6ad12324dc100b18435 +0 -0
  240. data/spec/dummy/tmp/cache/assets/development/sprockets/5dd2138848e347d174c374d012420ae3 +0 -0
  241. data/spec/dummy/tmp/cache/assets/development/sprockets/5e2b19c7c137f093e3a17e2eed13b00e +0 -0
  242. data/spec/dummy/tmp/cache/assets/development/sprockets/5f29f414f1d3e6a4c8eacd4974e20369 +0 -0
  243. data/spec/dummy/tmp/cache/assets/development/sprockets/5fc8e81b247da7b93af8a2eb06017a5e +0 -0
  244. data/spec/dummy/tmp/cache/assets/development/sprockets/646c6b9465381d825591b427e65cfa6f +0 -0
  245. data/spec/dummy/tmp/cache/assets/development/sprockets/6554b2d6606c5f90f91a8a1f01ee5207 +0 -0
  246. data/spec/dummy/tmp/cache/assets/development/sprockets/662f5fc7888fcf74ff719aea443f1e0e +0 -0
  247. data/spec/dummy/tmp/cache/assets/development/sprockets/66c3c3a1daf01d2edc14fb56645814af +0 -0
  248. data/spec/dummy/tmp/cache/assets/development/sprockets/69f57e81929c085cfd164a7b30f9cb5f +0 -0
  249. data/spec/dummy/tmp/cache/assets/development/sprockets/6a7af764897e94acc0adc4f6855846ea +0 -0
  250. data/spec/dummy/tmp/cache/assets/development/sprockets/6ddd5e3587977e83d7dc7b7124cc4044 +0 -0
  251. data/spec/dummy/tmp/cache/assets/development/sprockets/70894d30d9a638ae5cb410c1bf51d436 +0 -0
  252. data/spec/dummy/tmp/cache/assets/development/sprockets/746b6834bc4167c8495578a1b7b05cd2 +0 -0
  253. data/spec/dummy/tmp/cache/assets/development/sprockets/748419e05355441fbf8b5177841a01ae +0 -0
  254. data/spec/dummy/tmp/cache/assets/development/sprockets/75b6e2b76634cd778e12a60b8862cc83 +0 -0
  255. data/spec/dummy/tmp/cache/assets/development/sprockets/75e995d7f41c3d87054f39654ee96276 +0 -0
  256. data/spec/dummy/tmp/cache/assets/development/sprockets/7a6ffbc3e76322931e50faa267bf2ccd +0 -0
  257. data/spec/dummy/tmp/cache/assets/development/sprockets/7dbc97a9be7f04dc0f5cb28337fe9f4c +0 -0
  258. data/spec/dummy/tmp/cache/assets/development/sprockets/7e908a7a32793f07298fa2f32f7a1da6 +0 -0
  259. data/spec/dummy/tmp/cache/assets/development/sprockets/80137a3a1ee5336154baaea4290aa0fa +0 -0
  260. data/spec/dummy/tmp/cache/assets/development/sprockets/80a4a7e08ffe3c1b0ad632a9f69dae61 +0 -0
  261. data/spec/dummy/tmp/cache/assets/development/sprockets/875373523edad14b9efdc32d30056b88 +0 -0
  262. data/spec/dummy/tmp/cache/assets/development/sprockets/8b2a3bdfdd87982dbcdf9beaa4883771 +0 -0
  263. data/spec/dummy/tmp/cache/assets/development/sprockets/8c29fc18ccf7320aa1f9d9fbc277adbc +0 -0
  264. data/spec/dummy/tmp/cache/assets/development/sprockets/8c48b01bb6fe5d3f87c3e2d8796bfe57 +0 -0
  265. data/spec/dummy/tmp/cache/assets/development/sprockets/8c880b8aef8a9168cf039ff966dde072 +0 -0
  266. data/spec/dummy/tmp/cache/assets/development/sprockets/8e1041b3a7abe8f1431f078dd04e52f2 +0 -0
  267. data/spec/dummy/tmp/cache/assets/development/sprockets/8e1509b014a325c41eb6d6d060697d5b +0 -0
  268. data/spec/dummy/tmp/cache/assets/development/sprockets/9295c97f3680de471db1138760883721 +0 -0
  269. data/spec/dummy/tmp/cache/assets/development/sprockets/932ff26d70c7f83db540941e70fbc256 +0 -0
  270. data/spec/dummy/tmp/cache/assets/development/sprockets/95d1184dee9d6ad8efbb18992ef7f3bd +0 -0
  271. data/spec/dummy/tmp/cache/assets/development/sprockets/9a57b3781439b98aa17111614be63659 +0 -0
  272. data/spec/dummy/tmp/cache/assets/development/sprockets/9a958d65f5d84cf81a860fe6b98f7586 +0 -0
  273. data/spec/dummy/tmp/cache/assets/development/sprockets/9ba78083ca4f55d2e3dbb4c16f5108a4 +0 -0
  274. data/spec/dummy/tmp/cache/assets/development/sprockets/9bf7f52d56b17c5fcacc89e0196ec9ec +0 -0
  275. data/spec/dummy/tmp/cache/assets/development/sprockets/9dcc41c3f740c89aa23972f9f0fb7682 +0 -0
  276. data/spec/dummy/tmp/cache/assets/development/sprockets/9dd69825bb5d22668e78fcadbcc384bf +0 -0
  277. data/spec/dummy/tmp/cache/assets/development/sprockets/9f7694dc7aa37365dca45aa754f46e75 +0 -0
  278. data/spec/dummy/tmp/cache/assets/development/sprockets/a119b32f75ff105e311edc0f31ca67f6 +0 -0
  279. data/spec/dummy/tmp/cache/assets/development/sprockets/a388745aef9974ea0f378a3b83f6f8e7 +0 -0
  280. data/spec/dummy/tmp/cache/assets/development/sprockets/a80b32eb0130473db70817a2464be54a +0 -0
  281. data/spec/dummy/tmp/cache/assets/development/sprockets/a97cfb7a9ba4204c2c02cb794e0b529e +0 -0
  282. data/spec/dummy/tmp/cache/assets/development/sprockets/a9d026eb5dcf44bbad77067be7ccc216 +0 -0
  283. data/spec/dummy/tmp/cache/assets/development/sprockets/ac2422a2e7c30bbcf41620f5eadf6c9a +0 -0
  284. data/spec/dummy/tmp/cache/assets/development/sprockets/aca81e68e9477c36988579e16d099f7a +0 -0
  285. data/spec/dummy/tmp/cache/assets/development/sprockets/ad821e6998f57556c2bbebeac574bbd3 +0 -0
  286. data/spec/dummy/tmp/cache/assets/development/sprockets/adc26899d70ead5b9321d6b6be5cb73a +0 -0
  287. data/spec/dummy/tmp/cache/assets/development/sprockets/ae2d91de359a9f7f39d93f379705b07c +0 -0
  288. data/spec/dummy/tmp/cache/assets/development/sprockets/b1909373f0eb96fc7eb1a16b13cf9d9c +0 -0
  289. data/spec/dummy/tmp/cache/assets/development/sprockets/b2d360ac92a3862e54a81752fac14f04 +0 -0
  290. data/spec/dummy/tmp/cache/assets/development/sprockets/b32edcdd838f74e3b0b694bb4fb78135 +0 -0
  291. data/spec/dummy/tmp/cache/assets/development/sprockets/b80b1d0da5126d78830d5cc9d33bb939 +0 -0
  292. data/spec/dummy/tmp/cache/assets/development/sprockets/b80ff122a6e6cb26a8726574c9ed9843 +0 -0
  293. data/spec/dummy/tmp/cache/assets/development/sprockets/b8788a2d9cd7867f9732a0d1218b3be3 +0 -0
  294. data/spec/dummy/tmp/cache/assets/development/sprockets/c01c09c7af2805825d421efe97369c92 +0 -0
  295. data/spec/dummy/tmp/cache/assets/development/sprockets/c096a28eb3fb4f6a5943814c1d83de28 +0 -0
  296. data/spec/dummy/tmp/cache/assets/development/sprockets/c1c5e3bf6b463ce593f544553cd61880 +0 -0
  297. data/spec/dummy/tmp/cache/assets/development/sprockets/c206d760825f5d60935bc162372aae5f +0 -0
  298. data/spec/dummy/tmp/cache/assets/development/sprockets/c276778eb885b31ac5c72899422f687b +0 -0
  299. data/spec/dummy/tmp/cache/assets/development/sprockets/c381ab6aead4f08abb9b7da1fd2c5cbe +0 -0
  300. data/spec/dummy/tmp/cache/assets/development/sprockets/c3fae7c3a4d1eb0934a03e3508994894 +0 -0
  301. data/spec/dummy/tmp/cache/assets/development/sprockets/c532dcbd254ee5454d453f8dca2ea356 +0 -0
  302. data/spec/dummy/tmp/cache/assets/development/sprockets/c5febc1300d6cd4c2f85a5dcc4ccca65 +0 -0
  303. data/spec/dummy/tmp/cache/assets/development/sprockets/c6337ac9ac53de67c5e4e0bbd8e0b98f +0 -0
  304. data/spec/dummy/tmp/cache/assets/development/sprockets/c63f6f599121de54f10407499bdeb95d +0 -0
  305. data/spec/dummy/tmp/cache/assets/development/sprockets/c6ccf7b3128d1693a850e8014129e21b +0 -0
  306. data/spec/dummy/tmp/cache/assets/development/sprockets/c884f6ae49a257a9b8218d60cddc22c1 +0 -0
  307. data/spec/dummy/tmp/cache/assets/development/sprockets/c9053dba65ec180c37b513c1e0a02953 +0 -0
  308. data/spec/dummy/tmp/cache/assets/development/sprockets/c9274eaf6338c910a014211f057bb10f +0 -0
  309. data/spec/dummy/tmp/cache/assets/development/sprockets/c9b7bfc895f9ef763149e886eed1c12a +0 -0
  310. data/spec/dummy/tmp/cache/assets/development/sprockets/ca5d6127a6b6cb20b3137c6ed1b086e4 +0 -0
  311. data/spec/dummy/tmp/cache/assets/development/sprockets/ca68d3d42cc489b72f5a9caa1bec8a0f +0 -0
  312. data/spec/dummy/tmp/cache/assets/development/sprockets/cbb3bbaeb5cbb28714fc2d854e55d759 +0 -0
  313. data/spec/dummy/tmp/cache/assets/development/sprockets/cbc8f4f72d68f84e285b14c13c615e94 +0 -0
  314. data/spec/dummy/tmp/cache/assets/development/sprockets/cbf5cac128a3b9fd8567cf02d8b5c7f4 +0 -0
  315. data/spec/dummy/tmp/cache/assets/development/sprockets/cf62df2949741a6dfcbdf6dae39a376e +0 -0
  316. data/spec/dummy/tmp/cache/assets/development/sprockets/cfe2122c3660d4bf29e621b13cc1e4c0 +0 -0
  317. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  318. data/spec/dummy/tmp/cache/assets/development/sprockets/d1ebcb314c13703007e0a6e9c5604655 +0 -0
  319. data/spec/dummy/tmp/cache/assets/development/sprockets/d4db7fd1c1ad160335e9abc86e49a138 +0 -0
  320. data/spec/dummy/tmp/cache/assets/development/sprockets/d5a9b12dc73b0e530314f93a2e7d4270 +0 -0
  321. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  322. data/spec/dummy/tmp/cache/assets/development/sprockets/d84c8af9dd2dd84ac27282b753d2b33c +0 -0
  323. data/spec/dummy/tmp/cache/assets/development/sprockets/d86a26ce11fa0095e076b69ecd98fbf6 +0 -0
  324. data/spec/dummy/tmp/cache/assets/development/sprockets/dba3e0db21349797be91d79366b2e6d9 +0 -0
  325. data/spec/dummy/tmp/cache/assets/development/sprockets/dcfc0ac1daceac33f1f1d348341a8c75 +0 -0
  326. data/spec/dummy/tmp/cache/assets/development/sprockets/dd149c63c658dcacd022a8bbd0136c9f +0 -0
  327. data/spec/dummy/tmp/cache/assets/development/sprockets/de287cf9a2ea50ebc178bcc7cd8e0f4c +0 -0
  328. data/spec/dummy/tmp/cache/assets/development/sprockets/de35fa3c2360ca5a0479c6ec6c8c0d62 +0 -0
  329. data/spec/dummy/tmp/cache/assets/development/sprockets/dfc074e83f62650815ec91d5e6ae716a +0 -0
  330. data/spec/dummy/tmp/cache/assets/development/sprockets/e4806a3aea27283bdce20bcb1cc894a6 +0 -0
  331. data/spec/dummy/tmp/cache/assets/development/sprockets/e9075a2c21b7e2c0543aceff4975485a +0 -0
  332. data/spec/dummy/tmp/cache/assets/development/sprockets/e9c2ccf818891a7575ec2200367bbf52 +0 -0
  333. data/spec/dummy/tmp/cache/assets/development/sprockets/eb3496f8d86eed2469155f90f146a7bd +0 -0
  334. data/spec/dummy/tmp/cache/assets/development/sprockets/ec5d87f50983b6156db79eb4c4b0ae6d +0 -0
  335. data/spec/dummy/tmp/cache/assets/development/sprockets/f0bb04309f0742e927d269899c6b9a4a +0 -0
  336. data/spec/dummy/tmp/cache/assets/development/sprockets/f0fdb965c01e31547d9058c609918712 +0 -0
  337. data/spec/dummy/tmp/cache/assets/development/sprockets/f2de92b01852702a49c9e9e5cd3b320f +0 -0
  338. data/spec/dummy/tmp/cache/assets/development/sprockets/f478e4dc1bdfe5240e3ca48440488e32 +0 -0
  339. data/spec/dummy/tmp/cache/assets/development/sprockets/f51cc05ee2ec6ed667257568e527f522 +0 -0
  340. data/spec/dummy/tmp/cache/assets/development/sprockets/f535bdc9ad7f7f6ce6009b846c2fc2d7 +0 -0
  341. data/spec/dummy/tmp/cache/assets/development/sprockets/f61f3d9d282d0c092d604b8433071c77 +0 -0
  342. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  343. data/spec/dummy/tmp/cache/assets/development/sprockets/f97dc728e6d15fb7ba9f14ad2b8b6bcb +0 -0
  344. data/spec/dummy/tmp/cache/assets/development/sprockets/faeec0db256cfb91ad104e66a9453bd9 +0 -0
  345. data/spec/dummy/tmp/cache/assets/development/sprockets/fbbf6a435d522871a2d29d97e370bfce +0 -0
  346. data/spec/dummy/tmp/cache/assets/development/sprockets/ffbf6316da17c85bd6bda4bdb1961baf +0 -0
  347. data/spec/factories/mechanize_store_order_items.rb +10 -0
  348. data/spec/factories/mechanize_store_products.rb +14 -0
  349. data/spec/factories/store_flags.rb +7 -0
  350. data/spec/factories/store_freights.rb +10 -0
  351. data/spec/factories/store_order_statuses.rb +7 -0
  352. data/spec/factories/store_orders.rb +8 -0
  353. data/spec/factories/store_payment_statuses.rb +7 -0
  354. data/spec/factories/store_payment_types.rb +7 -0
  355. data/spec/factories/store_payments.rb +14 -0
  356. data/spec/factories/store_product_categories.rb +8 -0
  357. data/spec/factories/store_product_photos.rb +8 -0
  358. data/spec/factories/store_stores.rb +10 -0
  359. data/spec/features/orders_flow_spec.rb +0 -0
  360. data/spec/features/products_flow_test.rb +68 -0
  361. data/spec/fixtures/rails.png +0 -0
  362. data/spec/models/mechanize_store/order_item_spec.rb +7 -0
  363. data/spec/models/store/flag_spec.rb +7 -0
  364. data/spec/models/store/freight_spec.rb +7 -0
  365. data/spec/models/store/order_spec.rb +7 -0
  366. data/spec/models/store/order_status_spec.rb +7 -0
  367. data/spec/models/store/payment_spec.rb +7 -0
  368. data/spec/models/store/payment_status_spec.rb +7 -0
  369. data/spec/models/store/payment_type_spec.rb +7 -0
  370. data/spec/models/store/product_category_spec.rb +7 -0
  371. data/spec/models/store/product_photo_spec.rb +7 -0
  372. data/spec/models/store/product_spec.rb +7 -0
  373. data/spec/models/store/store_spec.rb +7 -0
  374. data/spec/routing/store/flags_routing_spec.rb +39 -0
  375. data/spec/routing/store/order_statuses_routing_spec.rb +39 -0
  376. data/spec/routing/store/orders_routing_spec.rb +18 -0
  377. data/spec/routing/store/payment_statuses_routing_spec.rb +38 -0
  378. data/spec/routing/store/payment_types_routing_spec.rb +38 -0
  379. data/spec/routing/store/product_categories_routing_spec.rb +39 -0
  380. data/spec/routing/store/products_photos_routing_spec.rb +19 -0
  381. data/spec/routing/store/products_routing_spec.rb +39 -0
  382. data/spec/spec_helper.rb +22 -0
  383. metadata +876 -0
@@ -0,0 +1,20 @@
1
+ jQuery(document).ready(function($){
2
+ placeholder = $("#donut-chart");
3
+
4
+ if (placeholder.is(":visible")) {
5
+ $.ajax({
6
+ url: "/dashboard/questionnaires.json",
7
+ dataType: "json",
8
+ type: "get"
9
+ }).done(function(data){
10
+ $.plot(placeholder, data, {
11
+ series: {
12
+ pie: {
13
+ innerRadius: 0.5,
14
+ show: true
15
+ }
16
+ }
17
+ });
18
+ });
19
+ };
20
+ });
@@ -0,0 +1 @@
1
+ !function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;for(b=a.split(",")[0].indexOf("base64")>=0?atob(a.split(",")[1]):decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f),h=0;h<b.length;h+=1)g[h]=b.charCodeAt(h);return i=a.split(",")[0].split(":")[1].split(";")[0],c?new Blob([d?g:f],{type:i}):(j=new e,j.append(f),j.getBlob(i))};a.HTMLCanvasElement&&!b.toBlob&&(b.mozGetAsFile?b.toBlob=function(a,c,d){d&&b.toDataURL&&f?a(f(this.toDataURL(c,d))):a(this.mozGetAsFile("blob",c))}:b.toDataURL&&f&&(b.toBlob=function(a,b,c){a(f(this.toDataURL(b,c)))})),"function"==typeof define&&define.amd?define(function(){return f}):a.dataURLtoBlob=f}(this);
@@ -0,0 +1 @@
1
+ !function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],a):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=a(window.blueimp.helper||window.jQuery))}(function(a){"use strict";function b(a,c){return void 0===document.body.style.maxHeight?null:this&&this.options===b.prototype.options?a&&a.length?(this.list=a,this.num=a.length,this.initOptions(c),void this.initialize()):void this.console.log("blueimp Gallery: No or empty list provided as first argument.",a):new b(a,c)}return a.extend(b.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(b){var c={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},d={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}},e=function(){var a,d,e=c.transition;document.body.appendChild(b),e&&(a=e.name.slice(0,-9)+"ransform",void 0!==b.style[a]&&(b.style[a]="translateZ(0)",d=window.getComputedStyle(b).getPropertyValue(e.prefix+"transform"),c.transform={prefix:e.prefix,name:a,translate:!0,translateZ:!!d&&"none"!==d})),void 0!==b.style.backgroundSize&&(c.backgroundSize={},b.style.backgroundSize="contain",c.backgroundSize.contain="contain"===window.getComputedStyle(b).getPropertyValue("background-size"),b.style.backgroundSize="cover",c.backgroundSize.cover="cover"===window.getComputedStyle(b).getPropertyValue("background-size")),document.body.removeChild(b)};return function(a,c){var d;for(d in c)if(c.hasOwnProperty(d)&&void 0!==b.style[d]){a.transition=c[d],a.transition.name=d;break}}(c,d),document.body?e():a(document).on("DOMContentLoaded",e),c}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,initialize:function(){return this.initStartIndex(),this.initWidget()===!1?!1:(this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),void(this.options.startSlideshow&&this.play()))},slide:function(a,b){window.clearTimeout(this.timeout);var c,d,e,f=this.index;if(f!==a&&1!==this.num){if(b||(b=this.options.transitionSpeed),this.support.transition){for(this.options.continuous||(a=this.circle(a)),c=Math.abs(f-a)/(f-a),this.options.continuous&&(d=c,c=-this.positions[this.circle(a)]/this.slideWidth,c!==d&&(a=-c*this.num+a)),e=Math.abs(f-a)-1;e;)e-=1,this.move(this.circle((a>f?a:f)-e-1),this.slideWidth*c,0);a=this.circle(a),this.move(f,this.slideWidth*c,b),this.move(a,0,b),this.options.continuous&&this.move(this.circle(a-c),-(this.slideWidth*c),0)}else a=this.circle(a),this.animate(f*-this.slideWidth,a*-this.slideWidth,b);this.onslide(a)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index<this.num-1)&&this.slide(this.index+1)},play:function(a){var b=this;window.clearTimeout(this.timeout),this.interval=a||this.options.slideshowInterval,this.elements[this.index]>1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(a,c){b.animationFrameId=b.requestAnimationFrame.call(window,function(){b.slide(a,c)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.container.removeClass(this.options.playingClass)},add:function(a){var b;for(a.concat||(a=Array.prototype.slice.call(a)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(a),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),b=this.num-a.length;b<this.num;b+=1)this.addSlide(b),this.positionSlide(b);this.positions.length=this.num,this.initSlides(!0)},resetSlides:function(){this.slidesContainer.empty(),this.slides=[]},handleClose:function(){var a=this.options;this.destroyEventListeners(),this.pause(),this.container[0].style.display="none",this.container.removeClass(a.displayClass).removeClass(a.singleClass).removeClass(a.leftEdgeClass).removeClass(a.rightEdgeClass),a.hidePageScrollbars&&(document.body.style.overflow=this.bodyOverflowStyle),this.options.clearSlides&&this.resetSlides(),this.options.onclosed&&this.options.onclosed.call(this)},close:function(){var a=this,b=function(c){c.target===a.container[0]&&(a.container.off(a.support.transition.end,b),a.handleClose())};this.options.onclose&&this.options.onclose.call(this),this.support.transition&&this.options.displayTransition?(this.container.on(this.support.transition.end,b),this.container.removeClass(this.options.displayClass)):this.handleClose()},circle:function(a){return(this.num+a%this.num)%this.num},move:function(a,b,c){this.translateX(a,b,c),this.positions[a]=b},translate:function(a,b,c,d){var e=this.slides[a].style,f=this.support.transition,g=this.support.transform;e[f.name+"Duration"]=d+"ms",e[g.name]="translate("+b+"px, "+c+"px)"+(g.translateZ?" translateZ(0)":"")},translateX:function(a,b,c){this.translate(a,b,0,c)},translateY:function(a,b,c){this.translate(a,0,b,c)},animate:function(a,b,c){if(!c)return void(this.slidesContainer[0].style.left=b+"px");var d=this,e=(new Date).getTime(),f=window.setInterval(function(){var g=(new Date).getTime()-e;return g>c?(d.slidesContainer[0].style.left=b+"px",d.ontransitionend(),void window.clearInterval(f)):void(d.slidesContainer[0].style.left=(b-a)*(Math.floor(g/c*100)/100)+a+"px")},4)},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(a){a.which&&1===a.which&&"VIDEO"!==a.target.nodeName&&(a.preventDefault(),(a.originalEvent||a).touches=[{pageX:a.pageX,pageY:a.pageY}],this.ontouchstart(a))},onmousemove:function(a){this.touchStart&&((a.originalEvent||a).touches=[{pageX:a.pageX,pageY:a.pageY}],this.ontouchmove(a))},onmouseup:function(a){this.touchStart&&(this.ontouchend(a),delete this.touchStart)},onmouseout:function(b){if(this.touchStart){var c=b.target,d=b.relatedTarget;(!d||d!==c&&!a.contains(c,d))&&this.onmouseup(b)}},ontouchstart:function(a){this.options.stopTouchEventsPropagation&&this.stopPropagation(a);var b=(a.originalEvent||a).touches[0];this.touchStart={x:b.pageX,y:b.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(a){this.options.stopTouchEventsPropagation&&this.stopPropagation(a);var b,c,d=(a.originalEvent||a).touches[0],e=(a.originalEvent||a).scale,f=this.index;if(!(d.length>1||e&&1!==e))if(this.options.disableScroll&&a.preventDefault(),this.touchDelta={x:d.pageX-this.touchStart.x,y:d.pageY-this.touchStart.y},b=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(b)<Math.abs(this.touchDelta.y)),this.isScrolling)this.options.closeOnSwipeUpOrDown&&this.translateY(f,this.touchDelta.y+this.positions[f],0);else for(a.preventDefault(),window.clearTimeout(this.timeout),this.options.continuous?c=[this.circle(f+1),f,this.circle(f-1)]:(this.touchDelta.x=b/=!f&&b>0||f===this.num-1&&0>b?Math.abs(b)/this.slideWidth+1:1,c=[f],f&&c.push(f-1),f<this.num-1&&c.unshift(f+1));c.length;)f=c.pop(),this.translateX(f,b+this.positions[f],0)},ontouchend:function(a){this.options.stopTouchEventsPropagation&&this.stopPropagation(a);var b,c,d,e,f,g=this.index,h=this.options.transitionSpeed,i=this.slideWidth,j=Number(Date.now()-this.touchStart.time)<250,k=j&&Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.x)>i/2,l=!g&&this.touchDelta.x>0||g===this.num-1&&this.touchDelta.x<0,m=!k&&this.options.closeOnSwipeUpOrDown&&(j&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(l=!1),b=this.touchDelta.x<0?-1:1,this.isScrolling?m?this.close():this.translateY(g,0,h):k&&!l?(c=g+b,d=g-b,e=i*b,f=-i*b,this.options.continuous?(this.move(this.circle(c),e,0),this.move(this.circle(g-2*b),f,0)):c>=0&&c<this.num&&this.move(c,e,0),this.move(g,this.positions[g]+e,h),this.move(this.circle(d),this.positions[this.circle(d)]+e,h),g=this.circle(d),this.onslide(g)):this.options.continuous?(this.move(this.circle(g-1),-i,h),this.move(g,0,h),this.move(this.circle(g+1),i,h)):(g&&this.move(g-1,-i,h),this.move(g,0,h),g<this.num-1&&this.move(g+1,i,h))},ontouchcancel:function(a){this.touchStart&&(this.ontouchend(a),delete this.touchStart)},ontransitionend:function(a){var b=this.slides[this.index];a&&b!==a.target||(this.interval&&this.play(),this.setTimeout(this.options.onslideend,[this.index,b]))},oncomplete:function(b){var c,d=b.target||b.srcElement,e=d&&d.parentNode;d&&e&&(c=this.getNodeIndex(e),a(e).removeClass(this.options.slideLoadingClass),"error"===b.type?(a(e).addClass(this.options.slideErrorClass),this.elements[c]=3):this.elements[c]=2,d.clientHeight>this.container[0].clientHeight&&(d.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===e&&this.play(),this.setTimeout(this.options.onslidecomplete,[c,e]))},onload:function(a){this.oncomplete(a)},onerror:function(a){this.oncomplete(a)},onkeydown:function(a){switch(a.which||a.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(a),this.toggleControls());break;case 27:this.options.closeOnEscape&&this.close();break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(a),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(a),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(a),this.next())}},handleClick:function(b){var c=this.options,d=b.target||b.srcElement,e=d.parentNode,f=function(b){return a(d).hasClass(b)||a(e).hasClass(b)};f(c.toggleClass)?(this.preventDefault(b),this.toggleControls()):f(c.prevClass)?(this.preventDefault(b),this.prev()):f(c.nextClass)?(this.preventDefault(b),this.next()):f(c.closeClass)?(this.preventDefault(b),this.close()):f(c.playPauseClass)?(this.preventDefault(b),this.toggleSlideshow()):e===this.slidesContainer[0]?(this.preventDefault(b),c.closeOnSlideClick?this.close():this.toggleControls()):e.parentNode&&e.parentNode===this.slidesContainer[0]&&(this.preventDefault(b),this.toggleControls())},onclick:function(a){return this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)?void delete this.touchDelta:this.handleClick(a)},updateEdgeClasses:function(a){a?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),a===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(a){this.options.continuous||this.updateEdgeClasses(a),this.loadElements(a),this.options.unloadElements&&this.unloadElements(a),this.setTitle(a)},onslide:function(a){this.index=a,this.handleSlide(a),this.setTimeout(this.options.onslide,[a,this.slides[a]])},setTitle:function(a){var b=this.slides[a].firstChild.title,c=this.titleElement;c.length&&(this.titleElement.empty(),b&&c[0].appendChild(document.createTextNode(b)))},setTimeout:function(a,b,c){var d=this;return a&&window.setTimeout(function(){a.apply(d,b||[])},c||0)},imageFactory:function(b,c){var d,e,f,g=this,h=this.imagePrototype.cloneNode(!1),i=b,j=this.options.stretchImages,k=function(b){if(!d){if(b={type:b.type,target:e},!e.parentNode)return g.setTimeout(k,[b]);d=!0,a(h).off("load error",k),j&&"load"===b.type&&(e.style.background='url("'+i+'") center no-repeat',e.style.backgroundSize=j),c(b)}};return"string"!=typeof i&&(i=this.getItemProperty(b,this.options.urlProperty),f=this.getItemProperty(b,this.options.titleProperty)),j===!0&&(j="contain"),j=this.support.backgroundSize&&this.support.backgroundSize[j]&&j,j?e=this.elementPrototype.cloneNode(!1):(e=h,h.draggable=!1),f&&(e.title=f),a(h).on("load error",k),h.src=i,e},createElement:function(b,c){var d=b&&this.getItemProperty(b,this.options.typeProperty),e=d&&this[d.split("/")[0]+"Factory"]||this.imageFactory,f=b&&e.call(this,b,c);return f||(f=this.elementPrototype.cloneNode(!1),this.setTimeout(c,[{type:"error",target:f}])),a(f).addClass(this.options.slideContentClass),f},loadElement:function(b){this.elements[b]||(this.slides[b].firstChild?this.elements[b]=a(this.slides[b]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[b]=1,a(this.slides[b]).addClass(this.options.slideLoadingClass),this.slides[b].appendChild(this.createElement(this.list[b],this.proxyListener))))},loadElements:function(a){var b,c=Math.min(this.num,2*this.options.preloadRange+1),d=a;for(b=0;c>b;b+=1)d+=b*(b%2===0?-1:1),d=this.circle(d),this.loadElement(d)},unloadElements:function(a){var b,c,d;for(b in this.elements)this.elements.hasOwnProperty(b)&&(d=Math.abs(a-b),d>this.options.preloadRange&&d+this.options.preloadRange<this.num&&(c=this.slides[b],c.removeChild(c.firstChild),delete this.elements[b]))},addSlide:function(a){var b=this.slidePrototype.cloneNode(!1);b.setAttribute("data-index",a),this.slidesContainer[0].appendChild(b),this.slides.push(b)},positionSlide:function(a){var b=this.slides[a];b.style.width=this.slideWidth+"px",this.support.transition&&(b.style.left=a*-this.slideWidth+"px",this.move(a,this.index>a?-this.slideWidth:this.index<a?this.slideWidth:0,0))},initSlides:function(b){var c,d;for(b||(this.positions=[],this.positions.length=this.num,this.elements={},this.imagePrototype=document.createElement("img"),this.elementPrototype=document.createElement("div"),this.slidePrototype=document.createElement("div"),a(this.slidePrototype).addClass(this.options.slideClass),this.slides=this.slidesContainer[0].children,c=this.options.clearSlides||this.slides.length!==this.num),this.slideWidth=this.container[0].offsetWidth,this.slideHeight=this.container[0].offsetHeight,this.slidesContainer[0].style.width=this.num*this.slideWidth+"px",c&&this.resetSlides(),d=0;d<this.num;d+=1)c&&this.addSlide(d),this.positionSlide(d);this.options.continuous&&this.support.transition&&(this.move(this.circle(this.index-1),-this.slideWidth,0),this.move(this.circle(this.index+1),this.slideWidth,0)),this.support.transition||(this.slidesContainer[0].style.left=this.index*-this.slideWidth+"px")},toggleControls:function(){var a=this.options.controlsClass;this.container.hasClass(a)?this.container.removeClass(a):this.container.addClass(a)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(a){return parseInt(a.getAttribute("data-index"),10)},getNestedProperty:function(a,b){return b.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(b,c,d,e,f){var g=f||c||d||e&&parseInt(e,10);b&&a&&(a=a[g])}),a},getDataProperty:function(b,c){if(b.getAttribute){var d=b.getAttribute("data-"+c.replace(/([A-Z])/g,"-$1").toLowerCase());if("string"==typeof d){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(d))try{return a.parseJSON(d)}catch(e){}return d}}},getItemProperty:function(a,b){var c=a[b];return void 0===c&&(c=this.getDataProperty(a,b),void 0===c&&(c=this.getNestedProperty(a,b))),c},initStartIndex:function(){var a,b=this.options.index,c=this.options.urlProperty;if(b&&"number"!=typeof b)for(a=0;a<this.num;a+=1)if(this.list[a]===b||this.getItemProperty(this.list[a],c)===this.getItemProperty(b,c)){b=a;break}this.index=this.circle(parseInt(b,10)||0)},initEventListeners:function(){var b=this,c=this.slidesContainer,d=function(a){var c=b.support.transition&&b.support.transition.end===a.type?"transitionend":a.type;b["on"+c](a)};a(window).on("resize",d),a(document.body).on("keydown",d),this.container.on("click",d),this.support.touch?c.on("touchstart touchmove touchend touchcancel",d):this.options.emulateTouchEvents&&this.support.transition&&c.on("mousedown mousemove mouseup mouseout",d),this.support.transition&&c.on(this.support.transition.end,d),this.proxyListener=d},destroyEventListeners:function(){var b=this.slidesContainer,c=this.proxyListener;a(window).off("resize",c),a(document.body).off("keydown",c),this.container.off("click",c),this.support.touch?b.off("touchstart touchmove touchend touchcancel",c):this.options.emulateTouchEvents&&this.support.transition&&b.off("mousedown mousemove mouseup mouseout",c),this.support.transition&&b.off(this.support.transition.end,c)},handleOpen:function(){this.options.onopened&&this.options.onopened.call(this)},initWidget:function(){var b=this,c=function(a){a.target===b.container[0]&&(b.container.off(b.support.transition.end,c),b.handleOpen())};return this.container=a(this.options.container),this.container.length?(this.slidesContainer=this.container.find(this.options.slidesContainer).first(),this.slidesContainer.length?(this.titleElement=this.container.find(this.options.titleElement).first(),1===this.num&&this.container.addClass(this.options.singleClass),this.options.onopen&&this.options.onopen.call(this),this.support.transition&&this.options.displayTransition?this.container.on(this.support.transition.end,c):this.handleOpen(),this.options.hidePageScrollbars&&(this.bodyOverflowStyle=document.body.style.overflow,document.body.style.overflow="hidden"),this.container[0].style.display="block",this.initSlides(),void this.container.addClass(this.options.displayClass)):(this.console.log("blueimp Gallery: Slides container not found.",this.options.slidesContainer),!1)):(this.console.log("blueimp Gallery: Widget container not found.",this.options.container),!1)},initOptions:function(b){this.options=a.extend({},this.options),(b&&b.carousel||this.options.carousel&&(!b||b.carousel!==!1))&&a.extend(this.options,this.carouselOptions),a.extend(this.options,b),this.num<3&&(this.options.continuous=this.options.continuous?null:!1),this.support.transition||(this.options.emulateTouchEvents=!1),this.options.event&&this.preventDefault(this.options.event)}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],a):a(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a.extend(b.prototype.options,{fullScreen:!1});var c=b.prototype.initialize,d=b.prototype.close;return a.extend(b.prototype,{getFullScreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullScreen:function(a){a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen&&a.msRequestFullscreen()},exitFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},initialize:function(){c.call(this),this.options.fullScreen&&!this.getFullScreenElement()&&this.requestFullScreen(this.container[0])},close:function(){this.getFullScreenElement()===this.container[0]&&this.exitFullScreen(),d.call(this)}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],a):a(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a.extend(b.prototype.options,{indicatorContainer:"ol",activeIndicatorClass:"active",thumbnailProperty:"thumbnail",thumbnailIndicators:!0});var c=b.prototype.initSlides,d=b.prototype.addSlide,e=b.prototype.resetSlides,f=b.prototype.handleClick,g=b.prototype.handleSlide,h=b.prototype.handleClose;return a.extend(b.prototype,{createIndicator:function(b){var c,d,e=this.indicatorPrototype.cloneNode(!1),f=this.getItemProperty(b,this.options.titleProperty),g=this.options.thumbnailProperty;return this.options.thumbnailIndicators&&(d=b.getElementsByTagName&&a(b).find("img")[0],d?c=d.src:g&&(c=this.getItemProperty(b,g)),c&&(e.style.backgroundImage='url("'+c+'")')),f&&(e.title=f),e},addIndicator:function(a){if(this.indicatorContainer.length){var b=this.createIndicator(this.list[a]);b.setAttribute("data-index",a),this.indicatorContainer[0].appendChild(b),this.indicators.push(b)}},setActiveIndicator:function(b){this.indicators&&(this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),this.activeIndicator=a(this.indicators[b]),this.activeIndicator.addClass(this.options.activeIndicatorClass))},initSlides:function(a){a||(this.indicatorContainer=this.container.find(this.options.indicatorContainer),this.indicatorContainer.length&&(this.indicatorPrototype=document.createElement("li"),this.indicators=this.indicatorContainer[0].children)),c.call(this,a)},addSlide:function(a){d.call(this,a),this.addIndicator(a)},resetSlides:function(){e.call(this),this.indicatorContainer.empty(),this.indicators=[]},handleClick:function(a){var b=a.target||a.srcElement,c=b.parentNode;if(c===this.indicatorContainer[0])this.preventDefault(a),this.slide(this.getNodeIndex(b));else{if(c.parentNode!==this.indicatorContainer[0])return f.call(this,a);this.preventDefault(a),this.slide(this.getNodeIndex(c))}},handleSlide:function(a){g.call(this,a),this.setActiveIndicator(a)},handleClose:function(){this.activeIndicator&&this.activeIndicator.removeClass(this.options.activeIndicatorClass),h.call(this)}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery"],a):a(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a.extend(b.prototype.options,{videoContentClass:"video-content",videoLoadingClass:"video-loading",videoPlayingClass:"video-playing",videoPosterProperty:"poster",videoSourcesProperty:"sources"});var c=b.prototype.handleSlide;return a.extend(b.prototype,{handleSlide:function(a){c.call(this,a),this.playingVideo&&this.playingVideo.pause()},videoFactory:function(b,c,d){var e,f,g,h,i,j=this,k=this.options,l=this.elementPrototype.cloneNode(!1),m=a(l),n=[{type:"error",target:l}],o=d||document.createElement("video"),p=this.getItemProperty(b,k.urlProperty),q=this.getItemProperty(b,k.typeProperty),r=this.getItemProperty(b,k.titleProperty),s=this.getItemProperty(b,k.videoPosterProperty),t=this.getItemProperty(b,k.videoSourcesProperty);if(m.addClass(k.videoContentClass),r&&(l.title=r),o.canPlayType)if(p&&q&&o.canPlayType(q))o.src=p;else for(;t&&t.length;)if(f=t.shift(),p=this.getItemProperty(f,k.urlProperty),q=this.getItemProperty(f,k.typeProperty),p&&q&&o.canPlayType(q)){o.src=p;break}return s&&(o.poster=s,e=this.imagePrototype.cloneNode(!1),a(e).addClass(k.toggleClass),e.src=s,e.draggable=!1,l.appendChild(e)),g=document.createElement("a"),g.setAttribute("target","_blank"),d||g.setAttribute("download",r),g.href=p,o.src&&(o.controls=!0,(d||a(o)).on("error",function(){j.setTimeout(c,n)}).on("pause",function(){h=!1,m.removeClass(j.options.videoLoadingClass).removeClass(j.options.videoPlayingClass),i&&j.container.addClass(j.options.controlsClass),delete j.playingVideo,j.interval&&j.play()}).on("playing",function(){h=!1,m.removeClass(j.options.videoLoadingClass).addClass(j.options.videoPlayingClass),j.container.hasClass(j.options.controlsClass)?(i=!0,j.container.removeClass(j.options.controlsClass)):i=!1}).on("play",function(){window.clearTimeout(j.timeout),h=!0,m.addClass(j.options.videoLoadingClass),j.playingVideo=o}),a(g).on("click",function(a){j.preventDefault(a),h?o.pause():o.play()}),l.appendChild(d&&d.element||o)),l.appendChild(g),this.setTimeout(c,[{type:"load",target:l}]),l}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],a):a(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";if(!window.postMessage)return b;a.extend(b.prototype.options,{vimeoVideoIdProperty:"vimeo",vimeoPlayerUrl:"//player.vimeo.com/video/VIDEO_ID?api=1&player_id=PLAYER_ID",vimeoPlayerIdPrefix:"vimeo-player-",vimeoClickToPlay:!0});var c=b.prototype.textFactory||b.prototype.imageFactory,d=function(a,b,c,d){this.url=a,this.videoId=b,this.playerId=c,this.clickToPlay=d,this.element=document.createElement("div"),this.listeners={}},e=0;return a.extend(d.prototype,{canPlayType:function(){return!0},on:function(a,b){return this.listeners[a]=b,this},loadAPI:function(){for(var b,c,d=this,e="//"+("https"===location.protocol?"secure-":"")+"a.vimeocdn.com/js/froogaloop2.min.js",f=document.getElementsByTagName("script"),g=f.length,h=function(){!c&&d.playOnReady&&d.play(),c=!0};g;)if(g-=1,f[g].src===e){b=f[g];break}b||(b=document.createElement("script"),b.src=e),a(b).on("load",h),f[0].parentNode.insertBefore(b,f[0]),/loaded|complete/.test(b.readyState)&&h()},onReady:function(){var a=this;this.ready=!0,this.player.addEvent("play",function(){a.hasPlayed=!0,a.onPlaying()}),this.player.addEvent("pause",function(){a.onPause()}),this.player.addEvent("finish",function(){a.onPause()}),this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){this.listeners.pause(),delete this.playStatus},insertIframe:function(){var a=document.createElement("iframe");a.src=this.url.replace("VIDEO_ID",this.videoId).replace("PLAYER_ID",this.playerId),a.id=this.playerId,this.element.parentNode.replaceChild(a,this.element),this.element=a},play:function(){var a=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.api("play"):(this.playOnReady=!0,window.$f?this.player||(this.insertIframe(),this.player=$f(this.element),this.player.addEvent("ready",function(){a.onReady()})):this.loadAPI())},pause:function(){this.ready?this.player.api("pause"):this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),a.extend(b.prototype,{VimeoPlayer:d,textFactory:function(a,b){var f=this.getItemProperty(a,this.options.vimeoVideoIdProperty);return f?(e+=1,this.videoFactory(a,b,new d(this.options.vimeoPlayerUrl,f,this.options.vimeoPlayerIdPrefix+e,this.options.vimeoClickToPlay))):c.call(this,a,b)}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper","./blueimp-gallery-video"],a):a(window.blueimp.helper||window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";if(!window.postMessage)return b;a.extend(b.prototype.options,{youTubeVideoIdProperty:"youtube",youTubePlayerVars:{wmode:"transparent"},youTubeClickToPlay:!0});var c=b.prototype.textFactory||b.prototype.imageFactory,d=function(a,b,c){this.videoId=a,this.playerVars=b,this.clickToPlay=c,this.element=document.createElement("div"),this.listeners={}};return a.extend(d.prototype,{canPlayType:function(){return!0},on:function(a,b){return this.listeners[a]=b,this},loadAPI:function(){var a,b=this,c=window.onYouTubeIframeAPIReady,d="//www.youtube.com/iframe_api",e=document.getElementsByTagName("script"),f=e.length;for(window.onYouTubeIframeAPIReady=function(){c&&c.apply(this),b.playOnReady&&b.play()};f;)if(f-=1,e[f].src===d)return;a=document.createElement("script"),a.src=d,e[0].parentNode.insertBefore(a,e[0])},onReady:function(){this.ready=!0,this.playOnReady&&this.play()},onPlaying:function(){this.playStatus<2&&(this.listeners.playing(),this.playStatus=2)},onPause:function(){b.prototype.setTimeout.call(this,this.checkSeek,null,2e3)},checkSeek:function(){(this.stateChange===YT.PlayerState.PAUSED||this.stateChange===YT.PlayerState.ENDED)&&(this.listeners.pause(),delete this.playStatus)},onStateChange:function(a){switch(a.data){case YT.PlayerState.PLAYING:this.hasPlayed=!0,this.onPlaying();break;case YT.PlayerState.PAUSED:case YT.PlayerState.ENDED:this.onPause()}this.stateChange=a.data},onError:function(a){this.listeners.error(a)},play:function(){var a=this;this.playStatus||(this.listeners.play(),this.playStatus=1),this.ready?!this.hasPlayed&&(this.clickToPlay||window.navigator&&/iP(hone|od|ad)/.test(window.navigator.platform))?this.onPlaying():this.player.playVideo():(this.playOnReady=!0,window.YT&&YT.Player?this.player||(this.player=new YT.Player(this.element,{videoId:this.videoId,playerVars:this.playerVars,events:{onReady:function(){a.onReady()},onStateChange:function(b){a.onStateChange(b)},onError:function(b){a.onError(b)}}})):this.loadAPI())},pause:function(){this.ready?this.player.pauseVideo():this.playStatus&&(delete this.playOnReady,this.listeners.pause(),delete this.playStatus)}}),a.extend(b.prototype,{YouTubePlayer:d,textFactory:function(a,b){var e=this.getItemProperty(a,this.options.youTubeVideoIdProperty);return e?this.videoFactory(a,b,new d(e,this.options.youTubePlayerVars,this.options.youTubeClickToPlay)):c.call(this,a,b)}}),b}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","./blueimp-gallery"],a):a(window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a(document).on("click","[data-gallery]",function(c){var d=a(this).data("gallery"),e=a(d),f=e.length&&e||a(b.prototype.options.container),g={onopen:function(){f.data("gallery",this).trigger("open")},onopened:function(){f.trigger("opened")},onslide:function(){f.trigger("slide",arguments)},onslideend:function(){f.trigger("slideend",arguments)},onslidecomplete:function(){f.trigger("slidecomplete",arguments)},onclose:function(){f.trigger("close")},onclosed:function(){f.trigger("closed").removeData("gallery")}},h=a.extend(f.data(),{container:f[0],index:this,event:c},g),i=a('[data-gallery="'+d+'"]');return h.filter&&(i=i.filter(h.filter)),new b(i,h)})});
@@ -0,0 +1,429 @@
1
+ /*
2
+ * jQuery File Upload AngularJS Plugin 2.2.0
3
+ * https://github.com/blueimp/jQuery-File-Upload
4
+ *
5
+ * Copyright 2013, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+ /* jshint nomen:false */
13
+ /* global define, angular */
14
+
15
+ (function (factory) {
16
+ 'use strict';
17
+ if (typeof define === 'function' && define.amd) {
18
+ // Register as an anonymous AMD module:
19
+ define([
20
+ 'jquery',
21
+ 'angular',
22
+ './jquery.fileupload-image',
23
+ './jquery.fileupload-audio',
24
+ './jquery.fileupload-video',
25
+ './jquery.fileupload-validate'
26
+ ], factory);
27
+ } else {
28
+ factory();
29
+ }
30
+ }(function () {
31
+ 'use strict';
32
+
33
+ angular.module('blueimp.fileupload', [])
34
+
35
+ // The fileUpload service provides configuration options
36
+ // for the fileUpload directive and default handlers for
37
+ // File Upload events:
38
+ .provider('fileUpload', function () {
39
+ var scopeEvalAsync = function (expression) {
40
+ var scope = angular.element(this)
41
+ .fileupload('option', 'scope');
42
+ // Schedule a new $digest cycle if not already inside of one
43
+ // and evaluate the given expression:
44
+ scope.$evalAsync(expression);
45
+ },
46
+ addFileMethods = function (scope, data) {
47
+ var files = data.files,
48
+ file = files[0];
49
+ angular.forEach(files, function (file, index) {
50
+ file._index = index;
51
+ file.$state = function () {
52
+ return data.state();
53
+ };
54
+ file.$processing = function () {
55
+ return data.processing();
56
+ };
57
+ file.$progress = function () {
58
+ return data.progress();
59
+ };
60
+ file.$response = function () {
61
+ return data.response();
62
+ };
63
+ });
64
+ file.$submit = function () {
65
+ if (!file.error) {
66
+ return data.submit();
67
+ }
68
+ };
69
+ file.$cancel = function () {
70
+ return data.abort();
71
+ };
72
+ },
73
+ $config;
74
+ $config = this.defaults = {
75
+ handleResponse: function (e, data) {
76
+ var files = data.result && data.result.files;
77
+ if (files) {
78
+ data.scope.replace(data.files, files);
79
+ } else if (data.errorThrown ||
80
+ data.textStatus === 'error') {
81
+ data.files[0].error = data.errorThrown ||
82
+ data.textStatus;
83
+ }
84
+ },
85
+ add: function (e, data) {
86
+ if (e.isDefaultPrevented()) {
87
+ return false;
88
+ }
89
+ var scope = data.scope,
90
+ filesCopy = [];
91
+ angular.forEach(data.files, function (file) {
92
+ filesCopy.push(file);
93
+ });
94
+ scope.$apply(function () {
95
+ addFileMethods(scope, data);
96
+ var method = scope.option('prependFiles') ?
97
+ 'unshift' : 'push';
98
+ Array.prototype[method].apply(scope.queue, data.files);
99
+ });
100
+ data.process(function () {
101
+ return scope.process(data);
102
+ }).always(function () {
103
+ scope.$apply(function () {
104
+ addFileMethods(scope, data);
105
+ scope.replace(filesCopy, data.files);
106
+ });
107
+ }).then(function () {
108
+ if ((scope.option('autoUpload') ||
109
+ data.autoUpload) &&
110
+ data.autoUpload !== false) {
111
+ data.submit();
112
+ }
113
+ });
114
+ },
115
+ progress: function (e, data) {
116
+ if (e.isDefaultPrevented()) {
117
+ return false;
118
+ }
119
+ data.scope.$apply();
120
+ },
121
+ done: function (e, data) {
122
+ if (e.isDefaultPrevented()) {
123
+ return false;
124
+ }
125
+ var that = this;
126
+ data.scope.$apply(function () {
127
+ data.handleResponse.call(that, e, data);
128
+ });
129
+ },
130
+ fail: function (e, data) {
131
+ if (e.isDefaultPrevented()) {
132
+ return false;
133
+ }
134
+ var that = this,
135
+ scope = data.scope;
136
+ if (data.errorThrown === 'abort') {
137
+ scope.clear(data.files);
138
+ return;
139
+ }
140
+ scope.$apply(function () {
141
+ data.handleResponse.call(that, e, data);
142
+ });
143
+ },
144
+ stop: scopeEvalAsync,
145
+ processstart: scopeEvalAsync,
146
+ processstop: scopeEvalAsync,
147
+ getNumberOfFiles: function () {
148
+ var scope = this.scope;
149
+ return scope.queue.length - scope.processing();
150
+ },
151
+ dataType: 'json',
152
+ autoUpload: false
153
+ };
154
+ this.$get = [
155
+ function () {
156
+ return {
157
+ defaults: $config
158
+ };
159
+ }
160
+ ];
161
+ })
162
+
163
+ // Format byte numbers to readable presentations:
164
+ .provider('formatFileSizeFilter', function () {
165
+ var $config = {
166
+ // Byte units following the IEC format
167
+ // http://en.wikipedia.org/wiki/Kilobyte
168
+ units: [
169
+ {size: 1000000000, suffix: ' GB'},
170
+ {size: 1000000, suffix: ' MB'},
171
+ {size: 1000, suffix: ' KB'}
172
+ ]
173
+ };
174
+ this.defaults = $config;
175
+ this.$get = function () {
176
+ return function (bytes) {
177
+ if (!angular.isNumber(bytes)) {
178
+ return '';
179
+ }
180
+ var unit = true,
181
+ i = 0,
182
+ prefix,
183
+ suffix;
184
+ while (unit) {
185
+ unit = $config.units[i];
186
+ prefix = unit.prefix || '';
187
+ suffix = unit.suffix || '';
188
+ if (i === $config.units.length - 1 || bytes >= unit.size) {
189
+ return prefix + (bytes / unit.size).toFixed(2) + suffix;
190
+ }
191
+ i += 1;
192
+ }
193
+ };
194
+ };
195
+ })
196
+
197
+ // The FileUploadController initializes the fileupload widget and
198
+ // provides scope methods to control the File Upload functionality:
199
+ .controller('FileUploadController', [
200
+ '$scope', '$element', '$attrs', '$window', 'fileUpload',
201
+ function ($scope, $element, $attrs, $window, fileUpload) {
202
+ var uploadMethods = {
203
+ progress: function () {
204
+ return $element.fileupload('progress');
205
+ },
206
+ active: function () {
207
+ return $element.fileupload('active');
208
+ },
209
+ option: function (option, data) {
210
+ if (arguments.length === 1) {
211
+ return $element.fileupload('option', option);
212
+ }
213
+ $element.fileupload('option', option, data);
214
+ },
215
+ add: function (data) {
216
+ return $element.fileupload('add', data);
217
+ },
218
+ send: function (data) {
219
+ return $element.fileupload('send', data);
220
+ },
221
+ process: function (data) {
222
+ return $element.fileupload('process', data);
223
+ },
224
+ processing: function (data) {
225
+ return $element.fileupload('processing', data);
226
+ }
227
+ };
228
+ $scope.disabled = !$window.jQuery.support.fileInput;
229
+ $scope.queue = $scope.queue || [];
230
+ $scope.clear = function (files) {
231
+ var queue = this.queue,
232
+ i = queue.length,
233
+ file = files,
234
+ length = 1;
235
+ if (angular.isArray(files)) {
236
+ file = files[0];
237
+ length = files.length;
238
+ }
239
+ while (i) {
240
+ i -= 1;
241
+ if (queue[i] === file) {
242
+ return queue.splice(i, length);
243
+ }
244
+ }
245
+ };
246
+ $scope.replace = function (oldFiles, newFiles) {
247
+ var queue = this.queue,
248
+ file = oldFiles[0],
249
+ i,
250
+ j;
251
+ for (i = 0; i < queue.length; i += 1) {
252
+ if (queue[i] === file) {
253
+ for (j = 0; j < newFiles.length; j += 1) {
254
+ queue[i + j] = newFiles[j];
255
+ }
256
+ return;
257
+ }
258
+ }
259
+ };
260
+ $scope.applyOnQueue = function (method) {
261
+ var list = this.queue.slice(0),
262
+ i,
263
+ file;
264
+ for (i = 0; i < list.length; i += 1) {
265
+ file = list[i];
266
+ if (file[method]) {
267
+ file[method]();
268
+ }
269
+ }
270
+ };
271
+ $scope.submit = function () {
272
+ this.applyOnQueue('$submit');
273
+ };
274
+ $scope.cancel = function () {
275
+ this.applyOnQueue('$cancel');
276
+ };
277
+ // Add upload methods to the scope:
278
+ angular.extend($scope, uploadMethods);
279
+ // The fileupload widget will initialize with
280
+ // the options provided via "data-"-parameters,
281
+ // as well as those given via options object:
282
+ $element.fileupload(angular.extend(
283
+ {scope: $scope},
284
+ fileUpload.defaults
285
+ )).on('fileuploadadd', function (e, data) {
286
+ data.scope = $scope;
287
+ }).on('fileuploadfail', function (e, data) {
288
+ if (data.errorThrown === 'abort') {
289
+ return;
290
+ }
291
+ if (data.dataType &&
292
+ data.dataType.indexOf('json') === data.dataType.length - 4) {
293
+ try {
294
+ data.result = angular.fromJson(data.jqXHR.responseText);
295
+ } catch (ignore) {}
296
+ }
297
+ }).on([
298
+ 'fileuploadadd',
299
+ 'fileuploadsubmit',
300
+ 'fileuploadsend',
301
+ 'fileuploaddone',
302
+ 'fileuploadfail',
303
+ 'fileuploadalways',
304
+ 'fileuploadprogress',
305
+ 'fileuploadprogressall',
306
+ 'fileuploadstart',
307
+ 'fileuploadstop',
308
+ 'fileuploadchange',
309
+ 'fileuploadpaste',
310
+ 'fileuploaddrop',
311
+ 'fileuploaddragover',
312
+ 'fileuploadchunksend',
313
+ 'fileuploadchunkdone',
314
+ 'fileuploadchunkfail',
315
+ 'fileuploadchunkalways',
316
+ 'fileuploadprocessstart',
317
+ 'fileuploadprocess',
318
+ 'fileuploadprocessdone',
319
+ 'fileuploadprocessfail',
320
+ 'fileuploadprocessalways',
321
+ 'fileuploadprocessstop'
322
+ ].join(' '), function (e, data) {
323
+ if ($scope.$emit(e.type, data).defaultPrevented) {
324
+ e.preventDefault();
325
+ }
326
+ }).on('remove', function () {
327
+ // Remove upload methods from the scope,
328
+ // when the widget is removed:
329
+ var method;
330
+ for (method in uploadMethods) {
331
+ if (uploadMethods.hasOwnProperty(method)) {
332
+ delete $scope[method];
333
+ }
334
+ }
335
+ });
336
+ // Observe option changes:
337
+ $scope.$watch(
338
+ $attrs.fileUpload,
339
+ function (newOptions) {
340
+ if (newOptions) {
341
+ $element.fileupload('option', newOptions);
342
+ }
343
+ }
344
+ );
345
+ }
346
+ ])
347
+
348
+ // Provide File Upload progress feedback:
349
+ .controller('FileUploadProgressController', [
350
+ '$scope', '$attrs', '$parse',
351
+ function ($scope, $attrs, $parse) {
352
+ var fn = $parse($attrs.fileUploadProgress),
353
+ update = function () {
354
+ var progress = fn($scope);
355
+ if (!progress || !progress.total) {
356
+ return;
357
+ }
358
+ $scope.num = Math.floor(
359
+ progress.loaded / progress.total * 100
360
+ );
361
+ };
362
+ update();
363
+ $scope.$watch(
364
+ $attrs.fileUploadProgress + '.loaded',
365
+ function (newValue, oldValue) {
366
+ if (newValue !== oldValue) {
367
+ update();
368
+ }
369
+ }
370
+ );
371
+ }
372
+ ])
373
+
374
+ // Display File Upload previews:
375
+ .controller('FileUploadPreviewController', [
376
+ '$scope', '$element', '$attrs',
377
+ function ($scope, $element, $attrs) {
378
+ $scope.$watch(
379
+ $attrs.fileUploadPreview + '.preview',
380
+ function (preview) {
381
+ $element.empty();
382
+ if (preview) {
383
+ $element.append(preview);
384
+ }
385
+ }
386
+ );
387
+ }
388
+ ])
389
+
390
+ .directive('fileUpload', function () {
391
+ return {
392
+ controller: 'FileUploadController',
393
+ scope: true
394
+ };
395
+ })
396
+
397
+ .directive('fileUploadProgress', function () {
398
+ return {
399
+ controller: 'FileUploadProgressController',
400
+ scope: true
401
+ };
402
+ })
403
+
404
+ .directive('fileUploadPreview', function () {
405
+ return {
406
+ controller: 'FileUploadPreviewController'
407
+ };
408
+ })
409
+
410
+ // Enhance the HTML5 download attribute to
411
+ // allow drag&drop of files to the desktop:
412
+ .directive('download', function () {
413
+ return function (scope, elm) {
414
+ elm.on('dragstart', function (e) {
415
+ try {
416
+ e.originalEvent.dataTransfer.setData(
417
+ 'DownloadURL',
418
+ [
419
+ 'application/octet-stream',
420
+ elm.prop('download'),
421
+ elm.prop('href')
422
+ ].join(':')
423
+ );
424
+ } catch (ignore) {}
425
+ });
426
+ };
427
+ });
428
+
429
+ }));