spree_backend 4.2.7 → 4.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/assets/config/spree_backend_manifest.js +129 -0
- data/app/assets/images/backend-arrows-fullscreen.svg +3 -0
- data/app/assets/images/backend-box.svg +3 -0
- data/app/assets/images/backend-circle-fill.svg +3 -0
- data/app/assets/images/backend-circle.svg +3 -0
- data/app/assets/images/backend-default-layout.svg +6 -0
- data/app/assets/images/backend-eye-slash-fill.svg +4 -0
- data/app/assets/images/backend-file-richtext.svg +4 -0
- data/app/assets/images/backend-fullscreen-exit.svg +3 -0
- data/app/assets/images/backend-fullscreen.svg +3 -0
- data/app/assets/images/backend-mobile.svg +5 -0
- data/app/assets/images/backend-pages.svg +10 -0
- data/app/assets/images/backend-phone.svg +4 -0
- data/app/assets/images/backend-reversed-layout.svg +6 -0
- data/app/assets/images/backend-spree-icon.svg +1 -0
- data/app/assets/images/backend-spree-logo.svg +6 -0
- data/app/assets/images/backend-store.svg +2 -13
- data/app/assets/images/backend-translate.svg +4 -0
- data/app/assets/images/backend-users.svg +2 -5
- data/app/assets/images/backend-window-sidebar.svg +4 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
- data/app/assets/javascripts/spree/backend/admin.js +45 -307
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
- data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
- data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
- data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
- data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
- data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
- data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
- data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
- data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
- data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
- data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
- data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
- data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
- data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
- data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
- data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +143 -0
- data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +61 -0
- data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
- data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
- data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
- data/app/assets/javascripts/spree/backend/menus/menu.es6 +58 -0
- data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +7 -17
- data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
- data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
- data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
- data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
- data/app/assets/javascripts/spree/backend/taxons.js +74 -73
- data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
- data/app/assets/javascripts/spree/backend.js +28 -1
- data/app/assets/javascripts/spree.js +78 -0
- data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
- data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
- data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
- data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
- data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
- data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +28 -26
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
- data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
- data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
- data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
- data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
- data/app/controllers/spree/admin/base_controller.rb +63 -3
- data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
- data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
- data/app/controllers/spree/admin/errors_controller.rb +11 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
- data/app/controllers/spree/admin/images_controller.rb +8 -22
- data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
- data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
- data/app/controllers/spree/admin/menus_controller.rb +32 -0
- data/app/controllers/spree/admin/option_types_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
- data/app/controllers/spree/admin/orders_controller.rb +22 -30
- data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
- data/app/controllers/spree/admin/payments_controller.rb +5 -10
- data/app/controllers/spree/admin/prices_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +21 -10
- data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
- data/app/controllers/spree/admin/promotions_controller.rb +3 -3
- data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +5 -1
- data/app/controllers/spree/admin/resource_controller.rb +35 -5
- data/app/controllers/spree/admin/return_index_controller.rb +1 -1
- data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
- data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
- data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
- data/app/controllers/spree/admin/stores_controller.rb +14 -17
- data/app/controllers/spree/admin/taxons_controller.rb +9 -5
- data/app/controllers/spree/admin/users_controller.rb +9 -7
- data/app/controllers/spree/admin/variants_controller.rb +16 -15
- data/app/helpers/spree/admin/base_helper.rb +52 -14
- data/app/helpers/spree/admin/cms_helper.rb +15 -0
- data/app/helpers/spree/admin/menu_helper.rb +30 -0
- data/app/helpers/spree/admin/stores_helper.rb +21 -0
- data/app/models/spree/backend_configuration.rb +2 -0
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
- data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
- data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
- data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
- data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
- data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
- data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
- data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
- data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
- data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
- data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +62 -0
- data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +177 -0
- data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
- data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
- data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
- data/app/views/spree/admin/countries/index.html.erb +5 -3
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
- data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
- data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
- data/app/views/spree/admin/images/index.html.erb +5 -3
- data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
- data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
- data/app/views/spree/admin/menu_items/new.html.erb +11 -0
- data/app/views/spree/admin/menus/_form.html.erb +19 -0
- data/app/views/spree/admin/menus/edit.html.erb +57 -0
- data/app/views/spree/admin/menus/index.html.erb +90 -0
- data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
- data/app/views/spree/admin/menus/new.html.erb +22 -0
- data/app/views/spree/admin/option_types/_form.html.erb +3 -0
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
- data/app/views/spree/admin/option_types/index.html.erb +5 -3
- data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
- data/app/views/spree/admin/orders/_line_items.html.erb +9 -7
- data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +10 -8
- data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
- data/app/views/spree/admin/orders/index.html.erb +100 -101
- data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
- data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
- data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
- data/app/views/spree/admin/payments/_list.html.erb +9 -7
- data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
- data/app/views/spree/admin/products/_autocomplete.js.erb +5 -5
- data/app/views/spree/admin/products/_form.html.erb +24 -5
- data/app/views/spree/admin/products/index.html.erb +14 -13
- data/app/views/spree/admin/products/new.html.erb +6 -1
- data/app/views/spree/admin/products/stock.html.erb +71 -68
- data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
- data/app/views/spree/admin/promotions/_form.html.erb +7 -0
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
- data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
- data/app/views/spree/admin/promotions/index.html.erb +33 -34
- data/app/views/spree/admin/properties/_form.html.erb +6 -0
- data/app/views/spree/admin/properties/index.html.erb +9 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
- data/app/views/spree/admin/prototypes/index.html.erb +5 -3
- data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
- data/app/views/spree/admin/reports/index.html.erb +1 -1
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
- data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
- data/app/views/spree/admin/roles/index.html.erb +5 -3
- data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
- data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
- data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
- data/app/views/spree/admin/shared/_head.html.erb +2 -1
- data/app/views/spree/admin/shared/_header.html.erb +7 -10
- data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
- data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
- data/app/views/spree/admin/shared/_paths.html.erb +8 -0
- data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
- data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
- data/app/views/spree/admin/shared/_translations.html.erb +2 -0
- data/app/views/spree/admin/shared/cms/_spree_product.html.erb +14 -0
- data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +14 -0
- data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
- data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +28 -0
- data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
- data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
- data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
- data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
- data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
- data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
- data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
- data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
- data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
- data/app/views/spree/admin/states/_state_list.html.erb +5 -3
- data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
- data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
- data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
- data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
- data/app/views/spree/admin/store_credits/index.html.erb +7 -5
- data/app/views/spree/admin/stores/_form.html.erb +12 -2
- data/app/views/spree/admin/stores/index.html.erb +12 -10
- data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
- data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
- data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
- data/app/views/spree/admin/users/index.html.erb +5 -3
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
- data/app/views/spree/admin/variants/_split.js.erb +9 -7
- data/app/views/spree/admin/variants/index.html.erb +8 -5
- data/app/views/spree/admin/zones/index.html.erb +5 -3
- data/app/views/spree/layouts/admin.html.erb +16 -16
- data/config/initializers/assets.rb +5 -1
- data/config/routes.rb +16 -4
- data/lib/generators/spree/backend/install/install_generator.rb +22 -0
- data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
- data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
- data/lib/spree/backend/engine.rb +4 -11
- data/lib/spree/backend.rb +7 -4
- data/lib/spree_backend.rb +0 -2
- data/spec/fixtures/files/favicon.ico +0 -0
- data/spec/fixtures/files/icon_512x512.png +0 -0
- data/spree_backend.gemspec +9 -4
- data/vendor/assets/javascripts/cleave.js +8 -0
- data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
- data/vendor/assets/javascripts/jsuri.js +458 -0
- data/vendor/assets/javascripts/sortable.js +2 -3709
- data/vendor/assets/javascripts/sweetalert2.js +2 -0
- metadata +193 -22
- data/app/assets/javascripts/spree/backend/address_states.js +0 -44
- data/app/assets/javascripts/spree/frontend/backend.js +0 -1
- data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
- data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
- /data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
@@ -5,7 +5,7 @@ $.fn.userAutocomplete = function () {
|
|
5
5
|
return values.map(function (obj) {
|
6
6
|
return {
|
7
7
|
id: obj.id,
|
8
|
-
text: obj.email
|
8
|
+
text: obj.attributes.email
|
9
9
|
}
|
10
10
|
})
|
11
11
|
}
|
@@ -14,24 +14,21 @@ $.fn.userAutocomplete = function () {
|
|
14
14
|
multiple: true,
|
15
15
|
minimumInputLength: 1,
|
16
16
|
ajax: {
|
17
|
-
url: Spree.routes.
|
17
|
+
url: Spree.routes.users_api_v2,
|
18
18
|
dataType: 'json',
|
19
|
+
headers: Spree.apiV2Authentication(),
|
19
20
|
data: function (params) {
|
20
21
|
return {
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
token: Spree.api_key
|
22
|
+
filter: {
|
23
|
+
email_i_cont: params.term
|
24
|
+
}
|
25
25
|
}
|
26
26
|
},
|
27
27
|
processResults: function(data) {
|
28
28
|
return {
|
29
|
-
results: formatUserList(data.
|
29
|
+
results: formatUserList(data.data)
|
30
30
|
}
|
31
31
|
}
|
32
|
-
},
|
33
|
-
templateSelection: function (data) {
|
34
|
-
return data.text
|
35
32
|
}
|
36
33
|
})
|
37
34
|
}
|
@@ -12,7 +12,14 @@
|
|
12
12
|
//= require jquery_ujs
|
13
13
|
//= require jquery-ui/widgets/autocomplete
|
14
14
|
//= require select2-full
|
15
|
+
//= require sweetalert2
|
16
|
+
//= require tinymce
|
17
|
+
//= require spree/backend/global/tinymce
|
18
|
+
|
15
19
|
//= require underscore-min.js
|
20
|
+
//= require jsonapi-serializer.min
|
21
|
+
|
22
|
+
//= require spree/backend/global/_index
|
16
23
|
|
17
24
|
//= require spree
|
18
25
|
//= require spree/backend/spree-select2
|
@@ -35,6 +42,8 @@
|
|
35
42
|
//= require spree/backend/product_picker
|
36
43
|
//= require spree/backend/progress
|
37
44
|
//= require spree/backend/promotions
|
45
|
+
//= require spree/backend/cms/_index
|
46
|
+
//= require spree/backend/menus/_index
|
38
47
|
//= require spree/backend/returns/expedited_exchanges_warning
|
39
48
|
//= require spree/backend/returns/return_item_selection
|
40
49
|
//= require spree/backend/shipments
|
@@ -67,7 +76,6 @@ Spree.routes.stock_locations_api = Spree.pathFor('api/v1/stock_locations')
|
|
67
76
|
Spree.routes.taxon_products_api = Spree.pathFor('api/v1/taxons/products')
|
68
77
|
Spree.routes.taxons_api = Spree.pathFor('api/v1/taxons')
|
69
78
|
Spree.routes.users_api = Spree.pathFor('api/v1/users')
|
70
|
-
Spree.routes.tags_api = Spree.pathFor('api/v1/tags')
|
71
79
|
Spree.routes.variants_api = Spree.pathFor('api/v1/variants')
|
72
80
|
|
73
81
|
Spree.routes.edit_product = function (productId) {
|
@@ -81,3 +89,22 @@ Spree.routes.payments_api = function (orderId) {
|
|
81
89
|
Spree.routes.stock_items_api = function (stockLocationId) {
|
82
90
|
return Spree.pathFor('api/v1/stock_locations/' + stockLocationId + '/stock_items')
|
83
91
|
}
|
92
|
+
|
93
|
+
// API v2
|
94
|
+
Spree.routes.countries_api_v2 = Spree.pathFor('api/v2/platform/countries')
|
95
|
+
Spree.routes.classifications_api_v2 = Spree.pathFor('api/v2/platform/classifications')
|
96
|
+
Spree.routes.menus_api_v2 = Spree.pathFor('api/v2/platform/menus')
|
97
|
+
Spree.routes.menus_items_api_v2 = Spree.pathFor('api/v2/platform/menu_items')
|
98
|
+
Spree.routes.option_types_api_v2 = Spree.pathFor('api/v2/platform/option_types')
|
99
|
+
Spree.routes.option_values_api_v2 = Spree.pathFor('api/v2/platform/option_values')
|
100
|
+
Spree.routes.pages_api_v2 = Spree.pathFor('api/v2/platform/cms_pages')
|
101
|
+
Spree.routes.products_api_v2 = Spree.pathFor('/api/v2/platform/products')
|
102
|
+
Spree.routes.sections_api_v2 = Spree.pathFor('/api/v2/platform/cms_sections')
|
103
|
+
Spree.routes.taxons_api_v2 = Spree.pathFor('/api/v2/platform/taxons')
|
104
|
+
Spree.routes.users_api_v2 = Spree.pathFor('api/v2/platform/users')
|
105
|
+
|
106
|
+
Spree.apiV2Authentication = function() {
|
107
|
+
return {
|
108
|
+
'Authorization': 'Bearer ' + OAUTH_TOKEN
|
109
|
+
}
|
110
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
//= require jsuri
|
2
|
+
function Spree () {}
|
3
|
+
|
4
|
+
Spree.ready = function (callback) {
|
5
|
+
return jQuery(document).on('page:load turbolinks:load', function () {
|
6
|
+
return callback(jQuery)
|
7
|
+
})
|
8
|
+
}
|
9
|
+
|
10
|
+
Spree.mountedAt = function () {
|
11
|
+
return window.SpreePaths.mounted_at
|
12
|
+
}
|
13
|
+
|
14
|
+
Spree.adminPath = function () {
|
15
|
+
return window.SpreePaths.admin
|
16
|
+
}
|
17
|
+
|
18
|
+
Spree.pathFor = function (path) {
|
19
|
+
var locationOrigin = (window.location.protocol + '//' + window.location.hostname) + (window.location.port ? ':' + window.location.port : '')
|
20
|
+
|
21
|
+
return this.url('' + locationOrigin + (this.mountedAt()) + path, this.url_params).toString()
|
22
|
+
}
|
23
|
+
|
24
|
+
Spree.localizedPathFor = function(path) {
|
25
|
+
if (typeof (SPREE_LOCALE) !== 'undefined' && typeof (SPREE_CURRENCY) !== 'undefined') {
|
26
|
+
var fullUrl = new URL(Spree.pathFor(path))
|
27
|
+
var params = fullUrl.searchParams
|
28
|
+
var pathName = fullUrl.pathname
|
29
|
+
|
30
|
+
params.set('currency', SPREE_CURRENCY)
|
31
|
+
|
32
|
+
if (pathName.match(/api\/v/)) {
|
33
|
+
params.set('locale', SPREE_LOCALE)
|
34
|
+
} else {
|
35
|
+
pathName = (this.mountedAt()) + SPREE_LOCALE + '/' + path
|
36
|
+
}
|
37
|
+
return fullUrl.origin + pathName + '?' + params.toString()
|
38
|
+
}
|
39
|
+
return Spree.pathFor(path)
|
40
|
+
}
|
41
|
+
|
42
|
+
Spree.adminPathFor = function (path) {
|
43
|
+
return this.pathFor('' + (this.adminPath()) + path)
|
44
|
+
}
|
45
|
+
|
46
|
+
Spree.url = function (uri, query) {
|
47
|
+
if (uri.path === void 0) {
|
48
|
+
// eslint-disable-next-line no-undef
|
49
|
+
uri = new Uri(uri)
|
50
|
+
}
|
51
|
+
if (query) {
|
52
|
+
$.each(query, function (key, value) {
|
53
|
+
return uri.addQueryParam(key, value)
|
54
|
+
})
|
55
|
+
}
|
56
|
+
return uri
|
57
|
+
}
|
58
|
+
|
59
|
+
Spree.ajax = function (urlOrSettings, settings) {
|
60
|
+
var url
|
61
|
+
if (typeof urlOrSettings === 'string') {
|
62
|
+
return $.ajax(Spree.url(urlOrSettings).toString(), settings)
|
63
|
+
} else {
|
64
|
+
url = urlOrSettings['url']
|
65
|
+
delete urlOrSettings['url']
|
66
|
+
return $.ajax(Spree.url(url).toString(), urlOrSettings)
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
Spree.routes = {
|
71
|
+
states_search: Spree.pathFor('api/v1/states'),
|
72
|
+
apply_coupon_code: function (orderId) {
|
73
|
+
return Spree.pathFor('api/v1/orders/' + orderId + '/apply_coupon_code')
|
74
|
+
},
|
75
|
+
cart: Spree.pathFor('cart')
|
76
|
+
}
|
77
|
+
|
78
|
+
Spree.url_params = {}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#table-filter {
|
2
2
|
display: none;
|
3
|
-
margin-top:
|
3
|
+
margin-top: 7.5px;
|
4
4
|
}
|
5
5
|
|
6
6
|
.index-filter-button .icon-chevron-right {
|
@@ -19,8 +19,6 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
i.js-delete-filter {
|
22
|
-
width: $select2-icon-size;
|
23
|
-
height: $select2-icon-size;
|
24
22
|
margin-bottom: 0;
|
25
23
|
}
|
26
24
|
|
@@ -25,5 +25,40 @@
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
28
|
+
#storeSwitcherDropdown {
|
29
|
+
.dropdown-menu.show {
|
30
|
+
min-width:250px;
|
31
|
+
width: fit-content;
|
32
|
+
max-width: 90vw;
|
33
|
+
max-height: 70vh;
|
34
|
+
overflow-y: scroll !important;
|
35
|
+
top:110%;
|
36
|
+
left: 50%;
|
37
|
+
right: 50%;
|
38
|
+
transform: translate(-50%, 0%);
|
39
|
+
box-shadow: 0 1rem 2.5rem rgba(18,38,63,.1),0 .5rem 1rem -.75rem rgba(18,38,63,.1);
|
40
|
+
|
41
|
+
@include media-breakpoint-up(lg) {
|
42
|
+
left: 0%;
|
43
|
+
right: 0%;
|
44
|
+
transform: translate(0%, 0%);
|
45
|
+
}
|
46
|
+
|
47
|
+
a {
|
48
|
+
white-space: nowrap;
|
49
|
+
overflow-x: hidden;
|
50
|
+
text-overflow: ellipsis;
|
51
|
+
|
52
|
+
svg {
|
53
|
+
vertical-align: text-top;
|
54
|
+
margin-right: 1em;
|
55
|
+
}
|
56
|
+
|
57
|
+
&.disabled svg {
|
58
|
+
color: $success;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
28
63
|
}
|
29
64
|
}
|
@@ -1,10 +1,6 @@
|
|
1
1
|
table.table {
|
2
2
|
font-size: $font-size-sm;
|
3
3
|
|
4
|
-
.move-handle {
|
5
|
-
cursor: grab;
|
6
|
-
}
|
7
|
-
|
8
4
|
th {
|
9
5
|
padding: 0.5rem;
|
10
6
|
|
@@ -20,6 +16,10 @@ table.table {
|
|
20
16
|
padding: 0.5rem;
|
21
17
|
}
|
22
18
|
|
19
|
+
td.move-handle {
|
20
|
+
width:45px;
|
21
|
+
}
|
22
|
+
|
23
23
|
.badge {
|
24
24
|
text-transform: uppercase;
|
25
25
|
}
|
@@ -58,7 +58,6 @@ table.table {
|
|
58
58
|
|
59
59
|
.table-active-filters {
|
60
60
|
display: none;
|
61
|
-
margin: -.5em 0 .9em;
|
62
61
|
|
63
62
|
.js-filter {
|
64
63
|
.icon {
|
@@ -17,3 +17,62 @@
|
|
17
17
|
#{$property}: $value;
|
18
18
|
}
|
19
19
|
}
|
20
|
+
|
21
|
+
|
22
|
+
@mixin switch($res: 'sm') {
|
23
|
+
$index: 1rem;
|
24
|
+
$mainVal: 1rem;
|
25
|
+
$baseVal: 1rem;
|
26
|
+
|
27
|
+
@if $res == 'md' {
|
28
|
+
$index: 2rem;
|
29
|
+
$mainVal: 1.5rem;
|
30
|
+
$baseVal: 1rem;
|
31
|
+
min-height: $index;
|
32
|
+
} @else if $res == 'lg' {
|
33
|
+
$index: 3rem;
|
34
|
+
$mainVal: 2rem;
|
35
|
+
$baseVal: 1rem;
|
36
|
+
} @else if $res == 'xl' {
|
37
|
+
$index: 4rem;
|
38
|
+
$mainVal: 2.5rem;
|
39
|
+
$baseVal: 1rem;
|
40
|
+
}
|
41
|
+
|
42
|
+
.custom-control-label {
|
43
|
+
padding-left: #{$baseVal};
|
44
|
+
padding-bottom: #{$mainVal};
|
45
|
+
}
|
46
|
+
|
47
|
+
.custom-control-label::before {
|
48
|
+
height: $mainVal;
|
49
|
+
width: calc(#{$index} + 0.75rem);
|
50
|
+
border-radius: $mainVal * 2;
|
51
|
+
}
|
52
|
+
|
53
|
+
.custom-control-label::after {
|
54
|
+
width: calc(#{$mainVal} - 4px);
|
55
|
+
height: calc(#{$mainVal} - 4px);
|
56
|
+
border-radius: calc(#{$index} - (#{$mainVal} / 2));
|
57
|
+
}
|
58
|
+
|
59
|
+
.custom-control-input:checked ~ .custom-control-label::after {
|
60
|
+
transform: translateX(calc(#{$mainVal} - 0.25rem));
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.custom-switch.custom-switch-sm {
|
65
|
+
@include switch();
|
66
|
+
}
|
67
|
+
|
68
|
+
.custom-switch.custom-switch-md {
|
69
|
+
@include switch('md');
|
70
|
+
}
|
71
|
+
|
72
|
+
.custom-switch.custom-switch-lg {
|
73
|
+
@include switch('lg');
|
74
|
+
}
|
75
|
+
|
76
|
+
.custom-switch.custom-switch-xl {
|
77
|
+
@include switch('xl');
|
78
|
+
}
|
@@ -0,0 +1,95 @@
|
|
1
|
+
[data-nav-x-wrapper] {
|
2
|
+
position: relative;
|
3
|
+
padding: 0;
|
4
|
+
overflow: hidden;
|
5
|
+
}
|
6
|
+
|
7
|
+
[data-nav-x-container] {
|
8
|
+
overflow-x: auto;
|
9
|
+
overflow-y: hidden;
|
10
|
+
white-space: nowrap;
|
11
|
+
position: relative;
|
12
|
+
-ms-overflow-style: none;
|
13
|
+
scrollbar-width: none;
|
14
|
+
|
15
|
+
&::-webkit-scrollbar {
|
16
|
+
display: none;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
[data-nav-x-content] {
|
21
|
+
float: left;
|
22
|
+
transition: transform .2s ease-in-out;
|
23
|
+
position: relative;
|
24
|
+
|
25
|
+
& > * {
|
26
|
+
z-index: 200;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Bug fix for iOS jittery elastic scroll from Bootstrap
|
30
|
+
// transaition on pills and buttons.
|
31
|
+
& > li > a {
|
32
|
+
transition: none !important;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
.nav-x_Transition_None {
|
37
|
+
transition: none;
|
38
|
+
}
|
39
|
+
|
40
|
+
.nav-x_Advancer {
|
41
|
+
appearance: none;
|
42
|
+
background: transparent;
|
43
|
+
border: 0;
|
44
|
+
position: absolute;
|
45
|
+
padding: 5px;
|
46
|
+
height: 100%;
|
47
|
+
width: fit-content;
|
48
|
+
top: 0;
|
49
|
+
bottom: 0;
|
50
|
+
opacity: 0;
|
51
|
+
transition: linear 0.01s 0.6s, opacity 0.4s;
|
52
|
+
z-index:300;
|
53
|
+
|
54
|
+
&:focus {
|
55
|
+
outline: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
&:hover {
|
59
|
+
cursor: pointer;
|
60
|
+
}
|
61
|
+
|
62
|
+
svg {
|
63
|
+
height: 1.5em;
|
64
|
+
width: 1.5em;
|
65
|
+
color: rgba(128, 128, 128, 0.56);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
.nav-x_Advancer_Left {
|
70
|
+
border-right: 2px solid rgba(128, 128, 128, 0.56);
|
71
|
+
background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 65%, rgba(255,255,255,0.8533788515406162) 100%);
|
72
|
+
left: -46px;
|
73
|
+
padding-right: 0;
|
74
|
+
}
|
75
|
+
|
76
|
+
[data-overflowing="both"] ~ .nav-x_Advancer_Left,
|
77
|
+
[data-overflowing="left"] ~ .nav-x_Advancer_Left {
|
78
|
+
opacity: 1;
|
79
|
+
left: -1px;
|
80
|
+
transition: linear 0.01s, opacity 0.4s 0.02s;
|
81
|
+
}
|
82
|
+
|
83
|
+
.nav-x_Advancer_Right {
|
84
|
+
border-left: 2px solid rgba(128, 128, 128, 0.56);
|
85
|
+
background: linear-gradient(90deg, rgba(255,255,255,0.850577731092437) 0%, rgba(255,255,255,1) 35%, rgba(255,255,255,1) 100%);
|
86
|
+
right: -46px;
|
87
|
+
padding-left: 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
[data-overflowing="both"] ~ .nav-x_Advancer_Right,
|
91
|
+
[data-overflowing="right"] ~ .nav-x_Advancer_Right {
|
92
|
+
opacity: 1;
|
93
|
+
right: -1px;
|
94
|
+
transition: linear 0.01s, opacity 0.4s 0.02s;
|
95
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
// Custom SCSS Standard SweetAlerts
|
2
|
+
body.swal2-shown {
|
3
|
+
.swal2-popup {
|
4
|
+
border-radius:$border-radius;
|
5
|
+
}
|
6
|
+
.swal2-html-container {
|
7
|
+
text-align: left;
|
8
|
+
font-size: 0.9em;
|
9
|
+
|
10
|
+
.alert-link {
|
11
|
+
font-weight: 400;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
.swal2-content {
|
15
|
+
padding: 0 !important;
|
16
|
+
}
|
17
|
+
.swal2-header {
|
18
|
+
.swal2-icon {
|
19
|
+
width: 2.5em;
|
20
|
+
height: 2.5em;
|
21
|
+
|
22
|
+
.swal2-icon-content {
|
23
|
+
font-size: 2.15em;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.swal2-close {
|
28
|
+
top: 3px;
|
29
|
+
right: 3px;
|
30
|
+
padding-bottom: 3px;
|
31
|
+
|
32
|
+
&:hover {
|
33
|
+
color:grey;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
// Custom SCSS Toast SweetAlerts
|
40
|
+
body.swal2-toast-shown .swal2-container.swal2-bottom {
|
41
|
+
right: -50% !important;
|
42
|
+
max-width: 500px;
|
43
|
+
|
44
|
+
.swal2-popup.swal2-toast {
|
45
|
+
border-width: 3px;
|
46
|
+
border-style: solid;
|
47
|
+
box-shadow: none !important;
|
48
|
+
margin-bottom: 50px;
|
49
|
+
|
50
|
+
.swal2-icon {
|
51
|
+
display: none !important;
|
52
|
+
}
|
53
|
+
|
54
|
+
button.swal2-close {
|
55
|
+
min-width: .8em;
|
56
|
+
padding-bottom: 0.1em;
|
57
|
+
&:hover {
|
58
|
+
opacity: 0.75;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
@include media-breakpoint-down(sm) {
|
65
|
+
body.swal2-toast-shown .swal2-container.swal2-bottom {
|
66
|
+
.swal2-popup.swal2-toast {
|
67
|
+
button.swal2-close {
|
68
|
+
padding-bottom: 0;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
.swal2-popup.swal2-toast.swal2-icon-success {
|
75
|
+
@extend .alert-success;
|
76
|
+
h2, button {
|
77
|
+
@extend .alert-success;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
.swal2-popup.swal2-toast.swal2-icon-error {
|
82
|
+
@extend .alert-danger;
|
83
|
+
h2, button {
|
84
|
+
@extend .alert-danger;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.swal2-popup.swal2-toast.swal2-icon-info {
|
89
|
+
@extend .alert-info;
|
90
|
+
h2, button {
|
91
|
+
@extend .alert-info;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
.swal2-popup.swal2-toast.swal2-icon-question {
|
96
|
+
@extend .alert-warning;
|
97
|
+
h2, button {
|
98
|
+
@extend .alert-warning;
|
99
|
+
}
|
100
|
+
}
|
@@ -15,14 +15,17 @@
|
|
15
15
|
z-index: $zindex-dropdown;
|
16
16
|
}
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
figure.admin-img-holder {
|
19
|
+
max-width: 275px;
|
20
|
+
border: 2px dashed grey;
|
21
|
+
border-radius: $border-radius;
|
22
|
+
overflow: hidden;
|
23
|
+
display: inline-block;
|
23
24
|
|
24
|
-
|
25
|
-
|
25
|
+
img {
|
26
|
+
max-width: 100%;
|
27
|
+
height: auto;
|
28
|
+
}
|
26
29
|
}
|
27
30
|
|
28
31
|
.js-remove-promo-rule-option-value {
|
@@ -32,30 +35,29 @@
|
|
32
35
|
}
|
33
36
|
}
|
34
37
|
|
35
|
-
.
|
36
|
-
|
37
|
-
|
38
|
-
bottom: -50px;
|
39
|
-
left:0;
|
40
|
-
right:0;
|
38
|
+
.button_to {
|
39
|
+
display: inline-block;
|
40
|
+
}
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
opacity: 0.98;
|
45
|
-
border-width: 3px;
|
46
|
-
margin-bottom: 0;
|
47
|
-
}
|
42
|
+
.move-handle {
|
43
|
+
cursor: grab;
|
48
44
|
}
|
49
45
|
|
50
|
-
.
|
51
|
-
|
52
|
-
bottom: 30px;
|
46
|
+
.badge-light-muted-text {
|
47
|
+
color: rgba(0, 0, 0, 0.50);
|
53
48
|
}
|
54
49
|
|
55
|
-
.
|
56
|
-
|
50
|
+
.truncate {
|
51
|
+
white-space: nowrap;
|
52
|
+
overflow: hidden;
|
53
|
+
text-overflow: ellipsis;
|
57
54
|
}
|
58
55
|
|
59
|
-
|
60
|
-
|
56
|
+
[data-show-info] {
|
57
|
+
color: $primary;
|
58
|
+
cursor: pointer;
|
59
|
+
}
|
60
|
+
|
61
|
+
#contentHeaderRow {
|
62
|
+
min-height: 51px;
|
61
63
|
}
|
@@ -37,6 +37,14 @@ input[type=number].hide-number-toggle {
|
|
37
37
|
-moz-appearance: textfield;
|
38
38
|
}
|
39
39
|
|
40
|
+
input[type="file"] {
|
41
|
+
width: fit-content;
|
42
|
+
max-width: 100%;
|
43
|
+
white-space: nowrap;
|
44
|
+
overflow: hidden;
|
45
|
+
text-overflow: ellipsis;
|
46
|
+
}
|
47
|
+
|
40
48
|
|
41
49
|
// Remove the default 5px outlines and box-shadows
|
42
50
|
// from all inputs on focus.
|
@@ -19,14 +19,19 @@
|
|
19
19
|
@import 'components/progress';
|
20
20
|
@import 'components/spinner';
|
21
21
|
|
22
|
+
@import 'plugins/sweetalert2_custom';
|
22
23
|
@import 'plugins/jquery_ui';
|
23
24
|
@import 'plugins/flatpickr';
|
24
25
|
@import 'plugins/select2_bootstrap4';
|
25
26
|
@import 'plugins/select2_custom';
|
27
|
+
@import 'plugins/tinymce_custom';
|
28
|
+
@import 'plugins/nav_x';
|
26
29
|
|
27
30
|
@import 'shared/base';
|
28
31
|
@import 'shared/forms';
|
29
32
|
|
33
|
+
@import 'views/menus';
|
34
|
+
@import 'views/cms_pages';
|
30
35
|
@import 'views/order_payments';
|
31
36
|
@import 'views/product_properties';
|
32
37
|
@import 'views/prototypes';
|