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.
- checksums.yaml +4 -4
- data/LICENSE.txt +52 -0
- data/app/assets/images/workarea/admin/email_logo.png +0 -0
- data/app/assets/javascripts/workarea/admin/application.js.erb +11 -1
- data/app/assets/javascripts/workarea/admin/config.js.erb +96 -0
- data/app/assets/javascripts/workarea/admin/modules/active_by_segment_tooltips.js +108 -0
- data/app/assets/javascripts/workarea/admin/modules/calendars.js +1 -1
- data/app/assets/javascripts/workarea/admin/modules/categorized_autocomplete_fields.js +1 -1
- data/app/assets/javascripts/workarea/admin/modules/impersonation_notification.js +44 -0
- data/app/assets/javascripts/workarea/admin/modules/jump_to_menus.js +74 -0
- data/app/assets/javascripts/workarea/admin/modules/new_navigation_taxons.js +1 -2
- data/app/assets/javascripts/workarea/admin/modules/release_reminder.js +1 -0
- data/app/assets/javascripts/workarea/admin/modules/selects.js +33 -0
- data/app/assets/javascripts/workarea/admin/modules/style_guide_autocomplete_fields.js +42 -0
- data/app/assets/javascripts/workarea/admin/modules/timeline_report_chart.js +105 -0
- data/app/assets/javascripts/workarea/admin/modules/toggle_elements.js +27 -0
- data/app/assets/javascripts/workarea/admin/modules/tribute_areas.js +91 -0
- data/app/assets/javascripts/workarea/admin/templates/chart_legend.jst.ejs +17 -9
- data/app/assets/javascripts/workarea/admin/templates/jump_to_menu.jst.ejs +13 -0
- data/app/assets/stylesheets/workarea/admin/application.scss.erb +3 -0
- data/app/assets/stylesheets/workarea/admin/base/_forms.scss +2 -2
- data/app/assets/stylesheets/workarea/admin/components/_activity.scss +24 -16
- data/app/assets/stylesheets/workarea/admin/components/_activity_group.scss +3 -19
- data/app/assets/stylesheets/workarea/admin/components/_box.scss +21 -5
- data/app/assets/stylesheets/workarea/admin/components/_calendar.scss +102 -140
- data/app/assets/stylesheets/workarea/admin/components/_chart_legend.scss +10 -13
- data/app/assets/stylesheets/workarea/admin/components/_checkbox.scss +49 -23
- data/app/assets/stylesheets/workarea/admin/components/_content_block_list.scss +5 -3
- data/app/assets/stylesheets/workarea/admin/components/_date_marker.scss +24 -3
- data/app/assets/stylesheets/workarea/admin/components/_index_table.scss +5 -0
- data/app/assets/stylesheets/workarea/admin/components/_jump_to_menu.scss +57 -0
- data/app/assets/stylesheets/workarea/admin/components/_product_summary.scss +46 -0
- data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +1 -4
- data/app/assets/stylesheets/workarea/admin/email/_base.scss +30 -2
- data/app/assets/stylesheets/workarea/admin/email/_components.scss +66 -5
- data/app/assets/stylesheets/workarea/admin/email/_helpers.scss +16 -5
- data/app/assets/stylesheets/workarea/admin/email/{_settings.scss → _settings.scss.erb} +4 -4
- data/app/controllers/workarea/admin/application_controller.rb +2 -4
- data/app/controllers/workarea/admin/bulk_action_sequential_product_edits_controller.rb +4 -6
- data/app/controllers/workarea/admin/bulk_variant_saving.rb +1 -2
- data/app/controllers/workarea/admin/catalog_products_controller.rb +4 -6
- data/app/controllers/workarea/admin/catalog_variants_controller.rb +2 -3
- data/app/controllers/workarea/admin/comments_controller.rb +9 -0
- data/app/controllers/workarea/admin/configurations_controller.rb +29 -0
- data/app/controllers/workarea/admin/content_assets_controller.rb +3 -1
- data/app/controllers/workarea/admin/content_blocks_controller.rb +1 -7
- data/app/controllers/workarea/admin/create_catalog_products_controller.rb +2 -8
- data/app/controllers/workarea/admin/create_release_undos_controller.rb +43 -0
- data/app/controllers/workarea/admin/create_segments_controller.rb +68 -0
- data/app/controllers/workarea/admin/dashboards_controller.rb +2 -0
- data/app/controllers/workarea/admin/data_file_imports_controller.rb +7 -2
- data/app/controllers/workarea/admin/fulfillment_skus_controller.rb +58 -0
- data/app/controllers/workarea/admin/fulfillment_tokens_controller.rb +56 -0
- data/app/controllers/workarea/admin/guest_browsings_controller.rb +2 -2
- data/app/controllers/workarea/admin/impersonations_controller.rb +3 -4
- data/app/controllers/workarea/admin/orders_controller.rb +3 -0
- data/app/controllers/workarea/admin/pricing_discount_redemptions_controller.rb +13 -0
- data/app/controllers/workarea/admin/pricing_overrides_controller.rb +1 -1
- data/app/controllers/workarea/admin/product_rules_controller.rb +1 -2
- data/app/controllers/workarea/admin/releases_controller.rb +8 -13
- data/app/controllers/workarea/admin/reports_controller.rb +18 -0
- data/app/controllers/workarea/admin/segment_overrides_controller.rb +19 -0
- data/app/controllers/workarea/admin/segment_rules_controller.rb +62 -0
- data/app/controllers/workarea/admin/segments_controller.rb +48 -0
- data/app/controllers/workarea/admin/tax_rates_controller.rb +62 -1
- data/app/controllers/workarea/admin/unsubscribes_controller.rb +40 -0
- data/app/controllers/workarea/admin/users_controller.rb +19 -0
- data/app/helpers/workarea/admin/application_helper.rb +2 -12
- data/app/helpers/workarea/admin/configurations_helper.rb +9 -0
- data/app/helpers/workarea/admin/content_helper.rb +2 -3
- data/app/helpers/workarea/admin/fulfillment_helper.rb +10 -0
- data/app/helpers/workarea/admin/icons_helper.rb +26 -0
- data/app/helpers/workarea/admin/navigation_helper.rb +1 -0
- data/app/helpers/workarea/admin/pricing_overrides_helper.rb +1 -1
- data/app/helpers/workarea/admin/products_helper.rb +13 -0
- data/app/helpers/workarea/admin/releases_helper.rb +5 -21
- data/app/helpers/workarea/admin/segments_helper.rb +68 -0
- data/app/helpers/workarea/admin/settings_helper.rb +11 -3
- data/app/mailers/workarea/admin/comment_mailer.rb +3 -3
- data/app/mailers/workarea/admin/status_report_mailer.rb +19 -6
- data/app/view_models/workarea/admin/bulk_action_product_edit_view_model.rb +5 -0
- data/app/view_models/workarea/admin/changeset_view_model.rb +15 -3
- data/app/view_models/workarea/admin/code_list_view_model.rb +1 -1
- data/app/view_models/workarea/admin/commentable_view_model.rb +4 -0
- data/app/view_models/workarea/admin/content_view_model.rb +2 -0
- data/app/view_models/workarea/admin/dashboards/marketing_view_model.rb +5 -9
- data/app/view_models/workarea/admin/dashboards/reports_view_model.rb +25 -0
- data/app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/category_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/free_gift_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/order_total_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/product_attribute_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/product_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/shipping_view_model.rb +6 -0
- data/app/view_models/workarea/admin/featured_products_view_model.rb +6 -12
- data/app/view_models/workarea/admin/fulfillment_sku_view_model.rb +22 -0
- data/app/view_models/workarea/admin/fulfillment_token_view_model.rb +15 -0
- data/app/view_models/workarea/admin/fulfillment_view_model.rb +14 -0
- data/app/view_models/workarea/admin/insight_view_model.rb +2 -2
- data/app/view_models/workarea/admin/insights/product_view_model.rb +2 -2
- data/app/view_models/workarea/admin/insights/segment_view_model.rb +25 -0
- data/app/view_models/workarea/admin/order_view_model.rb +4 -0
- data/app/view_models/workarea/admin/pricing_sku_view_model.rb +0 -51
- data/app/view_models/workarea/admin/product_rules_preview_view_model.rb +2 -2
- data/app/view_models/workarea/admin/product_view_model.rb +26 -5
- data/app/view_models/workarea/admin/recommendations_view_model.rb +3 -11
- data/app/view_models/workarea/admin/release_calendar_view_model.rb +4 -9
- data/app/view_models/workarea/admin/release_event_view_model.rb +8 -41
- data/app/view_models/workarea/admin/release_view_model.rb +10 -17
- data/app/view_models/workarea/admin/releases_feed_view_model.rb +5 -13
- data/app/view_models/workarea/admin/reports/customers_view_model.rb +4 -2
- data/app/view_models/workarea/admin/reports/low_inventory_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_category_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_discount_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_product_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_tender_view_model.rb +13 -0
- data/app/view_models/workarea/admin/reports/timeline_view_model.rb +74 -0
- data/app/view_models/workarea/admin/search_customization_product_rules_view_model.rb +1 -1
- data/app/view_models/workarea/admin/segment_view_model.rb +19 -0
- data/app/view_models/workarea/admin/user_view_model.rb +6 -9
- data/app/view_models/workarea/admin/variant_view_model.rb +8 -0
- data/app/views/layouts/workarea/admin/application.html.haml +1 -1
- data/app/views/layouts/workarea/admin/email.html.haml +35 -41
- data/app/views/workarea/admin/activities/_configuration_admin_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_create.html.haml +12 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_destroy.html.haml +10 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/_segment_create.html.haml +12 -0
- data/app/views/workarea/admin/activities/_segment_destroy.html.haml +10 -0
- data/app/views/workarea/admin/activities/_segment_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/show.html.haml +18 -11
- data/app/views/workarea/admin/bulk_action_product_edits/edit.html.haml +4 -0
- data/app/views/workarea/admin/bulk_action_product_edits/review.html.haml +11 -4
- data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +1 -1
- data/app/views/workarea/admin/catalog_categories/_cards.html.haml +3 -1
- data/app/views/workarea/admin/catalog_categories/edit.html.haml +1 -4
- data/app/views/workarea/admin/catalog_categories/index.html.haml +1 -0
- data/app/views/workarea/admin/catalog_product_images/edit.html.haml +1 -1
- data/app/views/workarea/admin/catalog_products/_cards.html.haml +2 -4
- data/app/views/workarea/admin/catalog_products/edit.html.haml +2 -1
- data/app/views/workarea/admin/catalog_products/index.html.haml +4 -2
- data/app/views/workarea/admin/catalog_products/insights.html.haml +2 -0
- data/app/views/workarea/admin/catalog_variants/edit.html.haml +6 -1
- data/app/views/workarea/admin/catalog_variants/index.html.haml +2 -0
- data/app/views/workarea/admin/catalog_variants/new.html.haml +5 -0
- data/app/views/workarea/admin/changesets/fields/_active_segment_ids.html.haml +4 -0
- data/app/views/workarea/admin/comment_mailer/notify.html.haml +27 -19
- data/app/views/workarea/admin/comments/index.html.haml +18 -12
- data/app/views/workarea/admin/configurations/_overridden.html.haml +2 -0
- data/app/views/workarea/admin/configurations/show.html.haml +49 -0
- data/app/views/workarea/admin/configurations/types/_array.html.haml +3 -0
- data/app/views/workarea/admin/configurations/types/_boolean.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_duration.html.haml +2 -0
- data/app/views/workarea/admin/configurations/types/_encrypted.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_float.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_hash.html.haml +17 -0
- data/app/views/workarea/admin/configurations/types/_integer.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_select.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_string.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_symbol.html.haml +1 -0
- data/app/views/workarea/admin/content/_edit.html.haml +8 -1
- data/app/views/workarea/admin/content/_form.html.haml +13 -7
- data/app/views/workarea/admin/content/advanced.html.haml +18 -10
- data/app/views/workarea/admin/content_assets/_cards.html.haml +3 -0
- data/app/views/workarea/admin/content_assets/_summary.html.haml +1 -1
- data/app/views/workarea/admin/content_assets/edit.html.haml +6 -0
- data/app/views/workarea/admin/content_assets/index.html.haml +7 -2
- data/app/views/workarea/admin/content_assets/new.html.haml +10 -3
- data/app/views/workarea/admin/content_blocks/_asset.html.haml +8 -1
- data/app/views/workarea/admin/content_pages/_cards.html.haml +1 -0
- data/app/views/workarea/admin/content_pages/edit.html.haml +1 -1
- data/app/views/workarea/admin/content_pages/index.html.haml +1 -0
- data/app/views/workarea/admin/create_catalog_categories/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_catalog_products/content.html.haml +1 -1
- data/app/views/workarea/admin/create_catalog_products/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_content_pages/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_pricing_discounts/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_release_undos/new.html.haml +45 -0
- data/app/views/workarea/admin/create_release_undos/review.html.haml +51 -0
- data/app/views/workarea/admin/create_releases/plan.html.haml +4 -3
- data/app/views/workarea/admin/create_releases/setup.html.haml +8 -12
- data/app/views/workarea/admin/create_segments/rules.html.haml +55 -0
- data/app/views/workarea/admin/create_segments/setup.html.haml +42 -0
- data/app/views/workarea/admin/create_users/admin.html.haml +0 -2
- data/app/views/workarea/admin/dashboards/catalog.html.haml +1 -0
- data/app/views/workarea/admin/dashboards/people.html.haml +1 -1
- data/app/views/workarea/admin/dashboards/reports.html.haml +31 -0
- data/app/views/workarea/admin/dashboards/settings.html.haml +23 -3
- data/app/views/workarea/admin/data_file_imports/new.html.haml +4 -2
- data/app/views/workarea/admin/data_file_mailer/export.html.haml +2 -0
- data/app/views/workarea/admin/data_file_mailer/import.html.haml +2 -0
- data/app/views/workarea/admin/data_file_mailer/import_failure.html.haml +2 -0
- data/app/views/workarea/admin/facets/_applied.html.haml +1 -1
- data/app/views/workarea/admin/featured_products/_selected.html.haml +3 -2
- data/app/views/workarea/admin/featured_products/_unselected.html.haml +3 -1
- data/app/views/workarea/admin/featured_products/edit.html.haml +3 -3
- data/app/views/workarea/admin/featured_products/select.html.haml +0 -1
- data/app/views/workarea/admin/fulfillment_skus/_aux_navigation.html.haml +3 -0
- data/app/views/workarea/admin/fulfillment_skus/_cards.html.haml +57 -0
- data/app/views/workarea/admin/fulfillment_skus/_summary.html.haml +6 -0
- data/app/views/workarea/admin/fulfillment_skus/edit.html.haml +53 -0
- data/app/views/workarea/admin/fulfillment_skus/index.html.haml +75 -0
- data/app/views/workarea/admin/fulfillment_skus/new.html.haml +41 -0
- data/app/views/workarea/admin/fulfillment_skus/show.html.haml +17 -0
- data/app/views/workarea/admin/fulfillment_tokens/index.html.haml +73 -0
- data/app/views/workarea/admin/fulfillments/show.html.haml +41 -6
- data/app/views/workarea/admin/insights/_most_discounted_products.html.haml +4 -4
- data/app/views/workarea/admin/inventory_skus/show.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/edit.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/index.html.haml +3 -1
- data/app/views/workarea/admin/navigation_redirects/index.html.haml +0 -5
- data/app/views/workarea/admin/navigation_taxons/index.html.haml +20 -4
- data/app/views/workarea/admin/orders/_cards.html.haml +23 -5
- data/app/views/workarea/admin/orders/attributes.html.haml +4 -1
- data/app/views/workarea/admin/orders/fraud.html.haml +43 -0
- data/app/views/workarea/admin/orders/index.html.haml +1 -0
- data/app/views/workarea/admin/orders/timeline.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_code_lists/_cards.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_redemptions/index.html.haml +44 -0
- data/app/views/workarea/admin/pricing_discounts/_cards.html.haml +22 -0
- data/app/views/workarea/admin/pricing_discounts/conditions/_segments.html.haml +5 -0
- data/app/views/workarea/admin/pricing_discounts/edit.html.haml +5 -15
- data/app/views/workarea/admin/pricing_discounts/index.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_buy_some_get_some.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_category.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_free_gift.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_order_total.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_product.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +2 -1
- data/app/views/workarea/admin/pricing_discounts/properties/_quantity_fixed_price.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_shipping.html.haml +1 -0
- data/app/views/workarea/admin/pricing_skus/_cards.html.haml +7 -7
- data/app/views/workarea/admin/pricing_skus/edit.html.haml +5 -5
- data/app/views/workarea/admin/pricing_skus/index.html.haml +4 -4
- data/app/views/workarea/admin/pricing_skus/new.html.haml +6 -9
- data/app/views/workarea/admin/product_rules/_card.html.haml +2 -2
- data/app/views/workarea/admin/product_rules/_form.html.haml +1 -0
- data/app/views/workarea/admin/product_rules/index.html.haml +2 -0
- data/app/views/workarea/admin/releases/_cards.html.haml +50 -12
- data/app/views/workarea/admin/releases/_publish.html.haml +1 -1
- data/app/views/workarea/admin/releases/edit.html.haml +33 -46
- data/app/views/workarea/admin/releases/index.html.haml +81 -90
- data/app/views/workarea/admin/releases/list.html.haml +107 -0
- data/app/views/workarea/admin/releases/original.html.haml +50 -0
- data/app/views/workarea/admin/releases/show.html.haml +3 -17
- data/app/views/workarea/admin/releases/undo.html.haml +64 -0
- data/app/views/workarea/admin/reports/average_order_value.html.haml +1 -1
- data/app/views/workarea/admin/reports/customers.html.haml +4 -0
- data/app/views/workarea/admin/reports/first_time_vs_returning_sales.html.haml +1 -1
- data/app/views/workarea/admin/reports/reference.html.haml +19 -60
- data/app/views/workarea/admin/reports/sales_by_country.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_product.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_sku.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_tender.html.haml +30 -0
- data/app/views/workarea/admin/reports/sales_over_time.html.haml +5 -1
- data/app/views/workarea/admin/reports/timeline.html.haml +20 -0
- data/app/views/workarea/admin/search_customizations/_cards.html.haml +1 -0
- data/app/views/workarea/admin/search_customizations/edit.html.haml +1 -1
- data/app/views/workarea/admin/search_customizations/index.html.haml +1 -0
- data/app/views/workarea/admin/searches/show.html.haml +6 -5
- data/app/views/workarea/admin/segment_overrides/show.html.haml +29 -0
- data/app/views/workarea/admin/segment_rules/_form.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/fields/_browser_info.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/fields/_geolocation.html.haml +4 -0
- data/app/views/workarea/admin/segment_rules/fields/_last_order.html.haml +3 -0
- data/app/views/workarea/admin/segment_rules/fields/_logged_in.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/fields/_orders.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/fields/_revenue.html.haml +9 -0
- data/app/views/workarea/admin/segment_rules/fields/_sessions.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/fields/_tags.html.haml +4 -0
- data/app/views/workarea/admin/segment_rules/fields/_traffic_referrer.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/geolocation_options.json.jbuilder +4 -0
- data/app/views/workarea/admin/segment_rules/index.html.haml +25 -0
- data/app/views/workarea/admin/segment_rules/summaries/_browser_info.html.haml +11 -0
- data/app/views/workarea/admin/segment_rules/summaries/_geolocation.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_last_order.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_logged_in.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/summaries/_orders.html.haml +6 -0
- data/app/views/workarea/admin/segment_rules/summaries/_revenue.html.haml +7 -0
- data/app/views/workarea/admin/segment_rules/summaries/_sessions.html.haml +6 -0
- data/app/views/workarea/admin/segment_rules/summaries/_tags.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_traffic_referrer.html.haml +10 -0
- data/app/views/workarea/admin/segments/_cards.html.haml +81 -0
- data/app/views/workarea/admin/segments/_publish.html.haml +10 -0
- data/app/views/workarea/admin/segments/edit.html.haml +41 -0
- data/app/views/workarea/admin/segments/index.html.haml +64 -0
- data/app/views/workarea/admin/segments/insights.html.haml +52 -0
- data/app/views/workarea/admin/segments/show.html.haml +20 -0
- data/app/views/workarea/admin/shared/_active_field.html.haml +17 -0
- data/app/views/workarea/admin/shared/_bulk_actions.html.haml +10 -8
- data/app/views/workarea/admin/shared/_primary_nav.html.haml +5 -2
- data/app/views/workarea/admin/shared/_toggle_button.html.haml +1 -1
- data/app/views/workarea/admin/shipping_services/edit.html.haml +0 -4
- data/app/views/workarea/admin/shipping_services/new.html.haml +0 -4
- data/app/views/workarea/admin/status_report_mailer/report.html.haml +83 -86
- data/app/views/workarea/admin/style_guides/components/_activity.html.haml +3 -5
- data/app/views/workarea/admin/style_guides/components/_activity_group.html.haml +9 -15
- data/app/views/workarea/admin/style_guides/components/_box.html.haml +12 -7
- data/app/views/workarea/admin/style_guides/components/_checkbox.html.haml +21 -2
- data/app/views/workarea/admin/style_guides/components/_release_changeset.html.haml +3 -5
- data/app/views/workarea/admin/tax_rates/edit.html.haml +64 -0
- data/app/views/workarea/admin/tax_rates/index.html.haml +59 -20
- data/app/views/workarea/admin/tax_rates/new.html.haml +62 -0
- data/app/views/workarea/admin/timeline/show.html.haml +34 -41
- data/app/views/workarea/admin/toolbar/show.html.haml +11 -1
- data/app/views/workarea/admin/trash/index.html.haml +1 -1
- data/app/views/workarea/admin/users/edit.html.haml +60 -57
- data/app/views/workarea/admin/users/index.html.haml +1 -3
- data/app/views/workarea/admin/users/index.json.jbuilder +8 -0
- data/app/views/workarea/admin/users/insights.html.haml +31 -23
- data/app/views/workarea/admin/users/permissions.html.haml +10 -1
- data/app/views/workarea/admin/users/show.html.haml +7 -0
- data/config/locales/en.yml +569 -124
- data/config/routes.rb +57 -5
- data/lib/workarea/mailer_previews/admin/status_report_mailer_preview.rb +3 -1
- data/public/workarea/import_samples/tax_rates.csv +3 -3
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/helpers/workarea/admin/application_helper_test.rb +0 -16
- data/test/helpers/workarea/admin/icons_helper_test.rb +9 -0
- data/test/helpers/workarea/admin/products_helper_test.rb +73 -0
- data/test/helpers/workarea/admin/releases_helper_test.rb +0 -49
- data/test/helpers/workarea/admin/settings_helper_test.rb +22 -1
- data/test/integration/workarea/admin/assets_integration_test.rb +2 -5
- data/test/integration/workarea/admin/comments_integration_test.rb +27 -7
- data/test/integration/workarea/admin/configurations_integration_test.rb +21 -0
- data/test/integration/workarea/admin/create_release_undos_integration_test.rb +29 -0
- data/test/integration/workarea/admin/create_segments_integration_test.rb +26 -0
- data/test/integration/workarea/admin/data_file_imports_integration_test.rb +34 -8
- data/test/integration/workarea/admin/fulfillment_skus_integration_test.rb +55 -0
- data/test/integration/workarea/admin/fulfillment_tokens_integration_test.rb +43 -0
- data/test/integration/workarea/admin/guest_browsings_integration_test.rb +8 -32
- data/test/integration/workarea/admin/impersonations_integration_test.rb +13 -57
- data/test/integration/workarea/admin/jump_to_integration_test.rb +0 -29
- data/test/integration/workarea/admin/pricing_overrides_integration_test.rb +11 -0
- data/test/integration/workarea/admin/products_integration_test.rb +0 -13
- data/test/integration/workarea/admin/releases_integration_test.rb +71 -87
- data/test/integration/workarea/admin/segment_overrides_integration_test.rb +28 -0
- data/test/integration/workarea/admin/segment_rules_integration_test.rb +49 -0
- data/test/integration/workarea/admin/segments_integration_test.rb +31 -0
- data/test/integration/workarea/admin/shipping_service_integration_test.rb +1 -3
- data/test/integration/workarea/admin/tax_categories_integration_test.rb +1 -1
- data/test/integration/workarea/admin/unsubscribes_integration_test.rb +32 -0
- data/test/integration/workarea/admin/users_integration_test.rb +32 -0
- data/test/javascripts/fixtures/release_reminder.html.haml +3 -3
- data/test/javascripts/new_navigation_taxons_spec.js +1 -12
- data/test/mailers/workarea/admin/comment_mailer_test.rb +35 -0
- data/test/mailers/workarea/admin/status_report_mailer_test.rb +30 -25
- data/test/system/workarea/admin/alerts_system_test.rb +2 -1
- data/test/system/workarea/admin/bulk_actions_system_test.rb +1 -1
- data/test/system/workarea/admin/comments_system_test.rb +43 -0
- data/test/system/workarea/admin/content_system_test.rb +6 -0
- data/test/system/workarea/admin/dashboard_system_test.rb +8 -9
- data/test/system/workarea/admin/data_files_system_test.rb +1 -1
- data/test/system/workarea/admin/discounts_system_test.rb +18 -0
- data/test/system/workarea/admin/featured_products_system_test.rb +3 -0
- data/test/system/workarea/admin/fulfillment_skus_system_test.rb +48 -0
- data/test/system/workarea/admin/impersonation_system_test.rb +5 -2
- data/test/system/workarea/admin/orders_system_test.rb +32 -21
- data/test/system/workarea/admin/payment_transactions_system_test.rb +34 -32
- data/test/system/workarea/admin/releases_system_test.rb +151 -37
- data/test/system/workarea/admin/reports_system_test.rb +29 -0
- data/test/system/workarea/admin/segments_system_test.rb +124 -0
- data/test/system/workarea/admin/tax_categories_system_test.rb +166 -16
- data/test/system/workarea/admin/users_system_test.rb +15 -0
- data/test/view_models/workarea/admin/changeset_view_model_test.rb +59 -9
- data/test/view_models/workarea/admin/code_list_view_model_test.rb +0 -5
- data/test/view_models/workarea/admin/content_view_model_test.rb +13 -11
- data/test/view_models/workarea/admin/insights/product_view_model_test.rb +4 -4
- data/test/view_models/workarea/admin/insights/segment_view_model_test.rb +73 -0
- data/test/view_models/workarea/admin/product_rules_preview_view_model_test.rb +37 -0
- data/test/view_models/workarea/admin/product_view_model_test.rb +13 -19
- data/test/view_models/workarea/admin/release_calendar_view_model_test.rb +16 -0
- data/test/view_models/workarea/admin/release_view_model_test.rb +13 -56
- data/test/view_models/workarea/admin/releases_feed_view_model_test.rb +8 -21
- data/test/view_models/workarea/admin/reports/timeline_view_model_test.rb +76 -0
- data/test/view_models/workarea/admin/search_analysis_view_model_test.rb +14 -16
- data/test/view_models/workarea/admin/timeline_view_model_test.rb +1 -1
- metadata +128 -17
- data/app/views/workarea/admin/featured_products/_release_preview_warning.html.haml +0 -4
- data/app/views/workarea/admin/releases/calendar.html.haml +0 -54
- data/test/dummy/tmp/screenshots/.keep +0 -0
- data/test/helpers/workarea/admin/content_helper_test.rb +0 -17
- data/test/integration/workarea/admin/index_tracking_integration_test.rb +0 -21
- data/test/javascripts/fixtures/existing_navigation_taxon.html.haml +0 -10
- data/test/view_models/workarea/admin/pricing_sku_view_model_test.rb +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aec0b614d6b570076fb116adfeed5287de5b426980c35c94f00381231847ad16
|
4
|
+
data.tar.gz: dc19afbd0f72de145970af4efbc99f7c41cdaaa9eec64364205e288df7c372a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79a8040de72e78e71b21dcac49fc92c8942c04963b20f3c233d7cc137dd1ff7c453c6e6bfc2385563a4c0955a979e0da69f628c0a547cb11da9c67ce910cb37
|
7
|
+
data.tar.gz: e00445f06304a00ed467c976f63d4d652ebe032eccc394c4fc9661e154ecb969e54ea9b55f62656a49ad1e8e5c8402bbac9f754603453b1fec7350c310131d98
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
WebLinc
|
2
|
+
Business Source License
|
3
|
+
|
4
|
+
Licensor: WebLinc Corporation, 22 S. 3rd Street, 2nd Floor, Philadelphia PA 19106
|
5
|
+
|
6
|
+
Licensed Work: Workarea Commerce Platform
|
7
|
+
The Licensed Work is (c) 2019 WebLinc Corporation
|
8
|
+
|
9
|
+
Additional Use Grant:
|
10
|
+
You may make production use of the Licensed Work without an additional license agreement with WebLinc so long as you do not use the Licensed Work for a Commerce Service.
|
11
|
+
|
12
|
+
A "Commerce Service" is a commercial offering that allows third parties (other than your employees and contractors) to access the functionality of the Licensed Work by creating or managing commerce functionality, the products, taxonomy, assets and/or content of which are controlled by such third parties.
|
13
|
+
|
14
|
+
For information about obtaining an additional license agreement with WebLinc, contact licensing@workarea.com.
|
15
|
+
|
16
|
+
Change Date: 2019-08-20
|
17
|
+
|
18
|
+
Change License: Version 2.0 or later of the GNU General Public License as published by the Free Software Foundation
|
19
|
+
|
20
|
+
Terms
|
21
|
+
|
22
|
+
The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
|
23
|
+
|
24
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
|
25
|
+
|
26
|
+
If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
|
27
|
+
|
28
|
+
All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
|
29
|
+
|
30
|
+
You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
|
31
|
+
|
32
|
+
Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
|
33
|
+
|
34
|
+
This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works and to refer to it using the trademark "Business Source License" as long as you comply with the Covenants of Licensor below.
|
35
|
+
|
36
|
+
Covenants of Licensor
|
37
|
+
In consideration of the right to use this License’s text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
|
38
|
+
|
39
|
+
To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
|
40
|
+
|
41
|
+
To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None."
|
42
|
+
|
43
|
+
To specify a Change Date.
|
44
|
+
|
45
|
+
Not to modify this License in any other way.
|
46
|
+
|
47
|
+
Notice
|
48
|
+
The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
|
49
|
+
|
50
|
+
For more information on the use of the Business Source License generally, please visit the Adopting and Developing Business Source License FAQ.
|
51
|
+
|
52
|
+
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. "Business Source License" is a trademark of MariaDB Corporation Ab.
|
Binary file
|
@@ -40,6 +40,7 @@ window.feature.testAll();
|
|
40
40
|
spectrum
|
41
41
|
Chart.bundle
|
42
42
|
chartkick
|
43
|
+
tribute
|
43
44
|
).each do |asset|
|
44
45
|
require_asset asset
|
45
46
|
end
|
@@ -79,6 +80,8 @@ window.feature.testAll();
|
|
79
80
|
workarea/admin/templates/direct_upload_processing
|
80
81
|
workarea/admin/templates/direct_upload_table_row
|
81
82
|
workarea/admin/templates/expandable_button
|
83
|
+
workarea/admin/templates/jump_to_menu
|
84
|
+
workarea/admin/templates/chart_legend
|
82
85
|
).each do |asset|
|
83
86
|
require_asset asset
|
84
87
|
end
|
@@ -127,12 +130,12 @@ window.feature.testAll();
|
|
127
130
|
workarea/core/modules/form_submitting_controls
|
128
131
|
workarea/core/modules/jquery
|
129
132
|
workarea/core/modules/style_guide_empty_links
|
130
|
-
workarea/core/modules/style_guide_autocomplete_fields
|
131
133
|
workarea/core/modules/style_guide_accordions
|
132
134
|
workarea/core/modules/reveal_password
|
133
135
|
workarea/core/modules/local_time
|
134
136
|
workarea/core/modules/date
|
135
137
|
workarea/core/modules/copy_to_clipboard
|
138
|
+
workarea/admin/modules/style_guide_autocomplete_fields
|
136
139
|
workarea/admin/modules/categorized_autocomplete_fields
|
137
140
|
workarea/admin/modules/messages
|
138
141
|
workarea/admin/modules/takeover
|
@@ -192,6 +195,13 @@ window.feature.testAll();
|
|
192
195
|
workarea/admin/modules/direct_uploads
|
193
196
|
workarea/admin/modules/pricing_overrides
|
194
197
|
workarea/admin/modules/expandables
|
198
|
+
workarea/admin/modules/impersonation_notification
|
199
|
+
workarea/admin/modules/timeline_report_chart
|
200
|
+
workarea/admin/modules/jump_to_menus
|
201
|
+
workarea/admin/modules/active_by_segment_tooltips
|
202
|
+
workarea/admin/modules/toggle_elements
|
203
|
+
workarea/admin/modules/selects
|
204
|
+
workarea/admin/modules/tribute_areas
|
195
205
|
).each do |asset|
|
196
206
|
require_asset asset
|
197
207
|
end
|
@@ -22,6 +22,8 @@
|
|
22
22
|
* @property {object} forms
|
23
23
|
* @property {object} directUploads
|
24
24
|
* @property {object} expandable
|
25
|
+
* @property {object} timelineReportChart
|
26
|
+
* @property {object} tributeAreas
|
25
27
|
*/
|
26
28
|
|
27
29
|
WORKAREA.config.datetimepickerFields = {
|
@@ -673,6 +675,100 @@
|
|
673
675
|
threshold: 350
|
674
676
|
};
|
675
677
|
|
678
|
+
WORKAREA.config.impersonationNotification = {
|
679
|
+
excludedPaths: [
|
680
|
+
'pricing_overrides',
|
681
|
+
'segment_override'
|
682
|
+
]
|
683
|
+
};
|
684
|
+
|
685
|
+
WORKAREA.config.timelineReportChart = {
|
686
|
+
initiallyActive: {
|
687
|
+
'Revenue': true,
|
688
|
+
'Releases': true
|
689
|
+
},
|
690
|
+
|
691
|
+
datasets: {
|
692
|
+
fill: false,
|
693
|
+
borderWidth: 2
|
694
|
+
},
|
695
|
+
|
696
|
+
colors: {
|
697
|
+
revenue: '#00b144',
|
698
|
+
orders: '#011eff',
|
699
|
+
units_sold: '#ff4070',
|
700
|
+
customers: '#ff8100',
|
701
|
+
releases: '#303541'
|
702
|
+
},
|
703
|
+
|
704
|
+
options: {
|
705
|
+
responsive: true,
|
706
|
+
title: {
|
707
|
+
display: false,
|
708
|
+
},
|
709
|
+
labels: {
|
710
|
+
usePointStyle: true
|
711
|
+
},
|
712
|
+
legend: {
|
713
|
+
display: false
|
714
|
+
},
|
715
|
+
tooltips: {
|
716
|
+
mode: 'index',
|
717
|
+
filter: function (item, data) {
|
718
|
+
var label = data.datasets[item.datasetIndex].label;
|
719
|
+
return label !== I18n.t('workarea.admin.reports.timeline.releases');
|
720
|
+
}
|
721
|
+
},
|
722
|
+
scales: {
|
723
|
+
xAxes: [
|
724
|
+
{
|
725
|
+
type: 'time',
|
726
|
+
time: {
|
727
|
+
parser: 'MM/DD/YYYY',
|
728
|
+
tooltipFormat: 'll'
|
729
|
+
},
|
730
|
+
scaleLabel: {
|
731
|
+
display: true,
|
732
|
+
labelString: I18n.t('workarea.admin.reports.timeline.date')
|
733
|
+
},
|
734
|
+
}
|
735
|
+
],
|
736
|
+
yAxes: [
|
737
|
+
{
|
738
|
+
type: 'linear',
|
739
|
+
position: 'left',
|
740
|
+
id: 'money-axis',
|
741
|
+
gridLines: {
|
742
|
+
display: false
|
743
|
+
},
|
744
|
+
ticks: {
|
745
|
+
beginAtZero: true,
|
746
|
+
callback: function (value, index, values) {
|
747
|
+
return '$' + value;
|
748
|
+
}
|
749
|
+
}
|
750
|
+
},
|
751
|
+
{
|
752
|
+
type: 'linear',
|
753
|
+
display: true,
|
754
|
+
position: 'right',
|
755
|
+
id: 'unit-axis',
|
756
|
+
gridLines: {
|
757
|
+
display: false
|
758
|
+
},
|
759
|
+
ticks: {
|
760
|
+
beginAtZero: true
|
761
|
+
}
|
762
|
+
}
|
763
|
+
]
|
764
|
+
}
|
765
|
+
}
|
766
|
+
};
|
767
|
+
|
768
|
+
WORKAREA.config.tributeAreas = {
|
769
|
+
trigger: '@'
|
770
|
+
};
|
771
|
+
|
676
772
|
|
677
773
|
/**
|
678
774
|
* Chart.js
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/**
|
2
|
+
* @namespace WORKAREA.activeBySegmentTooltips
|
3
|
+
*/
|
4
|
+
WORKAREA.registerModule('activeBySegmentTooltips', (function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var hiddenInput = JST['workarea/core/templates/hidden_input'],
|
8
|
+
|
9
|
+
getSelectedOptionText = function ($select) {
|
10
|
+
return $select.find('option:selected').map(function (_i, option) {
|
11
|
+
return $.trim($(option).text());
|
12
|
+
}).toArray();
|
13
|
+
},
|
14
|
+
|
15
|
+
updateMessages = function ($link, $content) {
|
16
|
+
var $message = $link.find('.active-field__segments-message'),
|
17
|
+
names = getSelectedOptionText($content.find('select')),
|
18
|
+
text = I18n.t('workarea.admin.shared.active_field.by_segment', {
|
19
|
+
count: names.length,
|
20
|
+
name: names[0],
|
21
|
+
more_count: names.length - 1
|
22
|
+
});
|
23
|
+
|
24
|
+
if (_.isEmpty(names)) {
|
25
|
+
$message.html($('<span />').text(text));
|
26
|
+
} else {
|
27
|
+
$message.html($('<strong />').text(text));
|
28
|
+
}
|
29
|
+
},
|
30
|
+
|
31
|
+
buildInput = function (name, value) {
|
32
|
+
var input = hiddenInput({ name: name, value: value });
|
33
|
+
return $(input).data('activeBySegmentInput', true);
|
34
|
+
},
|
35
|
+
|
36
|
+
addHiddenInputs = function ($form, $content) {
|
37
|
+
$content
|
38
|
+
.find('select')
|
39
|
+
.each(function (index, select) {
|
40
|
+
var $select = $(select);
|
41
|
+
|
42
|
+
if (_.isEmpty($select.val())) {
|
43
|
+
$form.append(buildInput(select.name, ''));
|
44
|
+
} else {
|
45
|
+
_.forEach($select.val(), function (value) {
|
46
|
+
$form.append(buildInput(select.name, value));
|
47
|
+
});
|
48
|
+
}
|
49
|
+
});
|
50
|
+
},
|
51
|
+
|
52
|
+
removeHiddenInputs = function ($form) {
|
53
|
+
$form
|
54
|
+
.find('[type=hidden]')
|
55
|
+
.filter(function (index, input) {
|
56
|
+
return $(input).data('activeBySegmentInput') === true;
|
57
|
+
})
|
58
|
+
.remove();
|
59
|
+
},
|
60
|
+
|
61
|
+
updateFields = function ($content, $trigger) {
|
62
|
+
var $form = $trigger.closest('form');
|
63
|
+
|
64
|
+
removeHiddenInputs($form);
|
65
|
+
addHiddenInputs($form, $content);
|
66
|
+
updateMessages($trigger, $content);
|
67
|
+
},
|
68
|
+
|
69
|
+
getConfig = function (trigger, $content) {
|
70
|
+
return _.assign({}, WORKAREA.config.tooltipster, {
|
71
|
+
interactive: true,
|
72
|
+
content: $content,
|
73
|
+
trigger: 'custom',
|
74
|
+
triggerOpen: {
|
75
|
+
click: true
|
76
|
+
},
|
77
|
+
triggerClose: {
|
78
|
+
mouseleave: true
|
79
|
+
}
|
80
|
+
});
|
81
|
+
},
|
82
|
+
|
83
|
+
setup = function (index, trigger) {
|
84
|
+
var $content = $(trigger.hash),
|
85
|
+
$select = $content.find('[data-select]'),
|
86
|
+
handleChange = _.partial(updateFields, $content, $(trigger));
|
87
|
+
|
88
|
+
$select.on('change', handleChange);
|
89
|
+
$(trigger).tooltipster(getConfig(trigger, $content));
|
90
|
+
},
|
91
|
+
|
92
|
+
/**
|
93
|
+
* @method
|
94
|
+
* @name init
|
95
|
+
* @memberof WORKAREA.activeBySegmentTooltips
|
96
|
+
*/
|
97
|
+
init = function ($scope) {
|
98
|
+
$('[data-active-by-segment-tooltip]', $scope)
|
99
|
+
.each(setup)
|
100
|
+
.on('click', function (event) {
|
101
|
+
event.preventDefault();
|
102
|
+
});
|
103
|
+
};
|
104
|
+
|
105
|
+
return {
|
106
|
+
init: init
|
107
|
+
};
|
108
|
+
}()));
|
@@ -32,7 +32,7 @@ WORKAREA.registerModule('calendars', (function () {
|
|
32
32
|
resetCalendar = function (event) {
|
33
33
|
var calendar = event.delegateTarget,
|
34
34
|
today = new Date(),
|
35
|
-
endpoint = WORKAREA.routes.admin.
|
35
|
+
endpoint = WORKAREA.routes.admin.releasesPath();
|
36
36
|
|
37
37
|
event.preventDefault();
|
38
38
|
|
@@ -5,7 +5,7 @@ WORKAREA.registerModule('categorizedAutocompleteFields', (function () {
|
|
5
5
|
'use strict';
|
6
6
|
|
7
7
|
var getSource = function (request, response) {
|
8
|
-
$.getJSON(
|
8
|
+
$.getJSON('/admin/jump_to', { q: request.term }, function (data) {
|
9
9
|
response(data.results);
|
10
10
|
});
|
11
11
|
},
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/**
|
2
|
+
* @namespace WORKAREA.impersonationNotification
|
3
|
+
*/
|
4
|
+
WORKAREA.registerModule('impersonationNotification', (function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var pathExcluded = function () {
|
8
|
+
var paths = WORKAREA.config.impersonationNotification.excludedPaths;
|
9
|
+
|
10
|
+
return _.reduce(paths, function (result, path) {
|
11
|
+
return _.includes(window.location.pathname, path);
|
12
|
+
}, false);
|
13
|
+
},
|
14
|
+
|
15
|
+
confirm = function ($form) {
|
16
|
+
var confirmed = window.confirm(
|
17
|
+
I18n.t('workarea.admin.actions.impersonation_confirmation', {
|
18
|
+
name: $form.data('impersonationNotification')
|
19
|
+
})
|
20
|
+
);
|
21
|
+
|
22
|
+
if (confirmed) { return; }
|
23
|
+
|
24
|
+
$form.trigger('submit');
|
25
|
+
},
|
26
|
+
|
27
|
+
/**
|
28
|
+
* @method
|
29
|
+
* @name init
|
30
|
+
* @memberof WORKAREA.impersonationNotification
|
31
|
+
*/
|
32
|
+
init = _.once(function ($scope) {
|
33
|
+
var $form = $('[data-impersonation-notification]', $scope);
|
34
|
+
|
35
|
+
if (_.isEmpty($form)) { return; }
|
36
|
+
if (pathExcluded()) { return; }
|
37
|
+
|
38
|
+
confirm($form);
|
39
|
+
});
|
40
|
+
|
41
|
+
return {
|
42
|
+
init: init
|
43
|
+
};
|
44
|
+
}()));
|
@@ -0,0 +1,74 @@
|
|
1
|
+
/**
|
2
|
+
* Define a `data-jump-to-menu` attribute on a container. This module will loop
|
3
|
+
* over any child with a `data-jump-to-menu-heading` attribute and use its
|
4
|
+
* numeric value as a way to build out a navigation UI that is stuck to the
|
5
|
+
* bottom right of the page. Each `data-jump-to-menu-heading` must also have a
|
6
|
+
* unique ID attribute value applied to the element in order to construct the
|
7
|
+
* links appropriately.
|
8
|
+
*
|
9
|
+
* @namespace WORKAREA.jumpToMenu
|
10
|
+
*/
|
11
|
+
WORKAREA.registerModule('jumpToMenu', (function () {
|
12
|
+
'use strict';
|
13
|
+
|
14
|
+
var menu = JST['workarea/admin/templates/jump_to_menu'],
|
15
|
+
|
16
|
+
scrollToAnchor = function (event) {
|
17
|
+
event.preventDefault();
|
18
|
+
|
19
|
+
$(window).scrollTop(
|
20
|
+
$(event.target.hash).offset().top - $('#header').height() - 8
|
21
|
+
);
|
22
|
+
},
|
23
|
+
|
24
|
+
buildMenu = function (container) {
|
25
|
+
var $headings = $('[data-jump-to-menu-heading]', container),
|
26
|
+
items = $headings.map(function (index, heading) {
|
27
|
+
return {
|
28
|
+
anchor: heading.id,
|
29
|
+
name: $(heading).text().trim(),
|
30
|
+
level: $(heading).data('jumpToMenuHeading')
|
31
|
+
};
|
32
|
+
}).toArray();
|
33
|
+
|
34
|
+
if (_.isEmpty(items)) { return; }
|
35
|
+
|
36
|
+
return $(menu({ items: items }));
|
37
|
+
},
|
38
|
+
|
39
|
+
setup = function (index, container) {
|
40
|
+
var $menu;
|
41
|
+
|
42
|
+
if ( ! _.isEmpty($('.jump-to-menu'))) {
|
43
|
+
window.console.warn(
|
44
|
+
'WORKAREA.jumpToMenu.init: you may only have one Jump-To ' +
|
45
|
+
'Menu on the page at a time.'
|
46
|
+
);
|
47
|
+
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
|
51
|
+
$menu = buildMenu(container);
|
52
|
+
|
53
|
+
$menu.on('click', 'a', scrollToAnchor);
|
54
|
+
|
55
|
+
if ( ! _.isEmpty($('.workflow-bar'))) {
|
56
|
+
$menu.addClass('jump-to-menu--with-workflow-bar');
|
57
|
+
}
|
58
|
+
|
59
|
+
$('body').append($menu);
|
60
|
+
},
|
61
|
+
|
62
|
+
/**
|
63
|
+
* @method
|
64
|
+
* @name init
|
65
|
+
* @memberof WORKAREA.jumpToMenu
|
66
|
+
*/
|
67
|
+
init = function ($scope) {
|
68
|
+
$('[data-jump-to-menu]', $scope).each(setup);
|
69
|
+
};
|
70
|
+
|
71
|
+
return {
|
72
|
+
init: init
|
73
|
+
};
|
74
|
+
}()));
|
@@ -23,9 +23,8 @@ WORKAREA.registerModule('newNavigationTaxons', (function () {
|
|
23
23
|
createRemoteSelect = function (event) {
|
24
24
|
var $typeSelect = $(event.currentTarget),
|
25
25
|
$idSelect = $('[name=navigable_id]', event.delegateTarget),
|
26
|
-
$section = $typeSelect.closest('[data-new-navigation-taxon]'),
|
27
26
|
settings = getConfig($typeSelect),
|
28
|
-
selected = $
|
27
|
+
selected = $typeSelect.data('newNavigationTaxon');
|
29
28
|
|
30
29
|
if ($idSelect.is('.select2-hidden-accessible') && _.isUndefined(selected)) {
|
31
30
|
destroyRemoteSelect($idSelect);
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* @namespace WORKAREA.selects
|
3
|
+
*/
|
4
|
+
WORKAREA.registerModule('selects', (function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @method
|
9
|
+
* @name init
|
10
|
+
* @memberof WORKAREA.selects
|
11
|
+
*/
|
12
|
+
var getConfig = function (select) {
|
13
|
+
var config = _.assign({}, $(select).data('select'));
|
14
|
+
|
15
|
+
if ( ! _.isUndefined(config.dropdownParent)) {
|
16
|
+
config.dropdownParent = $(config.dropdownParent);
|
17
|
+
}
|
18
|
+
|
19
|
+
return config;
|
20
|
+
},
|
21
|
+
|
22
|
+
setup = function(index, select) {
|
23
|
+
$(select).select2(getConfig(select));
|
24
|
+
},
|
25
|
+
|
26
|
+
init = function ($scope) {
|
27
|
+
$('[data-select]', $scope).each(setup);
|
28
|
+
};
|
29
|
+
|
30
|
+
return {
|
31
|
+
init: init
|
32
|
+
};
|
33
|
+
}()));
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* @namespace WORKAREA.styleGuideAutocompleteFields
|
3
|
+
*/
|
4
|
+
WORKAREA.registerModule('styleGuideAutocompleteFields', (function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var AUTOCOMPLETE_DATA = [
|
8
|
+
'Small red sweater',
|
9
|
+
'Medium red sweater',
|
10
|
+
'Large red sweater',
|
11
|
+
'Small blue sweater',
|
12
|
+
'Medium blue sweater',
|
13
|
+
'Large blue sweater',
|
14
|
+
'Small green sweater',
|
15
|
+
'Medium green sweater',
|
16
|
+
'Large green sweater',
|
17
|
+
'Small white sweater',
|
18
|
+
'Medium white sweater',
|
19
|
+
'Large white sweater',
|
20
|
+
'Small black sweater',
|
21
|
+
'Medium black sweater',
|
22
|
+
'Large black sweater',
|
23
|
+
'Small yellow sweater',
|
24
|
+
'Medium yellow sweater',
|
25
|
+
'Large yellow sweater'
|
26
|
+
],
|
27
|
+
|
28
|
+
/**
|
29
|
+
* @method
|
30
|
+
* @name init
|
31
|
+
* @memberof WORKAREA.styleGuideAutocompleteFields
|
32
|
+
*/
|
33
|
+
init = function ($scope) {
|
34
|
+
$('[data-style-guide-autocomplete-field]', $scope).autocomplete({
|
35
|
+
source: AUTOCOMPLETE_DATA
|
36
|
+
});
|
37
|
+
};
|
38
|
+
|
39
|
+
return {
|
40
|
+
init: init
|
41
|
+
};
|
42
|
+
}()));
|
@@ -0,0 +1,105 @@
|
|
1
|
+
/**
|
2
|
+
* @namespace WORKAREA.timelineReportChart
|
3
|
+
*/
|
4
|
+
WORKAREA.registerModule('timelineReportChart', (function () {
|
5
|
+
'use strict';
|
6
|
+
|
7
|
+
var updateChart = function (chart, event) {
|
8
|
+
var $item = $(event.target).closest('.chart-legend__list-item'),
|
9
|
+
dataset = chart.data.datasets[event.target.value];
|
10
|
+
|
11
|
+
if (event.target.checked) {
|
12
|
+
dataset.hidden = false;
|
13
|
+
$item.removeClass('chart-legend__list-item--disabled');
|
14
|
+
} else {
|
15
|
+
dataset.hidden = true;
|
16
|
+
$item.addClass('chart-legend__list-item--disabled');
|
17
|
+
}
|
18
|
+
|
19
|
+
chart.update();
|
20
|
+
},
|
21
|
+
|
22
|
+
setupLegend = function (chart) {
|
23
|
+
var legend = JST['workarea/admin/templates/chart_legend']({
|
24
|
+
datasets: chart.data.datasets,
|
25
|
+
enabled: WORKAREA.config.timelineReportChart.initiallyActive
|
26
|
+
});
|
27
|
+
|
28
|
+
$('#timeline-report-chart-legend')
|
29
|
+
.html(legend)
|
30
|
+
.on('change', '[type=checkbox]', _.partial(updateChart, chart))
|
31
|
+
.find('[type=checkbox]')
|
32
|
+
.trigger('change');
|
33
|
+
},
|
34
|
+
|
35
|
+
transformDataset = function (dataset, type) {
|
36
|
+
return _.map(dataset, function (item) {
|
37
|
+
var data = { x: new Date(item.x) };
|
38
|
+
|
39
|
+
if (type === 'releases') {
|
40
|
+
data.y = item.y > 0 ? 0 : null;
|
41
|
+
data.releaseCount = item.y;
|
42
|
+
} else {
|
43
|
+
data.y = item.y || 0;
|
44
|
+
}
|
45
|
+
|
46
|
+
return data;
|
47
|
+
});
|
48
|
+
},
|
49
|
+
|
50
|
+
buildDatasets = function (datasets) {
|
51
|
+
return _.map(datasets, function (dataset, type) {
|
52
|
+
var config = WORKAREA.config.timelineReportChart.datasets,
|
53
|
+
color = WORKAREA.config.timelineReportChart.colors[type],
|
54
|
+
dataConfig = _.merge({}, config, {
|
55
|
+
label: I18n.t('workarea.admin.reports.timeline.' + type),
|
56
|
+
borderColor: color,
|
57
|
+
backgroundColor: color,
|
58
|
+
});
|
59
|
+
|
60
|
+
if (type === 'revenue') {
|
61
|
+
dataConfig.yAxisID = 'money-axis';
|
62
|
+
} else {
|
63
|
+
dataConfig.yAxisID = 'unit-axis';
|
64
|
+
}
|
65
|
+
|
66
|
+
if (type === 'releases') {
|
67
|
+
dataConfig.pointStyle = 'triangle';
|
68
|
+
dataConfig.radius = 10;
|
69
|
+
dataConfig.hoverRadius = 13;
|
70
|
+
}
|
71
|
+
|
72
|
+
dataConfig.data = transformDataset(dataset, type);
|
73
|
+
|
74
|
+
return dataConfig;
|
75
|
+
});
|
76
|
+
},
|
77
|
+
|
78
|
+
getConfig = function (data) {
|
79
|
+
return {
|
80
|
+
type: 'line',
|
81
|
+
data: {
|
82
|
+
labels: _.map(data.labels, function (value) {
|
83
|
+
return new Date(value);
|
84
|
+
}),
|
85
|
+
datasets: buildDatasets(data.datasets)
|
86
|
+
},
|
87
|
+
options: WORKAREA.config.timelineReportChart.options
|
88
|
+
};
|
89
|
+
},
|
90
|
+
|
91
|
+
setup = function (index, canvas) {
|
92
|
+
var data = $(canvas).data('timelineReportChart'),
|
93
|
+
chart = new Chart(canvas.getContext('2d'), getConfig(data));
|
94
|
+
|
95
|
+
setupLegend(chart);
|
96
|
+
},
|
97
|
+
|
98
|
+
init = function ($scope) {
|
99
|
+
$('[data-timeline-report-chart]', $scope).each(setup);
|
100
|
+
};
|
101
|
+
|
102
|
+
return {
|
103
|
+
init: init
|
104
|
+
};
|
105
|
+
}()));
|