Commit 22109c9030a923fcc8d10d3bfb5145c125b3a196
1 parent
5b73133b
Exists in
master
and in
29 other branches
Added a 'close' button to the shopping cart checkout
Showing
3 changed files
with
14 additions
and
1 deletions
Show diff stats
plugins/shopping_cart/public/cart.js
@@ -304,6 +304,10 @@ function Cart(config) { | @@ -304,6 +304,10 @@ function Cart(config) { | ||
304 | }); | 304 | }); |
305 | } | 305 | } |
306 | 306 | ||
307 | + Cart.colorbox_close = function() { | ||
308 | + $.colorbox.close(); | ||
309 | + } | ||
310 | + | ||
307 | $(function(){ | 311 | $(function(){ |
308 | $('.cart-add-item').button({ icons: { primary: 'ui-icon-cart'} }) | 312 | $('.cart-add-item').button({ icons: { primary: 'ui-icon-cart'} }) |
309 | }); | 313 | }); |
plugins/shopping_cart/public/style.css
@@ -17,7 +17,6 @@ | @@ -17,7 +17,6 @@ | ||
17 | width: 200px; | 17 | width: 200px; |
18 | z-index: 1000; | 18 | z-index: 1000; |
19 | border: 1px solid #777; | 19 | border: 1px solid #777; |
20 | - border-top: none; | ||
21 | background: rgba(100,100,100,0.8); | 20 | background: rgba(100,100,100,0.8); |
22 | } | 21 | } |
23 | 22 | ||
@@ -120,6 +119,15 @@ | @@ -120,6 +119,15 @@ | ||
120 | float: left; | 119 | float: left; |
121 | } | 120 | } |
122 | 121 | ||
122 | +#cart-request-box .cart-box-close { | ||
123 | + position: absolute; | ||
124 | + right: 10px; | ||
125 | + bottom: 10px; | ||
126 | + width: 16px; | ||
127 | + height: 16px; | ||
128 | + background-repeat: no-repeat; | ||
129 | +} | ||
130 | + | ||
123 | #cart-form-main { | 131 | #cart-form-main { |
124 | border: 2px solid #FFF; | 132 | border: 2px solid #FFF; |
125 | padding: 0px 10px; | 133 | padding: 0px 10px; |
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | </div> | 17 | </div> |
18 | <% end %> | 18 | <% end %> |
19 | <%= items_table(session[:cart][:items], profile) %> | 19 | <%= items_table(session[:cart][:items], profile) %> |
20 | + <a href="" onclick="Cart.colorbox_close(this);" class="cart-box-close icon-cancel"/> | ||
20 | </div> | 21 | </div> |
21 | 22 | ||
22 | <script type="text/javascript"> | 23 | <script type="text/javascript"> |