spree_backend 2.3.3 → 2.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/admin.js.erb +0 -3
- data/app/assets/javascripts/spree/backend/shipments.js.erb +10 -3
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +5 -3
- data/app/controllers/spree/admin/adjustments_controller.rb +1 -14
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +1 -1
- data/app/views/spree/admin/adjustments/index.html.erb +0 -2
- data/app/views/spree/admin/countries/new.html.erb +2 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +5 -5
- data/app/views/spree/admin/orders/_form.html.erb +5 -4
- data/app/views/spree/admin/orders/index.html.erb +17 -11
- data/app/views/spree/admin/states/index.html.erb +0 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +3 -3
- data/app/views/spree/admin/stock_locations/edit.html.erb +2 -0
- data/app/views/spree/admin/stock_locations/new.html.erb +2 -0
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -2
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2247d6b1fd0f2c42d81b9e6fd359bc2ae51106af
|
4
|
+
data.tar.gz: f96494f83025962aac4de8de6064a8a7a12fa6bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66f25f0a706af218074a17849edc034b005fcf759c768e94eceadb96663db6013ff48358ced784be59c265eeac8fe419b09fb1f496666d0d800a3c43856e28f
|
7
|
+
data.tar.gz: 141a997656ca4272428900e729cd8e7fb0a42daff8d73c566bbfb3acbc6f9a8bd08567d19dd247046405cb0e634ced2ac5987b6bf6e8aea24c3b977b154ffd38
|
@@ -127,15 +127,12 @@ $(document).ready(function(){
|
|
127
127
|
handle_date_picker_fields();
|
128
128
|
$(".observe_field").on('change', function() {
|
129
129
|
target = $(this).data("update");
|
130
|
-
ajax_indicator = $(this).data("ajax-indicator") || '#busy_indicator';
|
131
130
|
$(target).hide();
|
132
|
-
$(ajax_indicator).show();
|
133
131
|
$.ajax({ dataType: 'html',
|
134
132
|
url: $(this).data("base-url")+encodeURIComponent($(this).val()),
|
135
133
|
type: 'get',
|
136
134
|
success: function(data){
|
137
135
|
$(target).html(data);
|
138
|
-
$(ajax_indicator).hide();
|
139
136
|
$(target).show();
|
140
137
|
}
|
141
138
|
});
|
@@ -47,7 +47,7 @@ $(document).ready(function () {
|
|
47
47
|
});
|
48
48
|
|
49
49
|
//handle delete click
|
50
|
-
$('a.delete-item').click(function(){
|
50
|
+
$('a.delete-item').click(function(event){
|
51
51
|
if (confirm(Spree.translations.are_you_sure_delete)) {
|
52
52
|
var del = $(this);
|
53
53
|
var shipment_number = del.data('shipment-number');
|
@@ -56,6 +56,7 @@ $(document).ready(function () {
|
|
56
56
|
toggleItemEdit();
|
57
57
|
adjustShipmentItems(shipment_number, variant_id, 0);
|
58
58
|
}
|
59
|
+
return false;
|
59
60
|
});
|
60
61
|
|
61
62
|
// handle ship click
|
@@ -78,7 +79,9 @@ $(document).ready(function () {
|
|
78
79
|
$('a.cancel-method').click(toggleMethodEdit);
|
79
80
|
|
80
81
|
// handle shipping method save
|
81
|
-
$('[data-hook=admin_shipment_form] a.save-method').on('click', function () {
|
82
|
+
$('[data-hook=admin_shipment_form] a.save-method').on('click', function (event) {
|
83
|
+
event.preventDefault();
|
84
|
+
|
82
85
|
var link = $(this);
|
83
86
|
var shipment_number = link.data('shipment-number');
|
84
87
|
var selected_shipping_rate_id = link.parents('tbody').find("select#selected_shipping_rate_id[data-shipment-number='" + shipment_number + "']").val();
|
@@ -171,6 +174,8 @@ toggleMethodEdit = function(){
|
|
171
174
|
var link = $(this);
|
172
175
|
link.parents('tbody').find('tr.edit-method').toggle();
|
173
176
|
link.parents('tbody').find('tr.show-method').toggle();
|
177
|
+
|
178
|
+
return false;
|
174
179
|
}
|
175
180
|
|
176
181
|
toggleItemEdit = function(){
|
@@ -292,7 +297,9 @@ cancelItemSplit = function(event) {
|
|
292
297
|
prev_row.find('a.delete-item').toggle();
|
293
298
|
}
|
294
299
|
|
295
|
-
addVariantFromStockLocation = function() {
|
300
|
+
addVariantFromStockLocation = function(event) {
|
301
|
+
event.preventDefault();
|
302
|
+
|
296
303
|
$('#stock_details').hide();
|
297
304
|
|
298
305
|
var variant_id = $('input.variant_autocomplete').val();
|
@@ -124,6 +124,8 @@ $color-ste-inactive-bg: $color-notice !default;
|
|
124
124
|
$color-ste-inactive-text: $color-1 !default;
|
125
125
|
$color-ste-considered_risky-bg: $color-error !default;
|
126
126
|
$color-ste-considered_risky-text:$color-1 !default;
|
127
|
+
$color-ste-considered_safe-bg: $color-success !default;
|
128
|
+
$color-ste-considered_safe-text: $color-1 !default;
|
127
129
|
$color-ste-success-bg: $color-success !default;
|
128
130
|
$color-ste-success-text: $color-1 !default;
|
129
131
|
$color-ste-notice-bg: $color-notice !default;
|
@@ -133,19 +135,19 @@ $color-ste-error-text: $color-1 !default;
|
|
133
135
|
|
134
136
|
// Available states
|
135
137
|
$states: completed, complete, sold, pending, awaiting_return, returned, credit_owed, paid, shipped, balance_due, backorder, checkout, cart, address,
|
136
|
-
delivery, payment, confirm, canceled, failed, ready, void, active, inactive, considered_risky, success, notice, error !default;
|
138
|
+
delivery, payment, confirm, canceled, failed, ready, void, active, inactive, considered_risky, considered_safe, success, notice, error !default;
|
137
139
|
|
138
140
|
$states-bg-colors: $color-ste-completed-bg, $color-ste-complete-bg, $color-ste-sold-bg, $color-ste-pending-bg, $color-ste-awaiting_return-bg,
|
139
141
|
$color-ste-returned-bg, $color-ste-credit_owed-bg, $color-ste-paid-bg, $color-ste-shipped-bg, $color-ste-balance_due-bg, $color-ste-backorder-bg,
|
140
142
|
$color-ste-checkout-bg, $color-ste-cart-bg, $color-ste-address-bg, $color-ste-delivery-bg, $color-ste-payment-bg, $color-ste-confirm-bg,
|
141
143
|
$color-ste-canceled-bg, $color-ste-failed-bg, $color-ste-ready-bg, $color-ste-void-bg, $color-ste-active-bg, $color-ste-inactive-bg, $color-ste-considered_risky-bg,
|
142
|
-
$color-ste-success-bg, $color-ste-notice-bg, $color-ste-error-bg !default;
|
144
|
+
$color-ste-considered_safe-bg, $color-ste-success-bg, $color-ste-notice-bg, $color-ste-error-bg !default;
|
143
145
|
|
144
146
|
$states-text-colors: $color-ste-completed-text, $color-ste-complete-text, $color-ste-sold-text, $color-ste-pending-text, $color-ste-awaiting_return-text,
|
145
147
|
$color-ste-returned-text, $color-ste-credit_owed-text, $color-ste-paid-text, $color-ste-shipped-text, $color-ste-balance_due-text, $color-ste-backorder-text,
|
146
148
|
$color-ste-checkout-text, $color-ste-cart-text, $color-ste-address-text, $color-ste-delivery-text, $color-ste-payment-text, $color-ste-confirm-text,
|
147
149
|
$color-ste-canceled-text, $color-ste-failed-text, $color-ste-ready-text, $color-ste-void-text, $color-ste-active-text, $color-ste-inactive-text, $color-ste-considered_risky-text,
|
148
|
-
$color-ste-success-text, $color-ste-notice-text, $color-ste-error-text !default;
|
150
|
+
$color-ste-considered_safe-text, $color-ste-success-text, $color-ste-notice-text, $color-ste-error-text !default;
|
149
151
|
|
150
152
|
// Available actions
|
151
153
|
$actions: edit, clone, remove, void, capture, save, cancel, mail !default;
|
@@ -10,25 +10,12 @@ module Spree
|
|
10
10
|
|
11
11
|
skip_before_filter :load_resource, only: [:toggle_state, :edit, :update, :destroy]
|
12
12
|
|
13
|
-
|
14
|
-
find_adjustment
|
15
|
-
super
|
16
|
-
end
|
17
|
-
|
18
|
-
def edit
|
19
|
-
find_adjustment
|
20
|
-
super
|
21
|
-
end
|
13
|
+
before_action :find_adjustment, only: [:destroy, :edit, :update]
|
22
14
|
|
23
15
|
def index
|
24
16
|
@adjustments = @order.all_adjustments.order("created_at ASC")
|
25
17
|
end
|
26
18
|
|
27
|
-
def update
|
28
|
-
find_adjustment
|
29
|
-
super
|
30
|
-
end
|
31
|
-
|
32
19
|
private
|
33
20
|
|
34
21
|
def find_adjustment
|
@@ -99,7 +99,7 @@ module Spree
|
|
99
99
|
|
100
100
|
params[:q][:s] ||= "name asc"
|
101
101
|
@collection = super
|
102
|
-
@collection = @collection.with_deleted if params[:q]
|
102
|
+
@collection = @collection.with_deleted if params[:q].delete(:deleted_at_null) == '0'
|
103
103
|
# @search needs to be defined as this is passed to search_form_for
|
104
104
|
@search = @collection.ransack(params[:q])
|
105
105
|
@collection = @search.result.
|
@@ -188,7 +188,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
188
188
|
if model_class.respond_to?(:accessible_by) && !current_ability.has_block?(params[:action], model_class)
|
189
189
|
model_class.accessible_by(current_ability, action)
|
190
190
|
else
|
191
|
-
model_class.
|
191
|
+
model_class.where(nil)
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
@@ -10,31 +10,31 @@
|
|
10
10
|
<fieldset class="general no-border-top">
|
11
11
|
|
12
12
|
<%= fields_for :store do |f| %>
|
13
|
-
<div class="field">
|
13
|
+
<div class="field" data-hook="admin_general_setting_input_name">
|
14
14
|
<%= f.label :name %>
|
15
15
|
<br />
|
16
16
|
<%= f.text_field :name, class: 'fullwidth' %>
|
17
17
|
</div>
|
18
18
|
|
19
|
-
<div class="field">
|
19
|
+
<div class="field" data-hook="admin_general_setting_input_seo_title">
|
20
20
|
<%= f.label :seo_title %>
|
21
21
|
<br />
|
22
22
|
<%= f.text_field :seo_title, class: 'fullwidth' %>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<div class="field">
|
25
|
+
<div class="field" data-hook="admin_general_setting_input_meta_keywords">
|
26
26
|
<%= f.label :meta_keywords %>
|
27
27
|
<br />
|
28
28
|
<%= f.text_field :meta_keywords, class: 'fullwidth' %>
|
29
29
|
</div>
|
30
30
|
|
31
|
-
<div class="field">
|
31
|
+
<div class="field" data-hook="admin_general_setting_input_meta_description">
|
32
32
|
<%= f.label :meta_description %>
|
33
33
|
<br />
|
34
34
|
<%= f.text_field :meta_description, class: 'fullwidth' %>
|
35
35
|
</div>
|
36
36
|
|
37
|
-
<div class="field">
|
37
|
+
<div class="field" data-hook="admin_general_setting_input_url">
|
38
38
|
<%= f.label :url %>
|
39
39
|
<br />
|
40
40
|
<%= f.text_field :url, class: 'fullwidth' %>
|
@@ -3,23 +3,24 @@
|
|
3
3
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @line_item } %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<% if Spree::Order.checkout_step_names.include?(:delivery) %>
|
6
|
+
<% if Spree::Order.checkout_step_names.include?(:delivery) && !%w(cart address).include?(@order.state) %>
|
7
7
|
<%= render :partial => "spree/admin/orders/shipment", :collection => @order.shipments, :locals => { :order => order } %>
|
8
8
|
<% else %>
|
9
9
|
<%= render :partial => "spree/admin/orders/line_items", :locals => { :order => order } %>
|
10
10
|
<% end %>
|
11
|
+
|
11
12
|
<%= render :partial => "spree/admin/orders/adjustments", :locals => {
|
12
|
-
:adjustments => @order.line_item_adjustments,
|
13
|
+
:adjustments => @order.line_item_adjustments,
|
13
14
|
:order => order,
|
14
15
|
:title => Spree.t(:line_item_adjustments)
|
15
16
|
} %>
|
16
17
|
<%= render :partial => "spree/admin/orders/adjustments", :locals => {
|
17
|
-
:adjustments => @order.shipment_adjustments,
|
18
|
+
:adjustments => @order.shipment_adjustments,
|
18
19
|
:order => order,
|
19
20
|
:title => Spree.t(:shipment_adjustments)
|
20
21
|
} %>
|
21
22
|
<%= render :partial => "spree/admin/orders/adjustments", :locals => {
|
22
|
-
:adjustments => @order.adjustments,
|
23
|
+
:adjustments => @order.adjustments,
|
23
24
|
:order => order,
|
24
25
|
:title => Spree.t(:order_adjustments)
|
25
26
|
} %>
|
@@ -34,6 +34,10 @@
|
|
34
34
|
<%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [Spree.t("order_state.#{s.name}"), s.value]}, {:include_blank => true}, :class => 'select2' %>
|
35
35
|
</div>
|
36
36
|
|
37
|
+
<div class="field">
|
38
|
+
<%= label_tag nil, Spree.t(:promotion) %>
|
39
|
+
<%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), {:include_blank => true}, :class => 'select2' %>
|
40
|
+
</div>
|
37
41
|
</div>
|
38
42
|
|
39
43
|
<div class="four columns">
|
@@ -64,10 +68,10 @@
|
|
64
68
|
<%= f.check_box :completed_at_not_null, {:checked => @show_only_completed}, '1', '0' %>
|
65
69
|
<%= Spree.t(:show_only_complete_orders) %>
|
66
70
|
</label>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
<label>
|
72
|
+
<%= f.check_box :considered_risky_eq, {:checked => (params[:q][:considered_risky_eq] == '1')}, '1', '' %>
|
73
|
+
<%= Spree.t(:show_only_considered_risky) %>
|
74
|
+
</label>
|
71
75
|
</div>
|
72
76
|
</div>
|
73
77
|
|
@@ -101,18 +105,19 @@
|
|
101
105
|
<thead>
|
102
106
|
<tr data-hook="admin_orders_index_headers">
|
103
107
|
<% if @show_only_completed %>
|
104
|
-
<th><%= sort_link @search, :completed_at,
|
108
|
+
<th><%= sort_link @search, :completed_at, I18n.t(:completed_at, :scope => 'activerecord.attributes.spree/order') %></th>
|
105
109
|
<% else %>
|
106
|
-
<th><%= sort_link @search, :created_at,
|
110
|
+
<th><%= sort_link @search, :created_at, I18n.t(:created_at, :scope => 'activerecord.attributes.spree/order') %></th>
|
107
111
|
<% end %>
|
108
|
-
<th><%= sort_link @search, :number,
|
109
|
-
<th><%= sort_link @search, :
|
110
|
-
<th><%= sort_link @search, :
|
112
|
+
<th><%= sort_link @search, :number, I18n.t(:number, :scope => 'activerecord.attributes.spree/order') %></th>
|
113
|
+
<th><%= sort_link @search, :considered_risky, I18n.t(:considered_risky, :scope => 'activerecord.attributes.spree/order') %></th>
|
114
|
+
<th><%= sort_link @search, :state, I18n.t(:state, :scope => 'activerecord.attributes.spree/order') %></th>
|
115
|
+
<th><%= sort_link @search, :payment_state, I18n.t(:payment_state, :scope => 'activerecord.attributes.spree/order') %></th>
|
111
116
|
<% if Spree::Order.checkout_step_names.include?(:delivery) %>
|
112
117
|
<th><%= sort_link @search, :shipment_state, I18n.t(:shipment_state, :scope => 'activerecord.attributes.spree/order') %></th>
|
113
118
|
<% end %>
|
114
|
-
<th><%= sort_link @search, :email,
|
115
|
-
<th><%= sort_link @search, :total,
|
119
|
+
<th><%= sort_link @search, :email, I18n.t(:email, :scope => 'activerecord.attributes.spree/order') %></th>
|
120
|
+
<th><%= sort_link @search, :total, I18n.t(:total, :scope => 'activerecord.attributes.spree/order') %></th>
|
116
121
|
<th data-hook="admin_orders_index_header_actions" class="actions"></th>
|
117
122
|
</tr>
|
118
123
|
</thead>
|
@@ -121,6 +126,7 @@
|
|
121
126
|
<tr data-hook="admin_orders_index_rows" class="state-<%= order.state.downcase %> <%= cycle('odd', 'even') %>">
|
122
127
|
<td class="align-center"><%= l (@show_only_completed ? order.completed_at : order.created_at).to_date %></td>
|
123
128
|
<td class="align-center"><%= link_to order.number, edit_admin_order_path(order) %></td>
|
129
|
+
<td class="align-center"><span class="state <%= order.considered_risky ? 'considered_risky' : 'considered_safe' %>"></span></td>
|
124
130
|
<td class="align-center"><span class="state <%= order.state.downcase %>"><%= Spree.t("order_state.#{order.state.downcase}") %></span></td>
|
125
131
|
<td class="align-center"><span class="state <%= order.payment_state %>"><%= link_to Spree.t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) if order.payment_state %></span></td>
|
126
132
|
<% if Spree::Order.checkout_step_names.include?(:delivery) %>
|
@@ -12,18 +12,18 @@
|
|
12
12
|
</div>
|
13
13
|
<div class="omega four columns">
|
14
14
|
<%= f.field_container :active do %>
|
15
|
-
<label for="active"><%= Spree.t(:
|
15
|
+
<label for="active"><%= Spree.t(:status) %></label>
|
16
16
|
<ul>
|
17
17
|
<li>
|
18
18
|
<%= f.label :active, Spree.t(:active) %>
|
19
19
|
<%= f.check_box :active %>
|
20
20
|
</li>
|
21
21
|
<li>
|
22
|
-
<%= f.label :
|
22
|
+
<%= f.label :backorderable_default, Spree.t(:backorderable_default) %>
|
23
23
|
<%= f.check_box :backorderable_default %>
|
24
24
|
</li>
|
25
25
|
<li>
|
26
|
-
<%= f.label :
|
26
|
+
<%= f.label :propagate_all_variants, Spree.t(:propagate_all_variants) %>
|
27
27
|
<%= f.check_box :propagate_all_variants %>
|
28
28
|
</li>
|
29
29
|
</ul>
|
@@ -82,8 +82,7 @@
|
|
82
82
|
</fieldset>
|
83
83
|
|
84
84
|
<div class="alpha twelve columns no-objects-found">
|
85
|
-
<%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/
|
86
|
-
<%= link_to Spree.t(:add_one), spree.new_admin_tax_rate_path %>!
|
85
|
+
<%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/variant')) %>.
|
87
86
|
</div>
|
88
87
|
|
89
88
|
<div id="transfer-variants-table" class="twelve columns alpha" style="display:none">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.3.
|
19
|
+
version: 2.3.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.3.
|
26
|
+
version: 2.3.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.3.
|
33
|
+
version: 2.3.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.3.
|
40
|
+
version: 2.3.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jquery-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|