spree_backend 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/admin/admin.js.erb +13 -20
  3. data/app/assets/javascripts/admin/payments/edit.js.coffee +148 -0
  4. data/app/assets/javascripts/admin/progress.coffee +4 -4
  5. data/app/assets/javascripts/admin/stock_movement.js.coffee +17 -0
  6. data/app/assets/javascripts/admin/stock_transfer.js.coffee +3 -5
  7. data/app/assets/javascripts/admin/taxonomy.js.coffee +1 -1
  8. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +7 -6
  9. data/app/assets/stylesheets/admin/components/_navigation.scss +8 -2
  10. data/app/assets/stylesheets/admin/plugins/_font-awesome.scss +2 -2
  11. data/app/assets/stylesheets/admin/plugins/_select2.scss +7 -2
  12. data/app/assets/stylesheets/admin/shared/_forms.scss +1 -0
  13. data/app/assets/stylesheets/admin/shared/_layout.scss +1 -0
  14. data/app/assets/stylesheets/admin/shared/_tables.scss +1 -1
  15. data/app/controllers/spree/admin/base_controller.rb +1 -1
  16. data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -0
  17. data/app/controllers/spree/admin/orders_controller.rb +1 -1
  18. data/app/controllers/spree/admin/payments_controller.rb +2 -2
  19. data/app/controllers/spree/admin/stock_movements_controller.rb +3 -1
  20. data/app/helpers/spree/admin/base_helper.rb +1 -1
  21. data/app/helpers/spree/admin/stock_movements_helper.rb +8 -1
  22. data/app/views/spree/admin/countries/index.html.erb +10 -1
  23. data/app/views/spree/admin/countries/new.html.erb +16 -0
  24. data/app/views/spree/admin/orders/_add_product.html.erb +1 -0
  25. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
  26. data/app/views/spree/admin/orders/customer_details/_form.html.erb +9 -2
  27. data/app/views/spree/admin/payments/_list.html.erb +2 -2
  28. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +5 -15
  29. data/app/views/spree/admin/products/new.html.erb +1 -1
  30. data/app/views/spree/admin/promotion_rules/create.js.erb +1 -0
  31. data/app/views/spree/admin/prototypes/show.html.erb +1 -1
  32. data/app/views/spree/admin/shared/_address_form.html.erb +21 -23
  33. data/app/views/spree/admin/shared/_menu.html.erb +1 -1
  34. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -1
  35. data/app/views/spree/admin/shared/_routes.html.erb +2 -1
  36. data/app/views/spree/admin/shared/_translations.html.erb +6 -3
  37. data/app/views/spree/admin/stock_movements/_form.html.erb +5 -4
  38. data/app/views/spree/admin/stock_movements/index.html.erb +3 -1
  39. data/app/views/spree/admin/taxonomies/edit.erb +1 -0
  40. data/app/views/spree/admin/taxons/edit.html.erb +1 -1
  41. data/app/views/spree/admin/variants/_autocomplete.js.erb +6 -51
  42. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +41 -0
  43. data/config/routes.rb +1 -1
  44. data/lib/spree/backend/engine.rb +0 -10
  45. data/vendor/assets/javascripts/jquery.jstree/themes/apple/{style.css → style.scss} +12 -12
  46. metadata +11 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 401402f4f58935c9dfcd62001630f34dff182a4f
4
- data.tar.gz: 752f24939efdc9c9c9530a2c8d788d0ce0112437
3
+ metadata.gz: 1edfef75f84d807cf8c95f2859bc483117a9d906
4
+ data.tar.gz: 0b68a358dfefe75da826cc499a6f452a4e15a46d
5
5
  SHA512:
6
- metadata.gz: 4bf575fd3b79608ea266746992e1cb97abdc798ea9120b3aa4a335ca612556453364fae30546fda58c84a37382b34f74e6afef6d9f8f8e822be74b79170eebea
7
- data.tar.gz: ab22128ba1a143a037fb79b2b3f4a48b2e6c94e30349c8c7376f261d2c7bf520bdd5fcb41af96dbfacc7929dcaa2f9e187cecc82699bd51ec3ea7f1787086476
6
+ metadata.gz: 0899662385e5da0455968e7b1c39f5bae6e50fbaa78ed448231ecdca68cd083c3187ba7cf699e31efe2eb618daab65da2423148699324aebcbdce57558c5196d
7
+ data.tar.gz: 0cf2af22c6bbcf29dde8eac4612a1f0aa0ed226b6a1d8c65e0d04f6e85e12b16aa508caca779ec539f39cc1e37a00515dcb9fc58c1a34f4b27d85b8ce9db9314
@@ -31,18 +31,16 @@ jQuery(function($) {
31
31
  smartPlacement: true,
32
32
  fadeInTime: 50,
33
33
  fadeOutTime: 50,
34
- intentPollInterval: 300
35
34
  });
36
35
 
37
- $('.with-tip').on({
38
- powerTipPreRender: function(){
39
- $('#powerTip').addClass($(this).attr("data-action"));
40
- $('#powerTip').addClass($(this).attr("data-tip-color"));
41
- },
42
- powerTipClose: function(){
43
- $('#powerTip').removeClass($(this).attr("data-action"))
44
- }
45
- });
36
+ $('body')
37
+ .on('powerTipPreRender', '.with-tip', function() {
38
+ $('#powerTip').addClass($(this).data('action'));
39
+ $('#powerTip').addClass($(this).data('tip-color'));
40
+ })
41
+ .on('powerTipClose', '.with-tip', function() {
42
+ $('#powerTip').removeClass($(this).data('action'));
43
+ })
46
44
 
47
45
  // Make flash messages dissapear
48
46
  setTimeout('$(".flash").fadeOut()', 5000);
@@ -81,17 +79,12 @@ jQuery(function($) {
81
79
  $.fn.visible = function(cond) { this[cond ? 'show' : 'hide' ]() };
82
80
 
83
81
  show_flash_error = function(message) {
84
- error_div = $('.flash.error');
85
- if (error_div.length > 0) {
86
- error_div.html(message);
87
- error_div.show();
88
- } else {
89
- if ($("#content .toolbar").length > 0) {
90
- $("#content .toolbar").before('<div class="flash error">' + message + '</div>');
91
- } else {
92
- $("#content h1").before('<div class="flash error">' + message + '</div>');
93
- }
82
+ var error_div = $('.flash.error');
83
+ if (error_div.length == 0) {
84
+ error_div = $('<div class="flash error" />');
85
+ $('#wrapper').prepend(error_div);
94
86
  }
87
+ error_div.html(message).show().fadeOut(5000);
95
88
  }
96
89
 
97
90
  // Apply to individual radio button that makes another element visible when checked
@@ -0,0 +1,148 @@
1
+ jQuery ($) ->
2
+ # Payment model
3
+ class Payment
4
+ constructor: (id) ->
5
+ @url = Spree.url("#{Spree.routes.payments_api}/#{id}.json")
6
+ @json = $.getJSON @url.toString(), (data) =>
7
+ @data = data
8
+
9
+ if_pending: (callback) ->
10
+ @json.done (data) ->
11
+ callback() if data.state is 'pending'
12
+
13
+ update: (attributes, success) ->
14
+ jqXHR = $.ajax
15
+ type: 'PUT'
16
+ url: @url.toString()
17
+ data: { payment: attributes }
18
+ jqXHR.done (data) =>
19
+ @data = data
20
+ jqXHR.fail ->
21
+ response = $.parseJSON(jqXHR.responseText)
22
+ show_flash_error(response.error)
23
+
24
+ amount: -> @data.amount
25
+ display_amount: -> @data.display_amount
26
+
27
+ # Payment base view
28
+ class PaymentView
29
+ constructor: (@$el, @payment) ->
30
+ @render()
31
+
32
+ render: ->
33
+ @add_action_button()
34
+
35
+ show: ->
36
+ @remove_buttons()
37
+ new ShowPaymentView(@$el, @payment)
38
+
39
+ edit: ->
40
+ @remove_buttons()
41
+ new EditPaymentView(@$el, @payment)
42
+
43
+ add_action_button: ->
44
+ @$actions().prepend @$new_button(@action)
45
+
46
+ remove_buttons: ->
47
+ @$buttons().remove()
48
+
49
+ $new_button: (action) ->
50
+ $('<a />')
51
+ .attr
52
+ class: "icon-#{action} icon_link no-text with-tip"
53
+ title: Spree.translations[action]
54
+ .data
55
+ action: action
56
+ .one
57
+ click: (event) ->
58
+ event.preventDefault()
59
+ mousedown: ->
60
+ $(@).data('clicked', true)
61
+ mouseup: =>
62
+ @[action]()
63
+ .powerTip
64
+ smartPlacement: true
65
+ fadeInTime: 50
66
+ fadeOutTime: 50
67
+
68
+ $buttons: ->
69
+ @$actions().find(".icon-#{@action}, .icon-cancel")
70
+
71
+ $actions: ->
72
+ @$el.find('.actions')
73
+
74
+ $amount: ->
75
+ @$el.find('td.amount')
76
+
77
+ # Payment show view
78
+ class ShowPaymentView extends PaymentView
79
+ action: 'edit'
80
+
81
+ render: ->
82
+ super
83
+ @set_actions_display()
84
+ @show_actions()
85
+ @show_amount()
86
+
87
+ set_actions_display: ->
88
+ width = @$actions().width()
89
+ @$actions().width(width).css('text-align', 'left')
90
+
91
+ show_actions: ->
92
+ @$actions().find('a').show()
93
+
94
+ show_amount: ->
95
+ amount = $('<span />')
96
+ .html(@payment.display_amount())
97
+ .one('click', => @edit().$input().focus())
98
+ @$amount().html(amount)
99
+
100
+ # Payment edit view
101
+ class EditPaymentView extends PaymentView
102
+ action: 'save'
103
+
104
+ render: ->
105
+ super
106
+ @hide_actions()
107
+ @edit_amount()
108
+ @add_cancel_button()
109
+
110
+ add_cancel_button: ->
111
+ @$actions().append @$new_button('cancel')
112
+
113
+ hide_actions: ->
114
+ @$actions().find('a').not(@$buttons()).hide()
115
+
116
+ edit_amount: ->
117
+ amount = @$amount()
118
+ amount.html(@$new_input(amount.find('span').width()))
119
+
120
+ save: (event) ->
121
+ @payment.update(amount: @$input().val())
122
+ .done(=> @show())
123
+
124
+ cancel: @::show
125
+
126
+ $new_input: (width) ->
127
+ amount = @constructor.normalize_amount(@payment.display_amount())
128
+ $('<input />')
129
+ .attr(id: 'amount', value: amount)
130
+ .width(width)
131
+ .one
132
+ blur: =>
133
+ clicked = (@$buttons().filter -> $(@).data('clicked')).length
134
+ @save() unless clicked
135
+ .css('text-align': 'right')
136
+
137
+ $input: ->
138
+ @$amount().find('input')
139
+
140
+ @normalize_amount: (amount) ->
141
+ separator = Spree.translations.currency_separator
142
+ amount.replace(///[^\d#{separator}]///g, '')
143
+
144
+ # Attach ShowPaymentView to each pending payment in the table
145
+ $('.admin tr[data-hook=payments_row]').each ->
146
+ $el = $(@)
147
+ payment = new Payment($el.attr('id').match(/\d+$/))
148
+ payment.if_pending -> new ShowPaymentView($el, payment)
@@ -16,12 +16,12 @@ $(document).ready ->
16
16
  top: 'auto'
17
17
  left: 'auto'
18
18
 
19
- target = document.getElementById("spinner")
19
+ target = document.getElementById("spinner")
20
20
 
21
21
  $(document).ajaxStart ->
22
- $("#progress").fadeIn()
23
- spinner = new Spinner(opts).spin(target)
22
+ $("#progress").stop(true, true).fadeIn()
23
+ spinner = new Spinner(opts).spin(target)
24
24
 
25
25
  $(document).ajaxStop ->
26
- $("#progress").fadeOut()
26
+ $("#progress").fadeOut()
27
27
 
@@ -0,0 +1,17 @@
1
+ jQuery ->
2
+ $('#stock_movement_stock_item_id').select2
3
+ placeholder: "Find a stock item" # translate
4
+ ajax:
5
+ url: Spree.url(Spree.routes.stock_items_api)
6
+ data: (term, page) ->
7
+ q:
8
+ variant_product_name_cont: term
9
+ per_page: 50
10
+ page: page
11
+ results: (data, page) ->
12
+ more = (page * 50) < data.count
13
+ return { results: data.stock_items, more: more }
14
+ formatResult: (stock_item) ->
15
+ variantTemplate({ variant: stock_item.variant })
16
+ formatSelection: (stock_item) ->
17
+ "#{stock_item.variant.name} (#{stock_item.variant.options_text})"
@@ -30,7 +30,7 @@ $ ->
30
30
 
31
31
  $('#transfer_receive_stock').change (event) => @receive_stock_change(event)
32
32
 
33
- $.getJSON Spree.routes.stock_locations_api, (data) =>
33
+ $.getJSON Spree.url(Spree.routes.stock_locations_api), (data) =>
34
34
  @locations = (location for location in data.stock_locations)
35
35
  @force_receive_stock() if @locations.length < 2
36
36
 
@@ -92,13 +92,13 @@ $ ->
92
92
  if @cached_variants?
93
93
  @populate_select @cached_variants
94
94
  else
95
- $.getJSON Spree.routes.variants_api, (data) =>
95
+ $.getJSON Spree.url(Spree.routes.variants_api), (data) =>
96
96
  @cached_variants = _.map(data.variants, (variant) -> new TransferVariant(variant))
97
97
  @populate_select @cached_variants
98
98
 
99
99
  _refresh_transfer_stock_items: ->
100
100
  stock_location_id = $('#transfer_source_location_id').val()
101
- $.getJSON Spree.routes.stock_locations_api + "/#{stock_location_id}/stock_items", (data) =>
101
+ $.getJSON Spree.url(Spree.routes.stock_locations_api + "/#{stock_location_id}/stock_items"), (data) =>
102
102
  @populate_select _.map(data.stock_items, (stock_item) -> new TransferStockItem(stock_item))
103
103
 
104
104
  populate_select: (variants) ->
@@ -177,5 +177,3 @@ $ ->
177
177
  transfer_locations = new TransferLocations
178
178
  transfer_variants = new TransferVariants
179
179
  transfer_add_variants = new TransferAddVariants
180
-
181
-
@@ -86,7 +86,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
86
86
  base_url.path() + '/' + e.attr('id') + '/jstree'
87
87
  themes:
88
88
  theme: "apple",
89
- url: "/assets/jquery.jstree/themes/apple/style.css"
89
+ url: Spree.url(Spree.routes.jstree_theme_path)
90
90
  strings:
91
91
  new_node: new_taxon,
92
92
  loading: Spree.translations.loading + "..."
@@ -54,14 +54,15 @@ $(document).ready(function() {
54
54
 
55
55
  //handle delete click
56
56
  $('a.delete-item').click(function(){
57
- var del = $(this);
58
- var shipment_number = del.data('shipment-number');
59
- var variant_id = del.data('variant-id');
57
+ if (confirm(Spree.translations.are_you_sure_delete)) {
58
+ var del = $(this);
59
+ var shipment_number = del.data('shipment-number');
60
+ var variant_id = del.data('variant-id');
60
61
 
61
- toggleItemEdit();
62
-
63
- adjustItems(shipment_number, variant_id, 0);
62
+ toggleItemEdit();
64
63
 
64
+ adjustItems(shipment_number, variant_id, 0);
65
+ }
65
66
  });
66
67
  }
67
68
  });
@@ -63,12 +63,18 @@ nav.menu {
63
63
  #admin-menu {
64
64
  background-color: $color-3;
65
65
 
66
+ ul{
67
+ display: table;
68
+ table-layout: fixed;
69
+ width: 100%;
70
+ }
71
+
66
72
  li {
67
- min-width: 90px;
73
+ display: table-cell;
68
74
 
69
75
  a {
70
76
  display: block;
71
- padding: 25px 20px;
77
+ padding: 25px 15px;
72
78
  color: $color-1 !important;
73
79
  text-transform: uppercase;
74
80
  position: relative;
@@ -27,8 +27,8 @@
27
27
  * -------------------------- */
28
28
  @font-face {
29
29
  font-family: 'FontAwesome';
30
- src: font-url('fontawesome-webfont.eot?v=3.2.1');
31
- src: font-url('fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), font-url('fontawesome-webfont.woff?v=3.2.1') format('woff'), font-url('fontawesome-webfont.ttf?v=3.2.1') format('truetype'), font-url('fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg');
30
+ src: font-url('fontawesome-webfont.eot');
31
+ src: font-url('fontawesome-webfont.eot?#iefix') format('embedded-opentype'), font-url('fontawesome-webfont.woff') format('woff'), font-url('fontawesome-webfont.ttf') format('truetype'), font-url('fontawesome-webfont.svg#fontawesomeregular') format('svg');
32
32
  font-weight: normal;
33
33
  font-style: normal;
34
34
  }
@@ -70,7 +70,7 @@
70
70
  input {
71
71
  @extend input[type="text"];
72
72
  margin-top: 5px;
73
- margin-left: -6px;
73
+ margin-left: 4px;
74
74
  padding-left: 25px;
75
75
  padding-top: 6px;
76
76
  padding-bottom: 6px;
@@ -107,6 +107,11 @@
107
107
  li {
108
108
  font-size: 85% !important;
109
109
 
110
+
111
+ &:nth-child(odd) {
112
+ background: #efefef;
113
+ }
114
+
110
115
  &.select2-highlighted {
111
116
  .select2-result-label {
112
117
  &, h6 {
@@ -133,7 +138,7 @@
133
138
  }
134
139
 
135
140
  .select2-highlighted {
136
- background-color: $color-sel-bg;
141
+ background-color: $color-sel-bg !important;
137
142
  }
138
143
  }
139
144
 
@@ -62,6 +62,7 @@ button, .button {
62
62
  color: $color-btn-text;
63
63
  text-transform: uppercase;
64
64
  font-weight: 600 !important;
65
+ white-space: nowrap;
65
66
 
66
67
  &:before {
67
68
  font-weight: normal !important;
@@ -75,6 +75,7 @@
75
75
  }
76
76
  .page-actions {
77
77
  text-align: right;
78
+ line-height: 38px;
78
79
  form {
79
80
  display: inline-block;
80
81
  }
@@ -84,7 +84,7 @@ table {
84
84
  background-color: $color-notice;
85
85
  color: $color-1;
86
86
  }
87
- .icon-edit:hover, .icon-capture:hover, .icon-ok:hover, .icon-plus:hover {
87
+ .icon-edit:hover, .icon-capture:hover, .icon-ok:hover, .icon-plus:hover, .icon-save:hover {
88
88
  background-color: $color-success;
89
89
  color: $color-1;
90
90
  }
@@ -19,7 +19,7 @@ module Spree
19
19
  if respond_to?(:model_class, true) && model_class
20
20
  record = model_class
21
21
  else
22
- record = Object
22
+ record = controller_name.to_sym
23
23
  end
24
24
  authorize! :admin, record
25
25
  authorize! action, record
@@ -13,6 +13,9 @@ module Spree
13
13
  country_id = Address.default.country.id
14
14
  @order.build_bill_address(:country_id => country_id) if @order.bill_address.nil?
15
15
  @order.build_ship_address(:country_id => country_id) if @order.ship_address.nil?
16
+
17
+ @order.bill_address.country_id = country_id if @order.bill_address.country.nil?
18
+ @order.ship_address.country_id = country_id if @order.ship_address.country.nil?
16
19
  end
17
20
 
18
21
  def update
@@ -83,7 +83,7 @@ module Spree
83
83
  # TODO - possible security check here but right now any admin can before any transition (and the state machine
84
84
  # itself will make sure transitions are not applied in the wrong state)
85
85
  event = params[:e]
86
- if @order.send("#{event}")
86
+ if @order.state_events.include?(event.to_sym) && @order.send("#{event}")
87
87
  flash[:success] = Spree.t(:order_updated)
88
88
  else
89
89
  flash[:error] = Spree.t(:cannot_perform_operation)
@@ -71,7 +71,7 @@ module Spree
71
71
  if params[:payment] and params[:payment_source] and source_params = params.delete(:payment_source)[params[:payment][:payment_method_id]]
72
72
  params[:payment][:source_attributes] = source_params
73
73
  end
74
- params.require(:payment).permit(:amount, :payment_method_id, :source_attributes)
74
+ params.require(:payment).permit(:amount, :payment_method_id, source_attributes: [:number, :expiry, :verification_value])
75
75
  end
76
76
 
77
77
  def load_data
@@ -86,7 +86,7 @@ module Spree
86
86
  end
87
87
 
88
88
  def can_transition_to_payment
89
- unless @order.billing_address.present?
89
+ unless @order.billing_address.present?
90
90
  flash[:notice] = Spree.t(:fill_in_customer_info)
91
91
  redirect_to edit_admin_order_customer_url(@order)
92
92
  end
@@ -5,7 +5,9 @@ module Spree
5
5
  helper_method :stock_location
6
6
 
7
7
  def index
8
- @stock_movements = stock_location.stock_movements.recent.page(params[:page])
8
+ @stock_movements = stock_location.stock_movements.recent.
9
+ includes(:stock_item => { :variant => :product }).
10
+ page(params[:page])
9
11
  end
10
12
 
11
13
  def new
@@ -24,7 +24,7 @@ module Spree
24
24
 
25
25
  def datepicker_field_value(date)
26
26
  unless date.blank?
27
- l(date, :format => Spree.t('date_picker.format'))
27
+ l(date, :format => Spree.t('date_picker.format', default: '%Y/%m/%d'))
28
28
  else
29
29
  nil
30
30
  end
@@ -3,11 +3,18 @@ module Spree
3
3
  module StockMovementsHelper
4
4
  def pretty_originator(stock_movement)
5
5
  if stock_movement.originator.respond_to?(:number)
6
- stock_movement.originator.number
6
+ link_to stock_movement.originator.number, [:edit, :admin, stock_movement.originator.order]
7
7
  else
8
8
  ""
9
9
  end
10
10
  end
11
+
12
+ def display_variant(stock_movement)
13
+ variant = stock_movement.stock_item.variant
14
+ output = variant.name
15
+ output += "<br>(#{variant.options_text})" unless variant.options_text.blank?
16
+ output.html_safe
17
+ end
11
18
  end
12
19
  end
13
20
  end
@@ -4,6 +4,14 @@
4
4
  <%= Spree.t(:listing_countries) %>
5
5
  <% end %>
6
6
 
7
+ <% content_for :page_actions do %>
8
+ <ul class="actions inline-menu">
9
+ <li>
10
+ <%= button_link_to Spree.t(:new_country), new_object_url, { :icon => 'icon-plus', :id => 'admin_new_country' } %>
11
+ </li>
12
+ </ul>
13
+ <% end %>
14
+
7
15
  <table class="index" id='listing_countries' data-hook>
8
16
  <colgroup>
9
17
  <col style="width: 35%" />
@@ -27,8 +35,9 @@
27
35
  <td class="align-center"><%= country.states_required? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
28
36
  <td class="actions">
29
37
  <%= link_to_edit country, :no_text => true %>
38
+ <%= link_to_delete country, :no_text => true %>
30
39
  </td>
31
40
  </tr>
32
41
  <% end %>
33
42
  </tbody>
34
- </table>
43
+ </table>
@@ -0,0 +1,16 @@
1
+ <% content_for :page_title do %>
2
+ <%= Spree.t(:new_country) %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <li><%= link_to_with_icon 'icon-arrow-left', Spree.t(:back_to_countries_list), admin_countries_path, :class => 'button' %></li>
7
+ <% end %>
8
+
9
+ <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @countries } %>
10
+
11
+ <%= form_for [:admin, @country] do |f| %>
12
+ <fieldset class="no-border-top">
13
+ <%= render :partial => 'form', :locals => { :f => f } %>
14
+ <%= render :partial => 'spree/admin/shared/new_resource_links' %>
15
+ </fieldset>
16
+ <% end %>
@@ -1,4 +1,5 @@
1
1
  <%= render :partial => "spree/admin/variants/autocomplete", :formats => :js %>
2
+ <%= render :partial => "spree/admin/variants/autocomplete_stock", :formats => :js %>
2
3
 
3
4
  <div id="add-line-item" data-hook>
4
5
  <fieldset class="no-border-bottom">
@@ -25,7 +25,7 @@
25
25
  <%= link_to '', '#', :class => 'cancel-item icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => Spree.t('actions.cancel'), :style => 'display: none' %>
26
26
  <%= link_to '', '#', :class => 'edit-item icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => Spree.t('edit') %>
27
27
  <%= link_to '', '#', :class => 'split-item icon_link icon-resize-horizontal no-text with-tip', :data => {:action => 'split', 'variant-id' => item.variant.id}, :title => Spree.t('split') %>
28
- <%= link_to '', '#', :class => 'delete-item icon-trash no-text with-tip', :data => { :confirm => Spree.t(:are_you_sure), 'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'remove'}, :title => Spree.t('delete') %>
28
+ <%= link_to '', '#', :class => 'delete-item icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'remove'}, :title => Spree.t('delete') %>
29
29
  <% end %>
30
30
  </td>
31
31
  <% end %>
@@ -40,7 +40,7 @@
40
40
  <fieldset class="no-border-bottom">
41
41
  <legend align="center"><%= Spree.t(:billing_address) %></legend>
42
42
  <%= f.fields_for :bill_address do |ba_form| %>
43
- <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :name => Spree.t(:billing_address), :use_billing => false } %>
43
+ <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :type => "billing" } %>
44
44
  <% end %>
45
45
  </fieldset>
46
46
  </div>
@@ -49,7 +49,14 @@
49
49
  <fieldset class="no-border-bottom">
50
50
  <legend align="center"><%= Spree.t(:shipping_address) %></legend>
51
51
  <%= f.fields_for :ship_address do |sa_form| %>
52
- <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :name => Spree.t(:shipping_address), :use_billing => true } %>
52
+ <div class="field" style="position: absolute;margin-top: -15px;right: 0;">
53
+ <span data-hook="use_billing">
54
+ <%= check_box_tag 'order[use_billing]', '1', @order.shipping_eq_billing_address? %>
55
+ <%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
56
+ </span>
57
+ </div>
58
+
59
+ <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => 'shipping' } %>
53
60
  <% end %>
54
61
  </fieldset>
55
62
  </div>
@@ -10,9 +10,9 @@
10
10
  </thead>
11
11
  <tbody>
12
12
  <% payments.each do |payment| %>
13
- <tr data-hook="payments_row" class="<%= cycle('odd', 'even')%>">
13
+ <tr id="<%= dom_id(payment) %>" data-hook="payments_row" class="<%= cycle('odd', 'even')%>">
14
14
  <td><%= pretty_time(payment.created_at) %></td>
15
- <td class='align-center'><%= payment.display_amount.to_html %></td>
15
+ <td class="align-center amount"><%= payment.display_amount.to_html %></td>
16
16
  <td class="align-center"><%= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment) %></td>
17
17
  <td class="align-center"> <span class="state <%= payment.state %>"><%= Spree.t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></span></td>
18
18
  <td class="actions">
@@ -2,28 +2,18 @@
2
2
  <legend align="center"><%= Spree.t(:credit_card) %></legend>
3
3
 
4
4
  <div class="row">
5
- <div class="alpha six columns">
5
+ <div class="alpha six columns">
6
6
  <dl>
7
+ <dt><%= Spree.t(:card_type) %>:</dt>
8
+ <dd><%= payment.source.cc_type %></dd>
9
+
7
10
  <dt><%= Spree.t(:card_number) %>:</dt>
8
11
  <dd><%= payment.source.display_number %></dd>
9
12
 
10
13
  <dt><%= Spree.t(:expiration) %>:</dt>
11
14
  <dd><%= payment.source.month %>/<%= payment.source.year %></dd>
12
-
13
- <dt><%= Spree.t(:card_code) %>:</dt>
14
- <dd><%= payment.source.verification_value %></dd>
15
15
  </dl>
16
16
  </div>
17
-
18
- <div class="omega six columns">
19
- <dl>
20
- <dt><%= Spree.t(:maestro_or_solo_cards) %>:</dt>
21
- <dd><%= payment.source.issue_number %></dd>
22
-
23
- <dt><%= Spree.t(:start_date) %>:</dt>
24
- <dd><%= payment.source.start_month %>/<%= payment.source.start_year %></dd>
25
- </dl>
26
- </div>
27
17
  </div>
28
18
 
29
- </fieldset>
19
+ </fieldset>
@@ -34,7 +34,7 @@
34
34
  <div 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, :class => 'fullwidth' %>
37
+ <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth' %>
38
38
  <%= f.error_message_on :price %>
39
39
  <% end %>
40
40
  </div>
@@ -5,3 +5,4 @@ $('.product_picker').productAutocomplete();
5
5
  $('.user_picker').userAutocomplete();
6
6
 
7
7
  $('#promotion_rule_type').html('<%= escape_javascript options_for_promotion_rule_types(@promotion) %>');
8
+ $('#promotion_rule_type').select2();
@@ -1,5 +1,5 @@
1
1
  <% if @prototype.option_types.present? %>
2
- <h2>Variants</h2>
2
+ <h2><%= Spree.t(:variants) %></h2>
3
3
 
4
4
  <ul class="product-prototype-options">
5
5
  <% @prototype.option_types.each do |ot| %>
@@ -1,54 +1,51 @@
1
- <% if use_billing %>
2
- <div class="field" style="position: absolute;margin-top: -15px;right: 0;">
3
- <span data-hook="use_billing">
4
- <%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.same_as?(@order.ship_address)) %>
5
- <%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
6
- </span>
7
- </div>
8
- <% end %>
9
-
10
- <% is_shipping_address = name == Spree.t(:shipping_address) %>
11
- <% shipping_or_billing = is_shipping_address ? 'shipping' : 'billing' %>
12
- <% s_or_b = is_shipping_address ? 's' : 'b' %>
1
+ <% s_or_b = type.chars.first %>
13
2
 
14
- <div id="<%= is_shipping_address ? 'shipping' : 'billing' %>" style="display: <%= (use_billing && (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address))) ? 'none' : 'block' %>" data-hook="address_fields">
15
- <div class="field <%= "#{shipping_or_billing}-row" %>">
3
+ <div id="<%= type %>" data-hook="address_fields">
4
+ <div class="field <%= "#{type}-row" %>">
16
5
  <%= f.label :firstname, Spree.t(:first_name) %>
17
6
  <%= f.text_field :firstname, :class => 'fullwidth' %>
18
7
  </div>
19
- <div class="field <%= "#{shipping_or_billing}-row" %>">
8
+
9
+ <div class="field <%= "#{type}-row" %>">
20
10
  <%= f.label :lastname, Spree.t(:last_name) %>
21
11
  <%= f.text_field :lastname, :class => 'fullwidth' %>
22
12
  </div>
13
+
23
14
  <% if Spree::Config[:company] %>
24
- <div class="field <%= "#{shipping_or_billing}-row" %>">
15
+ <div class="field <%= "#{type}-row" %>">
25
16
  <%= f.label :company, Spree.t(:company) %>
26
17
  <%= f.text_field :company, :class => 'fullwidth' %>
27
18
  </div>
28
19
  <% end %>
29
- <div class="field <%= "#{shipping_or_billing}-row" %>">
20
+
21
+ <div class="field <%= "#{type}-row" %>">
30
22
  <%= f.label :address1, Spree.t(:street_address) %>
31
23
  <%= f.text_field :address1, :class => 'fullwidth' %>
32
24
  </div>
33
- <div class="field <%= "#{shipping_or_billing}-row" %>">
25
+
26
+ <div class="field <%= "#{type}-row" %>">
34
27
  <%= f.label :address2, Spree.t(:street_address_2) %>
35
28
  <%= f.text_field :address2, :class => 'fullwidth' %>
36
29
  </div>
37
- <div class="field <%= "#{shipping_or_billing}-row" %>">
30
+
31
+ <div class="field <%= "#{type}-row" %>">
38
32
  <%= f.label :city, Spree.t(:city) %>
39
33
  <%= f.text_field :city, :class => 'fullwidth' %>
40
34
  </div>
41
- <div class="field <%= "#{shipping_or_billing}-row" %>">
35
+
36
+ <div class="field <%= "#{type}-row" %>">
42
37
  <%= f.label :zipcode, Spree.t(:zip) %>
43
38
  <%= f.text_field :zipcode, :class => 'fullwidth' %>
44
39
  </div>
45
- <div class="field <%= "#{shipping_or_billing}-row" %>">
40
+
41
+ <div class="field <%= "#{type}-row" %>">
46
42
  <%= f.label :country_id, Spree.t(:country) %>
47
43
  <span id="<%= s_or_b %>country">
48
44
  <%= f.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'select2 fullwidth'} %>
49
45
  </span>
50
46
  </div>
51
- <div class="field <%= "#{shipping_or_billing}-row" %>">
47
+
48
+ <div class="field <%= "#{type}-row" %>">
52
49
  <%= f.label :state_id, Spree.t(:state) %>
53
50
  <span id="<%= s_or_b %>state">
54
51
  <%= f.text_field :state_name,
@@ -57,7 +54,8 @@
57
54
  <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:class => 'select2 fullwidth', :style => "display: #{f.object.country.states.empty? ? 'none' : 'block' };", :disabled => f.object.country.states.empty?} %>
58
55
  </span>
59
56
  </div>
60
- <div class="field <%= "#{shipping_or_billing}-row" %>">
57
+
58
+ <div class="field <%= "#{type}-row" %>">
61
59
  <%= f.label :phone, Spree.t(:phone) %>
62
60
  <%= f.phone_field :phone, :class => 'fullwidth' %>
63
61
  </div>
@@ -1,7 +1,7 @@
1
1
  <nav id="admin-menu" data-hook>
2
2
  <div class="container">
3
3
  <div class="sixteen columns main-menu-wrapper">
4
- <ul data-hook="admin_tabs" class="inline-menu fullwidth-menu">
4
+ <ul data-hook="admin_tabs" class="fullwidth-menu">
5
5
  <%= render :partial => 'spree/admin/shared/tabs' %>
6
6
  </ul>
7
7
  </div>
@@ -1,5 +1,5 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:order) %> #<%= @order.number %>
2
+ <%= link_to "#{Spree.t(:order)} ##{@order.number}", spree.edit_admin_order_path(@order) %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :sidebar_title do %>
@@ -9,5 +9,6 @@
9
9
  Spree.routes.checkouts_api = "<%= spree.api_checkouts_url(:format => 'json') %>";
10
10
  Spree.routes.stock_locations_api = "<%= spree.api_stock_locations_url(:format => 'json') %>";
11
11
  Spree.routes.variants_api = "<%= spree.api_variants_url(:format => 'json') %>";
12
-
12
+ Spree.routes.payments_api = "<%= spree.api_order_payments_url(:format => 'json') if params[:order_id] %>";
13
+ Spree.routes.stock_items_api = "<%= spree.api_stock_location_stock_items_url(:format => 'json') if params[:stock_location_id] %>";
13
14
  </script>
@@ -10,8 +10,10 @@
10
10
  :choose_a_customer => Spree.t(:choose_a_customer),
11
11
  :confirm_delete => Spree.t(:confirm_delete),
12
12
  :cut => Spree.t(:cut),
13
- :destroy => Spree.t(:destroy),
14
- :edit => Spree.t(:edit),
13
+ :destroy => Spree.t(:destroy, :scope => :actions),
14
+ :edit => Spree.t(:edit, :scope => :actions),
15
+ :save => Spree.t(:save, :scope => :actions),
16
+ :cancel => Spree.t(:cancel, :scope => :actions),
15
17
  :first_day => Spree.t(:first_day,
16
18
  :scope => 'date_picker',
17
19
  :default => 0).to_i,
@@ -31,7 +33,8 @@
31
33
  :type_to_search => Spree.t(:type_to_search),
32
34
  :taxon_placeholder => Spree.t(:taxon_placeholder),
33
35
  :variant_placeholder => Spree.t(:variant_placeholder),
34
- :value => Spree.t(:value)
36
+ :value => Spree.t(:value),
37
+ :currency_separator => I18n.t('number.currency.format.separator'),
35
38
  }.to_json
36
39
  %>
37
40
  </script>
@@ -1,13 +1,14 @@
1
1
  <div data-hook="admin_stock_movements_form_fields" class="row">
2
- <div class="alpha four columns">
2
+ <div class="alpha twelve columns">
3
3
  <%= f.field_container :quantity do %>
4
4
  <%= f.label :quantity, Spree.t(:quantity) %>
5
- <%= f.text_field :quantity, :class => 'fullwidth' %>
5
+ <%= f.text_field :quantity %>
6
6
  <% end %>
7
7
  <%= f.field_container :stock_item_id do %>
8
8
  <%= f.label :stock_item_id, Spree.t(:stock_item_id) %>
9
- <%= collection_select 'stock_movement', 'stock_item_id', stock_location.stock_items, :id, :variant_name,
10
- { selected: @stock_movement.stock_item_id }, class: 'select2 fullwidth' %>
9
+ <%= f.text_field 'stock_item_id', :class => 'fullwidth' %>
11
10
  <% end %>
12
11
  </div>
13
12
  </div>
13
+
14
+ <%= render :partial => "spree/admin/variants/autocomplete", :formats => :js %>
@@ -30,7 +30,9 @@
30
30
  <tbody>
31
31
  <% @stock_movements.each do |stock_movement|%>
32
32
  <tr id="<%= spree_dom_id stock_movement %>" data-hook="admin_stock_movements_index_rows" class="<%= cycle('odd', 'even')%>">
33
- <td class="align-center"><%= stock_movement.stock_item.variant_name %></td>
33
+ <td class="align-center">
34
+ <%= display_variant(stock_movement) %>
35
+ </td>
34
36
  <td class="align-center"><%= stock_movement.quantity %></td>
35
37
  <td class="align-center"><%= pretty_originator(stock_movement) %></td>
36
38
  </tr>
@@ -22,6 +22,7 @@
22
22
  <script>
23
23
  Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy) %>";
24
24
  Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy) %>";
25
+ Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css") %>";
25
26
  </script>
26
27
  <div id="taxonomy_tree" class="tree"></div>
27
28
  </div>
@@ -10,7 +10,7 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <% # Because otherwise the form would attempt to use to_param of @taxon %>
13
+ <%# Because otherwise the form would attempt to use to_param of @taxon %>
14
14
  <% form_url = admin_taxonomy_taxon_path(@taxonomy.id, @taxon.id) %>
15
15
  <%= form_for [:admin, @taxonomy, @taxon], :method => :put, :url => form_url, :html => { :multipart => true } do |f| %>
16
16
  <%= render 'form', :f => f %>
@@ -12,59 +12,14 @@
12
12
 
13
13
  <h6 class="variant-name">{{variant.name}}</h6>
14
14
 
15
- <ul class='variant-data'>
16
- <li class='variant-sku'><strong><%= Spree.t(:sku) %>:</strong> {{variant.sku}}</li>
17
- </ul>
18
-
19
15
  {{#if variant.option_values}}
20
- <ul class='variant-options'>
21
- {{#each variant.option_values}}
22
- <li><strong>{{this.option_type.presentation}}:</strong> {{this.presentation}}</li>
23
- {{/each}}
24
- </ul>
16
+ {{#each variant.option_values}}
17
+ <strong>{{this.option_type_presentation}}:</strong> {{this.presentation}}<br>
18
+ {{/each}}
25
19
  {{/if}}
20
+
21
+ <strong><%= Spree.t(:sku) %>:</strong> {{variant.sku}}
26
22
 
27
23
  </div>
28
24
  </div>
29
- </script>
30
-
31
- <script type='text/template' id='variant_autocomplete_stock_template'>
32
- <fieldset>
33
- <legend align="center"><%= Spree.t(:select_stock) %></legend>
34
- <table class="stock-levels" data-hook="stock-levels">
35
- <colgroup>
36
- <col style="width: 30%;" />
37
- <col style="width: 40%;" />
38
- <col style="width: 20%;" />
39
- <col style="width: 10%;" />
40
- </colgroup>
41
- <thead>
42
- <th><%= Spree.t(:location) %></th>
43
- <th><%= Spree.t(:count_on_hand) %></th>
44
- <th><%= Spree.t(:quantity) %></th>
45
- <th class="actions"></th>
46
- </thead>
47
- <tbody>
48
- {{#each variant.stock_items}}
49
- <tr>
50
- <td>{{this.stock_location_name}}</td>
51
- {{#if this.available}}
52
- <td>
53
- {{this.count_on_hand}}
54
- {{#if this.backorderable}} (<%= Spree.t(:backorders_allowed) %>) {{/if}}
55
- </td>
56
- <td>
57
- <input class="quantity" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
58
- </td>
59
- <td class="actions">
60
- <button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add"></button>
61
- </td>
62
- {{else}}
63
- <td><%= Spree.t(:out_of_stock) %></td>
64
- <td>0</td>
65
- {{/if}}
66
- </tr>
67
- {{/each}}
68
- </tbody>
69
- </fieldset>
70
- </script>
25
+ </script>
@@ -0,0 +1,41 @@
1
+
2
+ <script type='text/template' id='variant_autocomplete_stock_template'>
3
+ <fieldset>
4
+ <legend align="center"><%= Spree.t(:select_stock) %></legend>
5
+ <table class="stock-levels" data-hook="stock-levels">
6
+ <colgroup>
7
+ <col style="width: 30%;" />
8
+ <col style="width: 40%;" />
9
+ <col style="width: 20%;" />
10
+ <col style="width: 10%;" />
11
+ </colgroup>
12
+ <thead>
13
+ <th><%= Spree.t(:location) %></th>
14
+ <th><%= Spree.t(:count_on_hand) %></th>
15
+ <th><%= Spree.t(:quantity) %></th>
16
+ <th class="actions"></th>
17
+ </thead>
18
+ <tbody>
19
+ {{#each variant.stock_items}}
20
+ <tr>
21
+ <td>{{this.stock_location_name}}</td>
22
+ {{#if this.available}}
23
+ <td>
24
+ {{this.count_on_hand}}
25
+ {{#if this.backorderable}} (<%= Spree.t(:backorders_allowed) %>) {{/if}}
26
+ </td>
27
+ <td>
28
+ <input class="quantity" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
29
+ </td>
30
+ <td class="actions">
31
+ <button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add"></button>
32
+ </td>
33
+ {{else}}
34
+ <td><%= Spree.t(:out_of_stock) %></td>
35
+ <td>0</td>
36
+ {{/if}}
37
+ </tr>
38
+ {{/each}}
39
+ </tbody>
40
+ </fieldset>
41
+ </script>
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
- Spree::Core::Engine.routes.draw do
1
+ Spree::Core::Engine.add_routes do
2
2
  get '/admin', :to => 'admin/orders#index', :as => :admin
3
3
 
4
4
  namespace :admin do
@@ -5,16 +5,6 @@ module Spree
5
5
 
6
6
  config.autoload_paths += %W(#{config.root}/lib)
7
7
 
8
- # We need to reload the routes here due to how Spree sets them up.
9
- # The different facets of Spree (auth, promo, etc.) append/prepend routes to Backend
10
- # *after* Backend has been loaded.
11
- #
12
- # So we wait until after initialization is complete to do one final reload.
13
- # This then makes the appended/prepended routes available to the application.
14
- config.after_initialize do
15
- Rails.application.routes_reloader.reload!
16
- end
17
-
18
8
  initializer "spree.backend.environment", :before => :load_config_initializers do |app|
19
9
  Spree::Backend::Config = Spree::BackendConfiguration.new
20
10
  end
@@ -4,9 +4,9 @@
4
4
  * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
5
5
  */
6
6
 
7
- .jstree-apple > ul { background:url("bg.jpg") left top repeat; }
8
- .jstree-apple li,
9
- .jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
7
+ .jstree-apple > ul { background:image-url("jquery.jstree/themes/apple/bg.jpg") left top repeat; }
8
+ .jstree-apple li,
9
+ .jstree-apple ins { background-image:image-url("jquery.jstree/themes/apple/d.png"); background-repeat:no-repeat; background-color:transparent; }
10
10
  .jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
11
11
  .jstree-apple li.jstree-last { background:transparent; }
12
12
  .jstree-apple .jstree-open > ins { background-position:-72px 0; }
@@ -17,11 +17,11 @@
17
17
  .jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
18
18
  .jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
19
19
  .jstree-apple a .jstree-icon { background-position:-56px -20px; }
20
- .jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
20
+ .jstree-apple a.jstree-loading .jstree-icon { background:image-url("jquery.jstree/themes/apple/throbber.gif") center center no-repeat !important; }
21
21
 
22
22
  .jstree-apple.jstree-focused { background:white; }
23
23
 
24
- .jstree-apple .jstree-no-dots li,
24
+ .jstree-apple .jstree-no-dots li,
25
25
  .jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
26
26
  .jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
27
27
  .jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
@@ -40,22 +40,22 @@
40
40
  .jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
41
41
 
42
42
  #vakata-dragged.jstree-apple ins { background:transparent !important; }
43
- /*#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }*/
44
- /*#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }*/
45
- /*#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }*/
43
+ /*#vakata-dragged.jstree-apple .jstree-ok { background:image-url("jquery.jstree/themes/apple/d.png") -2px -53px no-repeat !important; }*/
44
+ /*#vakata-dragged.jstree-apple .jstree-invalid { background:image-url("jquery.jstree/themes/apple/d.png") -18px -53px no-repeat !important; }*/
45
+ /*#jstree-marker.jstree-apple { background:image-url("jquery.jstree/themes/apple/d.png") -41px -57px no-repeat !important; text-indent:-100px; }*/
46
46
 
47
47
  .jstree-apple a.jstree-search { color:aqua; }
48
48
  .jstree-apple .jstree-locked a { color:silver; cursor:default; }
49
49
 
50
- #vakata-contextmenu.jstree-apple-context,
50
+ #vakata-contextmenu.jstree-apple-context,
51
51
  #vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
52
52
  #vakata-contextmenu.jstree-apple-context li { }
53
53
  #vakata-contextmenu.jstree-apple-context a { color:black; }
54
- #vakata-contextmenu.jstree-apple-context a:hover,
54
+ #vakata-contextmenu.jstree-apple-context a:hover,
55
55
  #vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -webkit-border-radius:2px; border-radius:2px; }
56
- #vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
56
+ #vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
57
57
  #vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
58
58
  #vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
59
59
  #vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
60
60
 
61
- /* TODO: IE6 support - the `>` selectors */
61
+ /* TODO: IE6 support - the `>` selectors */
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.1.1
4
+ version: 2.1.2
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-09-17 00:00:00.000000000 Z
11
+ date: 2013-10-15 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.1.1
19
+ version: 2.1.2
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.1.1
26
+ version: 2.1.2
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.1.1
33
+ version: 2.1.2
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.1.1
40
+ version: 2.1.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: deface
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +134,7 @@ files:
134
134
  - app/assets/javascripts/admin/option_type_autocomplete.js.erb
135
135
  - app/assets/javascripts/admin/orders/edit.js
136
136
  - app/assets/javascripts/admin/orders/edit_form.js
137
+ - app/assets/javascripts/admin/payments/edit.js.coffee
137
138
  - app/assets/javascripts/admin/payments/new.js
138
139
  - app/assets/javascripts/admin/product_picker.js
139
140
  - app/assets/javascripts/admin/progress.coffee
@@ -143,6 +144,7 @@ files:
143
144
  - app/assets/javascripts/admin/spree_backend.js
144
145
  - app/assets/javascripts/admin/states.js
145
146
  - app/assets/javascripts/admin/stock_management.js.coffee
147
+ - app/assets/javascripts/admin/stock_movement.js.coffee
146
148
  - app/assets/javascripts/admin/stock_transfer.js.coffee
147
149
  - app/assets/javascripts/admin/taxon_autocomplete.js.erb
148
150
  - app/assets/javascripts/admin/taxon_tree_menu.js.coffee
@@ -256,6 +258,7 @@ files:
256
258
  - app/views/spree/admin/countries/_form.html.erb
257
259
  - app/views/spree/admin/countries/edit.html.erb
258
260
  - app/views/spree/admin/countries/index.html.erb
261
+ - app/views/spree/admin/countries/new.html.erb
259
262
  - app/views/spree/admin/general_settings/edit.html.erb
260
263
  - app/views/spree/admin/image_settings/edit.html.erb
261
264
  - app/views/spree/admin/images/_form.html.erb
@@ -429,6 +432,7 @@ files:
429
432
  - app/views/spree/admin/trackers/index.html.erb
430
433
  - app/views/spree/admin/trackers/new.html.erb
431
434
  - app/views/spree/admin/variants/_autocomplete.js.erb
435
+ - app/views/spree/admin/variants/_autocomplete_stock.js.erb
432
436
  - app/views/spree/admin/variants/_form.html.erb
433
437
  - app/views/spree/admin/variants/_split.js.erb
434
438
  - app/views/spree/admin/variants/edit.html.erb
@@ -477,7 +481,7 @@ files:
477
481
  - vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg
478
482
  - vendor/assets/javascripts/jquery.jstree/themes/apple/d.png
479
483
  - vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif
480
- - vendor/assets/javascripts/jquery.jstree/themes/apple/style.css
484
+ - vendor/assets/javascripts/jquery.jstree/themes/apple/style.scss
481
485
  - vendor/assets/javascripts/jquery.jstree/themes/apple/throbber.gif
482
486
  - vendor/assets/javascripts/jquery.powertip.js
483
487
  - vendor/assets/javascripts/jquery.vAlign.js