spree_backend 2.0.6 → 2.0.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: 1f934ea7b74849f1c8eeef773b4de7db93103009
4
- data.tar.gz: 47e055d89c1c186254ddb60eaecbed7b422c0cbc
3
+ metadata.gz: 40b3e0c50a3466e2d27a556b75ddb02aa69ddb0c
4
+ data.tar.gz: cc2fab5e9597e131ce33008e97c28fd611d65830
5
5
  SHA512:
6
- metadata.gz: 9aec6aad45c261c02bb7d2024fbc33cf824d0fc1024bfa63fe4a1d6f7e4b4a8d85bafdab323e35302f40620a6704907016dad6f6ecdcb447d758da906840dba0
7
- data.tar.gz: dd42ef7b330a7bee18080f7839d88a70b311eabcc6d17465671772fc9636cb74e3abf89758a1d14641a55072b8dc27eed14123b9f791238082880e3a0f0c771f
6
+ metadata.gz: 7e36ce2f094093b78ad6e89f3eb08ffa2595ff8ac01d714c0f73e7d85f87368803a409aaf6cb5e651f79be681a4066f722c02fc1e33278900570dcff392f88b6
7
+ data.tar.gz: 257141c17829aabbcc8c15b46d3218751a3f7e4047b51ab0ff262927a461a3cf7ce7122070a629ef95983bc4f9a61f11cb5c406e9842d50ce8e8190c817d37ee
@@ -25,10 +25,9 @@ $(document).ready(function() {
25
25
  });
26
26
 
27
27
  // Handle adding new styles
28
- var styles_hash_index = 1;
29
28
  $(document).on('click', '.add_new_style', function(e) {
30
29
  e.preventDefault();
31
- $('#new-styles').append(generate_html_for_hash("new_attachment_styles", styles_hash_index));
30
+ $('#new-styles').append(generate_html_for_hash("new_attachment_styles", new Date().getTime()));
32
31
  });
33
32
 
34
33
  // Handle adding new headers
@@ -14,7 +14,7 @@ handle_move = (e, data) ->
14
14
  type: "POST",
15
15
  dataType: "json",
16
16
  url: url.toString(),
17
- data: ({_method: "put", "taxon[parent_id]": new_parent.attr("id"), "taxon[position]": position }),
17
+ data: ({_method: "put", "taxon[parent_id]": new_parent.attr("id"), "taxon[child_index]": position }),
18
18
  error: handle_ajax_error
19
19
 
20
20
  true
@@ -30,7 +30,7 @@ handle_create = (e, data) ->
30
30
  type: "POST",
31
31
  dataType: "json",
32
32
  url: base_url.toString(),
33
- data: ({"taxon[name]": name, "taxon[parent_id]": new_parent.attr("id"), "taxon[position]": position }),
33
+ data: ({"taxon[name]": name, "taxon[parent_id]": new_parent.attr("id")}),
34
34
  error: handle_ajax_error,
35
35
  success: (data,result) ->
36
36
  node.attr('id', data.id)
@@ -18,7 +18,6 @@ html.ie {
18
18
  }
19
19
  .select2-search {
20
20
  &:before {
21
- position: relative;
22
21
  z-index: 10000;
23
22
  content: '\f002' !important;
24
23
  }
@@ -70,4 +69,4 @@ html.ie8 {
70
69
  }
71
70
  }
72
71
 
73
- }
72
+ }
@@ -22,6 +22,7 @@ html.firefox {
22
22
 
23
23
  // Fix select2 search input left padding to not overlap search icon
24
24
  .select2-search input.select2-input {
25
+ padding-bottom: 12px !important;
25
26
  padding-left: 25px !important;
26
27
  }
27
28
 
@@ -29,4 +30,4 @@ html.firefox {
29
30
  input#image_attachment {
30
31
  width: 80%;
31
32
  }
32
- }
33
+ }
@@ -63,7 +63,7 @@
63
63
  @extend [class^="icon-"]:before;
64
64
 
65
65
  position: absolute;
66
- top: 13px;
66
+ top: 16px;
67
67
  left: 13px;
68
68
  }
69
69
 
@@ -39,39 +39,22 @@ module Spree
39
39
  parent_id = params[:taxon][:parent_id]
40
40
  new_position = params[:taxon][:position]
41
41
 
42
- if parent_id || new_position #taxon is being moved
43
- new_parent = parent_id.nil? ? @taxon.parent : Taxon.find(parent_id.to_i)
44
- new_position = new_position.nil? ? -1 : new_position.to_i
42
+ if parent_id
43
+ @taxon.parent = Taxon.find(parent_id.to_i)
44
+ end
45
45
 
46
- # Bellow is a very complicated way of finding where in nested set we
47
- # should actually move the taxon to achieve sane results,
48
- # JS is giving us the desired position, which was awesome for previous setup,
49
- # but now it's quite complicated to find where we should put it as we have
50
- # to differenciate between moving to the same branch, up down and into
51
- # first position.
52
- new_siblings = new_parent.children
53
- if new_position <= 0 && new_siblings.empty?
54
- @taxon.move_to_child_of(new_parent)
55
- elsif new_parent.id != @taxon.parent_id
56
- if new_position == 0
57
- @taxon.move_to_left_of(new_siblings.first)
58
- else
59
- @taxon.move_to_right_of(new_siblings[new_position-1])
60
- end
61
- elsif new_position < new_siblings.index(@taxon)
62
- @taxon.move_to_left_of(new_siblings[new_position]) # we move up
63
- else
64
- @taxon.move_to_right_of(new_siblings[new_position-1]) # we move down
65
- end
66
- # Reset legacy position, if any extensions still rely on it
67
- new_parent.children.reload.each{|t| t.update_column(:position, t.position)}
46
+ if new_position
47
+ @taxon.child_index = new_position.to_i
48
+ end
68
49
 
69
- if parent_id
70
- @taxon.reload
71
- @taxon.set_permalink
72
- @taxon.save!
73
- @update_children = true
74
- end
50
+ @taxon.save!
51
+
52
+ # regenerate permalink
53
+ if parent_id
54
+ @taxon.reload
55
+ @taxon.set_permalink
56
+ @taxon.save!
57
+ @update_children = true
75
58
  end
76
59
 
77
60
  if params.key? "permalink_part"
@@ -2,7 +2,7 @@
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <i class="icon-arrow-right"></i>
5
- <%= I18n.t("activerecord.models.#{@payment.class.to_s.underscore}.one") %>
5
+ <%= I18n.t(:one, scope: "activerecord.models.spree/payment") %>
6
6
  <i class="icon-arrow-right"></i>
7
7
  <%= payment_method_name(@payment) %>
8
8
  <% end %>
@@ -1,13 +1,13 @@
1
1
  <%= search_form_for @search, :url => spree.sales_total_admin_reports_path do |s| %>
2
2
  <div class="date-range-filter field align-center">
3
3
  <%= label_tag nil, Spree.t(:start), :class => 'inline' %>
4
- <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from' %>
4
+ <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from', :value => datepicker_field_value(params[:q][:created_at_gt]) %>
5
5
 
6
6
  <span class="range-divider">
7
7
  <i class="icon-arrow-right"></i>
8
8
  </span>
9
9
 
10
- <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to' %>
10
+ <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to', :value => datepicker_field_value(params[:q][:created_at_lt]) %>
11
11
  <%= label_tag nil, Spree.t(:end), :class => 'inline' %>
12
12
  </div>
13
13
 
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.0.6
4
+ version: 2.0.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: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.6
19
+ version: 2.0.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.0.6
26
+ version: 2.0.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_api
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.6
33
+ version: 2.0.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.0.6
40
+ version: 2.0.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,34 +80,6 @@ dependencies:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 3.4.7
83
- - !ruby/object:Gem::Dependency
84
- name: rails
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 3.2.8
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: 3.2.8
97
- - !ruby/object:Gem::Dependency
98
- name: deface
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
102
- - !ruby/object:Gem::Version
103
- version: 0.9.0
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '>='
109
- - !ruby/object:Gem::Version
110
- version: 0.9.0
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: email_spec
113
85
  requirement: !ruby/object:Gem::Requirement