spree_backend 2.2.6 → 2.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e184877b7a2f35dd34344987bb3cbfb5ebfbf37c
4
- data.tar.gz: e277a9c30e238faf1713d3ce7148b90231c64f01
3
+ metadata.gz: 3f59564b57c16054b7767c690eaadcbc2cccfad6
4
+ data.tar.gz: 23effe0eb5eeb447ef622cb3d9d3fab9a7f05da6
5
5
  SHA512:
6
- metadata.gz: ca6afcbc07bb19b206dafac2cb65cdbcf0f528ad129d58c43bb4c81e1312440611e68a4cd507f274a43538d503fda9f18a333042dd0ad74b997ecec8d84732d7
7
- data.tar.gz: 49d39b428ba01fcde54c1e5c5d5767c9af7de1e1f575e2e09f4afdaf1a8cb52fd7c8f2363357361e399a9e31c0ce4658a456a9cd06d00972594116996b72ba10
6
+ metadata.gz: cb1c8795329536adf932f3b1d24a6db53f87af5f6cfc9f8f343ca6df984701d94f25d6e1f6a4124be8ff5205fe6e51b33eee53faa1bb25dfefc701e4c9b8a267
7
+ data.tar.gz: b7f89d5f3d9053b0ca16e6d98980cf4870534d84963da333d7ee843d49bcc25d0bb5cdb15dff8015b5e571503b217e981a99efd57ae2ede628e17cc98a3c96a6
@@ -14,7 +14,7 @@ $(document).ready(function() {
14
14
  $('.payment-methods').hide();
15
15
  $('.payment-methods input').prop('disabled', true);
16
16
  if (this.checked) {
17
- $('#payment_method_' + this.value).prop('disabled', false);
17
+ $('#payment_method_' + this.value + ' input').prop('disabled', false);
18
18
  $('#payment_method_' + this.value).show();
19
19
  }
20
20
  }
@@ -23,11 +23,11 @@ $(document).ready(function() {
23
23
  $('.payment_methods_radios').each(
24
24
  function() {
25
25
  if (this.checked) {
26
- $('#payment_method_' + this.value).prop('disabled', false);
26
+ $('#payment_method_' + this.value + ' input').prop('disabled', false);
27
27
  $('#payment_method_' + this.value).show();
28
28
  } else {
29
29
  $('#payment_method_' + this.value).hide();
30
- $('#payment_method_' + this.value).prop('disabled', true);
30
+ $('#payment_method_' + this.value + ' input').prop('disabled', true);
31
31
  }
32
32
 
33
33
  if ($("#card_new" + this.value).is("*")) {
@@ -10,25 +10,12 @@ module Spree
10
10
 
11
11
  skip_before_filter :load_resource, only: [:toggle_state, :edit, :update, :destroy]
12
12
 
13
- def destroy
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
@@ -20,11 +20,11 @@ module Spree
20
20
 
21
21
  params[:q].delete(:inventory_units_shipment_id_null) if params[:q][:inventory_units_shipment_id_null] == "0"
22
22
 
23
- if !params[:q][:created_at_gt].blank?
23
+ if params[:q][:created_at_gt].present?
24
24
  params[:q][:created_at_gt] = Time.zone.parse(params[:q][:created_at_gt]).beginning_of_day rescue ""
25
25
  end
26
26
 
27
- if !params[:q][:created_at_lt].blank?
27
+ if params[:q][:created_at_lt].present?
28
28
  params[:q][:created_at_lt] = Time.zone.parse(params[:q][:created_at_lt]).end_of_day rescue ""
29
29
  end
30
30
 
@@ -22,7 +22,10 @@
22
22
  </tr>
23
23
  </thead>
24
24
  <tbody>
25
- <%= render "spree/admin/log_entries/#{@payment.payment_method.name.gsub(' ', '').underscore}", entry: entry %>
25
+ <tr>
26
+ <td>Message</td>
27
+ <td><%= entry.parsed_details.message %></td>
28
+ </tr>
26
29
  </tbody>
27
30
  <% end %>
28
- </table>
31
+ </table>
@@ -1,9 +1,11 @@
1
1
  <tr class="option_value fields" id="spree_<%= dom_id(f.object) %>" data-hook="option_value" class="<%= cycle('odd', 'even')%>">
2
- <td class="no-border">
3
- <span class="handle"></span>
4
- <%= f.hidden_field :id %>
5
- </td>
6
- <td class="name"><%= f.text_field :name %></td>
2
+ <% if f.object.persisted? %>
3
+ <td class="no-border">
4
+ <span class="handle"></span>
5
+ <%= f.hidden_field :id %>
6
+ </td>
7
+ <% end %>
8
+ <td colspan="<%= f.object.persisted? ? '' : '2' %>" class="name"><%= f.text_field :name %></td>
7
9
  <td class="presentation"><%= f.text_field :presentation %></td>
8
10
  <td class="actions"><%= link_to_remove_fields Spree.t(:remove), f, :no_text => true %></td>
9
11
  </tr>
@@ -32,15 +32,8 @@
32
32
  </tr>
33
33
  </thead>
34
34
  <tbody id="option_values">
35
- <% if @option_type.option_values.empty? %>
36
- <tr id="none" data-hook="option_none" class="<%= cycle('odd', 'even')%>">
37
- <td colspan="2"><%= Spree.t(:none) %></td>
38
- <td class="actions"></td>
39
- </tr>
40
- <% else %>
41
- <%= f.fields_for :option_values do |option_value_form| %>
42
- <%= render :partial => 'option_value_fields', :locals => { :f => option_value_form } %>
43
- <% end %>
35
+ <%= f.fields_for :option_values, @option_values do |option_value_form| %>
36
+ <%= render :partial => 'option_value_fields', :locals => { :f => option_value_form } %>
44
37
  <% end %>
45
38
  </tbody>
46
39
  </table>
@@ -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
  } %>
@@ -126,7 +126,13 @@
126
126
  <% if Spree::Order.checkout_step_names.include?(:delivery) %>
127
127
  <td class="align-center"><span class="state <%= order.shipment_state %>"><%= Spree.t("shipment_states.#{order.shipment_state}") if order.shipment_state %></span></td>
128
128
  <% end %>
129
- <td><%= mail_to order.email %></td>
129
+ <td>
130
+ <% if order.user %>
131
+ <%= link_to order.email, edit_admin_user_path(order.user) %>
132
+ <% else %>
133
+ <%= mail_to order.email %>
134
+ <% end %>
135
+ </td>
130
136
  <td class="align-center"><%= order.display_total.to_html %></td>
131
137
  <td class='actions align-center' data-hook="admin_orders_index_row_actions">
132
138
  <%= link_to_edit_url edit_admin_order_path(order), :title => "admin_edit_#{dom_id(order)}", :no_text => true %>
@@ -4,7 +4,7 @@
4
4
  <div data-hook="admin_product_form_name">
5
5
  <%= f.field_container :name do %>
6
6
  <%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', :class => 'required')) %>
7
- <%= f.text_field :name, :class => 'fullwidth title' %>
7
+ <%= f.text_field :name, :class => 'fullwidth title', :required => true %>
8
8
  <%= f.error_message_on :name %>
9
9
  <% end %>
10
10
  </div>
@@ -12,7 +12,7 @@
12
12
  <div data-hook="admin_product_form_slug">
13
13
  <%= f.field_container :slug do %>
14
14
  <%= f.label :slug, raw(Spree.t(:slug) + content_tag(:span, ' *', :class => "required")) %>
15
- <%= f.text_field :slug, :class => 'fullwidth title' %>
15
+ <%= f.text_field :slug, :class => 'fullwidth title', :required => true %>
16
16
  <%= f.error_message_on :slug %>
17
17
  <% end %>
18
18
  </div>
@@ -30,7 +30,7 @@
30
30
  <div data-hook="admin_product_form_price">
31
31
  <%= f.field_container :price do %>
32
32
  <%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', :class => "required")) %>
33
- <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
33
+ <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :required => true %>
34
34
  <%= f.error_message_on :price %>
35
35
  <% end %>
36
36
  </div>
@@ -42,6 +42,7 @@
42
42
  <%= f.error_message_on :cost_price %>
43
43
  <% end %>
44
44
  </div>
45
+
45
46
  <div data-hook="admin_product_form_cost_currency" class="omega two columns">
46
47
  <%= f.field_container :cost_currency do %>
47
48
  <%= f.label :cost_currency, Spree.t(:cost_currency) %>
@@ -9,7 +9,7 @@
9
9
 
10
10
  <%= f.field_container :name do %>
11
11
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
12
- <%= f.text_field :name, :class => 'fullwidth title' %>
12
+ <%= f.text_field :name, :class => 'fullwidth title', :required => true %>
13
13
  <%= f.error_message_on :name %>
14
14
  <% end %>
15
15
 
@@ -34,7 +34,7 @@
34
34
  <div data-hook="new_product_price" class="four columns">
35
35
  <%= f.field_container :price do %>
36
36
  <%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span><br />
37
- <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth' %>
37
+ <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth', :required => true %>
38
38
  <%= f.error_message_on :price %>
39
39
  <% end %>
40
40
  </div>
@@ -53,7 +53,7 @@
53
53
  <div data-hook="new_product_shipping_category" class="alpha four columns">
54
54
  <%= f.field_container :shipping_category do %>
55
55
  <%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span><br />
56
- <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth' }) %>
56
+ <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth', :required => true }) %>
57
57
  <%= f.error_message_on :shipping_category_id %>
58
58
  <% end %>
59
59
  </div>
@@ -11,7 +11,7 @@
11
11
  <div id='properties' data-hook>
12
12
  <%= f.field_container :property_ids do %>
13
13
  <%= f.label :property_ids, Spree.t(:properties) %><br>
14
- <%= f.select :property_ids, Spree::Property.all.map { |p| [p.presentation, p.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
14
+ <%= f.select :property_ids, Spree::Property.all.map { |p| ["#{p.presentation} (#{p.name})", p.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
15
15
  <% end %>
16
16
  </div>
17
17
  </div>
@@ -19,7 +19,7 @@
19
19
  <div class="six columns omega">
20
20
  <%= f.field_container :option_type_ids do %>
21
21
  <%= f.label :option_type_ids, Spree.t(:option_types) %><br>
22
- <%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| [ot.presentation, ot.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
22
+ <%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| ["#{ot.presentation} (#{ot.name})", ot.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
23
23
  <% end %>
24
24
  </div>
25
25
  </div>
@@ -24,7 +24,6 @@
24
24
  <%= content_tag :li, :class => ('active' if current == 'Stock Management') do %>
25
25
  <%= link_to_with_icon 'tasks', Spree.t(:stock_management), stock_admin_product_url(@product) %>
26
26
  <% end if can?(:stock, Spree::Product) %>
27
- </li>
28
27
  </ul>
29
28
  </nav>
30
29
 
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
  <div class="omega four columns">
14
14
  <%= f.field_container :active do %>
15
- <label for="active"><%= Spree.t(:state) %></label>
15
+ <label for="active"><%= Spree.t(:status) %></label>
16
16
  <ul>
17
17
  <li>
18
18
  <%= f.label :active, Spree.t(:active) %>
@@ -49,5 +49,6 @@
49
49
  </tr>
50
50
  {{/each}}
51
51
  </tbody>
52
+ </table>
52
53
  </fieldset>
53
54
  </script>
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.2.6
4
+ version: 2.2.7
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-09-19 00:00:00.000000000 Z
11
+ date: 2014-11-20 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.2.6
19
+ version: 2.2.7
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.2.6
26
+ version: 2.2.7
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.2.6
33
+ version: 2.2.7
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.2.6
40
+ version: 2.2.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -259,7 +259,6 @@ files:
259
259
  - app/views/spree/admin/inventory_units/adjust.html.erb
260
260
  - app/views/spree/admin/line_items/create.js.erb
261
261
  - app/views/spree/admin/line_items/destroy.js.erb
262
- - app/views/spree/admin/log_entries/_credit_card.html.erb
263
262
  - app/views/spree/admin/log_entries/index.html.erb
264
263
  - app/views/spree/admin/mail_methods/_form.html.erb
265
264
  - app/views/spree/admin/mail_methods/edit.html.erb
@@ -1,4 +0,0 @@
1
- <tr>
2
- <td>Message</td>
3
- <td><%= entry.parsed_details.message %></td>
4
- </tr>