spree_core 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
- data/app/assets/javascripts/admin/address_states.js +1 -1
- data/app/assets/javascripts/admin/admin.js.erb +18 -13
- data/app/assets/javascripts/admin/calculator.js +2 -2
- data/app/assets/javascripts/admin/checkouts/edit.js +3 -1
- data/app/assets/javascripts/admin/image_settings.js.erb +5 -5
- data/app/assets/javascripts/admin/orders/edit.js +1 -1
- data/app/assets/javascripts/admin/payments/new.js +9 -2
- data/app/assets/javascripts/admin/spree_core.js +13 -1
- data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +2 -1
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +23 -19
- data/app/assets/javascripts/spree.js.coffee +37 -0
- data/app/assets/javascripts/store/checkout.js.coffee +8 -0
- data/app/assets/javascripts/store/product.js.coffee +1 -1
- data/app/assets/javascripts/store/spree_core.js +1 -0
- data/app/assets/stylesheets/admin/components/_sidebar.scss +7 -6
- data/app/assets/stylesheets/admin/components/_states.scss +16 -12
- data/app/assets/stylesheets/admin/globals/_variables.scss +102 -96
- data/app/assets/stylesheets/admin/shared/_forms.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_icons.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_layout.scss +4 -1
- data/app/assets/stylesheets/admin/shared/_tables.scss +8 -0
- data/app/assets/stylesheets/store/screen.css.scss +28 -16
- data/app/assets/stylesheets/store/variables.css.scss +4 -2
- data/app/controllers/spree/admin/adjustments_controller.rb +7 -3
- data/app/controllers/spree/admin/base_controller.rb +10 -5
- data/app/controllers/spree/admin/line_items_controller.rb +3 -2
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -2
- data/app/controllers/spree/admin/orders_controller.rb +2 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +5 -5
- data/app/controllers/spree/admin/shipments_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +96 -0
- data/app/controllers/spree/checkout_controller.rb +18 -7
- data/app/controllers/spree/locale_controller.rb +1 -1
- data/app/controllers/spree/orders_controller.rb +20 -2
- data/app/controllers/spree/taxons_controller.rb +8 -2
- data/app/helpers/spree/admin/images_helper.rb +6 -2
- data/app/helpers/spree/admin/navigation_helper.rb +23 -3
- data/app/helpers/spree/base_helper.rb +9 -5
- data/app/helpers/spree/orders_helper.rb +13 -0
- data/app/helpers/spree/products_helper.rb +9 -4
- data/app/mailers/spree/base_mailer.rb +16 -0
- data/app/mailers/spree/order_mailer.rb +12 -11
- data/app/mailers/spree/shipment_mailer.rb +4 -7
- data/app/mailers/spree/test_mailer.rb +2 -3
- data/app/models/spree/adjustment.rb +1 -1
- data/app/models/spree/app_configuration.rb +9 -3
- data/app/models/spree/calculator/default_tax.rb +5 -1
- data/app/models/spree/calculator/per_item.rb +1 -1
- data/app/models/spree/classification.rb +7 -0
- data/app/models/spree/credit_card.rb +1 -5
- data/app/models/spree/gateway.rb +10 -2
- data/app/models/spree/gateway/bogus.rb +5 -5
- data/app/models/spree/inventory_unit.rb +4 -4
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/order.rb +15 -35
- data/app/models/spree/order/checkout.rb +52 -0
- data/app/models/spree/order_populator.rb +11 -3
- data/app/models/spree/order_updater.rb +3 -4
- data/app/models/spree/payment.rb +23 -1
- data/app/models/spree/payment/processing.rb +18 -5
- data/app/models/spree/payment_method.rb +4 -0
- data/app/models/spree/price.rb +2 -3
- data/app/models/spree/product.rb +12 -4
- data/app/models/spree/product/scopes.rb +29 -16
- data/app/models/spree/return_authorization.rb +1 -1
- data/app/models/spree/shipment.rb +1 -1
- data/app/models/spree/taxon.rb +21 -6
- data/app/models/spree/variant.rb +7 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/countries/index.html.erb +1 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +10 -2
- data/app/views/spree/admin/images/index.html.erb +7 -3
- data/app/views/spree/admin/mail_methods/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_form.html.erb +3 -3
- data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
- data/app/views/spree/admin/orders/index.html.erb +60 -52
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payment_methods/index.html.erb +39 -35
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +10 -10
- data/app/views/spree/admin/products/_form.html.erb +7 -12
- data/app/views/spree/admin/products/index.html.erb +13 -15
- data/app/views/spree/admin/products/new.html.erb +3 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +7 -7
- data/app/views/spree/admin/return_authorizations/edit.html.erb +17 -11
- data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
- data/app/views/spree/admin/return_authorizations/new.html.erb +13 -6
- data/app/views/spree/admin/shared/_alert.html.erb +1 -1
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +6 -2
- data/app/views/spree/admin/shared/_order_details.html.erb +6 -6
- data/app/views/spree/admin/shared/_order_tabs.html.erb +20 -37
- data/app/views/spree/admin/shared/_routes.html.erb +1 -1
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
- data/app/views/spree/admin/shared/_update_order_state.js +1 -1
- data/app/views/spree/admin/shipments/_form.html.erb +24 -24
- data/app/views/spree/admin/shipments/edit.html.erb +13 -13
- data/app/views/spree/admin/shipments/index.html.erb +35 -31
- data/app/views/spree/admin/shipping_methods/index.html.erb +35 -32
- data/app/views/spree/admin/tax_rates/_form.html.erb +2 -1
- data/app/views/spree/admin/taxons/_form.html.erb +17 -0
- data/app/views/spree/admin/taxons/edit.html.erb +3 -1
- data/app/views/spree/admin/trackers/_form.html.erb +2 -2
- data/app/views/spree/admin/trackers/index.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +37 -0
- data/app/views/spree/admin/users/edit.html.erb +28 -0
- data/app/views/spree/admin/users/index.html.erb +53 -0
- data/app/views/spree/admin/users/new.html.erb +23 -0
- data/app/views/spree/admin/users/show.html.erb +21 -0
- data/app/views/spree/admin/variants/edit.html.erb +6 -4
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +4 -4
- data/app/views/spree/admin/zones/index.html.erb +3 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_payment.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +2 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +6 -6
- data/app/views/spree/layouts/spree_application.html.erb +0 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
- data/app/views/spree/orders/_adjustments.html.erb +1 -1
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +1 -1
- data/app/views/spree/payments/_payment.html.erb +16 -0
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_thumbnails.html.erb +3 -3
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_google_analytics.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +10 -24
- data/app/views/spree/shared/_products.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -1
- data/app/views/spree/taxons/show.html.erb +1 -1
- data/config/initializers/check_for_orphaned_preferences.rb +5 -2
- data/config/locales/en.yml +24 -5
- data/config/routes.rb +4 -3
- data/db/default/spree/countries.rb +229 -0
- data/db/default/spree/roles.rb +2 -0
- data/db/default/spree/states.rb +57 -0
- data/db/default/spree/zones.rb +17 -0
- data/db/migrate/20130207155350_add_order_id_index_to_payments.rb +9 -0
- data/db/migrate/20130208032954_add_primary_to_spree_products_taxons.rb +5 -0
- data/db/migrate/20130222032153_add_order_id_index_to_shipments.rb +5 -0
- data/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb +5 -0
- data/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb +5 -0
- data/db/migrate/20130319062004_change_orders_total_precision.rb +8 -0
- data/db/migrate/20130319063911_change_spree_payments_amount_precision.rb +7 -0
- data/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb +7 -0
- data/db/migrate/20130319082943_change_adjustments_amount_precision.rb +7 -0
- data/db/migrate/20130328195253_add_seo_metas_to_taxons.rb +9 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +9 -6
- data/lib/spree/core/calculated_adjustments.rb +1 -1
- data/lib/spree/core/controller_helpers/auth.rb +3 -3
- data/lib/spree/core/controller_helpers/common.rb +1 -11
- data/lib/spree/core/controller_helpers/order.rb +15 -12
- data/lib/spree/core/engine.rb +5 -1
- data/lib/spree/core/mail_interceptor.rb +4 -6
- data/lib/spree/core/mail_settings.rb +52 -23
- data/lib/spree/core/permalinks.rb +1 -3
- data/lib/spree/core/testing_support/authorization_helpers.rb +1 -1
- data/lib/spree/core/testing_support/capybara_ext.rb +30 -0
- data/lib/spree/core/testing_support/common_rake.rb +8 -0
- data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/product_factory.rb +7 -2
- data/lib/spree/core/testing_support/factories/variant_factory.rb +4 -2
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +14 -3
- data/lib/spree/product_filters.rb +1 -1
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +3 -2
- data/vendor/assets/javascripts/jsuri.js +2 -0
- data/vendor/assets/javascripts/modernizr.js +3 -3
- metadata +78 -69
- data/db/default/spree/countries.yml +0 -1589
- data/db/default/spree/roles.yml +0 -5
- data/db/default/spree/states.yml +0 -256
- data/db/default/spree/zone_members.yml +0 -169
- data/db/default/spree/zones.yml +0 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7dcd25bc09eef1fdc85269018277aa954848fb6f
|
4
|
+
data.tar.gz: 6c09d32829e4e87e894c38ce1b14b6b307a97f53
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c3732fd647f46c1089fb737409226e8abc5bc0c255523f33815a8d1908fdd6f188d4cadb2bb8914db22b3bac65ea60aa8714aec919cbed2a8f475318cd9b536
|
7
|
+
data.tar.gz: d09f9087d47758599d36bed4852863a7dd8aadbe6dfa11ce5c279cfd654da291a976c535d0f0b159c0325c9279d6fcca7e44db755c1f70b8a195004d125a7873
|
Binary file
|
@@ -2,7 +2,7 @@ var update_state = function(region) {
|
|
2
2
|
var country = $('span#' + region + 'country .select2').select2('val');
|
3
3
|
var states = state_mapper[country];
|
4
4
|
|
5
|
-
var state_select = $('span#' + region + 'state .select2');
|
5
|
+
var state_select = $('span#' + region + 'state select.select2');
|
6
6
|
var state_input = $('span#' + region + 'state input');
|
7
7
|
|
8
8
|
if(states) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
//= require_self
|
2
|
+
//= require spree
|
2
3
|
//= require admin/handlebar_extensions
|
3
4
|
//= require admin/variant_autocomplete
|
4
5
|
//= require admin/taxon_autocomplete
|
@@ -23,10 +24,12 @@ jQuery(function($) {
|
|
23
24
|
<% # Re-adjusting admin menu during test causes tests to fail,
|
24
25
|
# like states_spec and shipping_methods_spec. Let's not do this. %>
|
25
26
|
<% unless Rails.env.test? %>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
if (Spree.translations) {
|
28
|
+
$('.main-menu-wrapper ul').AdaptiveMenu({
|
29
|
+
text: "<a href='#'><i class='icon-chevron-down'></i> " + Spree.translations.more + "</a>",
|
30
|
+
klass: "dropdown"
|
31
|
+
});
|
32
|
+
}
|
30
33
|
<% end %>
|
31
34
|
|
32
35
|
// Add some tips
|
@@ -111,15 +114,17 @@ $.fn.radioControlsVisibilityOfElement = function(dependentElementSelector){
|
|
111
114
|
}
|
112
115
|
|
113
116
|
handle_date_picker_fields = function(){
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
117
|
+
if (Spree.translations) {
|
118
|
+
$('.datepicker').datepicker({
|
119
|
+
dateFormat: Spree.translations.date_picker,
|
120
|
+
dayNames: Spree.translations.abbr_day_names,
|
121
|
+
dayNamesMin: Spree.translations.abbr_day_names,
|
122
|
+
monthNames: Spree.translations.month_names,
|
123
|
+
prevText: Spree.translations.previous,
|
124
|
+
nextText: Spree.translations.next,
|
125
|
+
showOn: "focus"
|
126
|
+
});
|
127
|
+
}
|
123
128
|
|
124
129
|
// Correctly display range dates
|
125
130
|
$('.date-range-filter .datepicker-from').datepicker('option', 'onSelect', function(selectedDate) {
|
@@ -6,11 +6,11 @@ $(function() {
|
|
6
6
|
if (calculator_select.attr('value') == original_calc_type) {
|
7
7
|
$('div.calculator-settings').show();
|
8
8
|
$('div#calculator-settings-warning').hide();
|
9
|
-
$('.calculator-settings
|
9
|
+
$('.calculator-settings').find('input,textarea').prop("disabled", false);
|
10
10
|
} else {
|
11
11
|
$('div.calculator-settings').hide();
|
12
12
|
$('div#calculator-settings-warning').show();
|
13
|
-
$('.calculator-settings
|
13
|
+
$('.calculator-settings').find('input,textarea').prop("disabled", true);
|
14
14
|
}
|
15
15
|
});
|
16
16
|
})
|
@@ -1,5 +1,7 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
|
2
|
+
if ($('#customer_autocomplete_template').length > 0) {
|
3
|
+
window.customerTemplate = Handlebars.compile($('#customer_autocomplete_template').text());
|
4
|
+
}
|
3
5
|
|
4
6
|
formatCustomerResult = function(customer) {
|
5
7
|
return customerTemplate({
|
@@ -9,31 +9,31 @@ $(document).ready(function() {
|
|
9
9
|
$('#s3_settings, #s3_headers').toggle();
|
10
10
|
});
|
11
11
|
|
12
|
-
$(
|
12
|
+
$(document).on('click', '.destroy_style', function(e) {
|
13
13
|
e.preventDefault();
|
14
14
|
$(this).parent().remove();
|
15
15
|
});
|
16
16
|
|
17
|
-
$(
|
17
|
+
$(document).on('click', '.destroy_new_attachment_styles', function(e) {
|
18
18
|
e.preventDefault();
|
19
19
|
$(this).closest('.new_attachment_styles').remove();
|
20
20
|
});
|
21
21
|
|
22
|
-
$(
|
22
|
+
$(document).on('click', '.destroy_new_s3_headers', function(e) {
|
23
23
|
e.preventDefault();
|
24
24
|
$(this).closest('.new_s3_headers').remove();
|
25
25
|
});
|
26
26
|
|
27
27
|
// Handle adding new styles
|
28
28
|
var styles_hash_index = 1;
|
29
|
-
$(
|
29
|
+
$(document).on('click', '.add_new_style', function(e) {
|
30
30
|
e.preventDefault();
|
31
31
|
$('#new-styles').append(generate_html_for_hash("new_attachment_styles", styles_hash_index));
|
32
32
|
});
|
33
33
|
|
34
34
|
// Handle adding new headers
|
35
35
|
var headers_hash_index = 1;
|
36
|
-
$(
|
36
|
+
$(document).on('click', '.add_header', function(e) {
|
37
37
|
e.preventDefault();
|
38
38
|
$('#headers_list').append(generate_html_for_hash("new_s3_headers", headers_hash_index));
|
39
39
|
});
|
@@ -1,9 +1,16 @@
|
|
1
1
|
$(document).ready(function(){
|
2
|
-
|
2
|
+
|
3
3
|
$("#card_new").radioControlsVisibilityOfElement('#card_form');
|
4
|
-
|
4
|
+
|
5
5
|
$('select.jump_menu').change(function(){
|
6
6
|
window.location = this.options[this.selectedIndex].value;
|
7
7
|
});
|
8
8
|
|
9
|
+
$('#cvv_link').click(function(event){
|
10
|
+
window_name = 'cvv_info';
|
11
|
+
window_options = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1';
|
12
|
+
window.open($(this).attr('href'), window_name, window_options);
|
13
|
+
event.preventDefault();
|
14
|
+
});
|
15
|
+
|
9
16
|
});
|
@@ -14,6 +14,18 @@
|
|
14
14
|
//= require equalize
|
15
15
|
//= require responsive-tables
|
16
16
|
//= require jquery.horizontalNav
|
17
|
+
//= require jsuri
|
17
18
|
//= require_tree .
|
18
19
|
|
19
|
-
var Spree = {
|
20
|
+
var Spree = {
|
21
|
+
// Helper function to take a URL and add query parameters to it
|
22
|
+
// Uses the JSUri library from here: https://code.google.com/p/jsuri/
|
23
|
+
// Thanks to Jake Moffat for the suggestion: https://twitter.com/jakeonrails/statuses/321776992221544449
|
24
|
+
url: function(uri, query) {
|
25
|
+
var uri = new Uri(uri);
|
26
|
+
$.each(query, function (key, value) {
|
27
|
+
uri.addQueryParam(key, value);
|
28
|
+
});
|
29
|
+
return uri;
|
30
|
+
}
|
31
|
+
};
|
@@ -11,7 +11,8 @@ $(document).ready(function() {
|
|
11
11
|
placeholder: Spree.translations.taxon_placeholder,
|
12
12
|
multiple: true,
|
13
13
|
initSelection: function(element, callback) {
|
14
|
-
|
14
|
+
url = Spree.url(Spree.routes.taxon_search, { ids: element.val() })
|
15
|
+
return $.getJSON(url, null, function(data) {
|
15
16
|
return callback(self.cleanTaxons(data));
|
16
17
|
})
|
17
18
|
},
|
@@ -2,7 +2,9 @@
|
|
2
2
|
// variant autocompletion
|
3
3
|
|
4
4
|
$(document).ready(function() {
|
5
|
-
|
5
|
+
if ($('#variant_autocomplete_template').length > 0) {
|
6
|
+
window.variantTemplate = Handlebars.compile($('#variant_autocomplete_template').text());
|
7
|
+
}
|
6
8
|
})
|
7
9
|
|
8
10
|
formatVariantResult = function(variant) {
|
@@ -13,24 +15,26 @@ formatVariantResult = function(variant) {
|
|
13
15
|
}
|
14
16
|
|
15
17
|
$.fn.variantAutocomplete = function() {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
if (Spree.routes) {
|
19
|
+
this.parent().children(".options_placeholder").attr('id', this.parent().data('index'))
|
20
|
+
this.select2({
|
21
|
+
placeholder: "Select a variant",
|
22
|
+
minimumInputLength: 3,
|
23
|
+
ajax: {
|
24
|
+
url: Spree.routes.variants_search,
|
25
|
+
datatype: 'json',
|
26
|
+
data: function(term, page) {
|
27
|
+
return { q: term }
|
28
|
+
},
|
29
|
+
results: function (data, page) {
|
30
|
+
return { results: data }
|
31
|
+
}
|
25
32
|
},
|
26
|
-
|
27
|
-
|
33
|
+
formatResult: formatVariantResult,
|
34
|
+
formatSelection: function (variant) {
|
35
|
+
$(this.element).parent().children('.options_placeholder').html(variant.options_text)
|
36
|
+
return variant.name;
|
28
37
|
}
|
29
|
-
}
|
30
|
-
|
31
|
-
formatSelection: function (variant) {
|
32
|
-
$(this.element).parent().children('.options_placeholder').html(variant.options_text)
|
33
|
-
return variant.name;
|
34
|
-
}
|
35
|
-
})
|
38
|
+
})
|
39
|
+
}
|
36
40
|
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#= require jsuri
|
2
|
+
class window.Spree
|
3
|
+
# Helper function to take a URL and add query parameters to it
|
4
|
+
# Uses the JSUri library from here: https://code.google.com/p/jsuri/
|
5
|
+
# Thanks to Jake Moffat for the suggestion: https://twitter.com/jakeonrails/statuses/321776992221544449
|
6
|
+
@url: (uri, query) ->
|
7
|
+
if uri.path == undefined
|
8
|
+
uri = new Uri(uri)
|
9
|
+
if query
|
10
|
+
$.each query, (key, value) ->
|
11
|
+
uri.addQueryParam(key, value)
|
12
|
+
if Spree.api_key
|
13
|
+
uri.addQueryParam('token', Spree.api_key)
|
14
|
+
return uri
|
15
|
+
|
16
|
+
# Helper method in case people want to call uri rather than url
|
17
|
+
@uri: (uri, query) ->
|
18
|
+
url(uri, query)
|
19
|
+
|
20
|
+
# This function automatically appends the API token
|
21
|
+
# for the user to the end of any URL.
|
22
|
+
# Immediately after, this string is then passed to jQuery.ajax.
|
23
|
+
#
|
24
|
+
# ajax works in two ways in jQuery:
|
25
|
+
#
|
26
|
+
# $.ajax("url", {settings: 'go here'})
|
27
|
+
# or:
|
28
|
+
# $.ajax({url: "url", settings: 'go here'})
|
29
|
+
#
|
30
|
+
# This function will support both of these calls.
|
31
|
+
@ajax: (url_or_settings, settings) ->
|
32
|
+
if (typeof(url_or_settings) == "string")
|
33
|
+
$.ajax(Spree.url(url_or_settings).toString(), settings)
|
34
|
+
else
|
35
|
+
url = url_or_settings['url']
|
36
|
+
delete url_or_settings['url']
|
37
|
+
$.ajax(Spree.url(url).toString(), url_or_settings)
|
@@ -34,6 +34,7 @@ $ ->
|
|
34
34
|
|
35
35
|
state_select.prop('disabled', false).show()
|
36
36
|
state_input.hide().prop 'disabled', true
|
37
|
+
state_para.show()
|
37
38
|
state_span_required.show()
|
38
39
|
else
|
39
40
|
state_select.hide().prop 'disabled', true
|
@@ -74,6 +75,13 @@ $ ->
|
|
74
75
|
($ '#payment_method_' + @value).show() if @checked
|
75
76
|
)
|
76
77
|
|
78
|
+
($ document).on('click', '#cvv_link', (event) ->
|
79
|
+
window_name = 'cvv_info'
|
80
|
+
window_options = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1'
|
81
|
+
window.open(($ this).attr('href'), window_name, window_options)
|
82
|
+
event.preventDefault()
|
83
|
+
)
|
84
|
+
|
77
85
|
# Activate already checked payment method if form is re-rendered
|
78
86
|
# i.e. if user enters invalid data
|
79
87
|
($ 'input[type="radio"]:checked').click()
|
@@ -18,7 +18,7 @@ add_image_handlers = ->
|
|
18
18
|
|
19
19
|
show_variant_images = (variant_id) ->
|
20
20
|
($ 'li.vtmb').hide()
|
21
|
-
($ 'li.
|
21
|
+
($ 'li.tmb-' + variant_id).show()
|
22
22
|
currentThumb = ($ '#' + ($ '#main-image').data('selectedThumbId'))
|
23
23
|
if not currentThumb.hasClass('vtmb-' + variant_id)
|
24
24
|
thumb = ($ ($ 'ul.thumbnails li:visible.vtmb').eq(0))
|
@@ -2,22 +2,23 @@
|
|
2
2
|
//---------------------------------------------------
|
3
3
|
#sidebar {
|
4
4
|
overflow: visible;
|
5
|
-
border-top: 1px solid $color-border;
|
5
|
+
border-top: 1px solid $color-border;
|
6
6
|
margin-top: 17px;
|
7
7
|
|
8
8
|
.sidebar-title {
|
9
9
|
color: $color-2;
|
10
10
|
text-transform: uppercase;
|
11
|
-
text-align: center;
|
11
|
+
text-align: center;
|
12
12
|
font-size: 14px;
|
13
13
|
font-weight: 600;
|
14
|
-
|
14
|
+
|
15
15
|
> span {
|
16
16
|
display: inline;
|
17
|
-
background: #fff;
|
18
|
-
padding: 5px 10px;
|
19
|
-
position: relative;
|
17
|
+
background: #fff;
|
18
|
+
padding: 5px 10px;
|
19
|
+
position: relative;
|
20
20
|
top: -14px;
|
21
|
+
-webkit-font-smoothing: antialiased;
|
21
22
|
}
|
22
23
|
}
|
23
24
|
}
|
@@ -1,21 +1,25 @@
|
|
1
1
|
.state {
|
2
|
-
@include border-radius($border-radius);
|
3
2
|
text-transform: uppercase;
|
4
3
|
font-size: 80%;
|
5
4
|
font-weight: 600;
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
|
6
|
+
&:before {
|
7
|
+
content: '';
|
8
|
+
position: relative;
|
9
|
+
display: inline-block;
|
10
|
+
margin-right: 3px;
|
11
|
+
border-radius: $body-font-size/2;
|
12
|
+
width: $body-font-size - 4px;
|
13
|
+
height: $body-font-size - 4px;
|
14
|
+
}
|
11
15
|
|
12
16
|
@each $state in $states {
|
13
|
-
&.#{$state} {
|
17
|
+
&.#{$state}:before {
|
14
18
|
background-color: get-value($states, $states-bg-colors, $state);
|
15
19
|
|
16
|
-
&, a {
|
17
|
-
|
18
|
-
}
|
20
|
+
// &, a {
|
21
|
+
// color: get-value($states, $states-text-colors, $state);
|
22
|
+
// }
|
19
23
|
}
|
20
24
|
}
|
21
25
|
}
|
@@ -24,7 +28,7 @@ table tbody tr {
|
|
24
28
|
&[class*="state"] td:first-child {
|
25
29
|
border-left-width: 3px;
|
26
30
|
}
|
27
|
-
&.state-complete td:first-child { border-left-color: $color-success }
|
31
|
+
&.state-complete td:first-child { border-left-color: $color-success }
|
28
32
|
&.state-cart td:first-child { border-left-color: very-light($color-notice, 6) }
|
29
33
|
&.state-canceled td:first-child { border-left-color: $color-error }
|
30
|
-
}
|
34
|
+
}
|
@@ -10,125 +10,131 @@ $base-font-family: "Open Sans", "Helvetica Neue", "Helvetica", Helvetica, Arial,
|
|
10
10
|
//--------------------------------------------------------------
|
11
11
|
|
12
12
|
// Basic color palette for admin
|
13
|
-
$color-1:
|
14
|
-
$color-2:
|
15
|
-
$color-3:
|
16
|
-
$color-4:
|
17
|
-
$color-5:
|
18
|
-
$color-6:
|
13
|
+
$color-1: #FFFFFF !default; // White
|
14
|
+
$color-2: #9FC820 !default; // Green
|
15
|
+
$color-3: #5498DA !default; // Light Blue
|
16
|
+
$color-4: #6788A2 !default; // Dark Blue
|
17
|
+
$color-5: #C60F13 !default; // Red
|
18
|
+
$color-6: #FF9300 !default; // Yellow
|
19
19
|
|
20
20
|
// Body base colors
|
21
|
-
$color-body-bg:
|
22
|
-
$color-body-text:
|
23
|
-
$color-headers:
|
24
|
-
$color-link:
|
25
|
-
$color-link-hover:
|
26
|
-
$color-link-active:
|
27
|
-
$color-link-focus:
|
28
|
-
$color-link-visited:
|
29
|
-
$color-border:
|
21
|
+
$color-body-bg: $color-1 !default;
|
22
|
+
$color-body-text: $color-4 !default;
|
23
|
+
$color-headers: $color-4 !default;
|
24
|
+
$color-link: $color-3 !default;
|
25
|
+
$color-link-hover: $color-2 !default;
|
26
|
+
$color-link-active: $color-2 !default;
|
27
|
+
$color-link-focus: $color-2 !default;
|
28
|
+
$color-link-visited: $color-3 !default;
|
29
|
+
$color-border: very-light($color-3, 12) !default;
|
30
30
|
|
31
31
|
// Basic flash colors
|
32
|
-
$color-success:
|
33
|
-
$color-notice:
|
34
|
-
$color-error:
|
32
|
+
$color-success: $color-2 !default;
|
33
|
+
$color-notice: $color-6 !default;
|
34
|
+
$color-error: $color-5 !default;
|
35
35
|
|
36
36
|
// Table colors
|
37
|
-
$color-tbl-odd:
|
38
|
-
$color-tbl-even:
|
39
|
-
$color-tbl-thead:
|
37
|
+
$color-tbl-odd: $color-1 !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
|
-
$color-btn-bg:
|
43
|
-
$color-btn-text:
|
44
|
-
$color-btn-hover-bg:
|
45
|
-
$color-btn-hover-text:
|
42
|
+
$color-btn-bg: $color-3 !default;
|
43
|
+
$color-btn-text: $color-1 !default;
|
44
|
+
$color-btn-hover-bg: $color-2 !default;
|
45
|
+
$color-btn-hover-text: $color-1 !default;
|
46
46
|
|
47
47
|
// Actions colors
|
48
|
-
$color-action-edit-bg:
|
49
|
-
$color-action-edit-brd:
|
50
|
-
$color-action-clone-bg:
|
51
|
-
$color-action-clone-brd:
|
52
|
-
$color-action-remove-bg:
|
53
|
-
$color-action-remove-brd:
|
54
|
-
$color-action-void-bg:
|
55
|
-
$color-action-void-brd:
|
56
|
-
$color-action-capture-bg:
|
57
|
-
$color-action-capture-brd:
|
58
|
-
$color-action-mail-bg:
|
59
|
-
$color-action-mail-brd:
|
48
|
+
$color-action-edit-bg: very-light($color-success, 5 ) !default;
|
49
|
+
$color-action-edit-brd: very-light($color-success, 20 ) !default;
|
50
|
+
$color-action-clone-bg: very-light($color-notice, 5 ) !default;
|
51
|
+
$color-action-clone-brd: very-light($color-notice, 15 ) !default;
|
52
|
+
$color-action-remove-bg: very-light($color-error, 5 ) !default;
|
53
|
+
$color-action-remove-brd: very-light($color-error, 10 ) !default;
|
54
|
+
$color-action-void-bg: very-light($color-error, 10 ) !default;
|
55
|
+
$color-action-void-brd: very-light($color-error, 20 ) !default;
|
56
|
+
$color-action-capture-bg: very-light($color-success, 5 ) !default;
|
57
|
+
$color-action-capture-brd: very-light($color-success, 20 ) !default;
|
58
|
+
$color-action-mail-bg: very-light($color-success, 5 ) !default;
|
59
|
+
$color-action-mail-brd: very-light($color-success, 20 ) !default;
|
60
60
|
|
61
61
|
// Select2 select field colors
|
62
|
-
$color-sel-bg:
|
63
|
-
$color-sel-text:
|
64
|
-
$color-sel-hover-bg:
|
65
|
-
$color-sel-hover-text:
|
62
|
+
$color-sel-bg: $color-3 !default;
|
63
|
+
$color-sel-text: $color-1 !default;
|
64
|
+
$color-sel-hover-bg: $color-2 !default;
|
65
|
+
$color-sel-hover-text: $color-1 !default;
|
66
66
|
|
67
67
|
// Text inputs colors
|
68
|
-
$color-txt-brd:
|
69
|
-
$color-txt-text:
|
70
|
-
$color-txt-hover-brd:
|
68
|
+
$color-txt-brd: $color-border !default;
|
69
|
+
$color-txt-text: $color-3 !default;
|
70
|
+
$color-txt-hover-brd: $color-2 !default;
|
71
71
|
|
72
72
|
// States label colors
|
73
|
-
$color-ste-complete-bg:
|
74
|
-
$color-ste-complete-text:
|
75
|
-
$color-ste-completed-bg:
|
76
|
-
$color-ste-completed-text:
|
77
|
-
$color-ste-sold-bg:
|
78
|
-
$color-ste-sold-text:
|
79
|
-
$color-ste-pending-bg:
|
80
|
-
$color-ste-pending-text:
|
81
|
-
$color-ste-paid-bg:
|
82
|
-
$color-ste-paid-text:
|
83
|
-
$color-ste-shipped-bg:
|
84
|
-
$color-ste-shipped-text:
|
85
|
-
$color-ste-balance_due-bg:
|
86
|
-
$color-ste-balance_due-text:
|
87
|
-
$color-ste-backorder-bg:
|
88
|
-
$color-ste-backorder-text:
|
89
|
-
$color-ste-none-bg:
|
90
|
-
$color-ste-none-text:
|
91
|
-
$color-ste-ready-bg:
|
92
|
-
$color-ste-ready-text:
|
93
|
-
$color-ste-void-bg:
|
94
|
-
$color-ste-void-text:
|
95
|
-
$color-ste-canceled-bg:
|
96
|
-
$color-ste-canceled-text:
|
97
|
-
$color-ste-address-bg:
|
98
|
-
$color-ste-address-text:
|
99
|
-
$color-ste-checkout-bg:
|
100
|
-
$color-ste-checkout-text:
|
101
|
-
$color-ste-cart-bg:
|
102
|
-
$color-ste-cart-text:
|
103
|
-
$color-ste-payment-bg:
|
104
|
-
$color-ste-payment-text:
|
105
|
-
$color-ste-delivery-bg:
|
106
|
-
$color-ste-delivery-text:
|
107
|
-
$color-ste-confirm-bg:
|
108
|
-
$color-ste-confirm-text:
|
73
|
+
$color-ste-complete-bg: $color-success !default;
|
74
|
+
$color-ste-complete-text: $color-1 !default;
|
75
|
+
$color-ste-completed-bg: $color-success !default;
|
76
|
+
$color-ste-completed-text: $color-1 !default;
|
77
|
+
$color-ste-sold-bg: $color-success !default;
|
78
|
+
$color-ste-sold-text: $color-1 !default;
|
79
|
+
$color-ste-pending-bg: $color-notice !default;
|
80
|
+
$color-ste-pending-text: $color-1 !default;
|
81
|
+
$color-ste-paid-bg: $color-success !default;
|
82
|
+
$color-ste-paid-text: $color-1 !default;
|
83
|
+
$color-ste-shipped-bg: $color-success !default;
|
84
|
+
$color-ste-shipped-text: $color-1 !default;
|
85
|
+
$color-ste-balance_due-bg: $color-notice !default;
|
86
|
+
$color-ste-balance_due-text: $color-1 !default;
|
87
|
+
$color-ste-backorder-bg: $color-notice !default;
|
88
|
+
$color-ste-backorder-text: $color-1 !default;
|
89
|
+
$color-ste-none-bg: $color-error !default;
|
90
|
+
$color-ste-none-text: $color-1 !default;
|
91
|
+
$color-ste-ready-bg: $color-success !default;
|
92
|
+
$color-ste-ready-text: $color-1 !default;
|
93
|
+
$color-ste-void-bg: $color-error !default;
|
94
|
+
$color-ste-void-text: $color-1 !default;
|
95
|
+
$color-ste-canceled-bg: $color-error !default;
|
96
|
+
$color-ste-canceled-text: $color-1 !default;
|
97
|
+
$color-ste-address-bg: $color-error !default;
|
98
|
+
$color-ste-address-text: $color-1 !default;
|
99
|
+
$color-ste-checkout-bg: $color-notice !default;
|
100
|
+
$color-ste-checkout-text: $color-1 !default;
|
101
|
+
$color-ste-cart-bg: $color-notice !default;
|
102
|
+
$color-ste-cart-text: $color-1 !default;
|
103
|
+
$color-ste-payment-bg: $color-error !default;
|
104
|
+
$color-ste-payment-text: $color-1 !default;
|
105
|
+
$color-ste-delivery-bg: $color-success !default;
|
106
|
+
$color-ste-delivery-text: $color-1 !default;
|
107
|
+
$color-ste-confirm-bg: $color-error !default;
|
108
|
+
$color-ste-confirm-text: $color-1 !default;
|
109
|
+
$color-ste-backordered-bg: $color-notice !default;
|
110
|
+
$color-ste-backordered-text: $color-1 !default;
|
111
|
+
$color-ste-credit_owed-bg: $color-success !default;
|
112
|
+
$color-ste-credit_owed-text: $color-1 !default;
|
113
|
+
$color-ste-awaiting_return-bg: $color-notice !default;;
|
114
|
+
$color-ste-awaiting_return-text: $color-1 !default;;
|
109
115
|
|
110
116
|
// Avaliable states
|
111
|
-
$states:
|
112
|
-
$states-bg-colors:
|
113
|
-
$states-text-colors:
|
117
|
+
$states: completed, complete, sold, pending, paid, shipped, balance_due, backorder, checkout, cart, address, delivery, payment, confirm, canceled, ready, void, backordered, credit_owed, awaiting_return !default;
|
118
|
+
$states-bg-colors: $color-ste-completed-bg, $color-ste-complete-bg, $color-ste-sold-bg, $color-ste-pending-bg, $color-ste-paid-bg, $color-ste-shipped-bg, $color-ste-balance_due-bg, $color-ste-backorder-bg, $color-ste-checkout-bg, $color-ste-cart-bg, $color-ste-address-bg, $color-ste-delivery-bg, $color-ste-payment-bg, $color-ste-confirm-bg, $color-ste-canceled-bg, $color-ste-ready-bg, $color-ste-void-bg, $color-ste-backordered-bg, $color-ste-credit_owed-bg, $color-ste-awaiting_return-bg !default;
|
119
|
+
$states-text-colors: $color-ste-completed-text, $color-ste-complete-text, $color-ste-sold-text, $color-ste-pending-text, $color-ste-paid-text, $color-ste-shipped-text, $color-ste-balance_due-text, $color-ste-backorder-text, $color-ste-checkout-text, $color-ste-cart-text, $color-ste-address-text, $color-ste-delivery-text, $color-ste-payment-text, $color-ste-confirm-text, $color-ste-canceled-text, $color-ste-ready-text, $color-ste-void-text, $color-ste-backordered-text, $color-ste-credit_owed-text, $color-ste-awaiting_return-text !default;
|
114
120
|
|
115
121
|
// Avaliable actions
|
116
|
-
$actions:
|
117
|
-
$actions-bg-colors:
|
118
|
-
$actions-brd-colors:
|
122
|
+
$actions: edit, clone, remove, void, capture, mail !default;
|
123
|
+
$actions-bg-colors: $color-action-edit-bg, $color-action-clone-bg, $color-action-remove-bg, $color-action-void-bg, $color-action-capture-bg, $color-action-mail-bg !default;
|
124
|
+
$actions-brd-colors: $color-action-edit-brd, $color-action-clone-brd, $color-action-remove-brd, $color-action-void-brd, $color-action-capture-brd, $color-action-mail-brd !default;
|
119
125
|
|
120
126
|
// Sizes
|
121
127
|
//--------------------------------------------------------------
|
122
|
-
$body-font-size:
|
128
|
+
$body-font-size: 13px !default;
|
123
129
|
|
124
|
-
$h6-size:
|
125
|
-
$h5-size:
|
126
|
-
$h4-size:
|
127
|
-
$h3-size:
|
128
|
-
$h2-size:
|
129
|
-
$h1-size:
|
130
|
+
$h6-size: $body-font-size + 2 !default;
|
131
|
+
$h5-size: $h6-size + 2 !default;
|
132
|
+
$h4-size: $h5-size + 2 !default;
|
133
|
+
$h3-size: $h4-size + 2 !default;
|
134
|
+
$h2-size: $h3-size + 2 !default;
|
135
|
+
$h1-size: $h2-size + 2 !default;
|
130
136
|
|
131
|
-
$border-radius:
|
137
|
+
$border-radius: 3px !default;
|
132
138
|
|
133
|
-
$font-weight-bold:
|
134
|
-
$font-weight-normal:
|
139
|
+
$font-weight-bold: 600 !default;
|
140
|
+
$font-weight-normal: 400 !default;
|