effective_orders 1.3.1 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07f1bc7ba763ebd70710187ba1e1399277b761b3
4
- data.tar.gz: 7d988714cd65169a91b79b43b10451467ef03f32
3
+ metadata.gz: 8a3ae1b1bfe46285c18de3ac2cd0c61390b61ff2
4
+ data.tar.gz: b68649dfb3abaf5fe2b622486ccd73fa936cf9e8
5
5
  SHA512:
6
- metadata.gz: d9d05850771be5513ce171927c6421876cc6c0a1aa16600eb1e7994b6526797366ae41f51479859b8b507e475954b2155cf4774db9e4444a2ac8807cbd835896
7
- data.tar.gz: 64eaaba7b0991417169b8bd34d9ffc120221eeab56ca09674d9e9293df7834bd5db489955a64f8e9bcc6f5e57559bb1ef80460dc4930cdae075122e6eb968b4d
6
+ metadata.gz: d5bc0e026ef2836d9b313e3a4be35b28121f7bc90755c71852b7aca41dff746867c1c1f9163eb20b1558aa5240d87fdf627e35f30e264536d7b608fc825daa16
7
+ data.tar.gz: f70043ddaf98f476cad272d82145a5499586ff50d8fd10a016328dd61e8d8cacf4ddbe7574c798541ff9698a228bcf7c48908bfd8781c33564d4ff611322872e
@@ -40,7 +40,7 @@ module EffectiveCartsHelper
40
40
  def link_to_add_to_cart(purchasable, opts = {})
41
41
  raise ArgumentError.new('expecting an acts_as_purchasable object') unless purchasable.respond_to?(:is_effectively_purchasable?)
42
42
 
43
- options = {:class => 'btn', :rel => :nofollow, 'data-disable-with' => 'Add to Cart...'}.merge(opts)
43
+ options = {:class => 'btn', :rel => :nofollow, 'data-disable-with' => 'Adding...'}.merge(opts)
44
44
  options[:class] = ((options[:class] || '') + ' btn-add-to-cart')
45
45
 
46
46
  link_to (options.delete(:label) || 'Add to Cart'), effective_orders.add_to_cart_path(:purchasable_type => purchasable.class.name, :purchasable_id => purchasable.id.to_i), options
@@ -51,9 +51,13 @@ module EffectiveCartsHelper
51
51
 
52
52
  options = {
53
53
  :rel => :nofollow,
54
- :data => {:confirm => 'Are you sure? This cannot be undone!'},
54
+ :data => {
55
+ :confirm => 'Are you sure? This cannot be undone!',
56
+ :disable_with => 'Removing...'
57
+ },
55
58
  :method => :delete
56
59
  }.merge(opts)
60
+
57
61
  options[:class] = ((options[:class] || '') + ' btn-remove-from-cart')
58
62
 
59
63
  link_to (options.delete(:label) || 'Remove'), effective_orders.remove_from_cart_path(cart_item), options
@@ -63,16 +67,25 @@ module EffectiveCartsHelper
63
67
  options = {
64
68
  :rel => :nofollow,
65
69
  :class => 'btn',
66
- :data => {:confirm => 'This will clear your entire cart. Are you sure? This cannot be undone!'},
70
+ :data => {
71
+ :confirm => 'This will clear your entire cart. Are you sure? This cannot be undone!',
72
+ :disable_with => 'Emptying...'
73
+ },
67
74
  :method => :delete
68
75
  }.merge(opts)
76
+
69
77
  options[:class] = ((options[:class] || '') + ' btn-empty-cart btn-danger')
70
78
 
71
79
  link_to (options.delete(:label) || 'Empty Cart'), effective_orders.cart_path, options
72
80
  end
73
81
 
74
82
  def link_to_checkout(opts = {})
75
- options = {:class => 'btn', :rel => :nofollow}.merge(opts)
83
+ options = {
84
+ :class => 'btn',
85
+ :rel => :nofollow,
86
+ :disable_with => 'Proceeding...'
87
+ }.merge(opts)
88
+
76
89
  options[:class] = ((options[:class] || '') + ' btn-checkout')
77
90
 
78
91
  link_to (options.delete(:label) || 'Proceed to Checkout'), effective_orders.new_order_path, options
@@ -1,7 +1,10 @@
1
1
  %h2 Customers
2
2
 
3
+ %p.text-right= link_to 'Stripe Dashboard: Customers', 'https://manage.stripe.com/customers', :class => 'btn btn-primary'
4
+
3
5
  = render_datatable @datatable do
4
6
  %p There are no customers
5
7
 
6
- %hr
7
- %p= link_to 'Stripe Dashboard: Customers', 'https://manage.stripe.com/customers', :class => 'btn btn-primary'
8
+ - if @datatable.present?
9
+ %p.text-right= link_to 'Stripe Dashboard: Customers', 'https://manage.stripe.com/customers', :class => 'btn btn-primary'
10
+
@@ -38,6 +38,6 @@
38
38
 
39
39
  .text-right
40
40
  - if order.total == 0 && EffectiveOrders.allow_free_orders
41
- = f.submit 'Checkout', :class => 'btn btn-primary pull-right', :rel => :nofollow, 'data-disable-with' => 'Continuing...'
41
+ = f.submit 'Checkout', :class => 'btn btn-primary pull-right', :rel => :nofollow, :data => {'disable_with' => 'Processing...' }
42
42
  - else
43
- = f.submit 'Continue to Checkout Confirmation', :class => 'btn btn-primary pull-right', :rel => :nofollow, 'data-disable-with' => 'Continuing...'
43
+ = f.submit 'Save and Continue', :class => 'btn btn-primary pull-right', :rel => :nofollow, :data => {'disable_with' => 'Saving...' }
@@ -11,8 +11,8 @@
11
11
  = render :partial => '/effective/orders/stripe/form', :locals => {:order => order}
12
12
 
13
13
  - if EffectiveOrders.allow_pretend_purchase_in_production
14
- = link_to 'Process Order', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary'
14
+ = link_to 'Purchase Order', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary', :data => {'disable_with' => 'Purchasing...' }
15
15
  %p= EffectiveOrders.allow_pretend_purchase_in_production_message
16
16
  - elsif Rails.env.development?
17
- = link_to 'Process Order (development only)', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary'
17
+ = link_to 'Purchase Order (development only)', effective_orders.pretend_purchase_path(order, :purchased_redirect_url => purchased_redirect_url, :declined_redirect_url => declined_redirect_url), :class => 'btn btn-primary', :data => {'disable_with' => 'Purchasing...' }
18
18
 
@@ -34,4 +34,4 @@
34
34
  = hidden_field_tag(:bill_postal_code, address.postal_code)
35
35
  = hidden_field_tag(:bill_country, address.country)
36
36
 
37
- = submit_tag 'Checkout with Moneris', :class => 'btn btn-primary'
37
+ = submit_tag 'Checkout with Moneris', :class => 'btn btn-primary', :data => {'disable_with' => 'Proceeding to Moneris...' }
@@ -2,4 +2,4 @@
2
2
  = hidden_field_tag :cmd, '_s-xclick'
3
3
  = hidden_field_tag :encrypted, paypal_encrypted_payload(order)
4
4
 
5
- = submit_tag 'Checkout with PayPal', :class => 'btn btn-primary'
5
+ = submit_tag 'Checkout with PayPal', :class => 'btn btn-primary', :data => {'disable_with' => 'Proceeding to PayPal...' }
@@ -7,7 +7,7 @@
7
7
  %p.pull-right
8
8
  %a.btn.btn-default{'data-role' => 'print-button', :class => 'print-button', :onClick => "window.print(); false;"} Print
9
9
  - if @order.purchased?
10
- = link_to 'Resend Receipt', effective_orders.resend_buyer_receipt_path(@order), 'data-confirm' => 'This action will email you a copy of the original email receipt. Send receipt now?', :class => 'btn btn-default'
10
+ = link_to 'Resend Receipt', effective_orders.resend_buyer_receipt_path(@order), :data => {'confirm' => 'This action will email you a copy of the original email receipt. Send receipt now?', 'disable_with' => 'Resending...'}, :class => 'btn btn-default'
11
11
 
12
12
  = render @order
13
13
 
@@ -13,4 +13,5 @@
13
13
  = ')'
14
14
  - else
15
15
  %p You have no subscriptions
16
- %p= link_to 'New Subscription', effective_orders.new_subscription_path
16
+
17
+ %p.text-right= link_to 'New Subscription', effective_orders.new_subscription_path
@@ -46,4 +46,4 @@
46
46
 
47
47
  %h3 Cancel Subscription
48
48
 
49
- = link_to 'Unsubscribe', effective_orders.subscription_path(@plan.id), :data => {:method => :delete, :confirm => 'This will cancel your subscription. Are you sure? This cannot be undone.'}
49
+ = link_to 'Unsubscribe', effective_orders.subscription_path(@plan.id), :data => {:method => :delete, :confirm => 'This will cancel your subscription. Are you sure? This cannot be undone.', :disable_with => 'Unsubscribing...'}
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-11 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails