spree_core 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/LICENSE +1 -1
  2. data/app/assets/javascripts/admin/admin.js.erb +1 -1
  3. data/app/assets/javascripts/admin/shipping_methods.js.coffee +1 -1
  4. data/app/assets/javascripts/admin/spree_core.js +1 -0
  5. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +1 -1
  6. data/app/assets/stylesheets/admin/globals/_variables.scss +7 -7
  7. data/app/assets/stylesheets/admin/plugins/font-awesome.scss +2 -2
  8. data/app/assets/stylesheets/admin/shared/_forms.scss +19 -16
  9. data/app/assets/stylesheets/admin/shared/_layout.scss +1 -1
  10. data/app/assets/stylesheets/admin/shared/_typography.scss +10 -10
  11. data/app/assets/stylesheets/store/screen.css.scss +50 -50
  12. data/app/controllers/spree/admin/base_controller.rb +0 -1
  13. data/app/controllers/spree/admin/images_controller.rb +1 -1
  14. data/app/controllers/spree/admin/line_items_controller.rb +1 -0
  15. data/app/controllers/spree/admin/orders_controller.rb +5 -1
  16. data/app/controllers/spree/admin/payments_controller.rb +2 -1
  17. data/app/controllers/spree/admin/products_controller.rb +3 -1
  18. data/app/controllers/spree/admin/resource_controller.rb +15 -4
  19. data/app/controllers/spree/admin/shipments_controller.rb +6 -1
  20. data/app/controllers/spree/admin/taxons_controller.rb +0 -6
  21. data/app/controllers/spree/checkout_controller.rb +0 -4
  22. data/app/controllers/spree/locale_controller.rb +2 -2
  23. data/app/controllers/spree/orders_controller.rb +1 -1
  24. data/app/helpers/spree/admin/base_helper.rb +9 -1
  25. data/app/helpers/spree/admin/images_helper.rb +14 -0
  26. data/app/helpers/spree/admin/products_helper.rb +1 -1
  27. data/app/helpers/spree/base_helper.rb +3 -3
  28. data/app/models/spree/ability.rb +2 -6
  29. data/app/models/spree/address.rb +6 -1
  30. data/app/models/spree/legacy_user.rb +11 -0
  31. data/app/models/spree/log_entry.rb +11 -0
  32. data/app/models/spree/order.rb +11 -5
  33. data/app/models/spree/order_populator.rb +2 -2
  34. data/app/models/spree/order_updater.rb +11 -11
  35. data/app/models/spree/payment/processing.rb +2 -2
  36. data/app/models/spree/payment.rb +20 -1
  37. data/app/models/spree/payment_method.rb +10 -3
  38. data/app/models/spree/preference.rb +0 -29
  39. data/app/models/spree/preferences/store.rb +4 -10
  40. data/app/models/spree/product/scopes.rb +2 -2
  41. data/app/models/spree/product.rb +2 -5
  42. data/app/models/spree/product_property.rb +3 -1
  43. data/app/models/spree/property.rb +0 -2
  44. data/app/models/spree/return_authorization.rb +1 -1
  45. data/app/models/spree/shipment.rb +1 -1
  46. data/app/models/spree/variant.rb +1 -1
  47. data/app/views/spree/admin/general_settings/edit.html.erb +2 -2
  48. data/app/views/spree/admin/images/index.html.erb +6 -33
  49. data/app/views/spree/admin/orders/_form.html.erb +1 -1
  50. data/app/views/spree/admin/payment_methods/_form.html.erb +4 -0
  51. data/app/views/spree/admin/payment_methods/index.html.erb +3 -1
  52. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +5 -1
  53. data/app/views/spree/admin/product_properties/index.html.erb +2 -2
  54. data/app/views/spree/admin/products/_form.html.erb +1 -6
  55. data/app/views/spree/admin/products/edit.html.erb +4 -1
  56. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  57. data/app/views/spree/admin/prototypes/select.js.erb +2 -2
  58. data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
  59. data/app/views/spree/admin/shared/_tabs.html.erb +1 -1
  60. data/app/views/spree/admin/shared/_translations.html.erb +1 -1
  61. data/app/views/spree/admin/shipments/_form.html.erb +1 -1
  62. data/app/views/spree/admin/shipping_methods/_form.html.erb +3 -3
  63. data/app/views/spree/admin/taxonomies/get_children.json.erb +1 -1
  64. data/app/views/spree/admin/variants/_autocomplete.js.erb +1 -1
  65. data/app/views/spree/shared/_order_details.html.erb +1 -1
  66. data/config/routes.rb +5 -1
  67. data/db/migrate/20121031162139_split_prices_from_variants.rb +1 -1
  68. data/db/migrate/20130114053446_add_display_on_to_spree_payment_methods.rb +9 -0
  69. data/db/migrate/20130120201805_add_position_to_product_properties.spree.rb +6 -0
  70. data/db/migrate/20130203232234_add_identifier_to_spree_payments.rb +5 -0
  71. data/lib/generators/spree/install/install_generator.rb +4 -1
  72. data/lib/spree/core/controller_helpers/common.rb +3 -3
  73. data/lib/spree/core/controller_helpers.rb +13 -0
  74. data/lib/spree/core/engine.rb +7 -4
  75. data/lib/spree/core/permalinks.rb +1 -1
  76. data/lib/spree/core/ssl_requirement.rb +1 -1
  77. data/lib/spree/core/testing_support/authorization_helpers.rb +5 -2
  78. data/lib/spree/core/testing_support/bar_ability.rb +17 -0
  79. data/lib/spree/core/testing_support/factories/product_factory.rb +4 -2
  80. data/lib/spree/core/testing_support/factories/variant_factory.rb +9 -3
  81. data/lib/spree/core/testing_support/preferences.rb +12 -6
  82. data/lib/spree/core/version.rb +1 -1
  83. data/lib/spree/core.rb +1 -1
  84. data/lib/spree/scopes/dynamic.rb +1 -1
  85. data/lib/tasks/core.rake +3 -3
  86. data/vendor/assets/javascripts/jquery-migrate-1.0.0.js +498 -0
  87. metadata +14 -7
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2012, Spree Commerce, Inc. and other contributors
1
+ Copyright (c) 2007-2013, Spree Commerce, Inc. and other contributors
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification,
@@ -271,7 +271,7 @@ $(document).ready(function(){
271
271
  $("table.sortable tr:odd").removeClass("odd even").addClass("odd");
272
272
  }
273
273
 
274
- }).disableSelection();
274
+ });
275
275
  });
276
276
 
277
277
  $('a.dismiss').click(function() {
@@ -1,5 +1,5 @@
1
1
  $ ->
2
- ($ 'input[type=checkbox]:not(:checked)').attr 'disabled', true if ($ '.categories input:checked').length > 0
2
+ ($ 'fieldset.categories input[type=checkbox]:not(:checked)').attr 'disabled', true if ($ '.categories input:checked').length > 0
3
3
  categoryCheckboxes = '.categories input[type=checkbox]'
4
4
  $(categoryCheckboxes).change ->
5
5
  if ($ this).is(':checked')
@@ -1,3 +1,4 @@
1
+ //= require jquery-migrate-1.0.0
1
2
  //= require jquery-ui
2
3
  //= require modernizr
3
4
  //= require jquery.cookie
@@ -6,7 +6,7 @@ $(document).ready(function() {
6
6
  })
7
7
 
8
8
  formatVariantResult = function(variant) {
9
- if (variant["images"][0] != undefined) {
9
+ if (variant["images"][0] != undefined && variant["images"][0].image != undefined) {
10
10
  variant.image = variant.images[0].image.mini_url
11
11
  }
12
12
  return variantTemplate({ variant: variant })
@@ -12,7 +12,7 @@ $base-font-family: "Open Sans", "Helvetica Neue", "Helvetica", Helvetica, Arial,
12
12
  // Basic color palette for admin
13
13
  $color-1: #FFFFFF !default; // White
14
14
  $color-2: #9FC820 !default; // Green
15
- $color-3: #5FA5E8 !default; // Light Blue
15
+ $color-3: #5498DA !default; // Light Blue
16
16
  $color-4: #6788A2 !default; // Dark Blue
17
17
  $color-5: #C60F13 !default; // Red
18
18
  $color-6: #FF9300 !default; // Yellow
@@ -26,7 +26,7 @@ $color-link-hover: $color-2 !default;
26
26
  $color-link-active: $color-2 !default;
27
27
  $color-link-focus: $color-2 !default;
28
28
  $color-link-visited: $color-3 !default;
29
- $color-border: very-light($color-3, 8) !default;
29
+ $color-border: very-light($color-3, 12) !default;
30
30
 
31
31
  // Basic flash colors
32
32
  $color-success: $color-2 !default;
@@ -35,8 +35,8 @@ $color-error: $color-5 !default;
35
35
 
36
36
  // Table colors
37
37
  $color-tbl-odd: $color-1 !default;
38
- $color-tbl-even: very-light($color-3) !default;
39
- $color-tbl-thead: very-light($color-3) !default;
38
+ $color-tbl-even: very-light($color-3, 4) !default;
39
+ $color-tbl-thead: very-light($color-3, 4) !default;
40
40
 
41
41
  // Button colors
42
42
  $color-btn-bg: $color-3 !default;
@@ -66,8 +66,8 @@ $color-sel-hover-text: $color-1 !default;
66
66
 
67
67
  // Text inputs colors
68
68
  $color-txt-brd: $color-border !default;
69
- $color-txt-text: $color-4 !default;
70
- $color-txt-hover-brd: very-light($color-2, 20) !default;
69
+ $color-txt-text: $color-3 !default;
70
+ $color-txt-hover-brd: $color-2 !default;
71
71
 
72
72
  // States label colors
73
73
  $color-ste-complete-bg: $color-success !default;
@@ -131,4 +131,4 @@ $h1-size: $h2-size + 2 !default;
131
131
  $border-radius: 3px !default;
132
132
 
133
133
  $font-weight-bold: 600 !default;
134
- $font-weight-normal: 400 !default;
134
+ $font-weight-normal: 400 !default;
@@ -23,8 +23,8 @@
23
23
  */
24
24
  @font-face {
25
25
  font-family: "FontAwesome";
26
- src: url('/assets/fontawesome-webfont.eot');
27
- src: url('/assets/fontawesome-webfont.eot?#iefix') format('eot'), url('/assets/fontawesome-webfont.woff') format('woff'), url('/assets/fontawesome-webfont.ttf') format('truetype'), url('/assets/fontawesome-webfont.svg#FontAwesome') format('svg');
26
+ src: font-url('fontawesome-webfont.eot');
27
+ src: font-url('fontawesome-webfont.eot?#iefix') format('eot'),font-url('fontawesome-webfont.woff') format('woff'), font-url('fontawesome-webfont.ttf') format('truetype'), font-url('fontawesome-webfont.svg#FontAwesome') format('svg');
28
28
  font-weight: normal;
29
29
  font-style: normal;
30
30
  }
@@ -9,9 +9,9 @@ input[type="number"],
9
9
  input[type="tel"],
10
10
  textarea, fieldset {
11
11
  @include border-radius($border-radius);
12
- padding: 7px 10px;
12
+ padding: 7px 10px;
13
13
  border: 1px solid $color-txt-brd;
14
- color: $color-body-text;
14
+ color: $color-txt-text;
15
15
  font-size: 90%;
16
16
 
17
17
  &:focus {
@@ -47,13 +47,13 @@ label {
47
47
 
48
48
  .label-block label { display: block }
49
49
 
50
- input[type="submit"],
51
- input[type="button"],
50
+ input[type="submit"],
51
+ input[type="button"],
52
52
  button, .button {
53
53
  @include border-radius($border-radius);
54
54
  display: inline-block;
55
55
  padding: 8px 15px;
56
- border: none;
56
+ border: none;
57
57
  background-color: $color-btn-bg;
58
58
  color: $color-btn-text;
59
59
  text-transform: uppercase;
@@ -67,7 +67,7 @@ button, .button {
67
67
  color: $color-btn-hover-text;
68
68
  }
69
69
 
70
- &:active:focus {
70
+ &:active:focus {
71
71
  box-shadow: 0 0 8px 0 darken($color-btn-hover-bg, 5) inset;
72
72
  }
73
73
 
@@ -91,7 +91,7 @@ span.info {
91
91
 
92
92
  &.checkbox {
93
93
  min-height: 73px;
94
-
94
+
95
95
  input[type="checkbox"] {
96
96
  display: inline-block;
97
97
  width: auto;
@@ -117,13 +117,16 @@ span.info {
117
117
  font-weight: normal;
118
118
  text-transform: none;
119
119
  }
120
+ &.white-space-nowrap {
121
+ white-space: nowrap;
122
+ }
120
123
  }
121
124
  }
122
125
 
123
126
  &.withError {
124
127
  .field_with_errors {
125
- label {
126
- color: very-light($color-error, 30);
128
+ label {
129
+ color: very-light($color-error, 30);
127
130
  }
128
131
 
129
132
  input {
@@ -145,14 +148,14 @@ fieldset {
145
148
  -webkit-box-sizing: border-box;
146
149
  -moz-box-sizing: border-box;
147
150
  margin-left: 0;
148
- margin-right: 0;
149
- position: relative;
151
+ margin-right: 0;
152
+ position: relative;
150
153
  margin-bottom: 35px;
151
154
  padding: 10px 0 15px 0;
152
155
  background-color: transparent;
153
156
  border-left: none;
154
157
  border-right: none;
155
- border-radius: 0;
158
+ border-radius: 0;
156
159
 
157
160
  &.no-border-bottom {
158
161
  border-bottom: none;
@@ -165,8 +168,8 @@ fieldset {
165
168
  }
166
169
 
167
170
  legend {
168
- background-color: $color-1;
169
- color: $color-2;
171
+ background-color: $color-1;
172
+ color: $color-2;
170
173
  font-size: 14px;
171
174
  font-weight: 600;
172
175
  text-transform: uppercase;
@@ -175,7 +178,7 @@ fieldset {
175
178
  }
176
179
 
177
180
  label {
178
- color: lighten($color-body-text, 15);
181
+ color: lighten($color-body-text, 5);
179
182
  }
180
183
 
181
184
  .filter-actions {
@@ -189,7 +192,7 @@ fieldset {
189
192
 
190
193
  button, .button, input[type="submit"], input[type="button"], span.or {
191
194
  @include border-radius($border-radius);
192
-
195
+
193
196
  -webkit-box-shadow: 0 0 0 15px $color-1;
194
197
  -moz-box-shadow: 0 0 0 15px $color-1;
195
198
  -ms-box-shadow: 0 0 0 15px $color-1;
@@ -60,7 +60,7 @@
60
60
 
61
61
  #content-header {
62
62
  padding: 15px 0;
63
- background-color: very-light($color-3);
63
+ background-color: very-light($color-3, 4);
64
64
  border-bottom: 1px solid $color-border;
65
65
 
66
66
  .page-title {
@@ -22,7 +22,7 @@ strong, b {
22
22
 
23
23
  // links
24
24
  //--------------------------------------------------------------
25
- a {
25
+ a {
26
26
  color: $color-link;
27
27
  text-decoration: none;
28
28
  line-height: inherit;
@@ -31,18 +31,18 @@ a {
31
31
  outline: none;
32
32
  }
33
33
 
34
- &:hover {
35
- color: $color-link-hover;
36
- }
37
- &:active {
38
- color: $color-link-active;
39
- }
40
34
  &:visited {
41
35
  color: $color-link-visited;
42
36
  }
43
37
  &:focus {
44
38
  color: $color-link-focus;
45
39
  }
40
+ &:active {
41
+ color: $color-link-active;
42
+ }
43
+ &:hover {
44
+ color: $color-link-hover;
45
+ }
46
46
  }
47
47
 
48
48
  // Headings
@@ -50,8 +50,8 @@ a {
50
50
 
51
51
  h1,h2,h3,h4,h5,h6 {
52
52
  font-weight: 600;
53
- color: $color-headers;
54
- line-height: 1.1;
53
+ color: $color-headers;
54
+ line-height: 1.1;
55
55
  }
56
56
 
57
57
  h1 { font-size: $h1-size; line-height: $h1-size + 6 }
@@ -129,4 +129,4 @@ dl {
129
129
  text-transform: uppercase;
130
130
  padding: 40px 0px;
131
131
  color: lighten($color-body-text, 15);
132
- }
132
+ }
@@ -1,14 +1,14 @@
1
1
  @import "./variables.css.scss"; // Must call explicit path or else extension integration tests cannot import file.
2
2
 
3
3
  /*--------------------------------------*/
4
- /* Basic styles
4
+ /* Basic styles
5
5
  /*--------------------------------------*/
6
6
  body {
7
7
  font-family: $ff_base;
8
8
  font-size: $base_font_size;
9
9
  font-weight: 400;
10
10
  color: $body_text_color;
11
- line-height: 18px;
11
+ line-height: 18px;
12
12
  background-color: $layout_background_color;
13
13
  -webkit-font-smoothing: antialiased;
14
14
  }
@@ -24,10 +24,10 @@ hr {
24
24
 
25
25
  /* Custom text-selection colors (remove any text shadows: twitter.com/miketaylr/status/12228805301) */
26
26
  ::-moz-selection{background: $link_text_color; color: $layout_background_color; text-shadow: none;}
27
- ::selection {background: $link_text_color; color: $layout_background_color; text-shadow: none;}
27
+ ::selection {background: $link_text_color; color: $layout_background_color; text-shadow: none;}
28
28
 
29
29
  /* j.mp/webkit-tap-highlight-color */
30
- a:link {-webkit-tap-highlight-color: $link_text_color;}
30
+ a:link {-webkit-tap-highlight-color: $link_text_color;}
31
31
 
32
32
  ins {background-color: $link_text_color; color: $layout_background_color; text-decoration: none;}
33
33
  mark {background-color: $link_text_color; color: $layout_background_color; font-style: italic; font-weight: bold;}
@@ -40,7 +40,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
40
40
  color: $link_text_color;
41
41
 
42
42
  &:hover {
43
- color: darken($link_text_color, 10) !important;
43
+ color: darken($link_text_color, 10);
44
44
  }
45
45
 
46
46
  &:active, &:focus {
@@ -64,7 +64,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
64
64
  }
65
65
  }
66
66
  }
67
-
67
+
68
68
  dl {
69
69
  dt, dd {
70
70
  display: inline-block;
@@ -77,7 +77,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
77
77
  }
78
78
  dt {
79
79
  font-weight: bold;
80
- text-transform: uppercase;
80
+ text-transform: uppercase;
81
81
  }
82
82
  dd {
83
83
  margin-left: -23px;
@@ -94,7 +94,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
94
94
  h5 { font-size: $sub_heading_font_size; line-height: $sub_heading_font_size + 10; }
95
95
  h6 { font-size: $sub_heading_font_size - 2; line-height: $sub_heading_font_size - 2 + 10; }
96
96
 
97
- h1, h2, h3, h4, h5, h6 {
97
+ h1, h2, h3, h4, h5, h6 {
98
98
  font-weight: 700;
99
99
  color: $title_text_color;
100
100
  -webkit-margin-before: 0;
@@ -106,14 +106,14 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
106
106
  /*--------------------------------------*/
107
107
  /* Forms
108
108
  /*--------------------------------------*/
109
- textarea, input[type="date"],
109
+ textarea, input[type="date"],
110
110
  input[type="datetime"], input[type="datetime-local"],
111
111
  input[type="email"], input[type="month"], input[type="number"],
112
112
  input[type="password"], input[type="search"], input[type="tel"],
113
- input[type="text"], input[type="time"], input[type="url"],
113
+ input[type="text"], input[type="time"], input[type="url"],
114
114
  input[type="week"] {
115
115
  border: $default_border;
116
- padding: 5px 10px;
116
+ padding: 5px 10px;
117
117
  font-family: $ff_base;
118
118
  font-size: $input_box_font_size;
119
119
 
@@ -189,7 +189,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
189
189
  background-image: none;
190
190
  background-color: $body_text_color;
191
191
  border-color: $body_text_color;
192
- color: $layout_background_color !important;
192
+ color: $layout_background_color;
193
193
  }
194
194
  }
195
195
 
@@ -197,7 +197,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
197
197
  a.button {
198
198
  line-height: 16px;
199
199
  }
200
- }
200
+ }
201
201
 
202
202
  input[type="checkbox"], label {
203
203
  vertical-align: middle;
@@ -271,7 +271,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
271
271
  a{
272
272
  font-weight: bold;
273
273
  font-size: $header_navigation_font_size;
274
- text-transform: uppercase;
274
+ text-transform: uppercase;
275
275
  }
276
276
  }
277
277
  }
@@ -285,7 +285,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
285
285
  padding-bottom: 6px;
286
286
 
287
287
  li {
288
-
288
+
289
289
  a {
290
290
  font-size: $horizontal_navigation_font_size;
291
291
  padding: 5px;
@@ -439,7 +439,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
439
439
  }
440
440
  &.diff {
441
441
  font-weight: bold;
442
- }
442
+ }
443
443
  }
444
444
 
445
445
  .taxon-title {
@@ -480,7 +480,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
480
480
 
481
481
  .product-image {
482
482
  border: $default_border;
483
- padding: 5px;
483
+ padding: 5px;
484
484
  min-height: 110px;
485
485
  background-color: $product_background_color;
486
486
 
@@ -508,7 +508,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
508
508
 
509
509
  a {
510
510
  color: $link_text_color;
511
- }
511
+ }
512
512
  }
513
513
 
514
514
  .search-results-title {
@@ -656,7 +656,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
656
656
  color: $layout_background_color;
657
657
 
658
658
  &:hover {
659
- color: $layout_background_color !important;
659
+ color: $layout_background_color;
660
660
  }
661
661
  }
662
662
  }
@@ -705,11 +705,11 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
705
705
  #summary-order-total {
706
706
  @extend span.price;
707
707
  font-size: $base_font_size + 2;
708
- }
708
+ }
709
709
  }
710
710
  }
711
711
 
712
- #billing, #shipping, #shipping_method,
712
+ #billing, #shipping, #shipping_method,
713
713
  #payment, #order_details, #order_summary {
714
714
  margin-top: 10px;
715
715
  border: $default_border;
@@ -759,11 +759,11 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
759
759
  font-size: $base_font_size + 4;
760
760
  color: $body_text_color;
761
761
 
762
- tr {
762
+ tr {
763
763
  border-top: 1px solid lighten($body_text_color, 60);
764
-
764
+
765
765
  td {
766
- padding: 10px;
766
+ padding: 10px;
767
767
  }
768
768
  }
769
769
  }
@@ -789,7 +789,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
789
789
  #shipping_method {
790
790
  p {
791
791
  label {
792
- float: left;
792
+ float: left;
793
793
  font-weight: bold;
794
794
  font-size: $base_font_size + 2;
795
795
  margin-right: 40px;
@@ -837,7 +837,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
837
837
  margin-top: 15px;
838
838
  text-align: right;
839
839
  }
840
-
840
+
841
841
  #subtotal {
842
842
  text-align: right;
843
843
  text-transform: uppercase;
@@ -846,12 +846,12 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
846
846
  span.order-total {
847
847
  @extend span.price;
848
848
  }
849
- }
849
+ }
850
850
  }
851
851
 
852
852
  #empty-cart {
853
- margin-top: -75px !important;
854
- float: left !important;
853
+ margin-top: -75px;
854
+ float: left;
855
855
  }
856
856
 
857
857
  /*--------------------------------------*/
@@ -865,7 +865,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
865
865
 
866
866
  #registration {
867
867
  h6 {
868
- text-transform: uppercase;
868
+ text-transform: uppercase;
869
869
  }
870
870
 
871
871
  #existing-customer {
@@ -931,17 +931,17 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
931
931
  }
932
932
  p[data-hook="use_billing"] {
933
933
  margin-top: -15px;
934
- }
934
+ }
935
935
  }
936
936
 
937
937
  /* All Mobile Sizes (devices and browser) */
938
- @media only screen and (max-width: 767px) {
938
+ @media only screen and (max-width: 767px) {
939
939
 
940
940
  html {
941
941
  -webkit-text-size-adjust: none;
942
942
  }
943
943
 
944
- #order_details .steps-data div.columns,
944
+ #order_details .steps-data div.columns,
945
945
  #order_summary .steps-data div.columns {
946
946
  padding: 0;
947
947
  margin: 0;
@@ -955,8 +955,8 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
955
955
  text-align: center;
956
956
 
957
957
  ul {
958
- padding-left: 0 !important;
959
- list-style: none !important;
958
+ padding-left: 0;
959
+ list-style: none;
960
960
  }
961
961
  }
962
962
 
@@ -972,7 +972,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
972
972
  #order_details, #order {
973
973
  table[data-hook="order_details"] {
974
974
  width: 100%;
975
- }
975
+ }
976
976
  }
977
977
 
978
978
  #update-cart {
@@ -991,11 +991,11 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
991
991
  @media only screen and (min-width: 480px) and (max-width: 767px) {
992
992
 
993
993
  footer#footer {
994
- width: auto !important;
994
+ width: auto;
995
995
  }
996
996
 
997
997
  input, select {
998
- vertical-align: baseline !important;
998
+ vertical-align: baseline;
999
999
  }
1000
1000
 
1001
1001
  figure#logo {
@@ -1042,7 +1042,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1042
1042
  }
1043
1043
  td[data-hook="cart_item_price"], td[data-hook="cart_item_total"],
1044
1044
  td[data-hook="order_item_price"], td[data-hook="order_item_total"] {
1045
- font-size: $base_font_size !important;
1045
+ font-size: $base_font_size;
1046
1046
  }
1047
1047
  td[data-hook="cart_item_image"], td[data-hook="order_item_image"] {
1048
1048
  img {
@@ -1050,7 +1050,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1050
1050
  }
1051
1051
  }
1052
1052
  }
1053
- }
1053
+ }
1054
1054
  }
1055
1055
 
1056
1056
  }
@@ -1058,21 +1058,21 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1058
1058
  @media only screen and (max-width: 767px) {
1059
1059
  #empty-cart {
1060
1060
  clear: both;
1061
- margin-top: 0 !important;
1062
- float: none !important;
1061
+ margin-top: 0;
1062
+ float: none;
1063
1063
  }
1064
1064
  }
1065
-
1065
+
1066
1066
  @media only screen and (min-width: 768px) and (max-width: 959px) {
1067
1067
  .container .offset-by-nine.coupon-code-field {
1068
1068
  padding-left: 380px;
1069
1069
  }
1070
1070
  }
1071
-
1071
+
1072
1072
 
1073
1073
  /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
1074
1074
  @media only screen and (max-width: 479px) {
1075
-
1075
+
1076
1076
  .progress-steps li {
1077
1077
  padding: 0;
1078
1078
  margin: 0;
@@ -1113,10 +1113,10 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1113
1113
  }
1114
1114
  }
1115
1115
  td[data-hook="cart_item_price"], td[data-hook="cart_item_total"] {
1116
- font-size: $base_font_size + 2 !important;
1116
+ font-size: $base_font_size + 2 !important;
1117
1117
  }
1118
1118
  }
1119
- }
1119
+ }
1120
1120
  }
1121
1121
 
1122
1122
  table.order-summary {
@@ -1129,7 +1129,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1129
1129
  tbody tr { display: inline-block; vertical-align: top; }
1130
1130
  td { display: block; min-height: 1.25em; }
1131
1131
  }
1132
-
1132
+
1133
1133
 
1134
1134
  figure#logo {
1135
1135
  text-align: center;
@@ -1153,7 +1153,7 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1153
1153
  text-align: center;
1154
1154
 
1155
1155
  ul {
1156
- padding-left: 0 !important;
1156
+ padding-left: 0;
1157
1157
 
1158
1158
  li {
1159
1159
  list-style-type: none;
@@ -1178,5 +1178,5 @@ mark {background-color: $link_text_color; color: $layout_background_color; font-
1178
1178
  #content {
1179
1179
  text-align: center;
1180
1180
  }
1181
-
1181
+
1182
1182
  }
@@ -17,7 +17,6 @@ module Spree
17
17
  rescue
18
18
  record = Object.new
19
19
  end
20
- authorize! :admin, record
21
20
  authorize! params[:action].to_sym, record
22
21
  end
23
22
 
@@ -14,7 +14,7 @@ module Spree
14
14
  end
15
15
 
16
16
  def load_data
17
- @product = Product.where(:permalink => params[:product_id]).first
17
+ @product = Product.find_by_permalink(params[:product_id])
18
18
  @variants = @product.variants.collect do |variant|
19
19
  [variant.options_text, variant.id]
20
20
  end
@@ -46,6 +46,7 @@ module Spree
46
46
 
47
47
  def load_order
48
48
  @order = Order.find_by_number!(params[:order_id])
49
+ authorize! params[:action], @order
49
50
  end
50
51
 
51
52
  def load_line_item
@@ -34,7 +34,7 @@ module Spree
34
34
  params[:q][:completed_at_lt] = params[:q].delete(:created_at_lt)
35
35
  end
36
36
 
37
- @search = Order.ransack(params[:q])
37
+ @search = Order.accessible_by(current_ability, :index).ransack(params[:q])
38
38
  @orders = @search.result.includes([:user, :shipments, :payments]).
39
39
  page(params[:page]).
40
40
  per(params[:per_page] || Spree::Config[:orders_per_page])
@@ -111,6 +111,7 @@ module Spree
111
111
 
112
112
  def load_order
113
113
  @order = Order.find_by_number!(params[:id], :include => :adjustments) if params[:id]
114
+ authorize! params[:action], @order
114
115
  end
115
116
 
116
117
  # Used for extensions which need to provide their own custom event links on the order details view.
@@ -118,6 +119,9 @@ module Spree
118
119
  @order_events = %w{cancel resume}
119
120
  end
120
121
 
122
+ def model_class
123
+ Spree::Order
124
+ end
121
125
  end
122
126
  end
123
127
  end