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,7 +62,7 @@ function Cart(config) {
62 '<div class="item-price">' + 62 '<div class="item-price">' +
63 '<input size="1" value="'+item.quantity+'" />'+ (item.price ? '&times; '+ item.price : '') +'</div>' + 63 '<input size="1" value="'+item.quantity+'" />'+ (item.price ? '&times; '+ item.price : '') +'</div>' +
64 ' <a href="remove:'+item.name+'" onclick="Cart.removeItem(\''+this.enterprise+'\', '+item.id+'); return false"' + 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 ).appendTo(li); 66 ).appendTo(li);
67 var input = $("input", li)[0]; 67 var input = $("input", li)[0];
68 input.lastValue = input.value; 68 input.lastValue = input.value;
plugins/shopping_cart/public/style.css
@@ -13,16 +13,16 @@ @@ -13,16 +13,16 @@
13 .cart { 13 .cart {
14 position: fixed; 14 position: fixed;
15 right: 20px; 15 right: 20px;
16 - top: 0px; 16 + bottom: 0px;
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; 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 .cart h3 { 24 .cart h3 {
25 - color: #888; 25 + color: #000;
26 margin: 0px 0px 0px 5px; 26 margin: 0px 0px 0px 5px;
27 } 27 }
28 28
@@ -108,7 +108,7 @@ @@ -108,7 +108,7 @@
108 padding: 0px 5px; 108 padding: 0px 5px;
109 } 109 }
110 .cart-toggle:hover { 110 .cart-toggle:hover {
111 - color: #555; 111 + color: #fff;
112 } 112 }
113 113
114 #cart-request-box { 114 #cart-request-box {
plugins/shopping_cart/views/cart.html.erb
@@ -4,14 +4,14 @@ @@ -4,14 +4,14 @@
4 <div class="cart-inner"> 4 <div class="cart-inner">
5 <div class="cart-content"> 5 <div class="cart-content">
6 <h3><%= _("Cart") %></h3> 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 <ul class="cart-items"></ul> 8 <ul class="cart-items"></ul>
9 <div class="cart-total"><%=_('Total:')%> <b></b></div> 9 <div class="cart-total"><%=_('Total:')%> <b></b></div>
10 <a href="cart:buy" class="cart-buy"><%=_('Shopping checkout')%></a> 10 <a href="cart:buy" class="cart-buy"><%=_('Shopping checkout')%></a>
11 </div> 11 </div>
12 <a href="#" onclick="Cart.toggle(this); return false" class="cart-toggle"> 12 <a href="#" onclick="Cart.toggle(this); return false" class="cart-toggle">
13 <span class="str-show"><%=_('Show cart')%></span> 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 </a> 15 </a>
16 </div> 16 </div>
17 </div> 17 </div>