Commit 9dea8f69267d79d1f8d0db457a9c761f0763bd06

Authored by Rafael Martins
1 parent 14694fe0

Cart fix: moved to the bottom of the browser

A few visual tweaks for the shopping cart
plugins/shopping_cart/public/cart.js
... ... @@ -62,7 +62,7 @@ function Cart(config) {
62 62 '<div class="item-price">' +
63 63 '<input size="1" value="'+item.quantity+'" />'+ (item.price ? '&times; '+ item.price : '') +'</div>' +
64 64 ' <a href="remove:'+item.name+'" onclick="Cart.removeItem(\''+this.enterprise+'\', '+item.id+'); return false"' +
65   - ' class="button icon-delete"><span>remove</span></a>'
  65 + ' class="button icon-remove"><span>remove</span></a>'
66 66 ).appendTo(li);
67 67 var input = $("input", li)[0];
68 68 input.lastValue = input.value;
... ...
plugins/shopping_cart/public/style.css
... ... @@ -13,16 +13,16 @@
13 13 .cart {
14 14 position: fixed;
15 15 right: 20px;
16   - top: 0px;
  16 + bottom: 0px;
17 17 width: 200px;
18 18 z-index: 1000;
19 19 border: 1px solid #777;
20 20 border-top: none;
21   - background: rgba(200,200,200,0.6);
  21 + background: rgba(100,100,100,0.8);
22 22 }
23 23  
24 24 .cart h3 {
25   - color: #888;
  25 + color: #000;
26 26 margin: 0px 0px 0px 5px;
27 27 }
28 28  
... ... @@ -108,7 +108,7 @@
108 108 padding: 0px 5px;
109 109 }
110 110 .cart-toggle:hover {
111   - color: #555;
  111 + color: #fff;
112 112 }
113 113  
114 114 #cart-request-box {
... ...
plugins/shopping_cart/views/cart.html.erb
... ... @@ -4,14 +4,14 @@
4 4 <div class="cart-inner">
5 5 <div class="cart-content">
6 6 <h3><%= _("Cart") %></h3>
7   - <a href="cart:clean" onclick="Cart.clean(this); return false" class="cart-clean"><%=_('Clean cart')%></a>
  7 + <a href="cart:clean" onclick="Cart.clean(this); return false" class="cart-clean"><%=_('Clean')%></a>
8 8 <ul class="cart-items"></ul>
9 9 <div class="cart-total"><%=_('Total:')%> <b></b></div>
10 10 <a href="cart:buy" class="cart-buy"><%=_('Shopping checkout')%></a>
11 11 </div>
12 12 <a href="#" onclick="Cart.toggle(this); return false" class="cart-toggle">
13 13 <span class="str-show"><%=_('Show cart')%></span>
14   - <span class="str-hide" style="display:none"><%=_('Hide cart')%></span>
  14 + <span class="str-hide" style="display:none"><%=_('Hide')%></span>
15 15 </a>
16 16 </div>
17 17 </div>
... ...