caboose-cms 0.5.14 → 0.5.15

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWRhNDZlOGY5YzA5ODcwOTliYmRmMzU3OTMwZmMxNTEzNzM0MmYyNA==
4
+ YmZkN2Y1OTAyYTUwNjIyM2JhYTA4MjIxMmI4NDYyNDg1OWUxNWFhMw==
5
5
  data.tar.gz: !binary |-
6
- ODliZDMwODBmN2Q1ZmZjNjU1YTgwNWRiZGYwMjk1NGM3MmE4NDgyMw==
6
+ YjM1NWE0ZGQyMTg5N2FjOGFjMWM3ODk0N2Q3YzZlYWZhMjE3MzFiNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NmY1MmZhNTU0NTJlMmE3ZDRjZjQ3YjQyYmZmNGE0MTI1Nzg4YjhlNDg2MDY5
10
- NWYyMjgyYmY3YzgwZGU0ODA3MzMwM2QzZDBmN2QxOTg5OThhOWJhMGFjMzMy
11
- ZDNhNjYzMDA5ZDQxZjQ3NTQyMTkzNDg2MWExYWJkMjVlMjU0YmY=
9
+ ZTQ5ZDYyOGRkN2ViNDlkZGYyMDQ1N2U1OTk1ZTYzMmNhYTA2NzY5YmQxNTU1
10
+ NjY5YTlkNmI3OGMwMzBhNzFmMzU3ZmI2M2E1OWRlNWNjMjY5ZDQ0MzkzOWZi
11
+ YmI5NDBiYzViMDVhZGY0NzdkYjg4MDQ4YmEyMjM3YTVlYzJkYzU=
12
12
  data.tar.gz: !binary |-
13
- NWY2OWNiZGVkZTA2ZjFhNWY5Mjg4YjkxMjVkZmI3MzBkNDQyNmNmMTJkMDhk
14
- OGM0MTIwZTdlNDY5NGZlZDk5YWFjNWIzYjAzYjFjNWFiYWZhNjBmZTBiNGU0
15
- NmE4MjM0NzY5MGM3YTQyMWVmYWVjNjEwMzlmMGMxMTM3M2YyNGU=
13
+ ZTdmZTE2NDA2MDc3NmE4NGVmOWIwZGRhZGYzOTYzN2NjMzhmY2EyZGI4MTg3
14
+ YjUxM2QxNDVhZDJjYWExNzRkN2U5YjBhZmMzZWIzZmIxMjY1YWY3ZWYyOWIy
15
+ MjRkMTBiYmY3YzczZGQyZGFmOTNhNDEyZjhhYjRhOGU5MjhlMjc=
@@ -103,13 +103,20 @@ Caboose.Store.Modules.Cart = (function() {
103
103
  if (self.$addToCart.length) self.$addToCart.trigger('added');
104
104
 
105
105
  if (!self.$addToCart.find('.message').length) {
106
- self.$addToCart.append($('<p/>').hide().addClass('message').text('Successfully added to cart'));
106
+ self.$addToCart
107
+ .append($('<div/>').hide().addClass('message')
108
+ .append($('<p/>').text('Successfully added to cart'))
109
+ .append($('<p/>')
110
+ .append($('<a/>').attr('href', '/cart').html('View cart')).append(' | ')
111
+ .append($('<a/>').attr('href', '/checkout').html('Continue to checkout'))
112
+ )
113
+ );
107
114
  self.$addToCart.find('.message').fadeIn();
108
115
  Caboose.Store.Modules.Product.$product.trigger('added-to-cart');
109
116
 
110
- setTimeout(function() {
111
- self.$addToCart.find('.message').fadeOut(function() { $(this).remove() });
112
- }, 1000);
117
+ //setTimeout(function() {
118
+ // self.$addToCart.find('.message').fadeOut(function() { $(this).remove() });
119
+ //}, 5000);
113
120
  }
114
121
  } else {
115
122
  alert(response.errors[0]);
@@ -151,7 +151,7 @@
151
151
  line-height: 1.5;
152
152
  margin: 0;
153
153
  padding: 24px 0;
154
- width: percentage(1/3);
154
+ width: percentage(1/2);
155
155
  text-align: center;
156
156
  &:last-child { border-right: none }
157
157
  p { margin: 0 0 6px }
@@ -166,7 +166,7 @@
166
166
  background: #821413;
167
167
  }
168
168
  }
169
- }
169
+ }
170
170
  @media screen and (max-width: 896px) {
171
171
  > li {
172
172
  float: none;
@@ -3,6 +3,6 @@
3
3
  </div>
4
4
 
5
5
  <% content_for :caboose_js do %>
6
- <%= javascript_include_tag 'caboose/modules/cart' %>
7
- <%= javascript_include_tag 'caboose/modules/product' %>
6
+ <%= javascript_include_tag 'caboose/cart' %>
7
+ <%= javascript_include_tag 'caboose/product' %>
8
8
  <% end %>
@@ -2,49 +2,42 @@
2
2
  <h2>Checkout</h2>
3
3
  <%= raw checkout_nav(1) %>
4
4
 
5
- <section id="checkout-login">
6
- <div class="wrapper" class='login-choices'>
7
- <ul>
8
- <li><p>Already a member </p><button data-login-action="signin" id='signin_button' >Sign in</button></li>
9
- <li><p>Sign up for all of our member benefits </p><button data-login-action="register" id='register_button' >New Customer</button></li>
10
- <li><p>No thanks </p><button data-login-action="guest" id='guest_button' >Continue As Guest</button></li>
11
- </ul>
12
- </div>
13
-
14
- <section id='checkout-login-form'>
15
- <div class="wrapper" id='signin_form_container'>
16
- <form action="/login" method="post" id='signin_form'>
17
- <input name="username" type="text" placeholder="Email" />
18
- <input name="password" type="password" placeholder="Password" />
19
- <input type="submit" value="Submit" />
20
- </form>
5
+ <% if @logged_in_user.id == 1 %>
6
+ <p class='note error'>You are logged in as the admin user. Please <a href='/logout'>logout</a> and complete your order as a different user.</p>
7
+ <% else %>
8
+ <section id="checkout-login">
9
+ <div class="wrapper" class='login-choices'>
10
+ <ul>
11
+ <li><p>Already a member? </p><button data-login-action="signin" id='signin_button' >Sign in</button></li>
12
+ <li><p>Continue as a new customer </p><button data-login-action="register" id='register_button' >New Customer</button></li>
13
+ </ul>
21
14
  </div>
22
15
 
23
- <div class="wrapper" id='register_form_container'>
24
- <form action="/register" method="post" id='register_form'>
25
- <input name="first_name" type="text" placeholder="First Name" />
26
- <input name="last_name" type="text" placeholder="Last Name" />
27
- <input name="email" type="text" placeholder="Email" />
28
- <input name="phone" type="text" placeholder="Phone" />
29
- <input name="pass1" type="password" placeholder="Password" />
30
- <input name="pass2" type="password" placeholder="Confirm Password" />
31
- <input type="submit" value="Submit" />
32
- </form>
33
- </div>
34
-
35
- <div class="wrapper" id='guest_form_container'>
36
- <form action="/checkout/attach-guest" method="post" id='guest_form'>
37
- <input name="email" type="text" placeholder="Email" />
38
- <input name="confirm_email" type="email" placeholder="Confirm email" />
39
- <input type="submit" value="Submit" />
40
- </form>
41
- </div>
42
-
43
- <div class="wrapper">
44
- <div id='message'></div>
45
- </div>
16
+ <section id='checkout-login-form'>
17
+ <div class="constrain" id='signin_form_container'>
18
+ <form action="/login" method="post" id='signin_form'>
19
+ <p><input name="username" type="text" placeholder="Email" /></p>
20
+ <p><input name="password" type="password" placeholder="Password" /></p>
21
+ <p><input type="submit" value="Continue" /></p>
22
+ </form>
23
+ </div>
24
+ <div class="constrain" id='register_form_container'>
25
+ <form action="/register" method="post" id='register_form'></p>
26
+ <p><input name="first_name" type="text" placeholder="First Name" /></p>
27
+ <p><input name="last_name" type="text" placeholder="Last Name" /></p>
28
+ <p><input name="email" type="text" placeholder="Email" /></p>
29
+ <p><input name="phone" type="text" placeholder="Phone" /></p>
30
+ <p><input name="pass1" type="password" placeholder="Password" /></p>
31
+ <p><input name="pass2" type="password" placeholder="Confirm Password" /></p>
32
+ <p><input type="submit" value="Continue" /></p>
33
+ </form>
34
+ </div>
35
+ <div class="wrapper">
36
+ <div id='message'></div>
37
+ </div>
38
+ </section>
46
39
  </section>
47
- </section>
40
+ <% end %>
48
41
 
49
42
  <section id="checkout-continue">
50
43
  <a href="/">return to the store</a>
@@ -2,48 +2,53 @@
2
2
  sa = @order.shipping_address
3
3
  ba = @order.billing_address
4
4
  %>
5
- <div id="checkout">
5
+
6
+ <div id="checkout" class='constrain'>
6
7
  <h2>Checkout</h2>
7
- <%= raw checkout_nav(2) %>
8
- <form action="/checkout/address" method="put" id='address_form'>
9
- <section id="checkout-address">
10
- <div class="wrapper">
11
- <section>
12
- <fieldset id="shipping">
13
- <h3>Shipping Address</h3>
14
- <label><span>First Name </span> <input name="shipping[first_name]" type="text" value="<%= sa ? sa.first_name : "" %>" /></label>
15
- <label><span>Last Name </span> <input name="shipping[last_name]" type="text" value="<%= sa ? sa.last_name : "" %>" /></label>
16
- <label><span>Company </span> <input name="shipping[company]" type="text" value="<%= sa ? sa.company : "" %>" /></label>
17
- <label><span>Address 1 </span> <input name="shipping[address1]" type="text" value="<%= sa ? sa.address1 : "" %>" /></label>
18
- <label><span>Address 2 </span> <input name="shipping[address2]" type="text" value="<%= sa ? sa.address2 : "" %>" /></label>
19
- <label><span>City </span> <input name="shipping[city]" type="text" value="<%= sa ? sa.city : "" %>" /></label>
20
- <label><span>State </span> <select name="shipping[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= sa && sa.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
21
- <label><span>Zip </span> <input name="shipping[zip]" type="text" value="<%= sa ? sa.zip : "" %>" /></label>
22
- <label><input name="use_as_billing" type="checkbox" value="false" /> Use as billing address</label>
23
- </fieldset>
24
- </section>
25
- <section>
26
- <fieldset id="billing">
27
- <h3>Billing Address</h3>
28
- <label><span>First Name </span> <input name="billing[first_name]" type="text" value="<%= ba ? ba.first_name : "" %>" /></label>
29
- <label><span>Last Name </span> <input name="billing[last_name]" type="text" value="<%= ba ? ba.last_name : "" %>" /></label>
30
- <label><span>Company </span> <input name="billing[company]" type="text" value="<%= ba ? ba.company : "" %>" /></label>
31
- <label><span>Address 1 </span> <input name="billing[address1]" type="text" value="<%= ba ? ba.address1 : "" %>" /></label>
32
- <label><span>Address 2 </span> <input name="billing[address2]" type="text" value="<%= ba ? ba.address2 : "" %>" /></label>
33
- <label><span>City </span> <input name="billing[city]" type="text" value="<%= ba ? ba.city : "" %>" /></label>
34
- <label><span>State </span> <select name="billing[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= ba && ba.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
35
- <label><span>Zip </span> <input name="billing[zip]" type="text" value="<%= ba ? ba.zip : "" %>" /></label>
36
- </fieldset>
37
- </section>
38
- </div>
39
- </section>
40
- <section id="checkout-continue">
41
- <div id='message'></div>
42
- <button class="blue">Continue</button>
43
- <em>or</em>
44
- <a href="/">return to the store</a>
45
- </section>
46
- </form>
8
+ <%= raw checkout_nav(2) %>
9
+ <% if @logged_in_user.id == 1 %>
10
+ <p class='note error'>You are logged in as the admin user. Please <a href='/logout'>logout</a> and complete your order as a different user.</p>
11
+ <% else %>
12
+ <form action="/checkout/address" method="put" id='address_form'>
13
+ <section id="checkout-address">
14
+ <div class="wrapper">
15
+ <section>
16
+ <fieldset id="shipping">
17
+ <h3>Shipping Address</h3>
18
+ <label><span>First Name </span> <input name="shipping[first_name]" type="text" value="<%= sa ? sa.first_name : "" %>" /></label>
19
+ <label><span>Last Name </span> <input name="shipping[last_name]" type="text" value="<%= sa ? sa.last_name : "" %>" /></label>
20
+ <label><span>Company </span> <input name="shipping[company]" type="text" value="<%= sa ? sa.company : "" %>" /></label>
21
+ <label><span>Address 1 </span> <input name="shipping[address1]" type="text" value="<%= sa ? sa.address1 : "" %>" /></label>
22
+ <label><span>Address 2 </span> <input name="shipping[address2]" type="text" value="<%= sa ? sa.address2 : "" %>" /></label>
23
+ <label><span>City </span> <input name="shipping[city]" type="text" value="<%= sa ? sa.city : "" %>" /></label>
24
+ <label><span>State </span> <select name="shipping[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= sa && sa.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
25
+ <label><span>Zip </span> <input name="shipping[zip]" type="text" value="<%= sa ? sa.zip : "" %>" /></label>
26
+ <label><input name="use_as_billing" type="checkbox" value="false" /> Use as billing address</label>
27
+ </fieldset>
28
+ </section>
29
+ <section>
30
+ <fieldset id="billing">
31
+ <h3>Billing Address</h3>
32
+ <label><span>First Name </span> <input name="billing[first_name]" type="text" value="<%= ba ? ba.first_name : "" %>" /></label>
33
+ <label><span>Last Name </span> <input name="billing[last_name]" type="text" value="<%= ba ? ba.last_name : "" %>" /></label>
34
+ <label><span>Company </span> <input name="billing[company]" type="text" value="<%= ba ? ba.company : "" %>" /></label>
35
+ <label><span>Address 1 </span> <input name="billing[address1]" type="text" value="<%= ba ? ba.address1 : "" %>" /></label>
36
+ <label><span>Address 2 </span> <input name="billing[address2]" type="text" value="<%= ba ? ba.address2 : "" %>" /></label>
37
+ <label><span>City </span> <input name="billing[city]" type="text" value="<%= ba ? ba.city : "" %>" /></label>
38
+ <label><span>State </span> <select name="billing[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= ba && ba.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
39
+ <label><span>Zip </span> <input name="billing[zip]" type="text" value="<%= ba ? ba.zip : "" %>" /></label>
40
+ </fieldset>
41
+ </section>
42
+ </div>
43
+ </section>
44
+ <section id="checkout-continue">
45
+ <div id='message'></div>
46
+ <button class="blue">Continue</button>
47
+ <em>or</em>
48
+ <a href="/">return to the store</a>
49
+ </section>
50
+ </form>
51
+ <% end %>
47
52
  </div>
48
53
 
49
54
  <%= content_for :caboose_js do %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.14'
2
+ VERSION = '0.5.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.14
4
+ version: 0.5.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry