workarea-admin 3.4.45 → 3.5.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +52 -0
  3. data/app/assets/images/workarea/admin/email_logo.png +0 -0
  4. data/app/assets/javascripts/workarea/admin/application.js.erb +11 -1
  5. data/app/assets/javascripts/workarea/admin/config.js.erb +96 -0
  6. data/app/assets/javascripts/workarea/admin/modules/active_by_segment_tooltips.js +108 -0
  7. data/app/assets/javascripts/workarea/admin/modules/calendars.js +1 -1
  8. data/app/assets/javascripts/workarea/admin/modules/categorized_autocomplete_fields.js +1 -1
  9. data/app/assets/javascripts/workarea/admin/modules/impersonation_notification.js +44 -0
  10. data/app/assets/javascripts/workarea/admin/modules/jump_to_menus.js +74 -0
  11. data/app/assets/javascripts/workarea/admin/modules/new_navigation_taxons.js +1 -2
  12. data/app/assets/javascripts/workarea/admin/modules/release_reminder.js +1 -0
  13. data/app/assets/javascripts/workarea/admin/modules/selects.js +33 -0
  14. data/app/assets/javascripts/workarea/admin/modules/style_guide_autocomplete_fields.js +42 -0
  15. data/app/assets/javascripts/workarea/admin/modules/timeline_report_chart.js +105 -0
  16. data/app/assets/javascripts/workarea/admin/modules/toggle_elements.js +27 -0
  17. data/app/assets/javascripts/workarea/admin/modules/tribute_areas.js +91 -0
  18. data/app/assets/javascripts/workarea/admin/templates/chart_legend.jst.ejs +17 -9
  19. data/app/assets/javascripts/workarea/admin/templates/jump_to_menu.jst.ejs +13 -0
  20. data/app/assets/stylesheets/workarea/admin/application.scss.erb +3 -0
  21. data/app/assets/stylesheets/workarea/admin/base/_forms.scss +2 -2
  22. data/app/assets/stylesheets/workarea/admin/components/_activity.scss +24 -16
  23. data/app/assets/stylesheets/workarea/admin/components/_activity_group.scss +3 -19
  24. data/app/assets/stylesheets/workarea/admin/components/_box.scss +21 -5
  25. data/app/assets/stylesheets/workarea/admin/components/_calendar.scss +102 -140
  26. data/app/assets/stylesheets/workarea/admin/components/_chart_legend.scss +10 -13
  27. data/app/assets/stylesheets/workarea/admin/components/_checkbox.scss +49 -23
  28. data/app/assets/stylesheets/workarea/admin/components/_content_block_list.scss +5 -3
  29. data/app/assets/stylesheets/workarea/admin/components/_date_marker.scss +24 -3
  30. data/app/assets/stylesheets/workarea/admin/components/_index_table.scss +5 -0
  31. data/app/assets/stylesheets/workarea/admin/components/_jump_to_menu.scss +57 -0
  32. data/app/assets/stylesheets/workarea/admin/components/_product_summary.scss +46 -0
  33. data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +1 -4
  34. data/app/assets/stylesheets/workarea/admin/email/_base.scss +30 -2
  35. data/app/assets/stylesheets/workarea/admin/email/_components.scss +66 -5
  36. data/app/assets/stylesheets/workarea/admin/email/_helpers.scss +16 -5
  37. data/app/assets/stylesheets/workarea/admin/email/{_settings.scss → _settings.scss.erb} +4 -4
  38. data/app/controllers/workarea/admin/application_controller.rb +2 -4
  39. data/app/controllers/workarea/admin/bulk_action_sequential_product_edits_controller.rb +4 -6
  40. data/app/controllers/workarea/admin/bulk_variant_saving.rb +1 -2
  41. data/app/controllers/workarea/admin/catalog_products_controller.rb +4 -6
  42. data/app/controllers/workarea/admin/catalog_variants_controller.rb +2 -3
  43. data/app/controllers/workarea/admin/comments_controller.rb +9 -0
  44. data/app/controllers/workarea/admin/configurations_controller.rb +29 -0
  45. data/app/controllers/workarea/admin/content_assets_controller.rb +3 -1
  46. data/app/controllers/workarea/admin/content_blocks_controller.rb +1 -7
  47. data/app/controllers/workarea/admin/create_catalog_products_controller.rb +2 -8
  48. data/app/controllers/workarea/admin/create_release_undos_controller.rb +43 -0
  49. data/app/controllers/workarea/admin/create_segments_controller.rb +68 -0
  50. data/app/controllers/workarea/admin/dashboards_controller.rb +2 -0
  51. data/app/controllers/workarea/admin/data_file_imports_controller.rb +7 -2
  52. data/app/controllers/workarea/admin/fulfillment_skus_controller.rb +58 -0
  53. data/app/controllers/workarea/admin/fulfillment_tokens_controller.rb +56 -0
  54. data/app/controllers/workarea/admin/guest_browsings_controller.rb +2 -2
  55. data/app/controllers/workarea/admin/impersonations_controller.rb +3 -4
  56. data/app/controllers/workarea/admin/orders_controller.rb +3 -0
  57. data/app/controllers/workarea/admin/pricing_discount_redemptions_controller.rb +13 -0
  58. data/app/controllers/workarea/admin/pricing_overrides_controller.rb +1 -1
  59. data/app/controllers/workarea/admin/product_rules_controller.rb +1 -2
  60. data/app/controllers/workarea/admin/releases_controller.rb +8 -13
  61. data/app/controllers/workarea/admin/reports_controller.rb +18 -0
  62. data/app/controllers/workarea/admin/segment_overrides_controller.rb +19 -0
  63. data/app/controllers/workarea/admin/segment_rules_controller.rb +62 -0
  64. data/app/controllers/workarea/admin/segments_controller.rb +48 -0
  65. data/app/controllers/workarea/admin/tax_rates_controller.rb +62 -1
  66. data/app/controllers/workarea/admin/unsubscribes_controller.rb +40 -0
  67. data/app/controllers/workarea/admin/users_controller.rb +19 -0
  68. data/app/helpers/workarea/admin/application_helper.rb +2 -12
  69. data/app/helpers/workarea/admin/configurations_helper.rb +9 -0
  70. data/app/helpers/workarea/admin/content_helper.rb +2 -3
  71. data/app/helpers/workarea/admin/fulfillment_helper.rb +10 -0
  72. data/app/helpers/workarea/admin/icons_helper.rb +26 -0
  73. data/app/helpers/workarea/admin/navigation_helper.rb +1 -0
  74. data/app/helpers/workarea/admin/pricing_overrides_helper.rb +1 -1
  75. data/app/helpers/workarea/admin/products_helper.rb +13 -0
  76. data/app/helpers/workarea/admin/releases_helper.rb +5 -21
  77. data/app/helpers/workarea/admin/segments_helper.rb +68 -0
  78. data/app/helpers/workarea/admin/settings_helper.rb +11 -3
  79. data/app/mailers/workarea/admin/comment_mailer.rb +3 -3
  80. data/app/mailers/workarea/admin/status_report_mailer.rb +19 -6
  81. data/app/view_models/workarea/admin/bulk_action_product_edit_view_model.rb +5 -0
  82. data/app/view_models/workarea/admin/changeset_view_model.rb +15 -3
  83. data/app/view_models/workarea/admin/code_list_view_model.rb +1 -1
  84. data/app/view_models/workarea/admin/commentable_view_model.rb +4 -0
  85. data/app/view_models/workarea/admin/content_view_model.rb +2 -0
  86. data/app/view_models/workarea/admin/dashboards/marketing_view_model.rb +5 -9
  87. data/app/view_models/workarea/admin/dashboards/reports_view_model.rb +25 -0
  88. data/app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb +6 -0
  89. data/app/view_models/workarea/admin/discounts/category_view_model.rb +6 -0
  90. data/app/view_models/workarea/admin/discounts/free_gift_view_model.rb +6 -0
  91. data/app/view_models/workarea/admin/discounts/order_total_view_model.rb +6 -0
  92. data/app/view_models/workarea/admin/discounts/product_attribute_view_model.rb +6 -0
  93. data/app/view_models/workarea/admin/discounts/product_view_model.rb +6 -0
  94. data/app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb +6 -0
  95. data/app/view_models/workarea/admin/discounts/shipping_view_model.rb +6 -0
  96. data/app/view_models/workarea/admin/featured_products_view_model.rb +6 -12
  97. data/app/view_models/workarea/admin/fulfillment_sku_view_model.rb +22 -0
  98. data/app/view_models/workarea/admin/fulfillment_token_view_model.rb +15 -0
  99. data/app/view_models/workarea/admin/fulfillment_view_model.rb +14 -0
  100. data/app/view_models/workarea/admin/insight_view_model.rb +2 -2
  101. data/app/view_models/workarea/admin/insights/product_view_model.rb +2 -2
  102. data/app/view_models/workarea/admin/insights/segment_view_model.rb +25 -0
  103. data/app/view_models/workarea/admin/order_view_model.rb +4 -0
  104. data/app/view_models/workarea/admin/pricing_sku_view_model.rb +0 -51
  105. data/app/view_models/workarea/admin/product_rules_preview_view_model.rb +2 -2
  106. data/app/view_models/workarea/admin/product_view_model.rb +26 -5
  107. data/app/view_models/workarea/admin/recommendations_view_model.rb +3 -11
  108. data/app/view_models/workarea/admin/release_calendar_view_model.rb +4 -9
  109. data/app/view_models/workarea/admin/release_event_view_model.rb +8 -41
  110. data/app/view_models/workarea/admin/release_view_model.rb +10 -17
  111. data/app/view_models/workarea/admin/releases_feed_view_model.rb +5 -13
  112. data/app/view_models/workarea/admin/reports/customers_view_model.rb +4 -2
  113. data/app/view_models/workarea/admin/reports/low_inventory_view_model.rb +2 -5
  114. data/app/view_models/workarea/admin/reports/sales_by_category_view_model.rb +2 -5
  115. data/app/view_models/workarea/admin/reports/sales_by_discount_view_model.rb +2 -5
  116. data/app/view_models/workarea/admin/reports/sales_by_product_view_model.rb +2 -5
  117. data/app/view_models/workarea/admin/reports/sales_by_tender_view_model.rb +13 -0
  118. data/app/view_models/workarea/admin/reports/timeline_view_model.rb +74 -0
  119. data/app/view_models/workarea/admin/search_customization_product_rules_view_model.rb +1 -1
  120. data/app/view_models/workarea/admin/segment_view_model.rb +19 -0
  121. data/app/view_models/workarea/admin/user_view_model.rb +6 -9
  122. data/app/view_models/workarea/admin/variant_view_model.rb +8 -0
  123. data/app/views/layouts/workarea/admin/application.html.haml +1 -1
  124. data/app/views/layouts/workarea/admin/email.html.haml +35 -41
  125. data/app/views/workarea/admin/activities/_configuration_admin_update.html.haml +10 -0
  126. data/app/views/workarea/admin/activities/_fulfillment_sku_create.html.haml +12 -0
  127. data/app/views/workarea/admin/activities/_fulfillment_sku_destroy.html.haml +10 -0
  128. data/app/views/workarea/admin/activities/_fulfillment_sku_update.html.haml +10 -0
  129. data/app/views/workarea/admin/activities/_segment_create.html.haml +12 -0
  130. data/app/views/workarea/admin/activities/_segment_destroy.html.haml +10 -0
  131. data/app/views/workarea/admin/activities/_segment_update.html.haml +10 -0
  132. data/app/views/workarea/admin/activities/show.html.haml +18 -11
  133. data/app/views/workarea/admin/bulk_action_product_edits/edit.html.haml +4 -0
  134. data/app/views/workarea/admin/bulk_action_product_edits/review.html.haml +11 -4
  135. data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +1 -1
  136. data/app/views/workarea/admin/catalog_categories/_cards.html.haml +3 -1
  137. data/app/views/workarea/admin/catalog_categories/edit.html.haml +1 -4
  138. data/app/views/workarea/admin/catalog_categories/index.html.haml +1 -0
  139. data/app/views/workarea/admin/catalog_product_images/edit.html.haml +1 -1
  140. data/app/views/workarea/admin/catalog_products/_cards.html.haml +2 -4
  141. data/app/views/workarea/admin/catalog_products/edit.html.haml +2 -1
  142. data/app/views/workarea/admin/catalog_products/index.html.haml +4 -2
  143. data/app/views/workarea/admin/catalog_products/insights.html.haml +2 -0
  144. data/app/views/workarea/admin/catalog_variants/edit.html.haml +6 -1
  145. data/app/views/workarea/admin/catalog_variants/index.html.haml +2 -0
  146. data/app/views/workarea/admin/catalog_variants/new.html.haml +5 -0
  147. data/app/views/workarea/admin/changesets/fields/_active_segment_ids.html.haml +4 -0
  148. data/app/views/workarea/admin/comment_mailer/notify.html.haml +27 -19
  149. data/app/views/workarea/admin/comments/index.html.haml +18 -12
  150. data/app/views/workarea/admin/configurations/_overridden.html.haml +2 -0
  151. data/app/views/workarea/admin/configurations/show.html.haml +49 -0
  152. data/app/views/workarea/admin/configurations/types/_array.html.haml +3 -0
  153. data/app/views/workarea/admin/configurations/types/_boolean.html.haml +1 -0
  154. data/app/views/workarea/admin/configurations/types/_duration.html.haml +2 -0
  155. data/app/views/workarea/admin/configurations/types/_encrypted.html.haml +1 -0
  156. data/app/views/workarea/admin/configurations/types/_float.html.haml +1 -0
  157. data/app/views/workarea/admin/configurations/types/_hash.html.haml +17 -0
  158. data/app/views/workarea/admin/configurations/types/_integer.html.haml +1 -0
  159. data/app/views/workarea/admin/configurations/types/_select.html.haml +1 -0
  160. data/app/views/workarea/admin/configurations/types/_string.html.haml +1 -0
  161. data/app/views/workarea/admin/configurations/types/_symbol.html.haml +1 -0
  162. data/app/views/workarea/admin/content/_edit.html.haml +8 -1
  163. data/app/views/workarea/admin/content/_form.html.haml +13 -7
  164. data/app/views/workarea/admin/content/advanced.html.haml +18 -10
  165. data/app/views/workarea/admin/content_assets/_cards.html.haml +3 -0
  166. data/app/views/workarea/admin/content_assets/_summary.html.haml +1 -1
  167. data/app/views/workarea/admin/content_assets/edit.html.haml +6 -0
  168. data/app/views/workarea/admin/content_assets/index.html.haml +7 -2
  169. data/app/views/workarea/admin/content_assets/new.html.haml +10 -3
  170. data/app/views/workarea/admin/content_blocks/_asset.html.haml +8 -1
  171. data/app/views/workarea/admin/content_pages/_cards.html.haml +1 -0
  172. data/app/views/workarea/admin/content_pages/edit.html.haml +1 -1
  173. data/app/views/workarea/admin/content_pages/index.html.haml +1 -0
  174. data/app/views/workarea/admin/create_catalog_categories/publish.html.haml +1 -0
  175. data/app/views/workarea/admin/create_catalog_products/content.html.haml +1 -1
  176. data/app/views/workarea/admin/create_catalog_products/publish.html.haml +1 -0
  177. data/app/views/workarea/admin/create_content_pages/publish.html.haml +1 -0
  178. data/app/views/workarea/admin/create_pricing_discounts/publish.html.haml +1 -0
  179. data/app/views/workarea/admin/create_release_undos/new.html.haml +45 -0
  180. data/app/views/workarea/admin/create_release_undos/review.html.haml +51 -0
  181. data/app/views/workarea/admin/create_releases/plan.html.haml +4 -3
  182. data/app/views/workarea/admin/create_releases/setup.html.haml +8 -12
  183. data/app/views/workarea/admin/create_segments/rules.html.haml +55 -0
  184. data/app/views/workarea/admin/create_segments/setup.html.haml +42 -0
  185. data/app/views/workarea/admin/create_users/admin.html.haml +0 -2
  186. data/app/views/workarea/admin/dashboards/catalog.html.haml +1 -0
  187. data/app/views/workarea/admin/dashboards/people.html.haml +1 -1
  188. data/app/views/workarea/admin/dashboards/reports.html.haml +31 -0
  189. data/app/views/workarea/admin/dashboards/settings.html.haml +23 -3
  190. data/app/views/workarea/admin/data_file_imports/new.html.haml +4 -2
  191. data/app/views/workarea/admin/data_file_mailer/export.html.haml +2 -0
  192. data/app/views/workarea/admin/data_file_mailer/import.html.haml +2 -0
  193. data/app/views/workarea/admin/data_file_mailer/import_failure.html.haml +2 -0
  194. data/app/views/workarea/admin/facets/_applied.html.haml +1 -1
  195. data/app/views/workarea/admin/featured_products/_selected.html.haml +3 -2
  196. data/app/views/workarea/admin/featured_products/_unselected.html.haml +3 -1
  197. data/app/views/workarea/admin/featured_products/edit.html.haml +3 -3
  198. data/app/views/workarea/admin/featured_products/select.html.haml +0 -1
  199. data/app/views/workarea/admin/fulfillment_skus/_aux_navigation.html.haml +3 -0
  200. data/app/views/workarea/admin/fulfillment_skus/_cards.html.haml +57 -0
  201. data/app/views/workarea/admin/fulfillment_skus/_summary.html.haml +6 -0
  202. data/app/views/workarea/admin/fulfillment_skus/edit.html.haml +53 -0
  203. data/app/views/workarea/admin/fulfillment_skus/index.html.haml +75 -0
  204. data/app/views/workarea/admin/fulfillment_skus/new.html.haml +41 -0
  205. data/app/views/workarea/admin/fulfillment_skus/show.html.haml +17 -0
  206. data/app/views/workarea/admin/fulfillment_tokens/index.html.haml +73 -0
  207. data/app/views/workarea/admin/fulfillments/show.html.haml +41 -6
  208. data/app/views/workarea/admin/insights/_most_discounted_products.html.haml +4 -4
  209. data/app/views/workarea/admin/inventory_skus/show.html.haml +1 -1
  210. data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
  211. data/app/views/workarea/admin/navigation_menus/edit.html.haml +1 -1
  212. data/app/views/workarea/admin/navigation_menus/index.html.haml +3 -1
  213. data/app/views/workarea/admin/navigation_redirects/index.html.haml +0 -5
  214. data/app/views/workarea/admin/navigation_taxons/index.html.haml +20 -4
  215. data/app/views/workarea/admin/orders/_cards.html.haml +23 -5
  216. data/app/views/workarea/admin/orders/attributes.html.haml +4 -1
  217. data/app/views/workarea/admin/orders/fraud.html.haml +43 -0
  218. data/app/views/workarea/admin/orders/index.html.haml +1 -0
  219. data/app/views/workarea/admin/orders/timeline.html.haml +1 -1
  220. data/app/views/workarea/admin/pricing_discount_code_lists/_cards.html.haml +1 -1
  221. data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +1 -1
  222. data/app/views/workarea/admin/pricing_discount_redemptions/index.html.haml +44 -0
  223. data/app/views/workarea/admin/pricing_discounts/_cards.html.haml +22 -0
  224. data/app/views/workarea/admin/pricing_discounts/conditions/_segments.html.haml +5 -0
  225. data/app/views/workarea/admin/pricing_discounts/edit.html.haml +5 -15
  226. data/app/views/workarea/admin/pricing_discounts/index.html.haml +1 -0
  227. data/app/views/workarea/admin/pricing_discounts/properties/_buy_some_get_some.html.haml +1 -0
  228. data/app/views/workarea/admin/pricing_discounts/properties/_category.html.haml +1 -0
  229. data/app/views/workarea/admin/pricing_discounts/properties/_free_gift.html.haml +1 -0
  230. data/app/views/workarea/admin/pricing_discounts/properties/_order_total.html.haml +1 -0
  231. data/app/views/workarea/admin/pricing_discounts/properties/_product.html.haml +1 -0
  232. data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +2 -1
  233. data/app/views/workarea/admin/pricing_discounts/properties/_quantity_fixed_price.html.haml +1 -0
  234. data/app/views/workarea/admin/pricing_discounts/properties/_shipping.html.haml +1 -0
  235. data/app/views/workarea/admin/pricing_skus/_cards.html.haml +7 -7
  236. data/app/views/workarea/admin/pricing_skus/edit.html.haml +5 -5
  237. data/app/views/workarea/admin/pricing_skus/index.html.haml +4 -4
  238. data/app/views/workarea/admin/pricing_skus/new.html.haml +6 -9
  239. data/app/views/workarea/admin/product_rules/_card.html.haml +2 -2
  240. data/app/views/workarea/admin/product_rules/_form.html.haml +1 -0
  241. data/app/views/workarea/admin/product_rules/index.html.haml +2 -0
  242. data/app/views/workarea/admin/releases/_cards.html.haml +50 -12
  243. data/app/views/workarea/admin/releases/_publish.html.haml +1 -1
  244. data/app/views/workarea/admin/releases/edit.html.haml +33 -46
  245. data/app/views/workarea/admin/releases/index.html.haml +81 -90
  246. data/app/views/workarea/admin/releases/list.html.haml +107 -0
  247. data/app/views/workarea/admin/releases/original.html.haml +50 -0
  248. data/app/views/workarea/admin/releases/show.html.haml +3 -17
  249. data/app/views/workarea/admin/releases/undo.html.haml +64 -0
  250. data/app/views/workarea/admin/reports/average_order_value.html.haml +1 -1
  251. data/app/views/workarea/admin/reports/customers.html.haml +4 -0
  252. data/app/views/workarea/admin/reports/first_time_vs_returning_sales.html.haml +1 -1
  253. data/app/views/workarea/admin/reports/reference.html.haml +19 -60
  254. data/app/views/workarea/admin/reports/sales_by_country.html.haml +6 -0
  255. data/app/views/workarea/admin/reports/sales_by_product.html.haml +6 -0
  256. data/app/views/workarea/admin/reports/sales_by_sku.html.haml +6 -0
  257. data/app/views/workarea/admin/reports/sales_by_tender.html.haml +30 -0
  258. data/app/views/workarea/admin/reports/sales_over_time.html.haml +5 -1
  259. data/app/views/workarea/admin/reports/timeline.html.haml +20 -0
  260. data/app/views/workarea/admin/search_customizations/_cards.html.haml +1 -0
  261. data/app/views/workarea/admin/search_customizations/edit.html.haml +1 -1
  262. data/app/views/workarea/admin/search_customizations/index.html.haml +1 -0
  263. data/app/views/workarea/admin/searches/show.html.haml +6 -5
  264. data/app/views/workarea/admin/segment_overrides/show.html.haml +29 -0
  265. data/app/views/workarea/admin/segment_rules/_form.html.haml +13 -0
  266. data/app/views/workarea/admin/segment_rules/fields/_browser_info.html.haml +13 -0
  267. data/app/views/workarea/admin/segment_rules/fields/_geolocation.html.haml +4 -0
  268. data/app/views/workarea/admin/segment_rules/fields/_last_order.html.haml +3 -0
  269. data/app/views/workarea/admin/segment_rules/fields/_logged_in.html.haml +2 -0
  270. data/app/views/workarea/admin/segment_rules/fields/_orders.html.haml +5 -0
  271. data/app/views/workarea/admin/segment_rules/fields/_revenue.html.haml +9 -0
  272. data/app/views/workarea/admin/segment_rules/fields/_sessions.html.haml +5 -0
  273. data/app/views/workarea/admin/segment_rules/fields/_tags.html.haml +4 -0
  274. data/app/views/workarea/admin/segment_rules/fields/_traffic_referrer.html.haml +13 -0
  275. data/app/views/workarea/admin/segment_rules/geolocation_options.json.jbuilder +4 -0
  276. data/app/views/workarea/admin/segment_rules/index.html.haml +25 -0
  277. data/app/views/workarea/admin/segment_rules/summaries/_browser_info.html.haml +11 -0
  278. data/app/views/workarea/admin/segment_rules/summaries/_geolocation.html.haml +2 -0
  279. data/app/views/workarea/admin/segment_rules/summaries/_last_order.html.haml +2 -0
  280. data/app/views/workarea/admin/segment_rules/summaries/_logged_in.html.haml +5 -0
  281. data/app/views/workarea/admin/segment_rules/summaries/_orders.html.haml +6 -0
  282. data/app/views/workarea/admin/segment_rules/summaries/_revenue.html.haml +7 -0
  283. data/app/views/workarea/admin/segment_rules/summaries/_sessions.html.haml +6 -0
  284. data/app/views/workarea/admin/segment_rules/summaries/_tags.html.haml +2 -0
  285. data/app/views/workarea/admin/segment_rules/summaries/_traffic_referrer.html.haml +10 -0
  286. data/app/views/workarea/admin/segments/_cards.html.haml +81 -0
  287. data/app/views/workarea/admin/segments/_publish.html.haml +10 -0
  288. data/app/views/workarea/admin/segments/edit.html.haml +41 -0
  289. data/app/views/workarea/admin/segments/index.html.haml +64 -0
  290. data/app/views/workarea/admin/segments/insights.html.haml +52 -0
  291. data/app/views/workarea/admin/segments/show.html.haml +20 -0
  292. data/app/views/workarea/admin/shared/_active_field.html.haml +17 -0
  293. data/app/views/workarea/admin/shared/_bulk_actions.html.haml +10 -8
  294. data/app/views/workarea/admin/shared/_primary_nav.html.haml +5 -2
  295. data/app/views/workarea/admin/shared/_toggle_button.html.haml +1 -1
  296. data/app/views/workarea/admin/shipping_services/edit.html.haml +0 -4
  297. data/app/views/workarea/admin/shipping_services/new.html.haml +0 -4
  298. data/app/views/workarea/admin/status_report_mailer/report.html.haml +83 -86
  299. data/app/views/workarea/admin/style_guides/components/_activity.html.haml +3 -5
  300. data/app/views/workarea/admin/style_guides/components/_activity_group.html.haml +9 -15
  301. data/app/views/workarea/admin/style_guides/components/_box.html.haml +12 -7
  302. data/app/views/workarea/admin/style_guides/components/_checkbox.html.haml +21 -2
  303. data/app/views/workarea/admin/style_guides/components/_release_changeset.html.haml +3 -5
  304. data/app/views/workarea/admin/tax_rates/edit.html.haml +64 -0
  305. data/app/views/workarea/admin/tax_rates/index.html.haml +59 -20
  306. data/app/views/workarea/admin/tax_rates/new.html.haml +62 -0
  307. data/app/views/workarea/admin/timeline/show.html.haml +34 -41
  308. data/app/views/workarea/admin/toolbar/show.html.haml +11 -1
  309. data/app/views/workarea/admin/trash/index.html.haml +1 -1
  310. data/app/views/workarea/admin/users/edit.html.haml +60 -57
  311. data/app/views/workarea/admin/users/index.html.haml +1 -3
  312. data/app/views/workarea/admin/users/index.json.jbuilder +8 -0
  313. data/app/views/workarea/admin/users/insights.html.haml +31 -23
  314. data/app/views/workarea/admin/users/permissions.html.haml +10 -1
  315. data/app/views/workarea/admin/users/show.html.haml +7 -0
  316. data/config/locales/en.yml +569 -124
  317. data/config/routes.rb +57 -5
  318. data/lib/workarea/mailer_previews/admin/status_report_mailer_preview.rb +3 -1
  319. data/public/workarea/import_samples/tax_rates.csv +3 -3
  320. data/test/dummy/config/initializers/session_store.rb +1 -1
  321. data/test/helpers/workarea/admin/application_helper_test.rb +0 -16
  322. data/test/helpers/workarea/admin/icons_helper_test.rb +9 -0
  323. data/test/helpers/workarea/admin/products_helper_test.rb +73 -0
  324. data/test/helpers/workarea/admin/releases_helper_test.rb +0 -49
  325. data/test/helpers/workarea/admin/settings_helper_test.rb +22 -1
  326. data/test/integration/workarea/admin/assets_integration_test.rb +2 -5
  327. data/test/integration/workarea/admin/comments_integration_test.rb +27 -7
  328. data/test/integration/workarea/admin/configurations_integration_test.rb +21 -0
  329. data/test/integration/workarea/admin/create_release_undos_integration_test.rb +29 -0
  330. data/test/integration/workarea/admin/create_segments_integration_test.rb +26 -0
  331. data/test/integration/workarea/admin/data_file_imports_integration_test.rb +34 -8
  332. data/test/integration/workarea/admin/fulfillment_skus_integration_test.rb +55 -0
  333. data/test/integration/workarea/admin/fulfillment_tokens_integration_test.rb +43 -0
  334. data/test/integration/workarea/admin/guest_browsings_integration_test.rb +8 -32
  335. data/test/integration/workarea/admin/impersonations_integration_test.rb +13 -57
  336. data/test/integration/workarea/admin/jump_to_integration_test.rb +0 -29
  337. data/test/integration/workarea/admin/pricing_overrides_integration_test.rb +11 -0
  338. data/test/integration/workarea/admin/products_integration_test.rb +0 -13
  339. data/test/integration/workarea/admin/releases_integration_test.rb +71 -87
  340. data/test/integration/workarea/admin/segment_overrides_integration_test.rb +28 -0
  341. data/test/integration/workarea/admin/segment_rules_integration_test.rb +49 -0
  342. data/test/integration/workarea/admin/segments_integration_test.rb +31 -0
  343. data/test/integration/workarea/admin/shipping_service_integration_test.rb +1 -3
  344. data/test/integration/workarea/admin/tax_categories_integration_test.rb +1 -1
  345. data/test/integration/workarea/admin/unsubscribes_integration_test.rb +32 -0
  346. data/test/integration/workarea/admin/users_integration_test.rb +32 -0
  347. data/test/javascripts/fixtures/release_reminder.html.haml +3 -3
  348. data/test/javascripts/new_navigation_taxons_spec.js +1 -12
  349. data/test/mailers/workarea/admin/comment_mailer_test.rb +35 -0
  350. data/test/mailers/workarea/admin/status_report_mailer_test.rb +30 -25
  351. data/test/system/workarea/admin/alerts_system_test.rb +2 -1
  352. data/test/system/workarea/admin/bulk_actions_system_test.rb +1 -1
  353. data/test/system/workarea/admin/comments_system_test.rb +43 -0
  354. data/test/system/workarea/admin/content_system_test.rb +6 -0
  355. data/test/system/workarea/admin/dashboard_system_test.rb +8 -9
  356. data/test/system/workarea/admin/data_files_system_test.rb +1 -1
  357. data/test/system/workarea/admin/discounts_system_test.rb +18 -0
  358. data/test/system/workarea/admin/featured_products_system_test.rb +3 -0
  359. data/test/system/workarea/admin/fulfillment_skus_system_test.rb +48 -0
  360. data/test/system/workarea/admin/impersonation_system_test.rb +5 -2
  361. data/test/system/workarea/admin/orders_system_test.rb +32 -21
  362. data/test/system/workarea/admin/payment_transactions_system_test.rb +34 -32
  363. data/test/system/workarea/admin/releases_system_test.rb +151 -37
  364. data/test/system/workarea/admin/reports_system_test.rb +29 -0
  365. data/test/system/workarea/admin/segments_system_test.rb +124 -0
  366. data/test/system/workarea/admin/tax_categories_system_test.rb +166 -16
  367. data/test/system/workarea/admin/users_system_test.rb +15 -0
  368. data/test/view_models/workarea/admin/changeset_view_model_test.rb +59 -9
  369. data/test/view_models/workarea/admin/code_list_view_model_test.rb +0 -5
  370. data/test/view_models/workarea/admin/content_view_model_test.rb +13 -11
  371. data/test/view_models/workarea/admin/insights/product_view_model_test.rb +4 -4
  372. data/test/view_models/workarea/admin/insights/segment_view_model_test.rb +73 -0
  373. data/test/view_models/workarea/admin/product_rules_preview_view_model_test.rb +37 -0
  374. data/test/view_models/workarea/admin/product_view_model_test.rb +13 -19
  375. data/test/view_models/workarea/admin/release_calendar_view_model_test.rb +16 -0
  376. data/test/view_models/workarea/admin/release_view_model_test.rb +13 -56
  377. data/test/view_models/workarea/admin/releases_feed_view_model_test.rb +8 -21
  378. data/test/view_models/workarea/admin/reports/timeline_view_model_test.rb +76 -0
  379. data/test/view_models/workarea/admin/search_analysis_view_model_test.rb +14 -16
  380. data/test/view_models/workarea/admin/timeline_view_model_test.rb +1 -1
  381. metadata +128 -17
  382. data/app/views/workarea/admin/featured_products/_release_preview_warning.html.haml +0 -4
  383. data/app/views/workarea/admin/releases/calendar.html.haml +0 -54
  384. data/test/dummy/tmp/screenshots/.keep +0 -0
  385. data/test/helpers/workarea/admin/content_helper_test.rb +0 -17
  386. data/test/integration/workarea/admin/index_tracking_integration_test.rb +0 -21
  387. data/test/javascripts/fixtures/existing_navigation_taxon.html.haml +0 -10
  388. data/test/view_models/workarea/admin/pricing_sku_view_model_test.rb +0 -84
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @namespace WORKAREA.toggleElement
3
+ */
4
+ WORKAREA.registerModule('toggleElement', (function () {
5
+ 'use strict';
6
+
7
+ /**
8
+ * @method
9
+ * @name init
10
+ * @memberof WORKAREA.toggleElement
11
+ */
12
+ var toggle = function (event) {
13
+ var $target = $(event.target).data('toggle');
14
+
15
+ event.preventDefault();
16
+
17
+ $target.toggleClass('hidden');
18
+ },
19
+
20
+ init = function ($scope) {
21
+ $('[data-toggle-element]', $scope).on('click', toggle);
22
+ };
23
+
24
+ return {
25
+ init: init
26
+ };
27
+ }()));
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @namespace WORKAREA.tributeAreas
3
+ */
4
+ WORKAREA.registerModule('tributeAreas', (function () {
5
+ 'use strict';
6
+
7
+ var hiddenInput = JST['workarea/core/templates/hidden_input'],
8
+
9
+ getValidMentions = function ($form) {
10
+ var $element = $form.find('[data-tribute-area]'),
11
+ words = $element.val().split(/\s+/),
12
+ storedMentions = $element.data('tributeMentions') || [],
13
+ typedMentions = _.filter(words, function (word) {
14
+ return word.startsWith(
15
+ WORKAREA.config.tributeAreas.trigger
16
+ );
17
+ });
18
+
19
+ return _.filter(storedMentions, function (stored) {
20
+ var value = stored.original.fillAttr;
21
+ return _.some(typedMentions, _.method('includes', value));
22
+ });
23
+ },
24
+
25
+ updateForm = function (event) {
26
+ var $form = $(event.target);
27
+
28
+ _.forEach(getValidMentions($form), function (mention) {
29
+ $form.append(function () {
30
+ return hiddenInput({
31
+ name: 'subscribed_user_ids[]',
32
+ value: mention.original.id
33
+ });
34
+ });
35
+ });
36
+ },
37
+
38
+ requestData = function (element, text, resolve) {
39
+ var baseUrl = $(element).data('tributeArea'),
40
+ endpoint = WORKAREA.url.addToQuery(baseUrl, 'q=' + text);
41
+
42
+ $.get(endpoint)
43
+ .done(function (response) {
44
+ resolve(response.mentions);
45
+ })
46
+ .fail(function () {
47
+ resolve([]);
48
+ });
49
+ },
50
+
51
+ storeMention = function (event) {
52
+ var mentions = $(event.target).data('tributeMentions') || [];
53
+ mentions.push(event.detail.item);
54
+ $(event.target).data('tributeMentions', mentions);
55
+ },
56
+
57
+ setup = function (index, element) {
58
+ var tribute = new Tribute({
59
+ collection: [
60
+ {
61
+ trigger: WORKAREA.config.tributeAreas.trigger,
62
+ values: function (text, callback) {
63
+ requestData(element, text, function (mentions) {
64
+ return callback(mentions);
65
+ });
66
+ },
67
+ lookup: 'lookup',
68
+ fillAttr: 'fillAttr'
69
+ }
70
+ ]
71
+ });
72
+
73
+ tribute.attach(element);
74
+
75
+ $(element).on('tribute-replaced', storeMention);
76
+ $(element).closest('form').on('submit', updateForm);
77
+ },
78
+
79
+ /**
80
+ * @method
81
+ * @name init
82
+ * @memberof WORKAREA.tributeAreas
83
+ */
84
+ init = function (scope) {
85
+ $('[data-tribute-area]', scope).each(setup);
86
+ };
87
+
88
+ return {
89
+ init: init
90
+ };
91
+ }()));
@@ -1,9 +1,17 @@
1
- <!-- TODO remove in v4, not used >= 3.4 -->
2
- <ul class="chart-legend">
3
- <% _.forEach(datasets, function (dataset) { %>
4
- <li class="chart-legend__item">
5
- <span class="chart-legend__color-dot" style="background: <%= dataset.legendColor %>"></span>
6
- <span class="chart-legend__label"><%= dataset.label %></span>
7
- </li>
8
- <% }); %>
9
- </ul>
1
+ <div class="chart-legend">
2
+ <ul class="chart-legend__list">
3
+ <% _.forEach(datasets, function (dataset, index) { %>
4
+ <li class="chart-legend__list-item" style="color: <%= dataset.backgroundColor %>">
5
+ <span class="checkbox">
6
+ <% checked = !!enabled[dataset.label] %>
7
+ <input type="checkbox" value="<%= index %>" class="checkbox__input" id="chart_dataset_<%= index %>"<% if (checked) { %> checked="checked"<% } %>>
8
+ <label for="chart_dataset_<%= index %>" class="checkbox__label">
9
+ <strong>
10
+ <%= dataset.label %>
11
+ </strong>
12
+ </label>
13
+ </span>
14
+ </li>
15
+ <% }); %>
16
+ </ul>
17
+ </div>
@@ -0,0 +1,13 @@
1
+ <div class='jump-to-menu' data-turbolinks='false'>
2
+ <nav class='jump-to-menu__container'>
3
+ <ul class='jump-to-menu__list'>
4
+ <% _.forEach(items, function (item) { %>
5
+ <li class='jump-to-menu__list-item'>
6
+ <a href='#<%= item.anchor %>' class='jump-to-menu__link jump-to-menu__link--<%= item.level %>'>
7
+ <%= item.name %>
8
+ </a>
9
+ </li>
10
+ <% }); %>
11
+ </ul>
12
+ </nav>
13
+ </div>
@@ -64,6 +64,7 @@
64
64
  @import 'jquery_ui/admin/ui_sortable';
65
65
  @import 'turbolinks/admin/progress_bar';
66
66
  @import 'spectrum';
67
+ @import 'tribute/index';
67
68
  <%= append_stylesheets('admin.dependencies') %>
68
69
 
69
70
  @import 'workarea/admin/components/asset_picker_field';
@@ -138,6 +139,8 @@
138
139
  @import 'workarea/admin/components/insight';
139
140
  @import 'workarea/admin/components/secondary_nav';
140
141
  @import 'workarea/admin/components/dashboard_graphs';
142
+ @import 'workarea/admin/components/jump_to_menu';
143
+ @import 'workarea/admin/components/chart_legend';
141
144
  <%= append_stylesheets('admin.components') %>
142
145
 
143
146
  @import 'workarea/admin/trumps/break_word';
@@ -4,8 +4,8 @@
4
4
 
5
5
  $forms-color: $off-black !default;
6
6
  $forms-bg-color: $white !default;
7
- $forms-disabled-color: $dark-gray !default;
8
- $forms-disabled-bg-color: $gray !default;
7
+ $forms-disabled-color: $gray !default;
8
+ $forms-disabled-bg-color: $light-gray !default;
9
9
  $forms-placeholder-color: $dark-gray !default;
10
10
 
11
11
 
@@ -7,19 +7,28 @@ $activity-message-color: $dark-gray !default;
7
7
  $activity-time-color: $dark-gray !default;
8
8
  $activity-bg-color: $white !default;
9
9
  $activity-border-color: $border-color !default;
10
+ $activity-box-shadow: 0 2px 8px rgba($off-black, 0.5) !default;
11
+ $activity-border-radius: $global-border-radius !default;
12
+ $activity-message-border: 1px solid $off-white !default;
13
+ $activity-in-card-border: 1px solid $light-gray !default;
10
14
 
11
15
  $activity-avatar-size: 32px !default;
12
16
 
13
17
 
14
18
  .activity {
15
19
  @extend %clearfix;
16
- padding: $spacing-unit;
17
- width: 100%;
20
+ position: relative;
21
+ padding: ($spacing-unit * 2) $spacing-unit ($spacing-unit * 2) ($activity-avatar-size / 2);
18
22
  color: $activity-color;
19
23
  background: $activity-bg-color;
24
+ box-shadow: $activity-box-shadow;
25
+ margin-bottom: $spacing-unit * 2;
26
+ margin-left: $activity-avatar-size / 2;
27
+ border-radius: $activity-border-radius;
20
28
 
21
- & + & {
22
- border-top: 1px solid $activity-border-color;
29
+ .card & {
30
+ box-shadow: none;
31
+ border: $activity-in-card-border;
23
32
  }
24
33
  }
25
34
 
@@ -28,7 +37,9 @@ $activity-avatar-size: 32px !default;
28
37
  }
29
38
 
30
39
  .activity__avatar {
31
- float: left;
40
+ position: absolute;
41
+ transform: translateX(-100%);
42
+ width: $activity-avatar-size;
32
43
  height: $activity-avatar-size;
33
44
  }
34
45
 
@@ -36,28 +47,25 @@ $activity-avatar-size: 32px !default;
36
47
  @extend %heading;
37
48
  @extend %heading--3;
38
49
  @extend %heading--no-margin;
39
- float: left;
40
- width: calc(100% - #{$activity-avatar-size});
41
- padding-top: $spacing-unit / 2;
42
50
  padding-left: $spacing-unit;
43
- line-height: normal;
44
51
  }
45
52
 
46
53
  .activity__time {
47
- clear: both;
48
- display: block;
49
54
  color: $activity-time-color;
50
- font-size: 0.8rem;
51
- margin-left: $activity-avatar-size + $spacing-unit;
52
- margin-bottom: $spacing-unit;
55
+ padding-left: $spacing-unit;
56
+ margin-bottom: 0;
53
57
  }
54
58
 
55
59
  .activity__actions {
56
- float: right;
60
+ position: absolute;
61
+ top: $spacing-unit;
62
+ right: $spacing-unit;
57
63
  }
58
64
 
59
65
  .activity__message {
60
- margin-left: $activity-avatar-size + $spacing-unit;
61
66
  color: $activity-message-color;
67
+ padding: $spacing-unit $spacing-unit 0;
68
+ margin-top: $spacing-unit;
69
+ border-top: $activity-message-border;
62
70
  }
63
71
 
@@ -2,26 +2,10 @@
2
2
  #ACTIVITY-GROUP
3
3
  \*------------------------------------*/
4
4
 
5
- $activity-group-border: 1px solid $border-color !default;
6
-
7
- $activity-group-header-color: $off-black !default;
8
- $activity-group-header-bg-color: $light-gray !default;
9
- $activity-group-header-border: 1px solid $border-color !default;
10
-
11
5
  .activity-group {
12
- padding: $spacing-unit 0;
13
- }
14
-
15
- .activity-group--bordered {
16
- border-bottom: $activity-group-border;
17
- }
18
-
19
- .activity-group__header {
20
- padding: $spacing-unit * 2;
21
- color: $activity-group-header-color;
22
- font-size: $font-size + 6px;
23
- background: $activity-group-header-bg-color;
24
- border-bottom: $activity-group-header-border;
6
+ & + & {
7
+ margin-top: $spacing-unit * 4;
25
8
  }
9
+ }
26
10
 
27
11
  .activity-group__activities {}
@@ -4,8 +4,9 @@
4
4
 
5
5
  $box-bg-color: $white !default;
6
6
  $box-border-color: $border-color !default;
7
- $box-head-bg-color: $light-gray !default;
7
+ $box-head-bg-color: $off-white !default;
8
8
  $box-body-color: $dark-gray !default;
9
+ $box-body-padding: $spacing-unit * 2 !default;
9
10
 
10
11
  $box-padding: 16px !default;
11
12
  $box-heading-font-size: 14px !default;
@@ -15,7 +16,6 @@ $box-rounded-border-radius: $global-border-radius !default;
15
16
 
16
17
  .box {
17
18
  margin-bottom: $vertical-margin;
18
- padding: $box-padding;
19
19
  background: $box-bg-color;
20
20
  border: 1px solid $box-border-color;
21
21
  }
@@ -24,8 +24,8 @@ $box-rounded-border-radius: $global-border-radius !default;
24
24
  border-radius: $box-rounded-border-radius;
25
25
  }
26
26
 
27
- .box--no-padding {
28
- padding: 0;
27
+ .box--padded {
28
+ padding: $spacing-unit;
29
29
  }
30
30
 
31
31
 
@@ -39,14 +39,30 @@ $box-rounded-border-radius: $global-border-radius !default;
39
39
  margin: 0;
40
40
  font-size: $box-heading-font-size;
41
41
  font-weight: bold;
42
- text-transform: uppercase;
43
42
  }
44
43
 
45
44
 
46
45
  .box__body {
47
46
  color: $box-body-color;
47
+ padding: $box-padding;
48
+
49
+ .box--no-padding & {
50
+ padding: 0;
51
+ }
52
+ }
53
+
54
+ .box__body--pad-top {
55
+ padding-top: $box-body-padding;
48
56
  }
49
57
 
50
58
  .box__actions {
51
59
  text-align: right;
52
60
  }
61
+
62
+ .box__section {
63
+ & + & {
64
+ margin-top: $spacing-unit * 2;
65
+ padding-top: $spacing-unit * 2;
66
+ border-top: 1px dashed $box-border-color;
67
+ }
68
+ }
@@ -2,44 +2,39 @@
2
2
  #CALENDAR
3
3
  \*------------------------------------*/
4
4
 
5
- $calendar-bg-color: $white !default;
6
- $calendar-control-icon-color: $blue !default;
7
- $calendar-control-icon-hover-color: $white !default;
8
- $calendar-control-bg-color: $white !default;
9
- $calendar-control-hover-bg-color: $blue !default;
10
- $calendar-control-border-color: $blue !default;
11
- $calendar-header-color: $gray !default;
12
- $calendar-weekday-bg-color: $transparent !default;
13
- $calendar-day-bg-color: $off-white !default;
14
- $calendar-day-odd-bg-color: $white !default;
15
- $calendar-day-odd-border-color: $light-gray !default;
16
- $calendar-day-number-color: $off-black !default;
17
- $calendar-day-number-odd-color: $gray !default;
18
- $calendar-day-number-today-color: $white !default;
19
- $calendar-day-number-today-bg-color: $gray !default;
20
- $calendar-release-color: $white !default;
21
- $calendar-release-bg-color: $blue !default;
22
- $calendar-release-content-color: $gray !default;
23
- $calendar-release-content-bg-color: $white !default;
24
- $calendar-release-content-border-color: $border-color !default;
25
- $calendar-new-release-icon-color: $green !default;
26
- $calendar-release-border-color: $border-color !default;
27
-
28
- $calendar-min-width: 744px !default;
29
- $calendar-control-size: 32px !default;
30
- $calendar-day-width: 112px !default;
31
- $calendar-day-height: 104px !default;
32
- $calendar-day-gutter: 8px !default;
33
- $calendar-day-padding: 4px !default;
34
- $calendar-day-number-dimensions: 24px !default;
35
- $calendar-day-number-margin: 0 0 4px !default;
36
- $calendar-release-padding: 3px 6px !default;
37
- $calendar-release-border-radius: 16px !default;
38
- $calendar-new-release-icon-size: 16px !default;
39
-
40
- $calendar-release-margin: 0 (($calendar-day-gutter + $calendar-day-padding) * -1) 4px !default;
41
- $calendar-max-width: ($calendar-day-width + $calendar-day-gutter * 2) * 10 !default;
42
- $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
5
+ $calendar-bg-color: $white !default;
6
+ $calendar-control-icon-color: $blue !default;
7
+ $calendar-control-icon-hover-color: $white !default;
8
+ $calendar-control-bg-color: $white !default;
9
+ $calendar-control-hover-bg-color: $blue !default;
10
+ $calendar-control-border-color: $blue !default;
11
+ $calendar-header-color: $gray !default;
12
+ $calendar-weekday-bg-color: $transparent !default;
13
+ $calendar-day-bg-color: $off-white !default;
14
+ $calendar-day-odd-bg-color: $white !default;
15
+ $calendar-day-odd-border-color: $light-gray !default;
16
+ $calendar-day-number-color: $off-black !default;
17
+ $calendar-day-number-odd-color: $gray !default;
18
+ $calendar-day-number-today-color: $white !default;
19
+ $calendar-day-number-today-bg-color: $red !default;
20
+ $calendar-release-color: $white !default;
21
+ $calendar-release-bg-color: $blue !default;
22
+ $calendar-new-release-color: $green !default;
23
+
24
+ $calendar-day-header-border-color: $white !default;
25
+ $calendar-day-header-odd-month-border-color: $light-gray !default;
26
+
27
+ $calendar-min-width: 744px !default;
28
+ $calendar-control-size: 32px !default;
29
+ $calendar-day-width: 112px !default;
30
+ $calendar-day-height: 104px !default;
31
+ $calendar-day-gutter: 8px !default;
32
+ $calendar-day-padding: 4px !default;
33
+ $calendar-day-number-dimensions: 24px !default;
34
+ $calendar-new-release-icon-size: 16px !default;
35
+
36
+ $calendar-max-width: ($calendar-day-width + $calendar-day-gutter * 2) * 10 !default;
37
+ $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
43
38
 
44
39
 
45
40
  /**
@@ -163,15 +158,19 @@ $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
163
158
  * Calendar Days
164
159
  *
165
160
  * 1. class added via ReleaseCalendarViewModel
166
- * 2. provides positioning context for `.calendar__new-release`
167
161
  */
168
162
  .calendar__day { /* [1] */
169
- position: relative; /* [2] */
170
- padding: $calendar-day-padding $calendar-day-padding ($calendar-day-padding + 16px);
163
+ padding: $calendar-day-padding;
171
164
  height: $calendar-day-height;
172
165
  background: $calendar-day-bg-color;
173
166
  border: 1px solid $transparent;
174
167
  vertical-align: top;
168
+
169
+ .tooltip-content & {
170
+ width: 200px;
171
+ height: auto;
172
+ padding-bottom: $calendar-day-padding;
173
+ }
175
174
  }
176
175
 
177
176
  .calendar__day--odd-month { /* [2] */
@@ -183,63 +182,78 @@ $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
183
182
  .calendar__day--start-of-week {} /* [2] */
184
183
  .calendar__day--end-of-week {} /* [2] */
185
184
 
186
- .calendar__day-header {}
187
-
188
- .calendar__day-number {
189
- display: inline-block;
190
- margin: $calendar-day-number-margin;
191
- width: $calendar-day-number-dimensions;
192
- height: $calendar-day-number-dimensions;
193
- color: $calendar-day-number-color;
194
- font-size: $font-size;
195
- line-height: $calendar-day-number-dimensions;
196
- text-align: center;
197
- background: $transparent;
198
- border-radius: 50%;
199
-
200
- .calendar__day--odd-month & {
201
- color: $calendar-day-number-odd-color;
202
- }
185
+ .calendar__day-header {
186
+ display: table;
187
+ width: 100%;
188
+ border-spacing: 0;
189
+ margin-bottom: $spacing-unit / 2;
190
+ padding-bottom: $spacing-unit / 2;
191
+ border-bottom: 1px solid $calendar-day-header-border-color;
203
192
 
204
- .calendar__day--today & {
205
- color: $calendar-day-number-today-color;
206
- background: $calendar-day-number-today-bg-color;
207
- }
193
+ .calendar__day--odd-month & {
194
+ border-color: $calendar-day-header-odd-month-border-color;
208
195
  }
196
+ }
209
197
 
210
198
 
211
- .calendar__new-release {
212
- display: block;
213
- position: absolute;
214
- right: $calendar-day-padding;
215
- bottom: $calendar-day-padding;
216
- left: $calendar-day-padding;
217
- line-height: 1;
218
- text-align: right;
219
-
220
- &:hover {
221
- text-decoration: none;
222
- }
199
+ .calendar__day-header-cell {
200
+ display: table-cell;
201
+ vertical-align: middle;
202
+
203
+ & + & { text-align: right }
223
204
  }
224
205
 
225
- .calendar__new-release-text {
226
- color: $green;
227
- font-size: $font-size - 4px;
228
- font-weight: bold;
229
- opacity: 0;
230
206
 
231
- .calendar__new-release:hover & {
232
- opacity: 1;
207
+ .calendar__day-number {
208
+ display: inline-block;
209
+ margin: 0;
210
+ width: $calendar-day-number-dimensions;
211
+ height: $calendar-day-number-dimensions;
212
+ color: $calendar-day-number-color;
213
+ font-size: $font-size;
214
+ line-height: $calendar-day-number-dimensions;
215
+ text-align: center;
216
+ background: $transparent;
217
+ border-radius: 50%;
218
+
219
+ .calendar__day--odd-month & {
220
+ color: $calendar-day-number-odd-color;
221
+ }
222
+
223
+ .calendar__day--today & {
224
+ color: $calendar-day-number-today-color;
225
+ background: $calendar-day-number-today-bg-color;
233
226
  }
234
227
  }
235
228
 
236
- .calendar__new-release-icon {
237
- width: $calendar-new-release-icon-size;
238
- height: $calendar-new-release-icon-size;
239
- vertical-align: middle;
240
- fill: $calendar-new-release-icon-color;
229
+
230
+ .calendar__new-release {
231
+ display: inline-block;
232
+
233
+ &:hover {
234
+ text-decoration: none;
235
+ }
241
236
  }
242
237
 
238
+ .calendar__new-release-text {
239
+ color: $calendar-new-release-color;
240
+ font-size: $font-size - 4px;
241
+ font-weight: bold;
242
+ opacity: 0;
243
+ vertical-align: middle;
244
+
245
+ .calendar__new-release:hover & {
246
+ opacity: 1;
247
+ }
248
+ }
249
+
250
+ .calendar__new-release-icon {
251
+ width: $calendar-new-release-icon-size;
252
+ height: $calendar-new-release-icon-size;
253
+ vertical-align: middle;
254
+ fill: $calendar-new-release-color;
255
+ }
256
+
243
257
 
244
258
  /**
245
259
  * Releases
@@ -248,41 +262,10 @@ $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
248
262
  * element itself.
249
263
  *
250
264
  * 1. class added via ReleaseCalendarViewModel
251
- * 2. set a border around the entire release, but not the left edge,
252
- * then reset that left edge for the start of the release.
253
265
  */
254
266
  .calendar__release { /* [1] */
255
267
  display: block;
256
- margin: $calendar-release-margin;
257
- padding: $calendar-release-padding;
258
- line-height: 1.1;
259
- border: 1px solid $calendar-release-border-color; /* [2] */
260
- border-left: 0; /* [2] */
261
-
262
- &:hover {
263
- text-decoration: none;
264
- }
265
-
266
- .calendar__day--start-of-week & { margin-left: $calendar-day-padding * -1; }
267
- .calendar__day--end-of-week & { margin-right: $calendar-day-padding * -1; }
268
- }
269
-
270
- .calendar__release--start { /* [1] */
271
- margin-left: 0;
272
- border-left: 1px solid $calendar-release-border-color; /* [2] */
273
- border-bottom-left-radius: $calendar-release-border-radius;
274
- border-top-left-radius: $calendar-release-border-radius;
275
- }
276
-
277
- .calendar__release--end { /* [1] */
278
- margin-right: 0;
279
- border-top-right-radius: $calendar-release-border-radius;
280
- border-bottom-right-radius: $calendar-release-border-radius;
281
- }
282
-
283
- .calendar__release--content { /* [1] */
284
- background: $calendar-release-content-bg-color;
285
- border-color: $calendar-release-content-border-color;
268
+ padding: 0 ($spacing-unit / 2);
286
269
  }
287
270
 
288
271
  /**
@@ -294,32 +277,11 @@ $calendar-weekday-padding: 0 0 (24px - $calendar-day-gutter);
294
277
  display: block;
295
278
  color: inherit; /* [1] */
296
279
  font-size: $font-size - 4px;
297
- line-height: 1;
298
280
  vertical-align: middle;
299
-
300
- .calendar__release--content & {
301
- color: $calendar-release-content-color;
302
- }
303
281
  }
304
282
 
305
- /**
306
- * 1. hide name output for release elements that aren't
307
- * first
308
- */
309
- .calendar__release-name {
310
- visibility: hidden; /* [1] */
311
-
312
- .calendar__day--start-of-week &,
313
- .calendar__release--start & { /* [1] */
314
- visibility: visible;
315
- }
316
- }
283
+ .calendar__release-name {}
317
284
 
318
285
  .calendar__release-time {
319
- display: none; /* [1] */
320
286
  font-weight: bold;
321
-
322
- .calendar__release--start & { /* [1] */
323
- display: inline; /* [1] */
324
- }
325
287
  }