spree_backend 4.1.5 → 4.2.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/backend-add.svg +5 -0
- data/app/assets/images/backend-adjust.svg +5 -0
- data/app/assets/images/backend-approve.svg +3 -0
- data/app/assets/images/backend-arrow-down.svg +1 -0
- data/app/assets/images/backend-arrow-left.svg +1 -0
- data/app/assets/images/backend-arrow-right.svg +1 -0
- data/app/assets/images/backend-arrow-up.svg +1 -0
- data/app/assets/images/backend-calendar.svg +9 -0
- data/app/assets/images/backend-cancel.svg +7 -0
- data/app/assets/images/backend-capture.svg +3 -0
- data/app/assets/images/backend-cart.svg +1 -0
- data/app/assets/images/backend-chevron-down.svg +1 -0
- data/app/assets/images/backend-chevron-left.svg +1 -0
- data/app/assets/images/backend-chevron-right.svg +1 -0
- data/app/assets/images/backend-chevron-up.svg +1 -0
- data/app/assets/images/backend-clone.svg +7 -0
- data/app/assets/images/backend-close.svg +7 -0
- data/app/assets/images/backend-delete.svg +6 -0
- data/app/assets/images/backend-double-chevron-left.svg +15 -0
- data/app/assets/images/backend-double-chevron-right.svg +17 -0
- data/app/assets/images/backend-edit.svg +14 -0
- data/app/assets/images/backend-enter.svg +6 -0
- data/app/assets/images/backend-envelope.svg +3 -0
- data/app/assets/images/backend-exit.svg +13 -0
- data/app/assets/images/backend-extensions.svg +4 -0
- data/app/assets/images/backend-eye-open.svg +8 -0
- data/app/assets/images/backend-file.svg +6 -0
- data/app/assets/images/backend-filter.svg +3 -0
- data/app/assets/images/backend-folder.svg +4 -0
- data/app/assets/images/backend-images.svg +7 -0
- data/app/assets/images/backend-info.svg +7 -0
- data/app/assets/images/backend-items.svg +5 -0
- data/app/assets/images/backend-leaf.svg +7 -0
- data/app/assets/images/backend-list.svg +5 -0
- data/app/assets/images/backend-location.svg +4 -0
- data/app/assets/images/backend-menu.svg +5 -0
- data/app/assets/images/backend-money.svg +1 -0
- data/app/assets/images/backend-move.svg +5 -0
- data/app/assets/images/backend-ok.svg +3 -0
- data/app/assets/images/backend-pagination-double-arrow-right.svg +8 -0
- data/app/assets/images/backend-payments.svg +8 -0
- data/app/assets/images/backend-pencil.svg +1 -0
- data/app/assets/images/backend-products.svg +5 -0
- data/app/assets/images/backend-promotion.svg +8 -0
- data/app/assets/images/backend-recycle.svg +5 -0
- data/app/assets/images/backend-remove.svg +6 -0
- data/app/assets/images/backend-report.svg +6 -0
- data/app/assets/images/backend-resume.svg +5 -0
- data/app/assets/images/backend-returns.svg +3 -0
- data/app/assets/images/backend-save.svg +3 -0
- data/app/assets/images/backend-search.svg +1 -0
- data/app/assets/images/backend-settings.svg +6 -0
- data/app/assets/images/backend-shipping.svg +3 -0
- data/app/assets/images/backend-slack.svg +3 -0
- data/app/assets/images/backend-sort.svg +5 -0
- data/app/assets/images/backend-split.svg +3 -0
- data/app/assets/images/backend-store.svg +14 -0
- data/app/assets/images/backend-tick.svg +3 -0
- data/app/assets/images/backend-update.svg +3 -0
- data/app/assets/images/backend-user.svg +3 -0
- data/app/assets/images/backend-users.svg +6 -0
- data/app/assets/images/backend-view.svg +8 -0
- data/app/assets/images/backend-void.svg +7 -0
- data/app/assets/javascripts/spree/backend.js +5 -2
- data/app/assets/javascripts/spree/backend/admin.js +156 -147
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -0
- data/app/assets/javascripts/spree/backend/flatpickr_locals.js +37 -0
- data/app/assets/javascripts/spree/backend/multi_currency.js +38 -0
- data/app/assets/javascripts/spree/backend/payments/edit.js +4 -3
- data/app/assets/javascripts/spree/backend/payments/new.js +18 -18
- data/app/assets/javascripts/spree/backend/promotions.js +1 -1
- data/app/assets/javascripts/spree/backend/spree-select2.js +18 -4
- data/app/assets/javascripts/spree/backend/stock_management.js +2 -1
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +4 -4
- data/app/assets/javascripts/spree/backend/taxonomy.js +8 -1
- data/app/assets/javascripts/spree/backend/taxons.js +25 -16
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_management.js +2 -1
- data/app/assets/stylesheets/spree/backend.css +1 -1
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +27 -11
- data/app/assets/stylesheets/spree/backend/components/_filters.scss +35 -5
- data/app/assets/stylesheets/spree/backend/components/_icons.scss +39 -4
- data/app/assets/stylesheets/spree/backend/components/_main.scss +32 -6
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +16 -8
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +119 -55
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +62 -19
- data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +26 -63
- data/app/assets/stylesheets/spree/backend/global/_variables.scss +5 -1
- data/app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss +95 -0
- data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +0 -117
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +73 -24
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +40 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +38 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
- data/app/assets/stylesheets/spree/backend/views/_order_payments.scss +12 -0
- data/app/assets/stylesheets/spree/backend/views/_product_properties.scss +11 -0
- data/app/assets/stylesheets/spree/backend/views/prototypes.scss +42 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +27 -0
- data/app/controllers/spree/admin/prices_controller.rb +39 -0
- data/app/controllers/spree/admin/stock_transfers_controller.rb +8 -1
- data/app/controllers/spree/admin/stores_controller.rb +61 -1
- data/app/controllers/spree/admin/taxons_controller.rb +5 -1
- data/app/helpers/spree/admin/base_helper.rb +25 -8
- data/app/helpers/spree/admin/navigation_helper.rb +50 -19
- data/app/helpers/spree/admin/orders_helper.rb +2 -2
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_first_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_gap.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_last_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_next_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_page.html.erb +0 -0
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_paginator.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_prev_page.html.erb +1 -1
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +2 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +16 -16
- data/app/views/spree/admin/adjustments/edit.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +3 -3
- data/app/views/spree/admin/adjustments/new.html.erb +1 -1
- data/app/views/spree/admin/countries/_form.html.erb +9 -4
- data/app/views/spree/admin/countries/index.html.erb +27 -24
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +37 -35
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +2 -0
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +45 -43
- data/app/views/spree/admin/customer_returns/index.html.erb +3 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/general_settings/_form.html.erb +27 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +4 -3
- data/app/views/spree/admin/images/edit.html.erb +2 -2
- data/app/views/spree/admin/images/index.html.erb +7 -7
- data/app/views/spree/admin/images/new.html.erb +2 -2
- data/app/views/spree/admin/log_entries/index.html.erb +4 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/spree/admin/option_types/edit.html.erb +22 -20
- data/app/views/spree/admin/option_types/index.html.erb +27 -25
- data/app/views/spree/admin/orders/_adjustments.html.erb +26 -26
- data/app/views/spree/admin/orders/_line_items.html.erb +7 -7
- data/app/views/spree/admin/orders/_order_actions.html.erb +1 -1
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +44 -42
- data/app/views/spree/admin/orders/_shipment.html.erb +6 -6
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +5 -5
- data/app/views/spree/admin/orders/_store_form.html.erb +3 -3
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +135 -127
- data/app/views/spree/admin/payment_methods/index.html.erb +6 -4
- data/app/views/spree/admin/payments/_capture_events.html.erb +18 -16
- data/app/views/spree/admin/payments/_form.html.erb +1 -1
- data/app/views/spree/admin/payments/_list.html.erb +39 -37
- data/app/views/spree/admin/payments/index.html.erb +2 -3
- data/app/views/spree/admin/payments/new.html.erb +1 -1
- data/app/views/spree/admin/payments/show.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +30 -30
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +20 -18
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +28 -26
- data/app/views/spree/admin/prices/_variant_prices.html.erb +43 -0
- data/app/views/spree/admin/prices/index.html.erb +21 -0
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +16 -4
- data/app/views/spree/admin/product_properties/index.html.erb +24 -19
- data/app/views/spree/admin/products/_add_stock_form.html.erb +1 -1
- data/app/views/spree/admin/products/_autocomplete.js.erb +27 -21
- data/app/views/spree/admin/products/_form.html.erb +40 -9
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +24 -19
- data/app/views/spree/admin/products/new.html.erb +11 -2
- data/app/views/spree/admin/products/stock.html.erb +3 -3
- data/app/views/spree/admin/promotion_categories/index.html.erb +4 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +44 -17
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +1 -1
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +5 -3
- data/app/views/spree/admin/promotions/new.html.erb +7 -6
- data/app/views/spree/admin/promotions/rules/_country.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +5 -5
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +6 -13
- data/app/views/spree/admin/promotions/rules/_product.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
- data/app/views/spree/admin/properties/index.html.erb +5 -3
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +30 -28
- data/app/views/spree/admin/prototypes/index.html.erb +21 -19
- data/app/views/spree/admin/prototypes/show.html.erb +21 -8
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +2 -2
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +4 -4
- data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -2
- data/app/views/spree/admin/reimbursements/edit.html.erb +66 -63
- data/app/views/spree/admin/reimbursements/index.html.erb +21 -20
- data/app/views/spree/admin/reimbursements/show.html.erb +66 -60
- data/app/views/spree/admin/reports/index.html.erb +18 -17
- data/app/views/spree/admin/reports/sales_total.html.erb +20 -19
- data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -2
- data/app/views/spree/admin/return_authorizations/edit.html.erb +3 -3
- data/app/views/spree/admin/return_authorizations/index.html.erb +3 -1
- data/app/views/spree/admin/return_authorizations/new.html.erb +2 -2
- data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -4
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
- data/app/views/spree/admin/roles/index.html.erb +21 -19
- data/app/views/spree/admin/shared/_account_nav.html.erb +51 -65
- data/app/views/spree/admin/shared/_address_form.html.erb +31 -73
- data/app/views/spree/admin/shared/_cal_close.html.erb +10 -0
- data/app/views/spree/admin/shared/_content_header.html.erb +40 -21
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_header.html.erb +14 -11
- data/app/views/spree/admin/shared/_index_table_options.html.erb +5 -7
- data/app/views/spree/admin/shared/_main_menu.html.erb +25 -14
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_order_summary.html.erb +2 -0
- data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
- data/app/views/spree/admin/shared/_product_tabs.html.erb +13 -5
- data/app/views/spree/admin/shared/_refunds.html.erb +31 -29
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +27 -6
- data/app/views/spree/admin/shared/_sidebar.html.erb +19 -1
- data/app/views/spree/admin/shared/_table_filter.html.erb +3 -3
- data/app/views/spree/admin/shared/_translations.html.erb +33 -1
- data/app/views/spree/admin/shared/_version.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +3 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +3 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -1
- data/app/views/spree/admin/state_changes/index.html.erb +5 -2
- data/app/views/spree/admin/states/_state_list.html.erb +25 -24
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/index.html.erb +3 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +28 -26
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +20 -18
- data/app/views/spree/admin/stock_transfers/index.html.erb +6 -4
- data/app/views/spree/admin/stock_transfers/new.html.erb +3 -3
- data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
- data/app/views/spree/admin/store_credit_categories/index.html.erb +3 -1
- data/app/views/spree/admin/store_credits/index.html.erb +3 -1
- data/app/views/spree/admin/stores/_form.html.erb +128 -68
- data/app/views/spree/admin/stores/edit.html.erb +1 -1
- data/app/views/spree/admin/stores/index.html.erb +4 -2
- data/app/views/spree/admin/tax_categories/index.html.erb +29 -27
- data/app/views/spree/admin/tax_rates/index.html.erb +3 -1
- data/app/views/spree/admin/taxonomies/_list.html.erb +24 -22
- data/app/views/spree/admin/taxonomies/edit.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +3 -3
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +24 -22
- data/app/views/spree/admin/taxons/edit.html.erb +6 -2
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +24 -23
- data/app/views/spree/admin/users/_sidebar.html.erb +5 -5
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/index.html.erb +25 -23
- data/app/views/spree/admin/users/items.html.erb +3 -2
- data/app/views/spree/admin/users/orders.html.erb +30 -29
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +14 -2
- data/app/views/spree/admin/variants/_split.js.erb +2 -2
- data/app/views/spree/admin/variants/index.html.erb +7 -5
- data/app/views/spree/admin/zones/index.html.erb +4 -4
- data/app/views/spree/layouts/admin.html.erb +33 -27
- data/config/initializers/ransack.rb +31 -0
- data/config/routes.rb +1 -0
- data/lib/spree/backend.rb +2 -0
- data/lib/spree_backend.rb +0 -1
- data/spec/fixtures/thinking-cat.jpg +0 -0
- data/spree_backend.gemspec +14 -6
- data/vendor/assets/javascripts/js.cookie.js +154 -156
- data/vendor/assets/javascripts/purify.js +1217 -0
- data/vendor/assets/javascripts/sortable.js +3709 -0
- data/vendor/assets/stylesheets/animate.css +7 -3156
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +23 -9
- metadata +137 -20
@@ -0,0 +1,38 @@
|
|
1
|
+
//= require spree/backend
|
2
|
+
|
3
|
+
$(document).ready(function () {
|
4
|
+
$.expr[':'].Contains = function (a, i, m) {
|
5
|
+
return (
|
6
|
+
(a.textContent || a.innerText || '')
|
7
|
+
.toUpperCase()
|
8
|
+
.indexOf(m[3].toUpperCase()) >= 0
|
9
|
+
)
|
10
|
+
}
|
11
|
+
|
12
|
+
function listFilter (list) {
|
13
|
+
var input = $('#variant-price-search')
|
14
|
+
|
15
|
+
$(input)
|
16
|
+
.change(function () {
|
17
|
+
var filter = $(this).val()
|
18
|
+
if (filter) {
|
19
|
+
$(list).find('.panel-title:not(:Contains(' + filter + '))').parent().hide()
|
20
|
+
$(list).find('.panel-title:Contains(' + filter + ')').parent().show()
|
21
|
+
} else {
|
22
|
+
$(list)
|
23
|
+
.find('.panel')
|
24
|
+
.parent()
|
25
|
+
.show()
|
26
|
+
}
|
27
|
+
return false
|
28
|
+
})
|
29
|
+
.keyup(function () {
|
30
|
+
$(this).change()
|
31
|
+
})
|
32
|
+
}
|
33
|
+
|
34
|
+
// ondomready
|
35
|
+
$(function () {
|
36
|
+
listFilter($('#variant-prices'))
|
37
|
+
})
|
38
|
+
})
|
@@ -95,8 +95,8 @@ jQuery(function ($) {
|
|
95
95
|
}
|
96
96
|
|
97
97
|
PaymentView.prototype.$new_button = function (action) {
|
98
|
-
return $('<a><
|
99
|
-
'class': 'payment-action-' + action + ' btn btn-
|
98
|
+
return $('<a><i class="icon icon-' + action + '"></i></a>').attr({
|
99
|
+
'class': 'payment-action-' + action + ' btn btn-outline-secondary btn-sm no-filter',
|
100
100
|
title: Spree.translations[action]
|
101
101
|
}).data({
|
102
102
|
action: action
|
@@ -203,8 +203,9 @@ jQuery(function ($) {
|
|
203
203
|
var amount = this.constructor.normalize_amount(this.payment.display_amount())
|
204
204
|
return $('<input />').prop({
|
205
205
|
id: 'amount',
|
206
|
+
class: 'form-control',
|
206
207
|
value: amount
|
207
|
-
}).width(width).css({
|
208
|
+
}).width(width * 2).css({
|
208
209
|
'text-align': 'right'
|
209
210
|
})
|
210
211
|
}
|
@@ -1,12 +1,23 @@
|
|
1
|
-
|
1
|
+
/* global Cleave */
|
2
|
+
|
2
3
|
$(document).ready(function () {
|
3
4
|
if ($('#new_payment').length) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
/* eslint-disable no-new */
|
6
|
+
new Cleave('.cardNumber', {
|
7
|
+
creditCard: true,
|
8
|
+
onCreditCardTypeChanged: function (type) {
|
9
|
+
$('.ccType').val(type)
|
10
|
+
}
|
11
|
+
})
|
12
|
+
/* eslint-disable no-new */
|
13
|
+
new Cleave('.cardExpiry', {
|
14
|
+
date: true,
|
15
|
+
datePattern: ['m', 'Y']
|
16
|
+
})
|
17
|
+
/* eslint-disable no-new */
|
18
|
+
new Cleave('.cardCode', {
|
19
|
+
numericOnly: true,
|
20
|
+
blocks: [3]
|
10
21
|
})
|
11
22
|
|
12
23
|
$('.payment_methods_radios').click(
|
@@ -35,16 +46,5 @@ $(document).ready(function () {
|
|
35
46
|
}
|
36
47
|
}
|
37
48
|
)
|
38
|
-
|
39
|
-
$('.cvvLink').click(function (event) {
|
40
|
-
var windowName = 'cvv_info'
|
41
|
-
var windowOptions = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1'
|
42
|
-
window.open($(this).prop('href'), windowName, windowOptions)
|
43
|
-
event.preventDefault()
|
44
|
-
})
|
45
|
-
|
46
|
-
$('select.jump_menu').change(function () {
|
47
|
-
window.location = this.options[this.selectedIndex].value
|
48
|
-
})
|
49
49
|
}
|
50
50
|
})
|
@@ -147,7 +147,7 @@ function initProductActions () {
|
|
147
147
|
var quantity = $container.find('input[name="add_quantity"]').val()
|
148
148
|
if (variant_id) {
|
149
149
|
// Add to the table
|
150
|
-
var newRow = '<tr><td>' +
|
150
|
+
var newRow = '<tr><td>' + product_name + '</td><td>' + quantity + '</td><td><i class="icon icon-cancel"></i></td></tr>'
|
151
151
|
$container.find('table').append(newRow)
|
152
152
|
// Add to serialized string in hidden text field
|
153
153
|
var $hiddenField = $container.find('.line_items_string')
|
@@ -1,7 +1,21 @@
|
|
1
|
-
|
2
|
-
//
|
1
|
+
document.addEventListener('DOMContentLoaded', function() {
|
2
|
+
// Inititate Select2 on any select element with the class .select2
|
3
3
|
$('select.select2').select2({
|
4
|
-
allowClear: true
|
5
|
-
|
4
|
+
allowClear: true
|
5
|
+
})
|
6
|
+
|
7
|
+
// BELOW: z-index fix for Select2 v3.x to lower the z-index of an opened Select2.
|
8
|
+
// The javascript below is not needed if Spree is updated to use Select2 v4.x
|
9
|
+
window.addEventListener('click', function(e) {
|
10
|
+
var select2Drop = document.getElementById('select2-drop')
|
11
|
+
|
12
|
+
if (select2Drop) {
|
13
|
+
if (select2Drop.contains(e.target)) {
|
14
|
+
// Clicking inside the Select2 dropdown does nothing...
|
15
|
+
} else {
|
16
|
+
// Clicking outside the Select2 dropdown close all open Select2 dropdowns.
|
17
|
+
$('*').select2('close')
|
18
|
+
}
|
19
|
+
}
|
6
20
|
})
|
7
21
|
})
|
@@ -6,26 +6,26 @@ root.taxon_tree_menu = function (obj, context) {
|
|
6
6
|
editUrl.setPath(editUrl.path() + '/' + obj.attr('id') + '/edit')
|
7
7
|
return {
|
8
8
|
create: {
|
9
|
-
label: '<
|
9
|
+
label: '<i class="icon icon-add"></i>' + Spree.translations.add,
|
10
10
|
action: function (obj) {
|
11
11
|
return context.create(obj)
|
12
12
|
}
|
13
13
|
},
|
14
14
|
rename: {
|
15
|
-
label: '<
|
15
|
+
label: '<i class="icon icon-edit"></i> ' + Spree.translations.rename,
|
16
16
|
action: function (obj) {
|
17
17
|
return context.rename(obj)
|
18
18
|
}
|
19
19
|
},
|
20
20
|
remove: {
|
21
|
-
label: '<
|
21
|
+
label: '<i class="icon icon-delete"></i> ' + Spree.translations.remove,
|
22
22
|
action: function (obj) {
|
23
23
|
return context.remove(obj)
|
24
24
|
}
|
25
25
|
},
|
26
26
|
edit: {
|
27
27
|
separator_before: true,
|
28
|
-
label: '<
|
28
|
+
label: '<i class="icon icon-settings"></i> ' + Spree.translations.edit,
|
29
29
|
action: function () {
|
30
30
|
window.location = editUrl.toString()
|
31
31
|
return window.location
|
@@ -158,9 +158,16 @@ root.setup_taxonomy_tree = function (taxonomyId) {
|
|
158
158
|
return $(this).jstree('core').toggle_node($('.jstree-icon').first())
|
159
159
|
})
|
160
160
|
})
|
161
|
+
|
161
162
|
$taxonomyTree.on('dblclick', 'a', function () {
|
162
|
-
|
163
|
+
var iOS = /iPad|iPhone|iPod/.test(navigator.platform || '')
|
164
|
+
if (iOS) {
|
165
|
+
$taxonomyTree.jstree('show_contextmenu', this)
|
166
|
+
} else {
|
167
|
+
$taxonomyTree.jstree('rename', this)
|
168
|
+
}
|
163
169
|
})
|
170
|
+
|
164
171
|
// suppress form submit on enter/return
|
165
172
|
$(document).keypress(function (event) {
|
166
173
|
if (event.keyCode === 13) {
|
@@ -1,26 +1,35 @@
|
|
1
|
-
/* global productTemplate */
|
1
|
+
/* global productTemplate, Sortable */
|
2
2
|
$(function () {
|
3
3
|
window.productTemplate = Handlebars.compile($('#product_template').text())
|
4
4
|
var taxonProducts = $('#taxon_products')
|
5
5
|
var taxonId = $('#taxon_id')
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
7
|
+
var el = document.getElementById('taxon_products')
|
8
|
+
if (el) {
|
9
|
+
Sortable.create(el, {
|
10
|
+
handle: '.sort-handle',
|
11
|
+
ghostClass: 'moving-this',
|
12
|
+
animation: 550,
|
13
|
+
easing: 'cubic-bezier(1, 0, 0, 1)',
|
14
|
+
swapThreshold: 0.9,
|
15
|
+
forceFallback: true,
|
16
|
+
onEnd: function (evt) {
|
17
|
+
var itemEl = evt.item.getAttribute('data-product-id')
|
18
|
+
var newin = evt.newIndex
|
19
|
+
return $.ajax({
|
20
|
+
url: Spree.routes.classifications_api,
|
21
|
+
method: 'PUT',
|
22
|
+
dataType: 'json',
|
23
|
+
data: {
|
24
|
+
token: Spree.api_key,
|
25
|
+
product_id: itemEl,
|
26
|
+
taxon_id: $('#taxon_id').val(),
|
27
|
+
position: newin
|
28
|
+
}
|
29
|
+
})
|
21
30
|
}
|
22
31
|
})
|
23
|
-
}
|
32
|
+
}
|
24
33
|
|
25
34
|
if (taxonId.length > 0) {
|
26
35
|
taxonId.select2({
|
@@ -3,9 +3,9 @@
|
|
3
3
|
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
4
|
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
5
|
|
6
|
-
*= require jquery-ui/datepicker
|
7
6
|
*= require jquery-ui/autocomplete
|
8
7
|
*= require select2
|
9
8
|
*= require animate
|
9
|
+
*= require flatpickr
|
10
10
|
*= require spree/backend/spree_admin
|
11
11
|
*/
|
@@ -1,3 +1,7 @@
|
|
1
|
+
.payment-action-save {
|
2
|
+
@include button-variant($success, $success, $success );
|
3
|
+
}
|
4
|
+
|
1
5
|
.btn,
|
2
6
|
.nav-pills > li > a {
|
3
7
|
vertical-align: middle;
|
@@ -7,19 +11,31 @@
|
|
7
11
|
.btn {
|
8
12
|
text-align: center;
|
9
13
|
|
10
|
-
.
|
11
|
-
|
14
|
+
.ship {
|
15
|
+
color: #fff;
|
16
|
+
}
|
17
|
+
svg,
|
18
|
+
i.icon {
|
19
|
+
margin-bottom: 3px;
|
12
20
|
}
|
13
|
-
|
14
|
-
.ship { color: #fff; }
|
15
21
|
}
|
16
22
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
+
input#image_attachment >
|
24
|
+
input[type="button"],
|
25
|
+
input[type="file"]::-webkit-file-upload-button {
|
26
|
+
@include border-radius();
|
27
|
+
border: 1px solid;
|
28
|
+
background-color: white;
|
29
|
+
color: $secondary;
|
30
|
+
border-color: $secondary;
|
31
|
+
padding: 0.375rem 0.75rem;
|
32
|
+
&:hover {
|
33
|
+
color: white;
|
34
|
+
background-color: $secondary;
|
35
|
+
}
|
36
|
+
}
|
23
37
|
|
24
|
-
|
38
|
+
.actions .btn,
|
39
|
+
.page-actions .btn {
|
40
|
+
margin: 2px;
|
25
41
|
}
|
@@ -1,15 +1,31 @@
|
|
1
1
|
#table-filter {
|
2
2
|
display: none;
|
3
|
-
border-top-left-radius: 0;
|
4
|
-
border-top-right-radius: 0;
|
5
3
|
margin-top: 20px;
|
6
4
|
}
|
7
5
|
|
6
|
+
.index-filter-button .icon-chevron-right {
|
7
|
+
transform: rotate(0);
|
8
|
+
transition: .3s ease-in-out;
|
9
|
+
margin-bottom: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
.collapsed .icon-chevron-right {
|
13
|
+
transform: rotate(90deg);
|
14
|
+
transition: .3s ease-in-out;
|
15
|
+
}
|
16
|
+
|
17
|
+
.default-filter-icon {
|
18
|
+
opacity: 0.1;
|
19
|
+
}
|
20
|
+
|
21
|
+
i.js-delete-filter {
|
22
|
+
width: $select2-icon-size;
|
23
|
+
height: $select2-icon-size;
|
24
|
+
margin-bottom: 0;
|
25
|
+
}
|
26
|
+
|
8
27
|
.index-filter-button {
|
9
28
|
font-size: $font-size-sm;
|
10
|
-
.glyphicon {
|
11
|
-
color: $gray-800;
|
12
|
-
}
|
13
29
|
|
14
30
|
button {
|
15
31
|
height: 100%;
|
@@ -34,3 +50,17 @@
|
|
34
50
|
border-bottom-left-radius: 0;
|
35
51
|
}
|
36
52
|
}
|
53
|
+
|
54
|
+
.sort_link {
|
55
|
+
.icon, svg {
|
56
|
+
margin-left: 5px;
|
57
|
+
margin-bottom: 2px;
|
58
|
+
width: 0.8rem;
|
59
|
+
height: 0.8rem;
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
svg.default-filter-arrow {
|
64
|
+
opacity: 0.1;
|
65
|
+
}
|
66
|
+
}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
.icon, .glyphicon {
|
1
|
+
span.icon, span.glyphicon {
|
3
2
|
vertical-align: text-top;
|
4
3
|
}
|
5
4
|
|
@@ -240,8 +239,9 @@ $alias_icons: (plus add)
|
|
240
239
|
(globe translate)
|
241
240
|
(ok approve);
|
242
241
|
|
243
|
-
.icon {
|
242
|
+
span.icon {
|
244
243
|
@extend .glyphicon;
|
244
|
+
top:2px;
|
245
245
|
|
246
246
|
// Map defaults.
|
247
247
|
@each $icon in $default_icons {
|
@@ -254,4 +254,39 @@ $alias_icons: (plus add)
|
|
254
254
|
$alias: nth($map, 2);
|
255
255
|
&.icon-#{$alias} { @extend .glyphicon-#{$icon}; }
|
256
256
|
}
|
257
|
-
}
|
257
|
+
}
|
258
|
+
|
259
|
+
// Spree SVG Icon Defaults
|
260
|
+
i.icon {
|
261
|
+
display: inline-block;
|
262
|
+
width: 1rem;
|
263
|
+
height: 1rem;
|
264
|
+
overflow: hidden;
|
265
|
+
vertical-align: middle;
|
266
|
+
background-repeat: no-repeat;
|
267
|
+
background-size: 100%;
|
268
|
+
background-position: center;
|
269
|
+
}
|
270
|
+
|
271
|
+
|
272
|
+
// Spree SVG Icons in JS
|
273
|
+
|
274
|
+
// The icons listed below are used by javascript generated content
|
275
|
+
// If you wish to use an existing SVG icon in javascript generated content
|
276
|
+
// use <i> tags like this -> <i class="icon icon-close"></i>
|
277
|
+
// Using <span> tags will fall back to legacy glyphicon font based icons
|
278
|
+
|
279
|
+
i.icon-close,
|
280
|
+
i.icon-cancel,
|
281
|
+
i.icon-delete,
|
282
|
+
i.icon-void { background-image: url(asset-path("backend-cancel.svg")); }
|
283
|
+
i.icon-save { background-image: url(asset-path("backend-save.svg")); }
|
284
|
+
i.icon-add { background-image: url(asset-path("backend-add.svg")); }
|
285
|
+
i.icon-search { background-image: url(asset-path("backend-search.svg")); }
|
286
|
+
i.icon-settings { background-image: url(asset-path("backend-settings.svg")); }
|
287
|
+
i.icon-delete { background-image: url(asset-path("backend-delete.svg")); }
|
288
|
+
i.icon-edit { background-image: url(asset-path("backend-edit.svg")); }
|
289
|
+
i.icon-chevron-down { background-image: url(asset-path("backend-chevron-down.svg")); }
|
290
|
+
i.icon-chevron-left { background-image: url(asset-path("backend-chevron-left.svg")); }
|
291
|
+
i.icon-chevron-right { background-image: url(asset-path("backend-chevron-right.svg")); }
|
292
|
+
i.icon-chevron-up { background-image: url(asset-path("backend-chevron-up.svg")); }
|