Commit 22109c9030a923fcc8d10d3bfb5145c125b3a196

Authored by Rafael Martins
1 parent 5b73133b

Added a 'close' button to the shopping cart checkout

plugins/shopping_cart/public/cart.js
... ... @@ -304,6 +304,10 @@ function Cart(config) {
304 304 });
305 305 }
306 306  
  307 + Cart.colorbox_close = function() {
  308 + $.colorbox.close();
  309 + }
  310 +
307 311 $(function(){
308 312 $('.cart-add-item').button({ icons: { primary: 'ui-icon-cart'} })
309 313 });
... ...
plugins/shopping_cart/public/style.css
... ... @@ -17,7 +17,6 @@
17 17 width: 200px;
18 18 z-index: 1000;
19 19 border: 1px solid #777;
20   - border-top: none;
21 20 background: rgba(100,100,100,0.8);
22 21 }
23 22  
... ... @@ -120,6 +119,15 @@
120 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 131 #cart-form-main {
124 132 border: 2px solid #FFF;
125 133 padding: 0px 10px;
... ...
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
... ... @@ -17,6 +17,7 @@
17 17 </div>
18 18 <% end %>
19 19 <%= items_table(session[:cart][:items], profile) %>
  20 + <a href="" onclick="Cart.colorbox_close(this);" class="cart-box-close icon-cancel"/>
20 21 </div>
21 22  
22 23 <script type="text/javascript">
... ...