piggybak_giftcerts 0.0.1 → 0.0.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.
@@ -18,7 +18,7 @@ $(function() {
18
18
  piggybak_giftcerts.apply_giftcert(false);
19
19
  return false;
20
20
  });
21
- $('#submit input').click(function() {
21
+ $('#submit input').unbind('click').click(function(e) {
22
22
  piggybak_giftcerts.apply_giftcert(true);
23
23
  return false;
24
24
  });
@@ -46,7 +46,7 @@ var piggybak_giftcerts = {
46
46
  $('#piggybak_order_line_items_attributes_1_payment_attributes_number').val('');
47
47
  $('#payment').show();
48
48
  }
49
- var totalcost = piggybak.update_totals();
49
+ var totalcost = piggybak.update_totals();
50
50
  $.ajax({
51
51
  url: giftcert_lookup,
52
52
  cached: false,
@@ -70,7 +70,9 @@ var piggybak_giftcerts = {
70
70
  $('#payment').hide();
71
71
  }
72
72
  } else {
73
- $('#giftcert_response').html(data.message).show();
73
+ if($('#giftcert_code').val() != '') {
74
+ $('#giftcert_response').html(data.message).show();
75
+ }
74
76
  piggybak.update_totals();
75
77
  }
76
78
  if(on_submit) {
@@ -1,3 +1,3 @@
1
1
  module PiggybakGiftcerts
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak_giftcerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: -1606422701928900771
134
+ hash: -3575537639470186526
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: -1606422701928900771
143
+ hash: -3575537639470186526
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.23