caboose-cms 0.8.12 → 0.8.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90866b1d7d4c42dfffa6d9e29884127fb63b443f
4
- data.tar.gz: 3b9cd1b1a63ffbf4850de31c88d8c88cf023f6a4
3
+ metadata.gz: e40c5b85defd05c5aef45e26c49e0879fc077c38
4
+ data.tar.gz: 9c1424364435b67824f10d28b7f1fb22d8d9f952
5
5
  SHA512:
6
- metadata.gz: 29c983d4718e404ec587a048799863fdfc8463ed8a2e534d128d7dd29ca4c2133cb7138dcaee7dc2f28f365b9226b44065e7029eb83f6251f2bc5c8def98611b
7
- data.tar.gz: 82e08132ea2f605dd2aace8b53bd45c2603c666caad8707b1c052cdfef17c07e8c34fcef845ca3bb34427f4c4554c37119ee7778ca14374c6c82c80267b94933
6
+ metadata.gz: 7aea2155daee32d211bd21f451ccd5b3c16c64ee5d146ef9831de4cc427e47860bf8ae84a2499edf840056d029e147c0b6b5cd5f22f80d45d8fbe5ab1f89b7eb
7
+ data.tar.gz: 17cd56f7954ef5ac1e11f520a7f37af2ec349d7c1714d8be174b15f191d5ce888c41ad03cb88e9662082352da5af1363666a47aa9ffd3c263a8124e1166221af
@@ -78,15 +78,15 @@ ShippingAddressController.prototype = {
78
78
  id: sa.id,
79
79
  update_url: '/checkout/shipping-address',
80
80
  authenticity_token: that.cc.authenticity_token,
81
- attributes: [
81
+ attributes: [
82
82
  { name: 'first_name' , wrapper_class: 'first_name' , nice_name: 'First Name' , type: 'text' , value: sa.first_name , width: '50%' , fixed_placeholder: false },
83
83
  { name: 'last_name' , wrapper_class: 'last_name' , nice_name: 'Last Name' , type: 'text' , value: sa.last_name , width: '50%' , fixed_placeholder: false },
84
84
  { name: 'company' , wrapper_class: 'company' , nice_name: 'Company' , type: 'text' , value: sa.company , width: '100%' , fixed_placeholder: false },
85
- { name: 'address1' , wrapper_class: 'address1' , nice_name: 'Address 1' , type: 'text' , value: sa.address1 , width: '100%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(); }},
86
- { name: 'address2' , wrapper_class: 'address2' , nice_name: 'Address 2' , type: 'text' , value: sa.address2 , width: '100%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(); }},
87
- { name: 'city' , wrapper_class: 'city' , nice_name: 'City' , type: 'text' , value: sa.city , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(); }},
88
- { name: 'zip' , wrapper_class: 'zip' , nice_name: 'Zip' , type: 'text' , value: sa.zip , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(); }},
89
- { name: 'state' , wrapper_class: 'state' , nice_name: 'State' , type: 'select' , value: sa.state , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(); }, options_url: '/checkout/state-options', show_empty_option: true, empty_text: '-- State --' }
85
+ { name: 'address1' , wrapper_class: 'address1' , nice_name: 'Address 1' , type: 'text' , value: sa.address1 , width: '100%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(function() { that.cc.print_ready_message(); }); }},
86
+ { name: 'address2' , wrapper_class: 'address2' , nice_name: 'Address 2' , type: 'text' , value: sa.address2 , width: '100%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(function() { that.cc.print_ready_message(); }); }},
87
+ { name: 'city' , wrapper_class: 'city' , nice_name: 'City' , type: 'text' , value: sa.city , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(function() { that.cc.print_ready_message(); }); }},
88
+ { name: 'zip' , wrapper_class: 'zip' , nice_name: 'Zip' , type: 'text' , value: sa.zip , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(function() { that.cc.print_ready_message(); }); }},
89
+ { name: 'state' , wrapper_class: 'state' , nice_name: 'State' , type: 'select' , value: sa.state , width: '25%' , fixed_placeholder: false , before_update: function() { this.value_old = this.value_clean; }, after_update: function() { if (this.value != this.value_old) that.cc.refresh_cart(function() { that.cc.print_ready_message(); }); }, options_url: '/checkout/state-options', show_empty_option: true, empty_text: '-- State --' }
90
90
  ]
91
91
  });
92
92
  },
@@ -94,8 +94,17 @@ ShippingAddressController.prototype = {
94
94
  ready: function()
95
95
  {
96
96
  var that = this;
97
- if (that.cc.all_downloadable()) return true;
97
+ if (that.cc.all_downloadable()) return true;
98
98
  if (that.cc.is_empty_address(that.cc.invoice.shipping_address)) return false;
99
+
100
+ var sa = that.cc.invoice.shipping_address;
101
+ if (!sa.first_name || sa.first_name.length == 0) return false;
102
+ if (!sa.last_name || sa.last_name.length == 0) return false;
103
+ if (!sa.address1 || sa.address1.length == 0) return false;
104
+ if (!sa.city || sa.city.length == 0) return false;
105
+ if (!sa.state || sa.state.length == 0) return false;
106
+ if (!sa.zip || sa.zip.length == 0) return false;
107
+
99
108
  return true;
100
109
  }
101
110
  };
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.12'
2
+ VERSION = '0.8.13'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.12
4
+ version: 0.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg