workarea-admin 3.4.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1331) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +52 -0
  3. data/README.md +19 -0
  4. data/Rakefile +23 -0
  5. data/app/assets/fonts/workarea/admin/spark_dotline_medium.woff +0 -0
  6. data/app/assets/fonts/workarea/admin/spark_dotline_medium.woff2 +0 -0
  7. data/app/assets/images/workarea/admin/add.svg +1 -0
  8. data/app/assets/images/workarea/admin/complete.svg +1 -0
  9. data/app/assets/images/workarea/admin/content_block_types/button.svg +1 -0
  10. data/app/assets/images/workarea/admin/content_block_types/category_summary.svg +1 -0
  11. data/app/assets/images/workarea/admin/content_block_types/custom_block.svg +1 -0
  12. data/app/assets/images/workarea/admin/content_block_types/divider.svg +1 -0
  13. data/app/assets/images/workarea/admin/content_block_types/hero.svg +1 -0
  14. data/app/assets/images/workarea/admin/content_block_types/html.svg +1 -0
  15. data/app/assets/images/workarea/admin/content_block_types/image.svg +1 -0
  16. data/app/assets/images/workarea/admin/content_block_types/image_and_text.svg +1 -0
  17. data/app/assets/images/workarea/admin/content_block_types/image_group.svg +1 -0
  18. data/app/assets/images/workarea/admin/content_block_types/product_insights.svg +1 -0
  19. data/app/assets/images/workarea/admin/content_block_types/product_list.svg +1 -0
  20. data/app/assets/images/workarea/admin/content_block_types/quote.svg +1 -0
  21. data/app/assets/images/workarea/admin/content_block_types/recommendations.svg +1 -0
  22. data/app/assets/images/workarea/admin/content_block_types/social_networks.svg +1 -0
  23. data/app/assets/images/workarea/admin/content_block_types/taxonomy.svg +1 -0
  24. data/app/assets/images/workarea/admin/content_block_types/text.svg +1 -0
  25. data/app/assets/images/workarea/admin/content_block_types/three_column_taxonomy.svg +1 -0
  26. data/app/assets/images/workarea/admin/content_block_types/two_column_taxonomy.svg +1 -0
  27. data/app/assets/images/workarea/admin/content_block_types/video.svg +1 -0
  28. data/app/assets/images/workarea/admin/content_block_types/video_and_text.svg +1 -0
  29. data/app/assets/images/workarea/admin/default_card.svg +1 -0
  30. data/app/assets/images/workarea/admin/favicon.ico +0 -0
  31. data/app/assets/images/workarea/admin/i18n.svg +1 -0
  32. data/app/assets/images/workarea/admin/icons/add.svg +1 -0
  33. data/app/assets/images/workarea/admin/icons/add_circle.svg +1 -0
  34. data/app/assets/images/workarea/admin/icons/alert.svg +1 -0
  35. data/app/assets/images/workarea/admin/icons/apple_calendar.svg +1 -0
  36. data/app/assets/images/workarea/admin/icons/arrow_down.svg +1 -0
  37. data/app/assets/images/workarea/admin/icons/arrow_up.svg +1 -0
  38. data/app/assets/images/workarea/admin/icons/asset.svg +1 -0
  39. data/app/assets/images/workarea/admin/icons/attributes.svg +1 -0
  40. data/app/assets/images/workarea/admin/icons/calendar.svg +1 -0
  41. data/app/assets/images/workarea/admin/icons/categories.svg +1 -0
  42. data/app/assets/images/workarea/admin/icons/category.svg +1 -0
  43. data/app/assets/images/workarea/admin/icons/clock.svg +1 -0
  44. data/app/assets/images/workarea/admin/icons/close.svg +1 -0
  45. data/app/assets/images/workarea/admin/icons/comment.svg +1 -0
  46. data/app/assets/images/workarea/admin/icons/comments.svg +1 -0
  47. data/app/assets/images/workarea/admin/icons/comments_viewed.svg +1 -0
  48. data/app/assets/images/workarea/admin/icons/content.svg +1 -0
  49. data/app/assets/images/workarea/admin/icons/create_preset.svg +1 -0
  50. data/app/assets/images/workarea/admin/icons/delete.svg +1 -0
  51. data/app/assets/images/workarea/admin/icons/edit.svg +1 -0
  52. data/app/assets/images/workarea/admin/icons/expand_more.svg +1 -0
  53. data/app/assets/images/workarea/admin/icons/favicon.svg +1 -0
  54. data/app/assets/images/workarea/admin/icons/featured_products.svg +1 -0
  55. data/app/assets/images/workarea/admin/icons/fire.svg +1 -0
  56. data/app/assets/images/workarea/admin/icons/fulfillment.svg +1 -0
  57. data/app/assets/images/workarea/admin/icons/google_calendar.svg +1 -0
  58. data/app/assets/images/workarea/admin/icons/grip.svg +1 -0
  59. data/app/assets/images/workarea/admin/icons/help.svg +1 -0
  60. data/app/assets/images/workarea/admin/icons/home.svg +1 -0
  61. data/app/assets/images/workarea/admin/icons/images.svg +1 -0
  62. data/app/assets/images/workarea/admin/icons/impersonation.svg +1 -0
  63. data/app/assets/images/workarea/admin/icons/imports.svg +1 -0
  64. data/app/assets/images/workarea/admin/icons/insights.svg +1 -0
  65. data/app/assets/images/workarea/admin/icons/inventory_sku.svg +1 -0
  66. data/app/assets/images/workarea/admin/icons/items.svg +1 -0
  67. data/app/assets/images/workarea/admin/icons/link.svg +1 -0
  68. data/app/assets/images/workarea/admin/icons/medium.svg +1 -0
  69. data/app/assets/images/workarea/admin/icons/menu.svg +1 -0
  70. data/app/assets/images/workarea/admin/icons/navigate_before.svg +1 -0
  71. data/app/assets/images/workarea/admin/icons/navigate_next.svg +1 -0
  72. data/app/assets/images/workarea/admin/icons/navigation_menu.svg +1 -0
  73. data/app/assets/images/workarea/admin/icons/order.svg +1 -0
  74. data/app/assets/images/workarea/admin/icons/order_statistics.svg +1 -0
  75. data/app/assets/images/workarea/admin/icons/orders.svg +1 -0
  76. data/app/assets/images/workarea/admin/icons/original.svg +1 -0
  77. data/app/assets/images/workarea/admin/icons/outlook.svg +1 -0
  78. data/app/assets/images/workarea/admin/icons/page.svg +1 -0
  79. data/app/assets/images/workarea/admin/icons/pages.svg +1 -0
  80. data/app/assets/images/workarea/admin/icons/payment.svg +1 -0
  81. data/app/assets/images/workarea/admin/icons/payment_transaction.svg +1 -0
  82. data/app/assets/images/workarea/admin/icons/permissions.svg +1 -0
  83. data/app/assets/images/workarea/admin/icons/plan_changes.svg +1 -0
  84. data/app/assets/images/workarea/admin/icons/planned_changes.svg +1 -0
  85. data/app/assets/images/workarea/admin/icons/prices.svg +1 -0
  86. data/app/assets/images/workarea/admin/icons/pricing.svg +1 -0
  87. data/app/assets/images/workarea/admin/icons/pricing_discount.svg +1 -0
  88. data/app/assets/images/workarea/admin/icons/pricing_sku.svg +1 -0
  89. data/app/assets/images/workarea/admin/icons/products.svg +1 -0
  90. data/app/assets/images/workarea/admin/icons/rates.svg +1 -0
  91. data/app/assets/images/workarea/admin/icons/recommendations.svg +1 -0
  92. data/app/assets/images/workarea/admin/icons/refresh.svg +1 -0
  93. data/app/assets/images/workarea/admin/icons/release.svg +1 -0
  94. data/app/assets/images/workarea/admin/icons/release_timeline.svg +1 -0
  95. data/app/assets/images/workarea/admin/icons/rules.svg +1 -0
  96. data/app/assets/images/workarea/admin/icons/saved_addresses.svg +1 -0
  97. data/app/assets/images/workarea/admin/icons/search.svg +1 -0
  98. data/app/assets/images/workarea/admin/icons/settings.svg +1 -0
  99. data/app/assets/images/workarea/admin/icons/shipping.svg +1 -0
  100. data/app/assets/images/workarea/admin/icons/small.svg +1 -0
  101. data/app/assets/images/workarea/admin/icons/star.svg +1 -0
  102. data/app/assets/images/workarea/admin/icons/timeline.svg +1 -0
  103. data/app/assets/images/workarea/admin/icons/tmp.svg +1 -0
  104. data/app/assets/images/workarea/admin/icons/user.svg +1 -0
  105. data/app/assets/images/workarea/admin/icons/variants.svg +1 -0
  106. data/app/assets/images/workarea/admin/icons/view.svg +1 -0
  107. data/app/assets/images/workarea/admin/icons/wide.svg +1 -0
  108. data/app/assets/images/workarea/admin/icons/wysiwyg/bold.svg +1 -0
  109. data/app/assets/images/workarea/admin/icons/wysiwyg/bulleted_list.svg +1 -0
  110. data/app/assets/images/workarea/admin/icons/wysiwyg/html.svg +1 -0
  111. data/app/assets/images/workarea/admin/icons/wysiwyg/italic.svg +1 -0
  112. data/app/assets/images/workarea/admin/icons/wysiwyg/link.svg +1 -0
  113. data/app/assets/images/workarea/admin/icons/wysiwyg/numbered_list.svg +1 -0
  114. data/app/assets/images/workarea/admin/icons/wysiwyg/underline.svg +1 -0
  115. data/app/assets/images/workarea/admin/invalid.svg +1 -0
  116. data/app/assets/images/workarea/admin/logo.svg +1 -0
  117. data/app/assets/images/workarea/admin/message_error.svg +1 -0
  118. data/app/assets/images/workarea/admin/message_info.svg +1 -0
  119. data/app/assets/images/workarea/admin/message_success.svg +1 -0
  120. data/app/assets/images/workarea/admin/message_warning.svg +1 -0
  121. data/app/assets/images/workarea/admin/payment_icons/american_express.svg +1 -0
  122. data/app/assets/images/workarea/admin/payment_icons/diner_s_club.svg +1 -0
  123. data/app/assets/images/workarea/admin/payment_icons/discover.svg +1 -0
  124. data/app/assets/images/workarea/admin/payment_icons/mastercard.svg +1 -0
  125. data/app/assets/images/workarea/admin/payment_icons/visa.svg +1 -0
  126. data/app/assets/images/workarea/admin/selected.svg +1 -0
  127. data/app/assets/images/workarea/admin/valid.svg +1 -0
  128. data/app/assets/javascripts/jquery_ui/admin/categorized_autocomplete.js +53 -0
  129. data/app/assets/javascripts/jquery_ujs/replace.js +15 -0
  130. data/app/assets/javascripts/workarea/admin/application.js.erb +235 -0
  131. data/app/assets/javascripts/workarea/admin/config.js.erb +700 -0
  132. data/app/assets/javascripts/workarea/admin/google_analytics.js +6 -0
  133. data/app/assets/javascripts/workarea/admin/modules/add_content_block_buttons.js +71 -0
  134. data/app/assets/javascripts/workarea/admin/modules/add_to_calendar_buttons.js +45 -0
  135. data/app/assets/javascripts/workarea/admin/modules/asset_picker_fields.js +51 -0
  136. data/app/assets/javascripts/workarea/admin/modules/asset_pickers.js +65 -0
  137. data/app/assets/javascripts/workarea/admin/modules/autocomplete_fields.js +55 -0
  138. data/app/assets/javascripts/workarea/admin/modules/bookmarks.js +40 -0
  139. data/app/assets/javascripts/workarea/admin/modules/bulk_action_deletion.js +43 -0
  140. data/app/assets/javascripts/workarea/admin/modules/bulk_action_items.js +319 -0
  141. data/app/assets/javascripts/workarea/admin/modules/calendars.js +130 -0
  142. data/app/assets/javascripts/workarea/admin/modules/categorized_autocomplete_fields.js +58 -0
  143. data/app/assets/javascripts/workarea/admin/modules/cloneable_rows.js +58 -0
  144. data/app/assets/javascripts/workarea/admin/modules/content_block_list.js +70 -0
  145. data/app/assets/javascripts/workarea/admin/modules/content_blocks.js +248 -0
  146. data/app/assets/javascripts/workarea/admin/modules/content_editor.js +44 -0
  147. data/app/assets/javascripts/workarea/admin/modules/content_editor_form_cancel.js +29 -0
  148. data/app/assets/javascripts/workarea/admin/modules/content_editor_forms.js +58 -0
  149. data/app/assets/javascripts/workarea/admin/modules/content_preset_form.js +29 -0
  150. data/app/assets/javascripts/workarea/admin/modules/content_preview.js +86 -0
  151. data/app/assets/javascripts/workarea/admin/modules/dashboard_charts.js +182 -0
  152. data/app/assets/javascripts/workarea/admin/modules/dashboard_toggles.js +59 -0
  153. data/app/assets/javascripts/workarea/admin/modules/datepicker_fields.js +113 -0
  154. data/app/assets/javascripts/workarea/admin/modules/datetimepicker_fields.js +160 -0
  155. data/app/assets/javascripts/workarea/admin/modules/direct_uploads.js +329 -0
  156. data/app/assets/javascripts/workarea/admin/modules/disable_publish_now.js +80 -0
  157. data/app/assets/javascripts/workarea/admin/modules/discount_options_menus.js +115 -0
  158. data/app/assets/javascripts/workarea/admin/modules/dom_remove.js +30 -0
  159. data/app/assets/javascripts/workarea/admin/modules/expandables.js +70 -0
  160. data/app/assets/javascripts/workarea/admin/modules/featured_products_sort.js +28 -0
  161. data/app/assets/javascripts/workarea/admin/modules/filter_dropdowns.js +88 -0
  162. data/app/assets/javascripts/workarea/admin/modules/help_helper.js +127 -0
  163. data/app/assets/javascripts/workarea/admin/modules/help_lookup_buttons.js +66 -0
  164. data/app/assets/javascripts/workarea/admin/modules/live_search_text.js +49 -0
  165. data/app/assets/javascripts/workarea/admin/modules/menu_editor_links.js +69 -0
  166. data/app/assets/javascripts/workarea/admin/modules/menu_editor_menu_list_sortables.js +107 -0
  167. data/app/assets/javascripts/workarea/admin/modules/menu_editor_sort_by_menus.js +48 -0
  168. data/app/assets/javascripts/workarea/admin/modules/messages.js +187 -0
  169. data/app/assets/javascripts/workarea/admin/modules/new_navigation_taxons.js +58 -0
  170. data/app/assets/javascripts/workarea/admin/modules/pricing_overrides.js +36 -0
  171. data/app/assets/javascripts/workarea/admin/modules/primary_nav.js +37 -0
  172. data/app/assets/javascripts/workarea/admin/modules/product_copy_ids.js +47 -0
  173. data/app/assets/javascripts/workarea/admin/modules/product_images_sortables.js +59 -0
  174. data/app/assets/javascripts/workarea/admin/modules/product_rules_preview.js +51 -0
  175. data/app/assets/javascripts/workarea/admin/modules/property_toggles.js +88 -0
  176. data/app/assets/javascripts/workarea/admin/modules/publish_create_release.js +40 -0
  177. data/app/assets/javascripts/workarea/admin/modules/publish_with_release_menus.js +132 -0
  178. data/app/assets/javascripts/workarea/admin/modules/range_fields.js +35 -0
  179. data/app/assets/javascripts/workarea/admin/modules/recommendations_sortables.js +20 -0
  180. data/app/assets/javascripts/workarea/admin/modules/releasable_model_search_forms.js +42 -0
  181. data/app/assets/javascripts/workarea/admin/modules/release_calendar_placeholders.js +83 -0
  182. data/app/assets/javascripts/workarea/admin/modules/release_reminder.js +93 -0
  183. data/app/assets/javascripts/workarea/admin/modules/relevance_sort.js +30 -0
  184. data/app/assets/javascripts/workarea/admin/modules/remote_selects.js +116 -0
  185. data/app/assets/javascripts/workarea/admin/modules/sort_navigation_menus.js +44 -0
  186. data/app/assets/javascripts/workarea/admin/modules/sort_variants.js +67 -0
  187. data/app/assets/javascripts/workarea/admin/modules/tabs.js +66 -0
  188. data/app/assets/javascripts/workarea/admin/modules/takeover.js +154 -0
  189. data/app/assets/javascripts/workarea/admin/modules/taxon_insert.js +96 -0
  190. data/app/assets/javascripts/workarea/admin/modules/taxon_select.js +50 -0
  191. data/app/assets/javascripts/workarea/admin/modules/toggle_buttons.js +50 -0
  192. data/app/assets/javascripts/workarea/admin/modules/toggle_filters.js +43 -0
  193. data/app/assets/javascripts/workarea/admin/modules/tooltips.js +128 -0
  194. data/app/assets/javascripts/workarea/admin/modules/unsaved_changes.js +56 -0
  195. data/app/assets/javascripts/workarea/admin/modules/wysiwygs.js +87 -0
  196. data/app/assets/javascripts/workarea/admin/routes.js.erb +27 -0
  197. data/app/assets/javascripts/workarea/admin/templates/bookmark_form.jst.ejs +5 -0
  198. data/app/assets/javascripts/workarea/admin/templates/bulk_action_items_count.jst.ejs +4 -0
  199. data/app/assets/javascripts/workarea/admin/templates/chart_legend.jst.ejs +9 -0
  200. data/app/assets/javascripts/workarea/admin/templates/checkbox_with_label.jst.ejs +2 -0
  201. data/app/assets/javascripts/workarea/admin/templates/content_block_iframe.jst.ejs +2 -0
  202. data/app/assets/javascripts/workarea/admin/templates/datetime_picker.jst.ejs +37 -0
  203. data/app/assets/javascripts/workarea/admin/templates/direct_upload_processing.jst.ejs +25 -0
  204. data/app/assets/javascripts/workarea/admin/templates/direct_upload_table_row.jst.ejs +10 -0
  205. data/app/assets/javascripts/workarea/admin/templates/expandable_button.jst.ejs +4 -0
  206. data/app/assets/javascripts/workarea/admin/templates/help_helper.jst.ejs +97 -0
  207. data/app/assets/javascripts/workarea/admin/templates/help_helper_text.jst.ejs +6 -0
  208. data/app/assets/javascripts/workarea/admin/templates/inactive_blocks_toggle.jst.ejs +1 -0
  209. data/app/assets/javascripts/workarea/admin/templates/inline_datepicker.jst.ejs +1 -0
  210. data/app/assets/javascripts/workarea/admin/templates/loading.jst.ejs +1 -0
  211. data/app/assets/javascripts/workarea/admin/templates/message.jst.ejs +10 -0
  212. data/app/assets/javascripts/workarea/admin/templates/message_dismiss_action.jst.ejs +5 -0
  213. data/app/assets/javascripts/workarea/admin/templates/new_release_option.jst.ejs +1 -0
  214. data/app/assets/javascripts/workarea/admin/templates/release_select_form.jst.ejs +5 -0
  215. data/app/assets/javascripts/workarea/admin/templates/remote_select.jst.ejs +1 -0
  216. data/app/assets/javascripts/workarea/admin/templates/remote_select_insight.jst.ejs.ruby +25 -0
  217. data/app/assets/javascripts/workarea/admin/templates/remote_select_sparkline.jst.ejs +8 -0
  218. data/app/assets/javascripts/workarea/admin/templates/tabs_menu.jst.ejs +7 -0
  219. data/app/assets/javascripts/workarea/admin/templates/takeover.jst.ejs +3 -0
  220. data/app/assets/javascripts/workarea/admin/templates/ui_menu_heading.jst.ejs +1 -0
  221. data/app/assets/javascripts/workarea/admin/templates/ui_menu_item.jst.ejs +8 -0
  222. data/app/assets/javascripts/workarea/admin/templates/wysiwyg_toolbar.jst.ejs.ruby +59 -0
  223. data/app/assets/stylesheets/dropzonejs/admin/_dropzone.scss +126 -0
  224. data/app/assets/stylesheets/jquery_select2/admin/theme/_workarea.scss +413 -0
  225. data/app/assets/stylesheets/jquery_ui/admin/_ui_accordion.scss +11 -0
  226. data/app/assets/stylesheets/jquery_ui/admin/_ui_accordion_content.scss +12 -0
  227. data/app/assets/stylesheets/jquery_ui/admin/_ui_accordion_header.scss +37 -0
  228. data/app/assets/stylesheets/jquery_ui/admin/_ui_autocomplete.scss +17 -0
  229. data/app/assets/stylesheets/jquery_ui/admin/_ui_datepicker.scss +158 -0
  230. data/app/assets/stylesheets/jquery_ui/admin/_ui_helper_hidden_accessible.scss +7 -0
  231. data/app/assets/stylesheets/jquery_ui/admin/_ui_menu.scss +44 -0
  232. data/app/assets/stylesheets/jquery_ui/admin/_ui_sortable.scss +9 -0
  233. data/app/assets/stylesheets/jquery_ui/admin/_ui_state_focus.scss +14 -0
  234. data/app/assets/stylesheets/jquery_ui/admin/_ui_tabs.scss +71 -0
  235. data/app/assets/stylesheets/tooltipster/admin/_tooltipster_workarea_admin.scss +88 -0
  236. data/app/assets/stylesheets/turbolinks/admin/_progress_bar.scss +11 -0
  237. data/app/assets/stylesheets/workarea/admin/application.scss.erb +150 -0
  238. data/app/assets/stylesheets/workarea/admin/base/_forms.scss +82 -0
  239. data/app/assets/stylesheets/workarea/admin/base/_images.scss +29 -0
  240. data/app/assets/stylesheets/workarea/admin/base/_links.scss +5 -0
  241. data/app/assets/stylesheets/workarea/admin/base/_lists.scss +8 -0
  242. data/app/assets/stylesheets/workarea/admin/base/_page.scss +32 -0
  243. data/app/assets/stylesheets/workarea/admin/base/_tables.scss +54 -0
  244. data/app/assets/stylesheets/workarea/admin/components/_activity.scss +63 -0
  245. data/app/assets/stylesheets/workarea/admin/components/_activity_group.scss +27 -0
  246. data/app/assets/stylesheets/workarea/admin/components/_add_to_calendar.scss +17 -0
  247. data/app/assets/stylesheets/workarea/admin/components/_admin_toolbar.scss +5 -0
  248. data/app/assets/stylesheets/workarea/admin/components/_asset_picker_field.scss +11 -0
  249. data/app/assets/stylesheets/workarea/admin/components/_avatar.scss +38 -0
  250. data/app/assets/stylesheets/workarea/admin/components/_box.scss +52 -0
  251. data/app/assets/stylesheets/workarea/admin/components/_browsing_controls.scss +234 -0
  252. data/app/assets/stylesheets/workarea/admin/components/_bulk_actions.scss +42 -0
  253. data/app/assets/stylesheets/workarea/admin/components/_button.scss +75 -0
  254. data/app/assets/stylesheets/workarea/admin/components/_calendar.scss +325 -0
  255. data/app/assets/stylesheets/workarea/admin/components/_card.scss +193 -0
  256. data/app/assets/stylesheets/workarea/admin/components/_chart.scss +154 -0
  257. data/app/assets/stylesheets/workarea/admin/components/_chart_legend.scss +22 -0
  258. data/app/assets/stylesheets/workarea/admin/components/_chartkick.scss +11 -0
  259. data/app/assets/stylesheets/workarea/admin/components/_checkbox.scss +74 -0
  260. data/app/assets/stylesheets/workarea/admin/components/_color_picker.scss +21 -0
  261. data/app/assets/stylesheets/workarea/admin/components/_comments.scss +76 -0
  262. data/app/assets/stylesheets/workarea/admin/components/_content_block.scss +136 -0
  263. data/app/assets/stylesheets/workarea/admin/components/_content_block_list.scss +58 -0
  264. data/app/assets/stylesheets/workarea/admin/components/_content_editor.scss +161 -0
  265. data/app/assets/stylesheets/workarea/admin/components/_content_preview.scss +117 -0
  266. data/app/assets/stylesheets/workarea/admin/components/_dashboard.scss +80 -0
  267. data/app/assets/stylesheets/workarea/admin/components/_dashboard_graphs.scss +23 -0
  268. data/app/assets/stylesheets/workarea/admin/components/_data_file_sample.scss +18 -0
  269. data/app/assets/stylesheets/workarea/admin/components/_data_pairs.scss +46 -0
  270. data/app/assets/stylesheets/workarea/admin/components/_date_marker.scss +42 -0
  271. data/app/assets/stylesheets/workarea/admin/components/_direct_upload.scss +105 -0
  272. data/app/assets/stylesheets/workarea/admin/components/_discount.scss +41 -0
  273. data/app/assets/stylesheets/workarea/admin/components/_expandable.scss +48 -0
  274. data/app/assets/stylesheets/workarea/admin/components/_header.scss +184 -0
  275. data/app/assets/stylesheets/workarea/admin/components/_help_article.scss +17 -0
  276. data/app/assets/stylesheets/workarea/admin/components/_help_article_summary.scss +57 -0
  277. data/app/assets/stylesheets/workarea/admin/components/_help_helper.scss +559 -0
  278. data/app/assets/stylesheets/workarea/admin/components/_index_table.scss +79 -0
  279. data/app/assets/stylesheets/workarea/admin/components/_insight.scss +93 -0
  280. data/app/assets/stylesheets/workarea/admin/components/_live_search.scss +120 -0
  281. data/app/assets/stylesheets/workarea/admin/components/_loading.scss +63 -0
  282. data/app/assets/stylesheets/workarea/admin/components/_menu.scss +121 -0
  283. data/app/assets/stylesheets/workarea/admin/components/_menu_editor.scss +400 -0
  284. data/app/assets/stylesheets/workarea/admin/components/_message.scss +108 -0
  285. data/app/assets/stylesheets/workarea/admin/components/_navigation_builder.scss +97 -0
  286. data/app/assets/stylesheets/workarea/admin/components/_new_block_button.scss +64 -0
  287. data/app/assets/stylesheets/workarea/admin/components/_new_navigation_link.scss +23 -0
  288. data/app/assets/stylesheets/workarea/admin/components/_page_container.scss +5 -0
  289. data/app/assets/stylesheets/workarea/admin/components/_page_content.scss +19 -0
  290. data/app/assets/stylesheets/workarea/admin/components/_page_messages.scss +11 -0
  291. data/app/assets/stylesheets/workarea/admin/components/_pagination.scss +27 -0
  292. data/app/assets/stylesheets/workarea/admin/components/_payment_icon.scss +20 -0
  293. data/app/assets/stylesheets/workarea/admin/components/_pricing_overrides.scss +13 -0
  294. data/app/assets/stylesheets/workarea/admin/components/_primary_nav.scss +85 -0
  295. data/app/assets/stylesheets/workarea/admin/components/_product_images.scss +83 -0
  296. data/app/assets/stylesheets/workarea/admin/components/_product_rules.scss +33 -0
  297. data/app/assets/stylesheets/workarea/admin/components/_product_rules_preview.scss +29 -0
  298. data/app/assets/stylesheets/workarea/admin/components/_product_summary.scss +78 -0
  299. data/app/assets/stylesheets/workarea/admin/components/_property.scss +116 -0
  300. data/app/assets/stylesheets/workarea/admin/components/_property_toggle.scss +35 -0
  301. data/app/assets/stylesheets/workarea/admin/components/_range_input.scss +32 -0
  302. data/app/assets/stylesheets/workarea/admin/components/_release_changeset.scss +87 -0
  303. data/app/assets/stylesheets/workarea/admin/components/_release_creatable.scss +53 -0
  304. data/app/assets/stylesheets/workarea/admin/components/_release_select.scss +70 -0
  305. data/app/assets/stylesheets/workarea/admin/components/_search_form.scss +78 -0
  306. data/app/assets/stylesheets/workarea/admin/components/_secondary_nav.scss +16 -0
  307. data/app/assets/stylesheets/workarea/admin/components/_state.scss +35 -0
  308. data/app/assets/stylesheets/workarea/admin/components/_style_guide.scss +134 -0
  309. data/app/assets/stylesheets/workarea/admin/components/_summary.scss +199 -0
  310. data/app/assets/stylesheets/workarea/admin/components/_svg_icon.scss +62 -0
  311. data/app/assets/stylesheets/workarea/admin/components/_tabs.scss +22 -0
  312. data/app/assets/stylesheets/workarea/admin/components/_takeover.scss +95 -0
  313. data/app/assets/stylesheets/workarea/admin/components/_text_box.scss +97 -0
  314. data/app/assets/stylesheets/workarea/admin/components/_text_button.scss +73 -0
  315. data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +159 -0
  316. data/app/assets/stylesheets/workarea/admin/components/_top_help_articles.scss +82 -0
  317. data/app/assets/stylesheets/workarea/admin/components/_view.scss +64 -0
  318. data/app/assets/stylesheets/workarea/admin/components/_workflow_bar.scss +125 -0
  319. data/app/assets/stylesheets/workarea/admin/components/_wysiwyg.scss +110 -0
  320. data/app/assets/stylesheets/workarea/admin/email.scss +4 -0
  321. data/app/assets/stylesheets/workarea/admin/email/_base.scss +48 -0
  322. data/app/assets/stylesheets/workarea/admin/email/_components.scss +114 -0
  323. data/app/assets/stylesheets/workarea/admin/email/_helpers.scss +69 -0
  324. data/app/assets/stylesheets/workarea/admin/email/_settings.scss +22 -0
  325. data/app/assets/stylesheets/workarea/admin/generic/_box_sizing.scss +20 -0
  326. data/app/assets/stylesheets/workarea/admin/generic/_fonts.scss +10 -0
  327. data/app/assets/stylesheets/workarea/admin/generic/_reset.scss +47 -0
  328. data/app/assets/stylesheets/workarea/admin/objects/_button_reset.scss +17 -0
  329. data/app/assets/stylesheets/workarea/admin/objects/_inline_list.scss +26 -0
  330. data/app/assets/stylesheets/workarea/admin/objects/_list_reset.scss +10 -0
  331. data/app/assets/stylesheets/workarea/admin/objects/_section.scss +8 -0
  332. data/app/assets/stylesheets/workarea/admin/objects/_text_field_reset.scss +10 -0
  333. data/app/assets/stylesheets/workarea/admin/objects/_tooltip_content.scss +25 -0
  334. data/app/assets/stylesheets/workarea/admin/settings/_breakpoints.scss.erb +8 -0
  335. data/app/assets/stylesheets/workarea/admin/settings/_colors.scss +32 -0
  336. data/app/assets/stylesheets/workarea/admin/settings/_global.scss +35 -0
  337. data/app/assets/stylesheets/workarea/admin/settings/_grid.scss +37 -0
  338. data/app/assets/stylesheets/workarea/admin/settings/_typography.scss +21 -0
  339. data/app/assets/stylesheets/workarea/admin/settings/_z_indexes.scss +37 -0
  340. data/app/assets/stylesheets/workarea/admin/tools/_center.scss +34 -0
  341. data/app/assets/stylesheets/workarea/admin/tools/_focus_ring.scss +23 -0
  342. data/app/assets/stylesheets/workarea/admin/tools/_global_box_shadow.scss +32 -0
  343. data/app/assets/stylesheets/workarea/admin/tools/_respond_to.scss +31 -0
  344. data/app/assets/stylesheets/workarea/admin/tools/_svg.scss +29 -0
  345. data/app/assets/stylesheets/workarea/admin/tools/_text_box_image.scss +24 -0
  346. data/app/assets/stylesheets/workarea/admin/trumps/_break_word.scss +9 -0
  347. data/app/assets/stylesheets/workarea/admin/trumps/_clearfix.scss +13 -0
  348. data/app/assets/stylesheets/workarea/admin/trumps/_hidden.scss +71 -0
  349. data/app/assets/stylesheets/workarea/admin/trumps/_image_replacement.scss +11 -0
  350. data/app/assets/stylesheets/workarea/admin/trumps/_truncate.scss +10 -0
  351. data/app/assets/stylesheets/workarea/admin/trumps/_visible.scss +70 -0
  352. data/app/assets/stylesheets/workarea/admin/trumps/_visually_hidden.scss +14 -0
  353. data/app/assets/stylesheets/workarea/admin/typography/_align.scss +15 -0
  354. data/app/assets/stylesheets/workarea/admin/typography/_headings.scss +87 -0
  355. data/app/assets/stylesheets/workarea/admin/typography/_links.scss +39 -0
  356. data/app/assets/stylesheets/workarea/admin/typography/_spark.scss +26 -0
  357. data/app/assets/stylesheets/workarea/admin/typography/_text.scss +75 -0
  358. data/app/controllers/workarea/admin/activities_controller.rb +9 -0
  359. data/app/controllers/workarea/admin/application_controller.rb +109 -0
  360. data/app/controllers/workarea/admin/bookmarks_controller.rb +17 -0
  361. data/app/controllers/workarea/admin/bulk_action_deletions_controller.rb +38 -0
  362. data/app/controllers/workarea/admin/bulk_action_product_edits_controller.rb +55 -0
  363. data/app/controllers/workarea/admin/bulk_action_sequential_product_edits_controller.rb +126 -0
  364. data/app/controllers/workarea/admin/bulk_actions_controller.rb +43 -0
  365. data/app/controllers/workarea/admin/bulk_variant_saving.rb +31 -0
  366. data/app/controllers/workarea/admin/catalog_categories_controller.rb +62 -0
  367. data/app/controllers/workarea/admin/catalog_product_copies_controller.rb +31 -0
  368. data/app/controllers/workarea/admin/catalog_product_images_controller.rb +67 -0
  369. data/app/controllers/workarea/admin/catalog_products_controller.rb +82 -0
  370. data/app/controllers/workarea/admin/catalog_variants_controller.rb +93 -0
  371. data/app/controllers/workarea/admin/categorizations_controller.rb +37 -0
  372. data/app/controllers/workarea/admin/changesets_controller.rb +28 -0
  373. data/app/controllers/workarea/admin/comments_controller.rb +104 -0
  374. data/app/controllers/workarea/admin/content_assets_controller.rb +66 -0
  375. data/app/controllers/workarea/admin/content_block_drafts_controller.rb +14 -0
  376. data/app/controllers/workarea/admin/content_blocks_controller.rb +105 -0
  377. data/app/controllers/workarea/admin/content_controller.rb +54 -0
  378. data/app/controllers/workarea/admin/content_emails_controller.rb +35 -0
  379. data/app/controllers/workarea/admin/content_pages_controller.rb +59 -0
  380. data/app/controllers/workarea/admin/content_presets_controller.rb +40 -0
  381. data/app/controllers/workarea/admin/create_catalog_categories_controller.rb +135 -0
  382. data/app/controllers/workarea/admin/create_catalog_products_controller.rb +145 -0
  383. data/app/controllers/workarea/admin/create_content_pages_controller.rb +91 -0
  384. data/app/controllers/workarea/admin/create_pricing_discounts_controller.rb +68 -0
  385. data/app/controllers/workarea/admin/create_releases_controller.rb +51 -0
  386. data/app/controllers/workarea/admin/create_users_controller.rb +65 -0
  387. data/app/controllers/workarea/admin/dashboards_controller.rb +51 -0
  388. data/app/controllers/workarea/admin/data_file_exports_controller.rb +35 -0
  389. data/app/controllers/workarea/admin/data_file_imports_controller.rb +35 -0
  390. data/app/controllers/workarea/admin/data_file_tax_imports_controller.rb +38 -0
  391. data/app/controllers/workarea/admin/data_files_controller.rb +13 -0
  392. data/app/controllers/workarea/admin/direct_uploads_controller.rb +36 -0
  393. data/app/controllers/workarea/admin/email_signups_controller.rb +20 -0
  394. data/app/controllers/workarea/admin/featured_products_controller.rb +78 -0
  395. data/app/controllers/workarea/admin/fulfillments_controller.rb +15 -0
  396. data/app/controllers/workarea/admin/guest_browsings_controller.rb +25 -0
  397. data/app/controllers/workarea/admin/help_assets_controller.rb +27 -0
  398. data/app/controllers/workarea/admin/help_authorization.rb +17 -0
  399. data/app/controllers/workarea/admin/help_controller.rb +79 -0
  400. data/app/controllers/workarea/admin/impersonations_controller.rb +34 -0
  401. data/app/controllers/workarea/admin/inventory_skus_controller.rb +79 -0
  402. data/app/controllers/workarea/admin/jump_to_controller.rb +30 -0
  403. data/app/controllers/workarea/admin/navigation_menus_controller.rb +104 -0
  404. data/app/controllers/workarea/admin/navigation_redirects_controller.rb +41 -0
  405. data/app/controllers/workarea/admin/navigation_taxons_controller.rb +104 -0
  406. data/app/controllers/workarea/admin/orders_controller.rb +28 -0
  407. data/app/controllers/workarea/admin/payment_transactions_controller.rb +20 -0
  408. data/app/controllers/workarea/admin/payments_controller.rb +12 -0
  409. data/app/controllers/workarea/admin/prices_controller.rb +69 -0
  410. data/app/controllers/workarea/admin/pricing_discount_code_lists_controller.rb +58 -0
  411. data/app/controllers/workarea/admin/pricing_discounts_controller.rb +56 -0
  412. data/app/controllers/workarea/admin/pricing_overrides_controller.rb +54 -0
  413. data/app/controllers/workarea/admin/pricing_skus_controller.rb +87 -0
  414. data/app/controllers/workarea/admin/product_rules_controller.rb +97 -0
  415. data/app/controllers/workarea/admin/publishing.rb +45 -0
  416. data/app/controllers/workarea/admin/recommendations_controller.rb +36 -0
  417. data/app/controllers/workarea/admin/releasables_controller.rb +16 -0
  418. data/app/controllers/workarea/admin/release_sessions_controller.rb +25 -0
  419. data/app/controllers/workarea/admin/releases_controller.rb +110 -0
  420. data/app/controllers/workarea/admin/reports_controller.rb +115 -0
  421. data/app/controllers/workarea/admin/search_customizations_controller.rb +84 -0
  422. data/app/controllers/workarea/admin/search_settings_controller.rb +27 -0
  423. data/app/controllers/workarea/admin/searches_controller.rb +11 -0
  424. data/app/controllers/workarea/admin/shipping_services_controller.rb +85 -0
  425. data/app/controllers/workarea/admin/shippings_controller.rb +24 -0
  426. data/app/controllers/workarea/admin/style_guides_controller.rb +6 -0
  427. data/app/controllers/workarea/admin/tax_categories_controller.rb +55 -0
  428. data/app/controllers/workarea/admin/tax_rates_controller.rb +14 -0
  429. data/app/controllers/workarea/admin/timeline_controller.rb +10 -0
  430. data/app/controllers/workarea/admin/toolbar_controller.rb +16 -0
  431. data/app/controllers/workarea/admin/trash_controller.rb +50 -0
  432. data/app/controllers/workarea/admin/user_params.rb +16 -0
  433. data/app/controllers/workarea/admin/users_controller.rb +77 -0
  434. data/app/controllers/workarea/admin/visiting.rb +51 -0
  435. data/app/helpers/workarea/admin/activities_helper.rb +70 -0
  436. data/app/helpers/workarea/admin/application_helper.rb +161 -0
  437. data/app/helpers/workarea/admin/bookmarks_helper.rb +15 -0
  438. data/app/helpers/workarea/admin/bulk_actions_helper.rb +9 -0
  439. data/app/helpers/workarea/admin/changesets_helper.rb +14 -0
  440. data/app/helpers/workarea/admin/content_block_icon_helper.rb +22 -0
  441. data/app/helpers/workarea/admin/content_helper.rb +69 -0
  442. data/app/helpers/workarea/admin/credit_cards_helper.rb +26 -0
  443. data/app/helpers/workarea/admin/data_files_helper.rb +9 -0
  444. data/app/helpers/workarea/admin/date_selector_helper.rb +58 -0
  445. data/app/helpers/workarea/admin/facets_helper.rb +15 -0
  446. data/app/helpers/workarea/admin/icons_helper.rb +95 -0
  447. data/app/helpers/workarea/admin/imports_helper.rb +50 -0
  448. data/app/helpers/workarea/admin/insights_helper.rb +42 -0
  449. data/app/helpers/workarea/admin/inventory_helper.rb +9 -0
  450. data/app/helpers/workarea/admin/navigation_helper.rb +70 -0
  451. data/app/helpers/workarea/admin/navigation_menus_helper.rb +12 -0
  452. data/app/helpers/workarea/admin/orders_helper.rb +17 -0
  453. data/app/helpers/workarea/admin/pages_helper.rb +9 -0
  454. data/app/helpers/workarea/admin/price_adjustments_helper.rb +21 -0
  455. data/app/helpers/workarea/admin/pricing_overrides_helper.rb +9 -0
  456. data/app/helpers/workarea/admin/product_rules_helper.rb +50 -0
  457. data/app/helpers/workarea/admin/products_helper.rb +10 -0
  458. data/app/helpers/workarea/admin/releases_helper.rb +221 -0
  459. data/app/helpers/workarea/admin/reports_helper.rb +57 -0
  460. data/app/helpers/workarea/admin/search_customizations_helper.rb +19 -0
  461. data/app/helpers/workarea/admin/settings_helper.rb +18 -0
  462. data/app/helpers/workarea/admin/storefront_helper.rb +13 -0
  463. data/app/helpers/workarea/admin/taxons_helper.rb +65 -0
  464. data/app/mailers/workarea/admin/application_mailer.rb +32 -0
  465. data/app/mailers/workarea/admin/comment_mailer.rb +32 -0
  466. data/app/mailers/workarea/admin/data_file_mailer.rb +68 -0
  467. data/app/mailers/workarea/admin/reports_mailer.rb +18 -0
  468. data/app/mailers/workarea/admin/status_report_mailer.rb +19 -0
  469. data/app/view_models/workarea/admin/activity_view_model.rb +107 -0
  470. data/app/view_models/workarea/admin/alerts_view_model.rb +60 -0
  471. data/app/view_models/workarea/admin/asset_view_model.rb +11 -0
  472. data/app/view_models/workarea/admin/bulk_action_deletion_view_model.rb +13 -0
  473. data/app/view_models/workarea/admin/bulk_action_product_edit_view_model.rb +25 -0
  474. data/app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb +25 -0
  475. data/app/view_models/workarea/admin/category_view_model.rb +55 -0
  476. data/app/view_models/workarea/admin/changes_view_model.rb +52 -0
  477. data/app/view_models/workarea/admin/changeset_view_model.rb +81 -0
  478. data/app/view_models/workarea/admin/code_list_view_model.rb +25 -0
  479. data/app/view_models/workarea/admin/comment_view_model.rb +18 -0
  480. data/app/view_models/workarea/admin/commentable_view_model.rb +21 -0
  481. data/app/view_models/workarea/admin/content_view_model.rb +142 -0
  482. data/app/view_models/workarea/admin/contentable_view_model.rb +9 -0
  483. data/app/view_models/workarea/admin/dashboards/catalog_view_model.rb +13 -0
  484. data/app/view_models/workarea/admin/dashboards/index_view_model.rb +28 -0
  485. data/app/view_models/workarea/admin/dashboards/insights_graphs.rb +97 -0
  486. data/app/view_models/workarea/admin/dashboards/marketing_view_model.rb +83 -0
  487. data/app/view_models/workarea/admin/dashboards/orders_view_model.rb +20 -0
  488. data/app/view_models/workarea/admin/dashboards/people_view_model.rb +39 -0
  489. data/app/view_models/workarea/admin/dashboards/reports_view_model.rb +105 -0
  490. data/app/view_models/workarea/admin/dashboards/search_view_model.rb +22 -0
  491. data/app/view_models/workarea/admin/dashboards/store_view_model.rb +13 -0
  492. data/app/view_models/workarea/admin/data_file_view_model.rb +28 -0
  493. data/app/view_models/workarea/admin/data_files_view_model.rb +42 -0
  494. data/app/view_models/workarea/admin/discount_rules_view_model.rb +99 -0
  495. data/app/view_models/workarea/admin/discount_search_view_model.rb +17 -0
  496. data/app/view_models/workarea/admin/discount_view_model.rb +127 -0
  497. data/app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb +35 -0
  498. data/app/view_models/workarea/admin/discounts/categories.rb +13 -0
  499. data/app/view_models/workarea/admin/discounts/category_view_model.rb +40 -0
  500. data/app/view_models/workarea/admin/discounts/free_gift_view_model.rb +35 -0
  501. data/app/view_models/workarea/admin/discounts/order_total_view_model.rb +32 -0
  502. data/app/view_models/workarea/admin/discounts/product_attribute_view_model.rb +38 -0
  503. data/app/view_models/workarea/admin/discounts/product_view_model.rb +40 -0
  504. data/app/view_models/workarea/admin/discounts/products.rb +13 -0
  505. data/app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb +35 -0
  506. data/app/view_models/workarea/admin/discounts/shipping_view_model.rb +36 -0
  507. data/app/view_models/workarea/admin/featured_products_view_model.rb +20 -0
  508. data/app/view_models/workarea/admin/fulfillment_item_view_model.rb +13 -0
  509. data/app/view_models/workarea/admin/fulfillment_view_model.rb +41 -0
  510. data/app/view_models/workarea/admin/help_search_view_model.rb +17 -0
  511. data/app/view_models/workarea/admin/insight_view_model.rb +37 -0
  512. data/app/view_models/workarea/admin/insights/category_view_model.rb +25 -0
  513. data/app/view_models/workarea/admin/insights/discount_view_model.rb +25 -0
  514. data/app/view_models/workarea/admin/insights/insights_details.rb +83 -0
  515. data/app/view_models/workarea/admin/insights/product_view_model.rb +56 -0
  516. data/app/view_models/workarea/admin/insights/search_view_model.rb +29 -0
  517. data/app/view_models/workarea/admin/inventory_sku_view_model.rb +21 -0
  518. data/app/view_models/workarea/admin/order_item_view_model.rb +29 -0
  519. data/app/view_models/workarea/admin/order_search_view_model.rb +14 -0
  520. data/app/view_models/workarea/admin/order_timeline_view_model.rb +163 -0
  521. data/app/view_models/workarea/admin/order_view_model.rb +114 -0
  522. data/app/view_models/workarea/admin/package_view_model.rb +20 -0
  523. data/app/view_models/workarea/admin/page_view_model.rb +16 -0
  524. data/app/view_models/workarea/admin/payment_view_model.rb +21 -0
  525. data/app/view_models/workarea/admin/pricing_sku_view_model.rb +21 -0
  526. data/app/view_models/workarea/admin/product_images_view_model.rb +9 -0
  527. data/app/view_models/workarea/admin/product_rules_preview_view_model.rb +64 -0
  528. data/app/view_models/workarea/admin/product_view_model.rb +153 -0
  529. data/app/view_models/workarea/admin/promo_code_view_model.rb +7 -0
  530. data/app/view_models/workarea/admin/recommendations_view_model.rb +23 -0
  531. data/app/view_models/workarea/admin/release_calendar_view_model.rb +57 -0
  532. data/app/view_models/workarea/admin/release_event_view_model.rb +56 -0
  533. data/app/view_models/workarea/admin/release_search_view_model.rb +13 -0
  534. data/app/view_models/workarea/admin/release_view_model.rb +44 -0
  535. data/app/view_models/workarea/admin/releases_feed_view_model.rb +58 -0
  536. data/app/view_models/workarea/admin/reports/average_order_value_view_model.rb +14 -0
  537. data/app/view_models/workarea/admin/reports/customers_view_model.rb +18 -0
  538. data/app/view_models/workarea/admin/reports/first_time_vs_returning_sales_view_model.rb +14 -0
  539. data/app/view_models/workarea/admin/reports/group_by_time.rb +38 -0
  540. data/app/view_models/workarea/admin/reports/insights_view_model.rb +32 -0
  541. data/app/view_models/workarea/admin/reports/low_inventory_view_model.rb +20 -0
  542. data/app/view_models/workarea/admin/reports/sales_by_category_view_model.rb +20 -0
  543. data/app/view_models/workarea/admin/reports/sales_by_country_view_model.rb +14 -0
  544. data/app/view_models/workarea/admin/reports/sales_by_discount_view_model.rb +20 -0
  545. data/app/view_models/workarea/admin/reports/sales_by_product_view_model.rb +20 -0
  546. data/app/view_models/workarea/admin/reports/sales_by_sku_view_model.rb +20 -0
  547. data/app/view_models/workarea/admin/reports/sales_by_traffic_referrer_view_model.rb +18 -0
  548. data/app/view_models/workarea/admin/reports/sales_over_time_view_model.rb +14 -0
  549. data/app/view_models/workarea/admin/reports/searches_view_model.rb +11 -0
  550. data/app/view_models/workarea/admin/revenue_view_model.rb +45 -0
  551. data/app/view_models/workarea/admin/search_analysis_view_model.rb +68 -0
  552. data/app/view_models/workarea/admin/search_customization_product_rules_view_model.rb +25 -0
  553. data/app/view_models/workarea/admin/search_customization_view_model.rb +17 -0
  554. data/app/view_models/workarea/admin/search_view_model.rb +91 -0
  555. data/app/view_models/workarea/admin/shipping_view_model.rb +23 -0
  556. data/app/view_models/workarea/admin/tax_category_view_model.rb +13 -0
  557. data/app/view_models/workarea/admin/timeline_view_model.rb +57 -0
  558. data/app/view_models/workarea/admin/transaction_view_model.rb +39 -0
  559. data/app/view_models/workarea/admin/user_search_view_model.rb +13 -0
  560. data/app/view_models/workarea/admin/user_view_model.rb +88 -0
  561. data/app/view_models/workarea/admin/variant_view_model.rb +48 -0
  562. data/app/views/layouts/workarea/admin/application.html.haml +181 -0
  563. data/app/views/layouts/workarea/admin/email.html.haml +185 -0
  564. data/app/views/layouts/workarea/admin/empty.html.haml +38 -0
  565. data/app/views/workarea/admin/activities/_bulk_action_order_export_create.haml +8 -0
  566. data/app/views/workarea/admin/activities/_bulk_action_pricing_discount_code_list_export_create.haml +8 -0
  567. data/app/views/workarea/admin/activities/_bulk_action_user_export_create.haml +8 -0
  568. data/app/views/workarea/admin/activities/_catalog_category_create.html.haml +12 -0
  569. data/app/views/workarea/admin/activities/_catalog_category_destroy.html.haml +10 -0
  570. data/app/views/workarea/admin/activities/_catalog_category_update.html.haml +11 -0
  571. data/app/views/workarea/admin/activities/_catalog_product_create.html.haml +12 -0
  572. data/app/views/workarea/admin/activities/_catalog_product_destroy.html.haml +10 -0
  573. data/app/views/workarea/admin/activities/_catalog_product_image_create.html.haml +10 -0
  574. data/app/views/workarea/admin/activities/_catalog_product_image_destroy.html.haml +11 -0
  575. data/app/views/workarea/admin/activities/_catalog_product_update.html.haml +11 -0
  576. data/app/views/workarea/admin/activities/_catalog_variant_create.html.haml +21 -0
  577. data/app/views/workarea/admin/activities/_catalog_variant_destroy.html.haml +15 -0
  578. data/app/views/workarea/admin/activities/_catalog_variant_update.html.haml +22 -0
  579. data/app/views/workarea/admin/activities/_comment_create.html.haml +12 -0
  580. data/app/views/workarea/admin/activities/_comment_destroy.html.haml +14 -0
  581. data/app/views/workarea/admin/activities/_comment_update.html.haml +12 -0
  582. data/app/views/workarea/admin/activities/_content_asset_create.html.haml +12 -0
  583. data/app/views/workarea/admin/activities/_content_asset_destroy.html.haml +10 -0
  584. data/app/views/workarea/admin/activities/_content_asset_update.html.haml +11 -0
  585. data/app/views/workarea/admin/activities/_content_block_create.html.haml +12 -0
  586. data/app/views/workarea/admin/activities/_content_block_destroy.html.haml +14 -0
  587. data/app/views/workarea/admin/activities/_content_block_update.html.haml +23 -0
  588. data/app/views/workarea/admin/activities/_content_email_update.html.haml +10 -0
  589. data/app/views/workarea/admin/activities/_content_page_create.html.haml +12 -0
  590. data/app/views/workarea/admin/activities/_content_page_destroy.html.haml +10 -0
  591. data/app/views/workarea/admin/activities/_content_page_update.html.haml +11 -0
  592. data/app/views/workarea/admin/activities/_content_update.html.haml +12 -0
  593. data/app/views/workarea/admin/activities/_help_article_create.html.haml +12 -0
  594. data/app/views/workarea/admin/activities/_help_article_destroy.html.haml +10 -0
  595. data/app/views/workarea/admin/activities/_help_article_update.html.haml +10 -0
  596. data/app/views/workarea/admin/activities/_help_asset_create.html.haml +8 -0
  597. data/app/views/workarea/admin/activities/_help_asset_destroy.html.haml +10 -0
  598. data/app/views/workarea/admin/activities/_import_catalog_create.html.haml +9 -0
  599. data/app/views/workarea/admin/activities/_import_redirect_create.html.haml +9 -0
  600. data/app/views/workarea/admin/activities/_import_tax_create.html.haml +9 -0
  601. data/app/views/workarea/admin/activities/_inventory_sku_create.html.haml +12 -0
  602. data/app/views/workarea/admin/activities/_inventory_sku_destroy.html.haml +10 -0
  603. data/app/views/workarea/admin/activities/_inventory_sku_update.html.haml +10 -0
  604. data/app/views/workarea/admin/activities/_navigation_menu_create.html.haml +12 -0
  605. data/app/views/workarea/admin/activities/_navigation_menu_destroy.html.haml +10 -0
  606. data/app/views/workarea/admin/activities/_navigation_menu_update.html.haml +11 -0
  607. data/app/views/workarea/admin/activities/_navigation_redirect_create.html.haml +9 -0
  608. data/app/views/workarea/admin/activities/_navigation_redirect_destroy.html.haml +10 -0
  609. data/app/views/workarea/admin/activities/_navigation_taxon_create.html.haml +12 -0
  610. data/app/views/workarea/admin/activities/_navigation_taxon_destroy.html.haml +10 -0
  611. data/app/views/workarea/admin/activities/_navigation_taxon_update.html.haml +10 -0
  612. data/app/views/workarea/admin/activities/_pricing_discount_code_list_create.html.haml +12 -0
  613. data/app/views/workarea/admin/activities/_pricing_discount_code_list_destroy.html.haml +10 -0
  614. data/app/views/workarea/admin/activities/_pricing_discount_code_list_update.html.haml +10 -0
  615. data/app/views/workarea/admin/activities/_pricing_discount_create.html.haml +12 -0
  616. data/app/views/workarea/admin/activities/_pricing_discount_destroy.html.haml +10 -0
  617. data/app/views/workarea/admin/activities/_pricing_discount_update.html.haml +11 -0
  618. data/app/views/workarea/admin/activities/_pricing_sku_create.html.haml +12 -0
  619. data/app/views/workarea/admin/activities/_pricing_sku_update.html.haml +10 -0
  620. data/app/views/workarea/admin/activities/_product_rule_create.html.haml +13 -0
  621. data/app/views/workarea/admin/activities/_product_rule_destroy.html.haml +13 -0
  622. data/app/views/workarea/admin/activities/_product_rule_update.html.haml +13 -0
  623. data/app/views/workarea/admin/activities/_release_create.html.haml +12 -0
  624. data/app/views/workarea/admin/activities/_release_destroy.html.haml +10 -0
  625. data/app/views/workarea/admin/activities/_release_info.html.haml +6 -0
  626. data/app/views/workarea/admin/activities/_release_update.html.haml +15 -0
  627. data/app/views/workarea/admin/activities/_search_customization_create.html.haml +12 -0
  628. data/app/views/workarea/admin/activities/_search_customization_destroy.html.haml +14 -0
  629. data/app/views/workarea/admin/activities/_search_customization_update.html.haml +11 -0
  630. data/app/views/workarea/admin/activities/_search_settings_update.html.haml +9 -0
  631. data/app/views/workarea/admin/activities/_shipping_service_create.html.haml +12 -0
  632. data/app/views/workarea/admin/activities/_shipping_service_destroy.html.haml +10 -0
  633. data/app/views/workarea/admin/activities/_shipping_service_update.html.haml +10 -0
  634. data/app/views/workarea/admin/activities/_tax_category_create.html.haml +12 -0
  635. data/app/views/workarea/admin/activities/_tax_category_destroy.html.haml +10 -0
  636. data/app/views/workarea/admin/activities/_tax_category_update.html.haml +10 -0
  637. data/app/views/workarea/admin/activities/_tax_rate_create.html.haml +12 -0
  638. data/app/views/workarea/admin/activities/_tax_rate_destroy.html.haml +10 -0
  639. data/app/views/workarea/admin/activities/_tax_rate_update.html.haml +14 -0
  640. data/app/views/workarea/admin/activities/_user_update.html.haml +10 -0
  641. data/app/views/workarea/admin/activities/show.html.haml +43 -0
  642. data/app/views/workarea/admin/bulk_action_deletions/_form.html.haml +8 -0
  643. data/app/views/workarea/admin/bulk_action_deletions/edit.html.haml +31 -0
  644. data/app/views/workarea/admin/bulk_action_product_edits/edit.html.haml +266 -0
  645. data/app/views/workarea/admin/bulk_action_product_edits/review.html.haml +113 -0
  646. data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +254 -0
  647. data/app/views/workarea/admin/bulk_action_sequential_product_edits/publishing.html.haml +29 -0
  648. data/app/views/workarea/admin/bulk_actions/selected.html.haml +16 -0
  649. data/app/views/workarea/admin/catalog_categories/_aux_navigation.html.haml +2 -0
  650. data/app/views/workarea/admin/catalog_categories/_cards.html.haml +119 -0
  651. data/app/views/workarea/admin/catalog_categories/_summary.html.haml +14 -0
  652. data/app/views/workarea/admin/catalog_categories/edit.html.haml +85 -0
  653. data/app/views/workarea/admin/catalog_categories/index.html.haml +88 -0
  654. data/app/views/workarea/admin/catalog_categories/index.json.jbuilder +9 -0
  655. data/app/views/workarea/admin/catalog_categories/insights.html.haml +71 -0
  656. data/app/views/workarea/admin/catalog_categories/show.html.haml +23 -0
  657. data/app/views/workarea/admin/catalog_product_copies/new.html.haml +47 -0
  658. data/app/views/workarea/admin/catalog_product_images/edit.html.haml +52 -0
  659. data/app/views/workarea/admin/catalog_product_images/index.html.haml +75 -0
  660. data/app/views/workarea/admin/catalog_product_images/options.json.jbuilder +4 -0
  661. data/app/views/workarea/admin/catalog_products/_aux_navigation.html.haml +3 -0
  662. data/app/views/workarea/admin/catalog_products/_cards.html.haml +265 -0
  663. data/app/views/workarea/admin/catalog_products/_summary.html.haml +19 -0
  664. data/app/views/workarea/admin/catalog_products/content.html.haml +40 -0
  665. data/app/views/workarea/admin/catalog_products/edit.html.haml +170 -0
  666. data/app/views/workarea/admin/catalog_products/index.html.haml +120 -0
  667. data/app/views/workarea/admin/catalog_products/index.json.jbuilder +9 -0
  668. data/app/views/workarea/admin/catalog_products/insights.html.haml +89 -0
  669. data/app/views/workarea/admin/catalog_products/show.html.haml +24 -0
  670. data/app/views/workarea/admin/catalog_variants/edit.html.haml +76 -0
  671. data/app/views/workarea/admin/catalog_variants/index.html.haml +58 -0
  672. data/app/views/workarea/admin/catalog_variants/index.json.jbuilder +4 -0
  673. data/app/views/workarea/admin/catalog_variants/new.html.haml +68 -0
  674. data/app/views/workarea/admin/categorizations/index.html.haml +75 -0
  675. data/app/views/workarea/admin/categorizations/index.json.jbuilder +9 -0
  676. data/app/views/workarea/admin/changesets/fields/_category_id.html.haml +4 -0
  677. data/app/views/workarea/admin/changesets/fields/_category_ids.html.haml +4 -0
  678. data/app/views/workarea/admin/changesets/fields/_compatible_discount_ids.html.haml +4 -0
  679. data/app/views/workarea/admin/changesets/fields/_data.html.haml +2 -0
  680. data/app/views/workarea/admin/changesets/fields/_generic.html.haml +4 -0
  681. data/app/views/workarea/admin/changesets/fields/_packaged_product_ids.html.haml +4 -0
  682. data/app/views/workarea/admin/changesets/fields/_product_id.html.haml +4 -0
  683. data/app/views/workarea/admin/changesets/fields/_product_ids.html.haml +4 -0
  684. data/app/views/workarea/admin/changesets/fields/_shipping_service_id.html.haml +4 -0
  685. data/app/views/workarea/admin/changesets/fields/data/_category.html.haml +4 -0
  686. data/app/views/workarea/admin/changesets/fields/data/_generic.html.haml +4 -0
  687. data/app/views/workarea/admin/changesets/fields/data/_products.html.haml +4 -0
  688. data/app/views/workarea/admin/changesets/index.html.haml +42 -0
  689. data/app/views/workarea/admin/comment_mailer/notify.html.haml +36 -0
  690. data/app/views/workarea/admin/comments/_card.html.haml +26 -0
  691. data/app/views/workarea/admin/comments/edit.html.haml +27 -0
  692. data/app/views/workarea/admin/comments/index.html.haml +64 -0
  693. data/app/views/workarea/admin/content/_aux_navigation.html.haml +4 -0
  694. data/app/views/workarea/admin/content/_card.html.haml +24 -0
  695. data/app/views/workarea/admin/content/_cards.html.haml +9 -0
  696. data/app/views/workarea/admin/content/_edit.html.haml +75 -0
  697. data/app/views/workarea/admin/content/_form.html.haml +51 -0
  698. data/app/views/workarea/admin/content/_summary.html.haml +10 -0
  699. data/app/views/workarea/admin/content/advanced.html.haml +65 -0
  700. data/app/views/workarea/admin/content/edit.html.haml +25 -0
  701. data/app/views/workarea/admin/content/index.html.haml +32 -0
  702. data/app/views/workarea/admin/content/preview.html.haml +14 -0
  703. data/app/views/workarea/admin/content/show.html.haml +27 -0
  704. data/app/views/workarea/admin/content_assets/_cards.html.haml +49 -0
  705. data/app/views/workarea/admin/content_assets/_summary.html.haml +9 -0
  706. data/app/views/workarea/admin/content_assets/edit.html.haml +56 -0
  707. data/app/views/workarea/admin/content_assets/index.html.haml +95 -0
  708. data/app/views/workarea/admin/content_assets/insert.html.haml +46 -0
  709. data/app/views/workarea/admin/content_assets/new.html.haml +36 -0
  710. data/app/views/workarea/admin/content_assets/show.html.haml +21 -0
  711. data/app/views/workarea/admin/content_blocks/_asset.html.haml +24 -0
  712. data/app/views/workarea/admin/content_blocks/_boolean.html.haml +14 -0
  713. data/app/views/workarea/admin/content_blocks/_breakpoints.html.haml +17 -0
  714. data/app/views/workarea/admin/content_blocks/_category.html.haml +14 -0
  715. data/app/views/workarea/admin/content_blocks/_color.html.haml +19 -0
  716. data/app/views/workarea/admin/content_blocks/_integer.html.haml +14 -0
  717. data/app/views/workarea/admin/content_blocks/_options.html.haml +14 -0
  718. data/app/views/workarea/admin/content_blocks/_products.html.haml +14 -0
  719. data/app/views/workarea/admin/content_blocks/_range.html.haml +16 -0
  720. data/app/views/workarea/admin/content_blocks/_string.html.haml +17 -0
  721. data/app/views/workarea/admin/content_blocks/_taxonomy.html.haml +14 -0
  722. data/app/views/workarea/admin/content_blocks/_text.html.haml +14 -0
  723. data/app/views/workarea/admin/content_blocks/_url.html.haml +14 -0
  724. data/app/views/workarea/admin/content_blocks/index.html.haml +31 -0
  725. data/app/views/workarea/admin/content_emails/edit.html.haml +22 -0
  726. data/app/views/workarea/admin/content_emails/index.html.haml +26 -0
  727. data/app/views/workarea/admin/content_pages/_aux_navigation.html.haml +2 -0
  728. data/app/views/workarea/admin/content_pages/_cards.html.haml +40 -0
  729. data/app/views/workarea/admin/content_pages/_summary.html.haml +14 -0
  730. data/app/views/workarea/admin/content_pages/edit.html.haml +76 -0
  731. data/app/views/workarea/admin/content_pages/index.html.haml +81 -0
  732. data/app/views/workarea/admin/content_pages/index.json.jbuilder +7 -0
  733. data/app/views/workarea/admin/content_pages/show.html.haml +23 -0
  734. data/app/views/workarea/admin/content_presets/new.html.haml +7 -0
  735. data/app/views/workarea/admin/create_catalog_categories/content.html.haml +31 -0
  736. data/app/views/workarea/admin/create_catalog_categories/featured_products.html.haml +75 -0
  737. data/app/views/workarea/admin/create_catalog_categories/navigation.html.haml +46 -0
  738. data/app/views/workarea/admin/create_catalog_categories/products.html.haml +64 -0
  739. data/app/views/workarea/admin/create_catalog_categories/publish.html.haml +36 -0
  740. data/app/views/workarea/admin/create_catalog_categories/rules.html.haml +68 -0
  741. data/app/views/workarea/admin/create_catalog_categories/setup.html.haml +51 -0
  742. data/app/views/workarea/admin/create_catalog_categories/taxonomy.html.haml +35 -0
  743. data/app/views/workarea/admin/create_catalog_products/categorization.html.haml +68 -0
  744. data/app/views/workarea/admin/create_catalog_products/content.html.haml +58 -0
  745. data/app/views/workarea/admin/create_catalog_products/details.html.haml +90 -0
  746. data/app/views/workarea/admin/create_catalog_products/images.html.haml +60 -0
  747. data/app/views/workarea/admin/create_catalog_products/publish.html.haml +45 -0
  748. data/app/views/workarea/admin/create_catalog_products/setup.html.haml +66 -0
  749. data/app/views/workarea/admin/create_catalog_products/variants.html.haml +93 -0
  750. data/app/views/workarea/admin/create_content_pages/content.html.haml +30 -0
  751. data/app/views/workarea/admin/create_content_pages/navigation.html.haml +45 -0
  752. data/app/views/workarea/admin/create_content_pages/publish.html.haml +35 -0
  753. data/app/views/workarea/admin/create_content_pages/setup.html.haml +53 -0
  754. data/app/views/workarea/admin/create_content_pages/taxonomy.html.haml +35 -0
  755. data/app/views/workarea/admin/create_pricing_discounts/details.html.haml +47 -0
  756. data/app/views/workarea/admin/create_pricing_discounts/publish.html.haml +31 -0
  757. data/app/views/workarea/admin/create_pricing_discounts/rules.html.haml +85 -0
  758. data/app/views/workarea/admin/create_pricing_discounts/setup.html.haml +100 -0
  759. data/app/views/workarea/admin/create_releases/plan.html.haml +83 -0
  760. data/app/views/workarea/admin/create_releases/setup.html.haml +58 -0
  761. data/app/views/workarea/admin/create_users/admin.html.haml +157 -0
  762. data/app/views/workarea/admin/create_users/customer.html.haml +76 -0
  763. data/app/views/workarea/admin/create_users/index.html.haml +38 -0
  764. data/app/views/workarea/admin/dashboards/catalog.html.haml +19 -0
  765. data/app/views/workarea/admin/dashboards/index.html.haml +177 -0
  766. data/app/views/workarea/admin/dashboards/marketing.html.haml +64 -0
  767. data/app/views/workarea/admin/dashboards/orders.html.haml +87 -0
  768. data/app/views/workarea/admin/dashboards/people.html.haml +70 -0
  769. data/app/views/workarea/admin/dashboards/reports.html.haml +220 -0
  770. data/app/views/workarea/admin/dashboards/search.html.haml +48 -0
  771. data/app/views/workarea/admin/dashboards/settings.html.haml +29 -0
  772. data/app/views/workarea/admin/dashboards/store.html.haml +21 -0
  773. data/app/views/workarea/admin/data_file_exports/new.html.haml +47 -0
  774. data/app/views/workarea/admin/data_file_imports/_csv_notes.html.haml +1 -0
  775. data/app/views/workarea/admin/data_file_imports/new.html.haml +47 -0
  776. data/app/views/workarea/admin/data_file_mailer/export.html.haml +3 -0
  777. data/app/views/workarea/admin/data_file_mailer/import.html.haml +11 -0
  778. data/app/views/workarea/admin/data_file_mailer/import_error.html.haml +13 -0
  779. data/app/views/workarea/admin/data_file_mailer/import_failure.html.haml +22 -0
  780. data/app/views/workarea/admin/data_file_tax_imports/new.html.haml +59 -0
  781. data/app/views/workarea/admin/data_files/errors.html.haml +38 -0
  782. data/app/views/workarea/admin/data_files/index.html.haml +68 -0
  783. data/app/views/workarea/admin/direct_uploads/product_images.html.haml +19 -0
  784. data/app/views/workarea/admin/email_signups/_summary.html.haml +6 -0
  785. data/app/views/workarea/admin/email_signups/index.html.haml +47 -0
  786. data/app/views/workarea/admin/facets/_applied.html.haml +17 -0
  787. data/app/views/workarea/admin/facets/_price_inputs.html.haml +23 -0
  788. data/app/views/workarea/admin/facets/_terms.html.haml +17 -0
  789. data/app/views/workarea/admin/featured_products/_release_preview_warning.html.haml +4 -0
  790. data/app/views/workarea/admin/featured_products/_selected.html.haml +10 -0
  791. data/app/views/workarea/admin/featured_products/_unselected.html.haml +8 -0
  792. data/app/views/workarea/admin/featured_products/edit.html.haml +46 -0
  793. data/app/views/workarea/admin/featured_products/select.html.haml +72 -0
  794. data/app/views/workarea/admin/fulfillments/show.html.haml +100 -0
  795. data/app/views/workarea/admin/help/edit.html.haml +53 -0
  796. data/app/views/workarea/admin/help/index.html.haml +78 -0
  797. data/app/views/workarea/admin/help/new.html.haml +53 -0
  798. data/app/views/workarea/admin/help/show.html.haml +23 -0
  799. data/app/views/workarea/admin/help/takeover.html.haml +35 -0
  800. data/app/views/workarea/admin/help_assets/index.html.haml +36 -0
  801. data/app/views/workarea/admin/insights/_best_customers.html.haml +20 -0
  802. data/app/views/workarea/admin/insights/_best_full_price_customers.html.haml +20 -0
  803. data/app/views/workarea/admin/insights/_cold_products.html.haml +29 -0
  804. data/app/views/workarea/admin/insights/_cold_searches.html.haml +25 -0
  805. data/app/views/workarea/admin/insights/_customer_acquisition.html.haml +11 -0
  806. data/app/views/workarea/admin/insights/_customers_at_risk.html.haml +20 -0
  807. data/app/views/workarea/admin/insights/_hot_products.html.haml +29 -0
  808. data/app/views/workarea/admin/insights/_hot_searches.html.haml +27 -0
  809. data/app/views/workarea/admin/insights/_low_aov_customers.html.haml +20 -0
  810. data/app/views/workarea/admin/insights/_most_discount_given.html.haml +24 -0
  811. data/app/views/workarea/admin/insights/_most_discounted_products.html.haml +32 -0
  812. data/app/views/workarea/admin/insights/_new_products.html.haml +20 -0
  813. data/app/views/workarea/admin/insights/_non_sellers.html.haml +23 -0
  814. data/app/views/workarea/admin/insights/_popular_searches.html.haml +21 -0
  815. data/app/views/workarea/admin/insights/_popular_searches_without_results.html.haml +19 -0
  816. data/app/views/workarea/admin/insights/_products_purchased_together.html.haml +26 -0
  817. data/app/views/workarea/admin/insights/_products_to_improve.html.haml +26 -0
  818. data/app/views/workarea/admin/insights/_promising_products.html.haml +26 -0
  819. data/app/views/workarea/admin/insights/_release_reminder.html.haml +36 -0
  820. data/app/views/workarea/admin/insights/_repeat_purchase_rate.html.haml +20 -0
  821. data/app/views/workarea/admin/insights/_sales_by_navigation.html.haml +22 -0
  822. data/app/views/workarea/admin/insights/_searches_to_improve.html.haml +25 -0
  823. data/app/views/workarea/admin/insights/_star_products.html.haml +26 -0
  824. data/app/views/workarea/admin/insights/_star_searches.html.haml +21 -0
  825. data/app/views/workarea/admin/insights/_top_categories.html.haml +22 -0
  826. data/app/views/workarea/admin/insights/_top_discounts.html.haml +24 -0
  827. data/app/views/workarea/admin/insights/_top_products.html.haml +25 -0
  828. data/app/views/workarea/admin/insights/_trending_products.html.haml +24 -0
  829. data/app/views/workarea/admin/insights/_trending_searches.html.haml +21 -0
  830. data/app/views/workarea/admin/insights/_upcoming_releases.html.haml +36 -0
  831. data/app/views/workarea/admin/inventory_skus/_aux_navigation.html.haml +4 -0
  832. data/app/views/workarea/admin/inventory_skus/_cards.html.haml +42 -0
  833. data/app/views/workarea/admin/inventory_skus/_summary.html.haml +6 -0
  834. data/app/views/workarea/admin/inventory_skus/edit.html.haml +71 -0
  835. data/app/views/workarea/admin/inventory_skus/index.html.haml +81 -0
  836. data/app/views/workarea/admin/inventory_skus/new.html.haml +52 -0
  837. data/app/views/workarea/admin/inventory_skus/show.html.haml +17 -0
  838. data/app/views/workarea/admin/navigation_menus/_summary.html.haml +10 -0
  839. data/app/views/workarea/admin/navigation_menus/edit.html.haml +42 -0
  840. data/app/views/workarea/admin/navigation_menus/index.html.haml +57 -0
  841. data/app/views/workarea/admin/navigation_menus/new.html.haml +44 -0
  842. data/app/views/workarea/admin/navigation_redirects/_summary.html.haml +7 -0
  843. data/app/views/workarea/admin/navigation_redirects/index.html.haml +72 -0
  844. data/app/views/workarea/admin/navigation_taxons/_insert.html.haml +53 -0
  845. data/app/views/workarea/admin/navigation_taxons/_select.html.haml +21 -0
  846. data/app/views/workarea/admin/navigation_taxons/_taxon.html.haml +34 -0
  847. data/app/views/workarea/admin/navigation_taxons/children.html.haml +19 -0
  848. data/app/views/workarea/admin/navigation_taxons/edit.html.haml +52 -0
  849. data/app/views/workarea/admin/navigation_taxons/index.html.haml +38 -0
  850. data/app/views/workarea/admin/navigation_taxons/new.html.haml +43 -0
  851. data/app/views/workarea/admin/orders/_aux_navigation.html.haml +4 -0
  852. data/app/views/workarea/admin/orders/_cards.html.haml +181 -0
  853. data/app/views/workarea/admin/orders/_summary.html.haml +11 -0
  854. data/app/views/workarea/admin/orders/attributes.html.haml +123 -0
  855. data/app/views/workarea/admin/orders/index.html.haml +128 -0
  856. data/app/views/workarea/admin/orders/show.html.haml +24 -0
  857. data/app/views/workarea/admin/orders/tenders/_credit_card.html.haml +4 -0
  858. data/app/views/workarea/admin/orders/tenders/_missing.html.haml +1 -0
  859. data/app/views/workarea/admin/orders/tenders/_store_credit.html.haml +4 -0
  860. data/app/views/workarea/admin/orders/timeline.html.haml +33 -0
  861. data/app/views/workarea/admin/orders/timeline/_authorize.html.haml +12 -0
  862. data/app/views/workarea/admin/orders/timeline/_canceled.html.haml +8 -0
  863. data/app/views/workarea/admin/orders/timeline/_canceled_fulfillment.html.haml +8 -0
  864. data/app/views/workarea/admin/orders/timeline/_capture.html.haml +12 -0
  865. data/app/views/workarea/admin/orders/timeline/_comment.html.haml +9 -0
  866. data/app/views/workarea/admin/orders/timeline/_copied.html.haml +9 -0
  867. data/app/views/workarea/admin/orders/timeline/_created.html.haml +8 -0
  868. data/app/views/workarea/admin/orders/timeline/_placed.html.haml +8 -0
  869. data/app/views/workarea/admin/orders/timeline/_price_overridden.html.haml +8 -0
  870. data/app/views/workarea/admin/orders/timeline/_refund.html.haml +12 -0
  871. data/app/views/workarea/admin/orders/timeline/_shipped.html.haml +8 -0
  872. data/app/views/workarea/admin/payment_transactions/_aux_navigation.html.haml +2 -0
  873. data/app/views/workarea/admin/payment_transactions/_summary.html.haml +6 -0
  874. data/app/views/workarea/admin/payment_transactions/index.html.haml +78 -0
  875. data/app/views/workarea/admin/payment_transactions/show.html.haml +80 -0
  876. data/app/views/workarea/admin/payments/show.html.haml +72 -0
  877. data/app/views/workarea/admin/prices/edit.html.haml +70 -0
  878. data/app/views/workarea/admin/prices/index.html.haml +51 -0
  879. data/app/views/workarea/admin/prices/new.html.haml +65 -0
  880. data/app/views/workarea/admin/pricing/show.html.haml +99 -0
  881. data/app/views/workarea/admin/pricing_discount_code_lists/_cards.html.haml +67 -0
  882. data/app/views/workarea/admin/pricing_discount_code_lists/_summary.html.haml +6 -0
  883. data/app/views/workarea/admin/pricing_discount_code_lists/edit.html.haml +34 -0
  884. data/app/views/workarea/admin/pricing_discount_code_lists/index.html.haml +53 -0
  885. data/app/views/workarea/admin/pricing_discount_code_lists/new.html.haml +40 -0
  886. data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +50 -0
  887. data/app/views/workarea/admin/pricing_discount_code_lists/show.html.haml +31 -0
  888. data/app/views/workarea/admin/pricing_discounts/_aux_navigation.html.haml +3 -0
  889. data/app/views/workarea/admin/pricing_discounts/_cards.html.haml +122 -0
  890. data/app/views/workarea/admin/pricing_discounts/_summary.html.haml +10 -0
  891. data/app/views/workarea/admin/pricing_discounts/conditions/_item_quantity.html.haml +8 -0
  892. data/app/views/workarea/admin/pricing_discounts/conditions/_order_total.html.haml +10 -0
  893. data/app/views/workarea/admin/pricing_discounts/conditions/_promo_code.html.haml +17 -0
  894. data/app/views/workarea/admin/pricing_discounts/conditions/_user_tags.html.haml +13 -0
  895. data/app/views/workarea/admin/pricing_discounts/edit.html.haml +57 -0
  896. data/app/views/workarea/admin/pricing_discounts/index.html.haml +85 -0
  897. data/app/views/workarea/admin/pricing_discounts/index.json.jbuilder +8 -0
  898. data/app/views/workarea/admin/pricing_discounts/insights.html.haml +60 -0
  899. data/app/views/workarea/admin/pricing_discounts/properties/_buy_some_get_some.html.haml +39 -0
  900. data/app/views/workarea/admin/pricing_discounts/properties/_category.html.haml +22 -0
  901. data/app/views/workarea/admin/pricing_discounts/properties/_free_gift.html.haml +28 -0
  902. data/app/views/workarea/admin/pricing_discounts/properties/_order_total.html.haml +21 -0
  903. data/app/views/workarea/admin/pricing_discounts/properties/_product.html.haml +23 -0
  904. data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +32 -0
  905. data/app/views/workarea/admin/pricing_discounts/properties/_quantity_fixed_price.html.haml +36 -0
  906. data/app/views/workarea/admin/pricing_discounts/properties/_shipping.html.haml +21 -0
  907. data/app/views/workarea/admin/pricing_discounts/rules.html.haml +64 -0
  908. data/app/views/workarea/admin/pricing_discounts/show.html.haml +39 -0
  909. data/app/views/workarea/admin/pricing_overrides/edit.html.haml +115 -0
  910. data/app/views/workarea/admin/pricing_skus/_aux_navigation.html.haml +4 -0
  911. data/app/views/workarea/admin/pricing_skus/_cards.html.haml +67 -0
  912. data/app/views/workarea/admin/pricing_skus/_summary.html.haml +10 -0
  913. data/app/views/workarea/admin/pricing_skus/edit.html.haml +65 -0
  914. data/app/views/workarea/admin/pricing_skus/index.html.haml +81 -0
  915. data/app/views/workarea/admin/pricing_skus/new.html.haml +78 -0
  916. data/app/views/workarea/admin/pricing_skus/show.html.haml +16 -0
  917. data/app/views/workarea/admin/product_rules/_card.html.haml +23 -0
  918. data/app/views/workarea/admin/product_rules/_form.html.haml +12 -0
  919. data/app/views/workarea/admin/product_rules/_preview.html.haml +28 -0
  920. data/app/views/workarea/admin/product_rules/fields/_available_inventory.html.haml +7 -0
  921. data/app/views/workarea/admin/product_rules/fields/_category.html.haml +5 -0
  922. data/app/views/workarea/admin/product_rules/fields/_created_at.html.haml +4 -0
  923. data/app/views/workarea/admin/product_rules/fields/_excluded_products.html.haml +5 -0
  924. data/app/views/workarea/admin/product_rules/fields/_generic.html.haml +8 -0
  925. data/app/views/workarea/admin/product_rules/fields/_on_sale.html.haml +7 -0
  926. data/app/views/workarea/admin/product_rules/fields/_price.html.haml +5 -0
  927. data/app/views/workarea/admin/product_rules/fields/_search.html.haml +31 -0
  928. data/app/views/workarea/admin/product_rules/index.html.haml +61 -0
  929. data/app/views/workarea/admin/product_rules/preview.html.haml +1 -0
  930. data/app/views/workarea/admin/product_rules/summaries/_available_inventory.html.haml +1 -0
  931. data/app/views/workarea/admin/product_rules/summaries/_category.html.haml +1 -0
  932. data/app/views/workarea/admin/product_rules/summaries/_created_at.html.haml +1 -0
  933. data/app/views/workarea/admin/product_rules/summaries/_excluded_products.html.haml +4 -0
  934. data/app/views/workarea/admin/product_rules/summaries/_generic.html.haml +3 -0
  935. data/app/views/workarea/admin/product_rules/summaries/_on_sale.html.haml +5 -0
  936. data/app/views/workarea/admin/product_rules/summaries/_price.html.haml +1 -0
  937. data/app/views/workarea/admin/product_rules/summaries/_search.html.haml +1 -0
  938. data/app/views/workarea/admin/recommendations/edit.html.haml +42 -0
  939. data/app/views/workarea/admin/releasables/index.html.haml +72 -0
  940. data/app/views/workarea/admin/releases/_cards.html.haml +103 -0
  941. data/app/views/workarea/admin/releases/_publish.html.haml +31 -0
  942. data/app/views/workarea/admin/releases/_select.html.haml +13 -0
  943. data/app/views/workarea/admin/releases/_summary.html.haml +6 -0
  944. data/app/views/workarea/admin/releases/calendar.html.haml +54 -0
  945. data/app/views/workarea/admin/releases/edit.html.haml +83 -0
  946. data/app/views/workarea/admin/releases/index.html.haml +100 -0
  947. data/app/views/workarea/admin/releases/new.html.haml +6 -0
  948. data/app/views/workarea/admin/releases/show.html.haml +65 -0
  949. data/app/views/workarea/admin/reports/_export.html.haml +12 -0
  950. data/app/views/workarea/admin/reports/_group_by_time.html.haml +6 -0
  951. data/app/views/workarea/admin/reports/average_order_value.html.haml +39 -0
  952. data/app/views/workarea/admin/reports/customers.html.haml +49 -0
  953. data/app/views/workarea/admin/reports/first_time_vs_returning_sales.html.haml +41 -0
  954. data/app/views/workarea/admin/reports/insights.html.haml +16 -0
  955. data/app/views/workarea/admin/reports/low_inventory.html.haml +35 -0
  956. data/app/views/workarea/admin/reports/reference.html.haml +88 -0
  957. data/app/views/workarea/admin/reports/sales_by_category.html.haml +42 -0
  958. data/app/views/workarea/admin/reports/sales_by_country.html.haml +42 -0
  959. data/app/views/workarea/admin/reports/sales_by_discount.html.haml +38 -0
  960. data/app/views/workarea/admin/reports/sales_by_product.html.haml +42 -0
  961. data/app/views/workarea/admin/reports/sales_by_sku.html.haml +42 -0
  962. data/app/views/workarea/admin/reports/sales_by_traffic_referrer.html.haml +42 -0
  963. data/app/views/workarea/admin/reports/sales_over_time.html.haml +49 -0
  964. data/app/views/workarea/admin/reports/searches.html.haml +45 -0
  965. data/app/views/workarea/admin/reports_mailer/export.html.haml +3 -0
  966. data/app/views/workarea/admin/search_customizations/_aux_navigation.html.haml +2 -0
  967. data/app/views/workarea/admin/search_customizations/_cards.html.haml +130 -0
  968. data/app/views/workarea/admin/search_customizations/analyze.html.haml +119 -0
  969. data/app/views/workarea/admin/search_customizations/edit.html.haml +74 -0
  970. data/app/views/workarea/admin/search_customizations/index.html.haml +78 -0
  971. data/app/views/workarea/admin/search_customizations/index.json.jbuilder +4 -0
  972. data/app/views/workarea/admin/search_customizations/insights.html.haml +71 -0
  973. data/app/views/workarea/admin/search_customizations/show.html.haml +19 -0
  974. data/app/views/workarea/admin/search_settings/show.html.haml +55 -0
  975. data/app/views/workarea/admin/searches/show.html.haml +54 -0
  976. data/app/views/workarea/admin/shared/_activate_select.html.haml +6 -0
  977. data/app/views/workarea/admin/shared/_bulk_actions.html.haml +18 -0
  978. data/app/views/workarea/admin/shared/_creation_date.html.haml +21 -0
  979. data/app/views/workarea/admin/shared/_csv_formatting_tooltip.html.haml +9 -0
  980. data/app/views/workarea/admin/shared/_date_selector.html.haml +22 -0
  981. data/app/views/workarea/admin/shared/_message.html.haml +4 -0
  982. data/app/views/workarea/admin/shared/_pagination.html.haml +38 -0
  983. data/app/views/workarea/admin/shared/_primary_nav.html.haml +113 -0
  984. data/app/views/workarea/admin/shared/_publishing_select.html.haml +6 -0
  985. data/app/views/workarea/admin/shared/_release_slug_tooltip.html.haml +7 -0
  986. data/app/views/workarea/admin/shared/_summary.html.haml +9 -0
  987. data/app/views/workarea/admin/shared/_toggle_button.html.haml +7 -0
  988. data/app/views/workarea/admin/shared/values.json.jbuilder +4 -0
  989. data/app/views/workarea/admin/shipping_services/edit.html.haml +69 -0
  990. data/app/views/workarea/admin/shipping_services/index.html.haml +61 -0
  991. data/app/views/workarea/admin/shipping_services/new.html.haml +57 -0
  992. data/app/views/workarea/admin/shippings/index.html.haml +92 -0
  993. data/app/views/workarea/admin/status_report_mailer/report.html.haml +94 -0
  994. data/app/views/workarea/admin/style_guides/_navigation.html.haml +10 -0
  995. data/app/views/workarea/admin/style_guides/base/_forms.html.haml +77 -0
  996. data/app/views/workarea/admin/style_guides/base/_tables.html.haml +72 -0
  997. data/app/views/workarea/admin/style_guides/components/_activity.html.haml +25 -0
  998. data/app/views/workarea/admin/style_guides/components/_activity_group.html.haml +80 -0
  999. data/app/views/workarea/admin/style_guides/components/_asset_picker_field.html.haml +12 -0
  1000. data/app/views/workarea/admin/style_guides/components/_avatar.html.haml +17 -0
  1001. data/app/views/workarea/admin/style_guides/components/_box.html.haml +59 -0
  1002. data/app/views/workarea/admin/style_guides/components/_button.html.haml +53 -0
  1003. data/app/views/workarea/admin/style_guides/components/_card.html.haml +157 -0
  1004. data/app/views/workarea/admin/style_guides/components/_checkbox.html.haml +21 -0
  1005. data/app/views/workarea/admin/style_guides/components/_color_picker_field.html.haml +36 -0
  1006. data/app/views/workarea/admin/style_guides/components/_data_file_sample.html.haml +28 -0
  1007. data/app/views/workarea/admin/style_guides/components/_data_pairs.html.haml +28 -0
  1008. data/app/views/workarea/admin/style_guides/components/_date_marker.html.haml +18 -0
  1009. data/app/views/workarea/admin/style_guides/components/_direct_upload.html.haml +96 -0
  1010. data/app/views/workarea/admin/style_guides/components/_expandable.html.haml +25 -0
  1011. data/app/views/workarea/admin/style_guides/components/_index_table.html.haml +51 -0
  1012. data/app/views/workarea/admin/style_guides/components/_insight.html.haml +100 -0
  1013. data/app/views/workarea/admin/style_guides/components/_loading.html.haml +85 -0
  1014. data/app/views/workarea/admin/style_guides/components/_menu.html.haml +112 -0
  1015. data/app/views/workarea/admin/style_guides/components/_message.html.haml +45 -0
  1016. data/app/views/workarea/admin/style_guides/components/_pagination.html.haml +156 -0
  1017. data/app/views/workarea/admin/style_guides/components/_product_summary.html.haml +28 -0
  1018. data/app/views/workarea/admin/style_guides/components/_property.html.haml +147 -0
  1019. data/app/views/workarea/admin/style_guides/components/_property_toggle.html.haml +48 -0
  1020. data/app/views/workarea/admin/style_guides/components/_release_changeset.html.haml +55 -0
  1021. data/app/views/workarea/admin/style_guides/components/_search_form.html.haml +28 -0
  1022. data/app/views/workarea/admin/style_guides/components/_state.html.haml +35 -0
  1023. data/app/views/workarea/admin/style_guides/components/_summary.html.haml +66 -0
  1024. data/app/views/workarea/admin/style_guides/components/_svg_icon.html.haml +51 -0
  1025. data/app/views/workarea/admin/style_guides/components/_tabs.html.haml +17 -0
  1026. data/app/views/workarea/admin/style_guides/components/_text_box.html.haml +147 -0
  1027. data/app/views/workarea/admin/style_guides/components/_text_button.html.haml +58 -0
  1028. data/app/views/workarea/admin/style_guides/components/_toggle_button.html.haml +59 -0
  1029. data/app/views/workarea/admin/style_guides/components/_ui_accordion.html.haml +21 -0
  1030. data/app/views/workarea/admin/style_guides/components/_ui_autocomplete.html.haml +10 -0
  1031. data/app/views/workarea/admin/style_guides/components/_ui_datepicker.html.haml +22 -0
  1032. data/app/views/workarea/admin/style_guides/components/_ui_helper_hidden_accessible.html.haml +5 -0
  1033. data/app/views/workarea/admin/style_guides/components/_view.html.haml +45 -0
  1034. data/app/views/workarea/admin/style_guides/components/_workflow_bar.html.haml +118 -0
  1035. data/app/views/workarea/admin/style_guides/components/_wysiwyg.html.haml +10 -0
  1036. data/app/views/workarea/admin/style_guides/index.html.haml +87 -0
  1037. data/app/views/workarea/admin/style_guides/objects/_button.html.haml +9 -0
  1038. data/app/views/workarea/admin/style_guides/objects/_button_reset.html.haml +17 -0
  1039. data/app/views/workarea/admin/style_guides/objects/_inline_list.html.haml +41 -0
  1040. data/app/views/workarea/admin/style_guides/objects/_list_reset.html.haml +17 -0
  1041. data/app/views/workarea/admin/style_guides/objects/_section.html.haml +13 -0
  1042. data/app/views/workarea/admin/style_guides/objects/_text_field_reset.html.haml +11 -0
  1043. data/app/views/workarea/admin/style_guides/objects/_tooltip_content.html.haml +31 -0
  1044. data/app/views/workarea/admin/style_guides/settings/_color_variables.html.haml +21 -0
  1045. data/app/views/workarea/admin/style_guides/show.html.haml +10 -0
  1046. data/app/views/workarea/admin/style_guides/trumps/_break_word.html.haml +15 -0
  1047. data/app/views/workarea/admin/style_guides/trumps/_clearfix.html.haml +21 -0
  1048. data/app/views/workarea/admin/style_guides/trumps/_hidden.html.haml +97 -0
  1049. data/app/views/workarea/admin/style_guides/trumps/_image_replacement.html.haml +13 -0
  1050. data/app/views/workarea/admin/style_guides/trumps/_truncate.html.haml +13 -0
  1051. data/app/views/workarea/admin/style_guides/trumps/_visible.html.haml +97 -0
  1052. data/app/views/workarea/admin/style_guides/trumps/_visually_hidden.html.haml +17 -0
  1053. data/app/views/workarea/admin/style_guides/typography/_align.html.haml +25 -0
  1054. data/app/views/workarea/admin/style_guides/typography/_fonts.html.haml +25 -0
  1055. data/app/views/workarea/admin/style_guides/typography/_headings.html.haml +34 -0
  1056. data/app/views/workarea/admin/style_guides/typography/_links.html.haml +47 -0
  1057. data/app/views/workarea/admin/style_guides/typography/_spark.html.haml +32 -0
  1058. data/app/views/workarea/admin/style_guides/typography/_text.html.haml +50 -0
  1059. data/app/views/workarea/admin/tax_categories/_cards.html.haml +57 -0
  1060. data/app/views/workarea/admin/tax_categories/edit.html.haml +44 -0
  1061. data/app/views/workarea/admin/tax_categories/index.html.haml +48 -0
  1062. data/app/views/workarea/admin/tax_categories/new.html.haml +39 -0
  1063. data/app/views/workarea/admin/tax_categories/show.html.haml +19 -0
  1064. data/app/views/workarea/admin/tax_rates/index.html.haml +52 -0
  1065. data/app/views/workarea/admin/timeline/_card.html.haml +16 -0
  1066. data/app/views/workarea/admin/timeline/show.html.haml +78 -0
  1067. data/app/views/workarea/admin/toolbar/show.html.haml +79 -0
  1068. data/app/views/workarea/admin/trash/index.html.haml +21 -0
  1069. data/app/views/workarea/admin/users/_cards.html.haml +199 -0
  1070. data/app/views/workarea/admin/users/_summary.html.haml +15 -0
  1071. data/app/views/workarea/admin/users/addresses.html.haml +22 -0
  1072. data/app/views/workarea/admin/users/edit.html.haml +88 -0
  1073. data/app/views/workarea/admin/users/index.html.haml +94 -0
  1074. data/app/views/workarea/admin/users/index.json.jbuilder +4 -0
  1075. data/app/views/workarea/admin/users/insights.html.haml +128 -0
  1076. data/app/views/workarea/admin/users/orders.html.haml +52 -0
  1077. data/app/views/workarea/admin/users/permissions.html.haml +132 -0
  1078. data/app/views/workarea/admin/users/show.html.haml +38 -0
  1079. data/bin/rails +18 -0
  1080. data/config/locales/en.yml +3609 -0
  1081. data/config/routes.rb +372 -0
  1082. data/lib/workarea/admin.rb +7 -0
  1083. data/lib/workarea/admin/engine.rb +8 -0
  1084. data/lib/workarea/mailer_previews/admin/comment_mailer_preview.rb +12 -0
  1085. data/lib/workarea/mailer_previews/admin/data_file_mailer_preview.rb +21 -0
  1086. data/lib/workarea/mailer_previews/admin/status_report_mailer_preview.rb +9 -0
  1087. data/public/workarea/import_samples/tax_rates.csv +3 -0
  1088. data/test/dummy/README.rdoc +261 -0
  1089. data/test/dummy/Rakefile +7 -0
  1090. data/test/dummy/app/controllers/application_controller.rb +3 -0
  1091. data/test/dummy/app/helpers/application_helper.rb +2 -0
  1092. data/test/dummy/app/mailers/.gitkeep +0 -0
  1093. data/test/dummy/app/models/.gitkeep +0 -0
  1094. data/test/dummy/bin/bundle +3 -0
  1095. data/test/dummy/bin/rails +5 -0
  1096. data/test/dummy/bin/rake +4 -0
  1097. data/test/dummy/bin/setup +34 -0
  1098. data/test/dummy/bin/update +29 -0
  1099. data/test/dummy/config.ru +4 -0
  1100. data/test/dummy/config/application.rb +22 -0
  1101. data/test/dummy/config/boot.rb +3 -0
  1102. data/test/dummy/config/cable.yml +9 -0
  1103. data/test/dummy/config/environment.rb +5 -0
  1104. data/test/dummy/config/environments/development.rb +54 -0
  1105. data/test/dummy/config/environments/production.rb +86 -0
  1106. data/test/dummy/config/environments/test.rb +43 -0
  1107. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  1108. data/test/dummy/config/initializers/assets.rb +11 -0
  1109. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  1110. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  1111. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  1112. data/test/dummy/config/initializers/inflections.rb +16 -0
  1113. data/test/dummy/config/initializers/mime_types.rb +4 -0
  1114. data/test/dummy/config/initializers/new_framework_defaults.rb +17 -0
  1115. data/test/dummy/config/initializers/secret_token.rb +7 -0
  1116. data/test/dummy/config/initializers/session_store.rb +3 -0
  1117. data/test/dummy/config/initializers/workarea.rb +8 -0
  1118. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  1119. data/test/dummy/config/locales/de.yml +2 -0
  1120. data/test/dummy/config/locales/en.yml +23 -0
  1121. data/test/dummy/config/puma.rb +47 -0
  1122. data/test/dummy/config/routes.rb +5 -0
  1123. data/test/dummy/config/secrets.yml +22 -0
  1124. data/test/dummy/config/spring.rb +6 -0
  1125. data/test/dummy/db/seeds.rb +10 -0
  1126. data/test/dummy/lib/assets/.gitkeep +0 -0
  1127. data/test/dummy/log/.gitkeep +0 -0
  1128. data/test/dummy/public/404.html +26 -0
  1129. data/test/dummy/public/422.html +26 -0
  1130. data/test/dummy/public/500.html +25 -0
  1131. data/test/dummy/public/favicon.ico +1 -0
  1132. data/test/dummy/script/rails +6 -0
  1133. data/test/helpers/workarea/admin/application_helper_test.rb +83 -0
  1134. data/test/helpers/workarea/admin/icons_helper_test.rb +62 -0
  1135. data/test/helpers/workarea/admin/imports_helper_test.rb +31 -0
  1136. data/test/helpers/workarea/admin/insights_helper_test.rb +19 -0
  1137. data/test/helpers/workarea/admin/releases_helper_test.rb +152 -0
  1138. data/test/helpers/workarea/admin/settings_helper_test.rb +34 -0
  1139. data/test/integration/workarea/admin/assets_integration_test.rb +62 -0
  1140. data/test/integration/workarea/admin/authorization_integration_test.rb +32 -0
  1141. data/test/integration/workarea/admin/bookmarks_integration_test.rb +29 -0
  1142. data/test/integration/workarea/admin/bulk_action_deletions_integration_test.rb +149 -0
  1143. data/test/integration/workarea/admin/bulk_action_product_edits_integration_test.rb +77 -0
  1144. data/test/integration/workarea/admin/bulk_action_sequential_product_edits_integration_test.rb +198 -0
  1145. data/test/integration/workarea/admin/bulk_actions_integration_test.rb +42 -0
  1146. data/test/integration/workarea/admin/catalog_product_copies_integration_test.rb +37 -0
  1147. data/test/integration/workarea/admin/categories_integration_test.rb +63 -0
  1148. data/test/integration/workarea/admin/categorizations_integration_test.rb +49 -0
  1149. data/test/integration/workarea/admin/changesets_integration_test.rb +22 -0
  1150. data/test/integration/workarea/admin/comments_integration_test.rb +147 -0
  1151. data/test/integration/workarea/admin/content_blocks_integration_test.rb +116 -0
  1152. data/test/integration/workarea/admin/content_emails_integration_test.rb +22 -0
  1153. data/test/integration/workarea/admin/content_integration_test.rb +20 -0
  1154. data/test/integration/workarea/admin/content_presets_integration_test.rb +38 -0
  1155. data/test/integration/workarea/admin/create_catalog_categories_integration_test.rb +99 -0
  1156. data/test/integration/workarea/admin/create_catalog_products_integration_test.rb +215 -0
  1157. data/test/integration/workarea/admin/create_content_pages_integration_test.rb +99 -0
  1158. data/test/integration/workarea/admin/create_pricing_discounts_integration_test.rb +249 -0
  1159. data/test/integration/workarea/admin/create_releases_integration_test.rb +24 -0
  1160. data/test/integration/workarea/admin/create_users_integration_test.rb +188 -0
  1161. data/test/integration/workarea/admin/data_file_exports_integration_test.rb +69 -0
  1162. data/test/integration/workarea/admin/data_file_imports_integration_test.rb +153 -0
  1163. data/test/integration/workarea/admin/direct_uploads_integration_test.rb +92 -0
  1164. data/test/integration/workarea/admin/discounts_integration_test.rb +57 -0
  1165. data/test/integration/workarea/admin/email_signups_integration_test.rb +18 -0
  1166. data/test/integration/workarea/admin/featured_products_integration_test.rb +55 -0
  1167. data/test/integration/workarea/admin/guest_browsings_integration_test.rb +62 -0
  1168. data/test/integration/workarea/admin/help_articles_integration_test.rb +70 -0
  1169. data/test/integration/workarea/admin/impersonations_integration_test.rb +79 -0
  1170. data/test/integration/workarea/admin/import_taxes_integration_test.rb +30 -0
  1171. data/test/integration/workarea/admin/inventory_skus_integration_test.rb +68 -0
  1172. data/test/integration/workarea/admin/jump_to_integration_test.rb +239 -0
  1173. data/test/integration/workarea/admin/menus_integration_test.rb +142 -0
  1174. data/test/integration/workarea/admin/pages_integration_test.rb +45 -0
  1175. data/test/integration/workarea/admin/permissions_integration_test.rb +27 -0
  1176. data/test/integration/workarea/admin/pricing_overrides_integration_test.rb +63 -0
  1177. data/test/integration/workarea/admin/pricing_sku_prices_integration_test.rb +86 -0
  1178. data/test/integration/workarea/admin/pricing_skus_integration_test.rb +67 -0
  1179. data/test/integration/workarea/admin/product_images_integration_test.rb +68 -0
  1180. data/test/integration/workarea/admin/product_rules_integration_test.rb +151 -0
  1181. data/test/integration/workarea/admin/products_integration_test.rb +73 -0
  1182. data/test/integration/workarea/admin/promo_codes_list_integration_test.rb +73 -0
  1183. data/test/integration/workarea/admin/publish_authorization_integration_test.rb +66 -0
  1184. data/test/integration/workarea/admin/publishing_integration_test.rb +36 -0
  1185. data/test/integration/workarea/admin/recommendations_integration_test.rb +29 -0
  1186. data/test/integration/workarea/admin/redirects_integration_test.rb +26 -0
  1187. data/test/integration/workarea/admin/releases_integration_test.rb +172 -0
  1188. data/test/integration/workarea/admin/reports_integration_test.rb +55 -0
  1189. data/test/integration/workarea/admin/search_customizations_integration_test.rb +60 -0
  1190. data/test/integration/workarea/admin/search_settings_integration_test.rb +63 -0
  1191. data/test/integration/workarea/admin/shipping_service_integration_test.rb +79 -0
  1192. data/test/integration/workarea/admin/sort_integration_test.rb +17 -0
  1193. data/test/integration/workarea/admin/tax_categories_integration_test.rb +44 -0
  1194. data/test/integration/workarea/admin/taxonomy_integration_test.rb +94 -0
  1195. data/test/integration/workarea/admin/trash_integration_test.rb +145 -0
  1196. data/test/integration/workarea/admin/users_integration_test.rb +153 -0
  1197. data/test/integration/workarea/admin/variants_integration_test.rb +78 -0
  1198. data/test/integration/workarea/admin/visiting_integration_test.rb +40 -0
  1199. data/test/javascripts/add_content_block_buttons_spec.js +21 -0
  1200. data/test/javascripts/add_to_calendar_buttons_spec.js +27 -0
  1201. data/test/javascripts/asset_pickers_spec.js +56 -0
  1202. data/test/javascripts/cloneable_rows_spec.js +38 -0
  1203. data/test/javascripts/content_blocks_spec.js +47 -0
  1204. data/test/javascripts/content_editor_form_cancel_spec.js +19 -0
  1205. data/test/javascripts/content_editor_forms_spec.js +20 -0
  1206. data/test/javascripts/content_preset_form_spec.js +18 -0
  1207. data/test/javascripts/datepicker_fields_spec.js +65 -0
  1208. data/test/javascripts/datetimepicker_fields_spec.js +97 -0
  1209. data/test/javascripts/direct_uploads_spec.js +152 -0
  1210. data/test/javascripts/fixtures/add_content_block_button.html.haml +10 -0
  1211. data/test/javascripts/fixtures/add_to_calendar_button.html.haml +6 -0
  1212. data/test/javascripts/fixtures/asset_picker.html.haml +6 -0
  1213. data/test/javascripts/fixtures/calendar.html.haml +25 -0
  1214. data/test/javascripts/fixtures/cloneable_row.html.haml +7 -0
  1215. data/test/javascripts/fixtures/content_block.html.haml +4 -0
  1216. data/test/javascripts/fixtures/content_block_editor_form.html.haml +8 -0
  1217. data/test/javascripts/fixtures/datepicker_fields.html.haml +31 -0
  1218. data/test/javascripts/fixtures/datetimepicker_fields.html.haml +11 -0
  1219. data/test/javascripts/fixtures/direct_upload.html.haml +3 -0
  1220. data/test/javascripts/fixtures/help_lookup_button.haml +11 -0
  1221. data/test/javascripts/fixtures/menu_editor_menu_list_sortable.html.haml +3 -0
  1222. data/test/javascripts/fixtures/new_navigation_taxon.html.haml +10 -0
  1223. data/test/javascripts/fixtures/primary_nav.html.haml +4 -0
  1224. data/test/javascripts/fixtures/property_toggle.html.haml +16 -0
  1225. data/test/javascripts/fixtures/release_calendar_placeholder.html.haml +1 -0
  1226. data/test/javascripts/fixtures/release_reminder.html.haml +6 -0
  1227. data/test/javascripts/fixtures/remote_select.html.haml +1 -0
  1228. data/test/javascripts/fixtures/sort_form.html.haml +3 -0
  1229. data/test/javascripts/fixtures/takeover.html.haml +4 -0
  1230. data/test/javascripts/fixtures/tooltip.html.haml +3 -0
  1231. data/test/javascripts/menu_editor_menu_list_sortables_spec.js +40 -0
  1232. data/test/javascripts/messages_spec.js +50 -0
  1233. data/test/javascripts/new_navigation_taxons_spec.js +20 -0
  1234. data/test/javascripts/primary_nav_spec.js +22 -0
  1235. data/test/javascripts/property_toggles_spec.js +33 -0
  1236. data/test/javascripts/release_calendar_placeholders_spec.js +60 -0
  1237. data/test/javascripts/release_reminder_spec.js +18 -0
  1238. data/test/javascripts/relevance_sort_spec.js +23 -0
  1239. data/test/javascripts/remove_selects_spec.js +32 -0
  1240. data/test/javascripts/spec_helper.js +3 -0
  1241. data/test/javascripts/takeover_spec.js +99 -0
  1242. data/test/javascripts/tooltips_spec.js +52 -0
  1243. data/test/mailers/workarea/admin/status_report_mailer_test.rb +38 -0
  1244. data/test/system/workarea/admin/activity_system_test.rb +79 -0
  1245. data/test/system/workarea/admin/alerts_system_test.rb +43 -0
  1246. data/test/system/workarea/admin/assets_system_test.rb +75 -0
  1247. data/test/system/workarea/admin/bookmarks_system_test.rb +31 -0
  1248. data/test/system/workarea/admin/bulk_action_deletions_system_test.rb +71 -0
  1249. data/test/system/workarea/admin/bulk_actions_system_test.rb +206 -0
  1250. data/test/system/workarea/admin/categories_system_test.rb +188 -0
  1251. data/test/system/workarea/admin/comments_system_test.rb +21 -0
  1252. data/test/system/workarea/admin/content_emails_system_test.rb +29 -0
  1253. data/test/system/workarea/admin/content_presets_system_test.rb +65 -0
  1254. data/test/system/workarea/admin/content_system_test.rb +130 -0
  1255. data/test/system/workarea/admin/dashboard_system_test.rb +72 -0
  1256. data/test/system/workarea/admin/data_files_system_test.rb +110 -0
  1257. data/test/system/workarea/admin/discounts_system_test.rb +106 -0
  1258. data/test/system/workarea/admin/exports_system_test.rb +63 -0
  1259. data/test/system/workarea/admin/featured_products_system_test.rb +39 -0
  1260. data/test/system/workarea/admin/guest_browsing_system_test.rb +86 -0
  1261. data/test/system/workarea/admin/help_system_test.rb +104 -0
  1262. data/test/system/workarea/admin/impersonation_system_test.rb +59 -0
  1263. data/test/system/workarea/admin/imports_system_test.rb +42 -0
  1264. data/test/system/workarea/admin/insights_system_test.rb +15 -0
  1265. data/test/system/workarea/admin/inventory_skus_system_test.rb +45 -0
  1266. data/test/system/workarea/admin/menus_system_test.rb +94 -0
  1267. data/test/system/workarea/admin/orders_system_test.rb +108 -0
  1268. data/test/system/workarea/admin/pages_system_test.rb +58 -0
  1269. data/test/system/workarea/admin/payment_transactions_system_test.rb +44 -0
  1270. data/test/system/workarea/admin/pricing_sku_prices_system_test.rb +81 -0
  1271. data/test/system/workarea/admin/pricing_skus_system_test.rb +56 -0
  1272. data/test/system/workarea/admin/product_copy_system_test.rb +48 -0
  1273. data/test/system/workarea/admin/product_images_system_test.rb +71 -0
  1274. data/test/system/workarea/admin/product_rules_system_test.rb +157 -0
  1275. data/test/system/workarea/admin/products_system_test.rb +140 -0
  1276. data/test/system/workarea/admin/publish_authorization_system_test.rb +90 -0
  1277. data/test/system/workarea/admin/recommendations_system_test.rb +80 -0
  1278. data/test/system/workarea/admin/redirects_system_test.rb +42 -0
  1279. data/test/system/workarea/admin/releases_system_test.rb +232 -0
  1280. data/test/system/workarea/admin/reports_system_test.rb +455 -0
  1281. data/test/system/workarea/admin/search_customizations_system_test.rb +133 -0
  1282. data/test/system/workarea/admin/search_settings_system_test.rb +34 -0
  1283. data/test/system/workarea/admin/search_system_test.rb +111 -0
  1284. data/test/system/workarea/admin/sequential_product_editing_system_test.rb +57 -0
  1285. data/test/system/workarea/admin/shipping_services_system_test.rb +30 -0
  1286. data/test/system/workarea/admin/style_guides_system_test.rb +18 -0
  1287. data/test/system/workarea/admin/tax_categories_system_test.rb +61 -0
  1288. data/test/system/workarea/admin/taxonomy_system_test.rb +41 -0
  1289. data/test/system/workarea/admin/timeline_system_test.rb +62 -0
  1290. data/test/system/workarea/admin/toolbar_system_test.rb +24 -0
  1291. data/test/system/workarea/admin/trash_system_test.rb +53 -0
  1292. data/test/system/workarea/admin/users_system_test.rb +141 -0
  1293. data/test/system/workarea/admin/variants_system_test.rb +51 -0
  1294. data/test/teaspoon_env.rb +10 -0
  1295. data/test/test_helper.rb +10 -0
  1296. data/test/view_models/workarea/admin/activity_view_model_test.rb +173 -0
  1297. data/test/view_models/workarea/admin/changeset_view_model_test.rb +72 -0
  1298. data/test/view_models/workarea/admin/code_list_view_model_test.rb +43 -0
  1299. data/test/view_models/workarea/admin/commentable_view_model_test.rb +52 -0
  1300. data/test/view_models/workarea/admin/content_view_model_test.rb +109 -0
  1301. data/test/view_models/workarea/admin/dashboards/insights_graphs_test.rb +106 -0
  1302. data/test/view_models/workarea/admin/dashboards/marketing_view_model_test.rb +25 -0
  1303. data/test/view_models/workarea/admin/dashboards/people_view_model_test.rb +26 -0
  1304. data/test/view_models/workarea/admin/discount_rules_view_model_test.rb +119 -0
  1305. data/test/view_models/workarea/admin/discount_search_view_model_test.rb +26 -0
  1306. data/test/view_models/workarea/admin/discount_view_model_test.rb +19 -0
  1307. data/test/view_models/workarea/admin/fulfillment_item_view_model_test.rb +18 -0
  1308. data/test/view_models/workarea/admin/fulfillment_view_model_test.rb +37 -0
  1309. data/test/view_models/workarea/admin/help_search_view_model_test.rb +35 -0
  1310. data/test/view_models/workarea/admin/insights/insights_details_test.rb +159 -0
  1311. data/test/view_models/workarea/admin/insights/product_view_model_test.rb +92 -0
  1312. data/test/view_models/workarea/admin/order_timeline_view_model_test.rb +194 -0
  1313. data/test/view_models/workarea/admin/product_images_view_model_test.rb +22 -0
  1314. data/test/view_models/workarea/admin/product_view_model_test.rb +152 -0
  1315. data/test/view_models/workarea/admin/promo_code_view_model_test.rb +17 -0
  1316. data/test/view_models/workarea/admin/release_calendar_view_model_test.rb +72 -0
  1317. data/test/view_models/workarea/admin/release_view_model_test.rb +80 -0
  1318. data/test/view_models/workarea/admin/releases_feed_view_model_test.rb +39 -0
  1319. data/test/view_models/workarea/admin/reports/average_order_value_view_model_test.rb +27 -0
  1320. data/test/view_models/workarea/admin/reports/group_by_time_test.rb +32 -0
  1321. data/test/view_models/workarea/admin/reports/insights_view_model_test.rb +36 -0
  1322. data/test/view_models/workarea/admin/reports/sales_by_traffic_referrer_view_model_test.rb +19 -0
  1323. data/test/view_models/workarea/admin/reports/sales_over_time_view_model_test.rb +27 -0
  1324. data/test/view_models/workarea/admin/search_analysis_view_model_test.rb +74 -0
  1325. data/test/view_models/workarea/admin/search_view_model_test.rb +36 -0
  1326. data/test/view_models/workarea/admin/shipping_view_model_test.rb +29 -0
  1327. data/test/view_models/workarea/admin/timeline_view_model_test.rb +80 -0
  1328. data/test/view_models/workarea/admin/transaction_view_model_test.rb +34 -0
  1329. data/test/view_models/workarea/admin/user_search_view_model_test.rb +16 -0
  1330. data/workarea-admin.gemspec +17 -0
  1331. metadata +1401 -0
@@ -0,0 +1,113 @@
1
+ /**
2
+ * @namespace WORKAREA.datepickerFields
3
+ */
4
+ WORKAREA.registerModule('datepickerFields', (function () {
5
+ 'use strict';
6
+
7
+ var setDates = function (event) {
8
+ var dates = event.target.value.split('|'),
9
+ range = { starts_at: dates[0], ends_at: dates[1] || dates[0] },
10
+ $ui = $(event.delegateTarget),
11
+ $startsAt = $ui.find('[data-datepicker-field-starts-at]'),
12
+ $endsAt = $ui.find('[data-datepicker-field-ends-at]');
13
+
14
+ $startsAt.data('datepicker').datepicker('setDate', range.starts_at);
15
+ $endsAt.data('datepicker').datepicker('setDate', range.ends_at);
16
+ },
17
+
18
+ getConfig = function (input, options) {
19
+ return _.merge(
20
+ {},
21
+ WORKAREA.config.datepickerFields.uiOptions,
22
+ options.uiOptions || {}
23
+ );
24
+ },
25
+
26
+ clearDatepickerActiveState = function($inlineCalendar) {
27
+ $('.ui-state-highlight.ui-state-active', $inlineCalendar)
28
+ .removeClass('ui-state-highlight ui-state-active');
29
+ },
30
+
31
+ datepickerAlreadyInjected = function($input) {
32
+ return !_.isEmpty($input.siblings('.datepicker--inline'));
33
+ },
34
+
35
+ injectInlinePlaceholder = function($input, inputId) {
36
+ var placeholder = JST['workarea/admin/templates/inline_datepicker']({
37
+ id: inputId
38
+ });
39
+
40
+ // Remove the UI if it was already injected
41
+ // this condition is only needed because of turbolinks
42
+ if (datepickerAlreadyInjected($input)) {
43
+ $input.siblings('.datepicker--inline').remove();
44
+ }
45
+
46
+ $input.before(placeholder);
47
+
48
+ return $input.siblings('.datepicker--inline');
49
+ },
50
+
51
+ initInlineDatePicker = function (input, options) {
52
+ var $input = $(input),
53
+ initialValue = $(input).val(),
54
+ inputId = $input.attr('id'),
55
+ $inlineCalendar = injectInlinePlaceholder($input, inputId);
56
+
57
+ if (_.isUndefined(options.uiOptions)) {
58
+ options.uiOptions = {};
59
+ }
60
+
61
+ options.uiOptions.altField = '#' + inputId;
62
+
63
+ $inlineCalendar.datepicker(getConfig(input, options));
64
+ $input.data('datepicker', $inlineCalendar);
65
+
66
+ if (_.isEmpty(initialValue)) {
67
+ $inlineCalendar.datepicker('setDate', null);
68
+ //Active state isn't cleared by datepicker setDate: null
69
+ clearDatepickerActiveState($inlineCalendar);
70
+ } else {
71
+ $inlineCalendar.datepicker('setDate', WORKAREA.date.formatDate(initialValue));
72
+ }
73
+ },
74
+
75
+ initDatepicker = function (input, options) {
76
+ var $input = $(input),
77
+ initialValue = $input.val();
78
+
79
+ $input.datepicker(getConfig(input, options));
80
+
81
+ if (_.isEmpty(initialValue)) {
82
+ $input.datepicker('setDate', null);
83
+ } else {
84
+ $input.datepicker('setDate', WORKAREA.date.formatDate(initialValue));
85
+ }
86
+ },
87
+
88
+ initByType = function (index, input) {
89
+ var options = $(input).data('datepickerField');
90
+
91
+ if (options.inline) {
92
+ initInlineDatePicker(input, options);
93
+ } else {
94
+ initDatepicker(input, options);
95
+ }
96
+ },
97
+
98
+ /**
99
+ * @method
100
+ * @name init
101
+ * @memberof WORKAREA.datepickerFields
102
+ */
103
+ init = function ($scope) {
104
+ $('[data-datepicker-field]', $scope)
105
+ .each(initByType)
106
+ .closest('.browsing-controls__filter-dropdown')
107
+ .on('change', '[name=quick_range]', setDates);
108
+ };
109
+
110
+ return {
111
+ init: init
112
+ };
113
+ }()));
@@ -0,0 +1,160 @@
1
+ /**
2
+ * @namespace WORKAREA.datetimepickerFields
3
+ */
4
+ WORKAREA.registerModule('datetimepickerFields', (function () {
5
+ 'use strict';
6
+
7
+ var altFieldId = function (input, options) {
8
+ if(options.inline) {
9
+ return '#' + $(input).attr('id') + WORKAREA.config.datetimepickerFields.fieldSuffixes.date;
10
+ } else {
11
+ return '';
12
+ }
13
+ },
14
+
15
+ getConfig = function (input, options) {
16
+ return _.merge(
17
+ {},
18
+ WORKAREA.config.datepickerFields.uiOptions,
19
+ options.uiOptions || {},
20
+ {
21
+ altField: altFieldId(input, options)
22
+ }
23
+ );
24
+ },
25
+
26
+ twentyFourHourHours = function(hours, ampm) {
27
+ if (hours !== 12) {
28
+ return ampm === 'pm' ? hours + 12 : hours;
29
+ } else if(ampm === 'am') {
30
+ return 0;
31
+ } else {
32
+ return 12;
33
+ }
34
+ },
35
+
36
+ composeDate = function($dateTimePicker, inputId) {
37
+ var fieldSuffixes = WORKAREA.config.datetimepickerFields.fieldSuffixes,
38
+ date = $dateTimePicker.find('#' + inputId + fieldSuffixes.date).val(),
39
+ hours = parseInt($dateTimePicker.find('#' + inputId + fieldSuffixes.hours).val()),
40
+ minutes = $dateTimePicker.find('#' + inputId + fieldSuffixes.minutes).val(),
41
+ ampm = $dateTimePicker.find('#' + inputId + fieldSuffixes.ampm).val(),
42
+ dateParts = date.toString().split('-');
43
+
44
+ if (_.isEmpty(date)) {
45
+ return '';
46
+ } else {
47
+ return new Date(
48
+ dateParts[0],
49
+ dateParts[1] -1, //Date counts months from 0
50
+ dateParts[2],
51
+ twentyFourHourHours(hours, ampm),
52
+ minutes
53
+ );
54
+ }
55
+ },
56
+
57
+ updateDateTimeField = function($input, $dateTimePicker) {
58
+ var dateTime = composeDate($dateTimePicker, $input.attr('id'));
59
+
60
+ $input.val(WORKAREA.date.formatDateTime(dateTime));
61
+ },
62
+
63
+ serializeOnSubmit = function($dateTimePicker, $input) {
64
+ var $form = $input.closest('form');
65
+
66
+ $form.on('submit', function () {
67
+ updateDateTimeField($input, $dateTimePicker);
68
+ });
69
+ },
70
+
71
+ parseDate = function($dateField) {
72
+ return {
73
+ hours: WORKAREA.date.parseHoursFromDate($dateField.val()),
74
+ minutes: WORKAREA.date.parseMinutesFromDate($dateField.val()),
75
+ ampm: WORKAREA.date.parseAmPmFromDate($dateField.val())
76
+ };
77
+ },
78
+
79
+ getCalendar = function($dateTimePicker, $input) {
80
+ return $dateTimePicker.find('#' + $input.attr('id') + WORKAREA.config.datetimepickerFields.fieldSuffixes.picker);
81
+ },
82
+
83
+ clearDatepickerActiveState = function($inlineCalendar) {
84
+ $('.ui-state-highlight.ui-state-active', $inlineCalendar)
85
+ .removeClass('ui-state-highlight ui-state-active');
86
+ },
87
+
88
+ handleDateFieldChange = function($inlineCalendar, event) {
89
+ var $dateField = $(event.currentTarget),
90
+ dateValue = $dateField.val();
91
+
92
+ if (WORKAREA.date.testDateFormat(dateValue)) {
93
+ $inlineCalendar.datepicker('setDate', dateValue);
94
+ } else {
95
+ clearDatepickerActiveState($inlineCalendar);
96
+ }
97
+ },
98
+
99
+ datepickerAlreadyInjected = function($input) {
100
+ return !_.isEmpty($input.siblings('.datetimepicker'));
101
+ },
102
+
103
+ injectUI = function($input) {
104
+ var placeholder = JST['workarea/admin/templates/datetime_picker']({
105
+ id: $input.attr('id'),
106
+ initialDateTime: parseDate($input),
107
+ fieldSuffixes: WORKAREA.config.datetimepickerFields.fieldSuffixes,
108
+ name: $input.attr('id')
109
+ });
110
+
111
+ // Prevents UI being injected twice on browser back
112
+ // this condition is only needed because of turbolinks
113
+ if (datepickerAlreadyInjected($input)) {
114
+ $input.siblings('.datetimepicker').remove();
115
+ }
116
+
117
+ $input.before(placeholder);
118
+
119
+ return $input.siblings('.datetimepicker');
120
+ },
121
+
122
+ initInlineDatetimePicker = function (index, input) {
123
+ var $input = $(input),
124
+ options = $input.data('datetimepickerField'),
125
+ $dateTimePicker = injectUI($input),
126
+ $inlineCalendar = getCalendar($dateTimePicker, $input),
127
+ $dateField = $('[data-datetimepicker-field-date-input]', $dateTimePicker);
128
+
129
+ $inlineCalendar.datepicker(getConfig(input, options));
130
+
131
+ // Set the initial state of the datepicker inputs
132
+ if (_.isEmpty($input.val())) {
133
+ $inlineCalendar.datepicker('setDate', null);
134
+ //Active state isn't cleared by datepicker setDate: null
135
+ clearDatepickerActiveState($inlineCalendar);
136
+ } else {
137
+ $inlineCalendar.datepicker('setDate', WORKAREA.date.formatDateTime($input.val()));
138
+ }
139
+
140
+ // On form submit serialize the injected date/time inputs back into the hidden field
141
+ serializeOnSubmit($dateTimePicker, $input);
142
+
143
+ // Update the calendar UI when the date input changes
144
+ $dateField.on('keyup input', _.partial(handleDateFieldChange, $inlineCalendar));
145
+ },
146
+
147
+ /**
148
+ * @method
149
+ * @name init
150
+ * @memberof WORKAREA.datetimepickerFields
151
+ */
152
+ init = function ($scope) {
153
+ $('[data-datetimepicker-field]', $scope).each(initInlineDatetimePicker);
154
+ };
155
+
156
+ return {
157
+ init: init,
158
+ updateDateTimeField: updateDateTimeField
159
+ };
160
+ }()));
@@ -0,0 +1,329 @@
1
+ /**
2
+ * @namespace WORKAREA.directUploads
3
+ */
4
+ WORKAREA.registerModule('directUploads', (function () {
5
+ 'use strict';
6
+
7
+ var processingTemplate = JST['workarea/admin/templates/direct_upload_processing'],
8
+ tableRowTemplate = JST['workarea/admin/templates/direct_upload_table_row'],
9
+
10
+ savingFile = function (type, filename) {
11
+ return $.post({
12
+ url: WORKAREA.routes.admin.directUploadsPath({
13
+ type: type,
14
+ filename: filename
15
+ })
16
+ });
17
+ },
18
+
19
+ uploadingFile = function (type, file, url) {
20
+ return $.ajax({
21
+ url: url,
22
+ method: 'put',
23
+ data: file,
24
+ contentType: file.type,
25
+ processData: false
26
+ });
27
+ },
28
+
29
+ gettingUploadEndpoint = function (type, filename) {
30
+ return $.get({
31
+ url: WORKAREA.routes.admin.newDirectUploadsPath({
32
+ type: type,
33
+ filename: filename
34
+ })
35
+ });
36
+ },
37
+
38
+ markTableRow = function(status, file, response) {
39
+ var $tableBody = file.$element.closest('tbody');
40
+
41
+ file.$element
42
+ .addClass('direct-upload__table-row--' + status)
43
+ .find('[data-direct-upload-file-status]')
44
+ .text(function () {
45
+ var defaultMessage = I18n.t(
46
+ 'workarea.admin.direct_uploads.' + status + '_status'
47
+ );
48
+
49
+ if (_.isEmpty((response.responseJSON || {}).error)) {
50
+ return defaultMessage;
51
+ } else {
52
+ return response.responseJSON.error;
53
+ }
54
+ });
55
+
56
+ if (status === 'failure') {
57
+ file.$element.prependTo($tableBody);
58
+ }
59
+ },
60
+
61
+ incrementCount = function ($dropzone) {
62
+ var $count = $('[data-direct-upload-count]', $dropzone),
63
+ count = $count.data('directUploadCount') + 1;
64
+
65
+ $count.text(count).data('directUploadCount', count);
66
+ },
67
+
68
+ stopProcessing = function ($dropzone) {
69
+ $dropzone.removeClass('direct-upload--processing');
70
+
71
+ WORKAREA.unsavedChanges.reset();
72
+ },
73
+
74
+ scrollToFailures = function ($dropzone) {
75
+ $('html, body').animate({
76
+ scrollTop: $dropzone.offset().top
77
+ }, 1000);
78
+ },
79
+
80
+ updateFailUI = function ($dropzone) {
81
+ $dropzone
82
+ .addClass('direct-upload--fail')
83
+ .find('.direct-upload__heading')
84
+ .text(I18n.t('workarea.admin.direct_uploads.something_went_wrong'))
85
+ .end()
86
+ .find('.direct-upload__info')
87
+ .text(I18n.t('workarea.admin.direct_uploads.upload_failed'));
88
+ },
89
+
90
+ failUI = function ($dropzone) {
91
+ updateFailUI($dropzone);
92
+ scrollToFailures($dropzone);
93
+ },
94
+
95
+ refresh = function ($dropzone) {
96
+ var $takeover = $dropzone.closest('.takeover');
97
+
98
+ _.delay(function () {
99
+ if (_.isEmpty($takeover)) {
100
+ window.location.reload();
101
+ } else {
102
+ WORKAREA.takeover.reload();
103
+ }
104
+ }, WORKAREA.config.messages.delay);
105
+ },
106
+
107
+ updateSuccessUI = function ($dropzone) {
108
+ $dropzone
109
+ .addClass('direct-upload--success')
110
+ .find('.direct-upload__heading')
111
+ .text(I18n.t('workarea.admin.direct_uploads.everything_went_great'))
112
+ .end()
113
+ .find('.direct-upload__info')
114
+ .text(I18n.t('workarea.admin.direct_uploads.upload_succeeded'));
115
+ },
116
+
117
+ successUI = function ($dropzone) {
118
+ updateSuccessUI($dropzone);
119
+ refresh($dropzone);
120
+ },
121
+
122
+ uploadFile = function (type, $dropzone, file) {
123
+ var endpointRequest = WORKAREA.directUploads.gettingUploadEndpoint(
124
+ type, file.name
125
+ ),
126
+ uploadPromise = $.Deferred(),
127
+ requests = [];
128
+
129
+ requests.push(endpointRequest);
130
+
131
+ endpointRequest.done(function (result) {
132
+ var uploadRequest = WORKAREA.directUploads.uploadingFile(
133
+ type, file, result.upload_url
134
+ );
135
+
136
+ requests.push(uploadRequest);
137
+
138
+ uploadRequest.done(function () {
139
+ var saveRequest = WORKAREA.directUploads.savingFile(
140
+ type, file.name
141
+ );
142
+
143
+ requests.push(saveRequest);
144
+
145
+ saveRequest.done(function(response) {
146
+ uploadPromise.resolve.apply(null, requests);
147
+ markTableRow('success', file, response);
148
+ }).fail(function (response) {
149
+ uploadPromise.reject(requests);
150
+ markTableRow('failure', file, response);
151
+ });
152
+ }).fail(function (response) {
153
+ uploadPromise.reject(requests);
154
+ markTableRow('failure', file, response);
155
+ });
156
+ }).fail(function (response) {
157
+ uploadPromise.reject(requests);
158
+ markTableRow('failure', file, response);
159
+ }).always(_.partial(incrementCount, $dropzone));
160
+
161
+ return uploadPromise;
162
+ },
163
+
164
+
165
+ activateUI = function (event) {
166
+ var $dropzone = $(event.delegateTarget);
167
+
168
+ event.preventDefault();
169
+ event.stopPropagation();
170
+
171
+ $dropzone.addClass('direct-upload--active');
172
+ },
173
+
174
+
175
+ prepareFiles = function (event) {
176
+ var data = (event.originalEvent || {}).dataTransfer,
177
+ files;
178
+
179
+ if (data.items) {
180
+ files = _.filter(data.items, function (item) {
181
+ return item.kind === 'file';
182
+ });
183
+
184
+ files = _.map(files, function (item) {
185
+ return item.getAsFile();
186
+ });
187
+
188
+ data.items.clear();
189
+ } else {
190
+ files = data.files;
191
+
192
+ data.clearData();
193
+ }
194
+
195
+ return _.map(files, function (file) {
196
+ return Object.defineProperty(file, '$element', {
197
+ value: $(tableRowTemplate({ fileName: file.name })),
198
+ writable: false
199
+ });
200
+ });
201
+ },
202
+
203
+ testUnload = function ($dropzone) {
204
+ if ($dropzone.data('directUploadProcessing')) {
205
+ WORKAREA.unsavedChanges.set();
206
+ }
207
+ },
208
+
209
+ processFiles = function ($dropzone, files) {
210
+ var type = $dropzone.data('directUpload').type,
211
+ upload = _.partial(uploadFile, type, $dropzone),
212
+ done = _.partial(successUI, $dropzone),
213
+ fail = _.partial(failUI, $dropzone),
214
+ always = _.partial(stopProcessing, $dropzone),
215
+ requests = _.map(files, upload);
216
+
217
+ $.when.apply($, requests)
218
+ .done(done)
219
+ .fail(fail)
220
+ .always(always);
221
+ },
222
+
223
+ processingUI = function ($dropzone, files) {
224
+ var $tableBody;
225
+
226
+ $dropzone
227
+ .addClass('direct-upload--processing')
228
+ .data('directUploadProcessing', true)
229
+ .find('.direct-upload__content')
230
+ .empty()
231
+ .append(processingTemplate({ count: 0, total: files.length }));
232
+
233
+ $tableBody = $('[data-direct-upload-table-body]', $dropzone);
234
+
235
+ _.forEach(files, function (file) {
236
+ $tableBody.append(file.$element);
237
+ });
238
+ },
239
+
240
+ thresholdError = function () {
241
+ WORKAREA.messages.insertMessage(
242
+ I18n.t(
243
+ 'workarea.admin.direct_uploads.threshold_error', {
244
+ count: WORKAREA.config.directUploads.countThreshold,
245
+ size: WORKAREA.config.directUploads.sizeThreshold
246
+ }
247
+ ),
248
+ 'error'
249
+ );
250
+ },
251
+
252
+ thresholdExceeded = function (files) {
253
+ var safeCount = 500,
254
+ safeSize = 500,
255
+ countThreshold = WORKAREA.config.directUploads.countThreshold,
256
+ sizeThreshold = WORKAREA.config.directUploads.sizeThreshold,
257
+ count = files.length,
258
+ size = _.reduce(files, function (totalMegabytes, file) {
259
+ return totalMegabytes + file.size / 1000000;
260
+ }, 0);
261
+
262
+ if (WORKAREA.environment.isDevelopment
263
+ && ! WORKAREA.config.directUploads.suppressWarning) {
264
+ if (countThreshold > safeCount || sizeThreshold > safeSize) {
265
+ window.console.warn(
266
+ 'WORKAREA.directUploads.thresholdExceeded: you have ' +
267
+ 'increased either the file or file size threshold in ' +
268
+ 'this module\'s configuration. Testing revealed that ' +
269
+ 'raising this value too far past the default ' +
270
+ 'thresholds causes instability and random failure ' +
271
+ 'during the upload process. PROCEED WITH CAUTION!\n\n' +
272
+ 'To suppress this warning, set the `WORKAREA.config.' +
273
+ 'directUploads.suppressWarning` equal to `true`.'
274
+ );
275
+ }
276
+ }
277
+
278
+ return count > countThreshold || size > sizeThreshold;
279
+ },
280
+
281
+ processingWarning = function () {
282
+ WORKAREA.messages.insertMessage(
283
+ I18n.t('workarea.admin.direct_uploads.processing_warning'),
284
+ 'warning'
285
+ );
286
+ },
287
+
288
+ process = function (event) {
289
+ var $dropzone = $(event.delegateTarget),
290
+ files;
291
+
292
+ event.preventDefault();
293
+
294
+ if ($dropzone.is('.direct-upload--processing')) {
295
+ processingWarning();
296
+ } else {
297
+ files = WORKAREA.directUploads.prepareFiles(event);
298
+
299
+ if (thresholdExceeded(files)) {
300
+ thresholdError();
301
+ } else {
302
+ processingUI($dropzone, files);
303
+ processFiles($dropzone, files);
304
+ testUnload($dropzone);
305
+ }
306
+ }
307
+ },
308
+
309
+ /**
310
+ * @method
311
+ * @name init
312
+ * @memberof WORKAREA.directUploads
313
+ */
314
+ init = function($scope) {
315
+ $('[data-direct-upload]', $scope)
316
+ .on('drop', process)
317
+ .on('dragover dragenter', activateUI);
318
+ };
319
+
320
+ return {
321
+ init: init,
322
+ // for testing
323
+ savingFile: savingFile,
324
+ prepareFiles: prepareFiles,
325
+ processFiles: processFiles,
326
+ uploadingFile: uploadingFile,
327
+ gettingUploadEndpoint: gettingUploadEndpoint
328
+ };
329
+ }()));