Shopping cart dropdown changes
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index 8566c5c..de0b02b 100644
--- a/erpnext/public/css/website.css
+++ b/erpnext/public/css/website.css
@@ -70,7 +70,6 @@
border-top: 1px solid #EBEFF2;
}
.transaction-list-item {
- border-bottom: none;
padding: 30px;
margin: 0px -30px;
}
@@ -166,7 +165,7 @@
display: none;
}
.cart-dropdown-container {
- width: 350px;
+ width: 320px;
padding: 15px;
}
.cart-dropdown-container .item-price {
@@ -189,7 +188,7 @@
display: none;
}
.cart-dropdown-container .checkout-btn {
- margin: 15px;
+ padding-top: 25px;
}
.cart-dropdown-container .col-name-description {
margin-bottom: 8px;
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index c09e383..9d16c62 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -48,8 +48,7 @@
shopping_cart.set_cart_count();
if (r.message.shopping_cart_menu) {
$('.shopping-cart-menu').html(r.message.shopping_cart_menu);
- }
-
+ }
if(opts.callback)
opts.callback(r);
}
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index 894340e..357bb8a 100644
--- a/erpnext/public/less/website.less
+++ b/erpnext/public/less/website.less
@@ -83,7 +83,6 @@
}
.transaction-list-item {
- border-bottom: none;
padding: 30px;
margin: 0px -30px;
@@ -213,7 +212,7 @@
}
.cart-dropdown-container {
- width: 350px;
+ width: 320px;
padding: 15px;
.item-price {
@@ -241,7 +240,7 @@
}
.checkout-btn {
- margin:15px;
+ padding-top:25px;
}
.col-name-description {
margin-bottom:8px;
@@ -316,4 +315,5 @@
.homepage-tagline {
font-size:40px !important;
-}
\ No newline at end of file
+}
+
diff --git a/erpnext/templates/includes/cart.js b/erpnext/templates/includes/cart.js
index 931df7a..2a6570f 100644
--- a/erpnext/templates/includes/cart.js
+++ b/erpnext/templates/includes/cart.js
@@ -63,23 +63,6 @@
btn: this,
callback: function(r) {
frappe.unfreeze();
- if(!r.exc) {
- $(".cart-items").html(r.message.items);
- $(".cart-tax-items").html(r.message.taxes);
- $(".cart-icon").hide();
- }
- },
- });
- });
- },
-
- bind_remove_item: function() {
- $(".cart-items").on("click", ".remove-item", function() {
- var item_code = $(this).attr("data-item-code");
- shopping_cart.update_cart({
- item_code: item_code,
- qty: "0",
- callback: function(r) {
location.reload();
if(!r.exc) {
$(".cart-items").html(r.message.items);
@@ -90,7 +73,7 @@
});
});
},
-
+
render_tax_row: function($cart_taxes, doc, shipping_rules) {
var shipping_selector;
if(shipping_rules) {
diff --git a/erpnext/templates/includes/cart/cart_dropdown.html b/erpnext/templates/includes/cart/cart_dropdown.html
index 19892d4..18148ad 100644
--- a/erpnext/templates/includes/cart/cart_dropdown.html
+++ b/erpnext/templates/includes/cart/cart_dropdown.html
@@ -2,13 +2,10 @@
<div id="cart-error" class="alert alert-danger"
style="display: none;"></div>
<div class="row cart-items-dropdown cart-item-header text-muted">
- <div class="col-sm-7 col-xs-6 h6 text-uppercase">
+ <div class="col-sm-6 col-xs-6 h6 text-uppercase">
{{ _("Item") }}
</div>
- <div class="col-sm-2 col-xs-2 text-right h6 text-uppercase">
- {{ _("Qty") }}
- </div>
- <div class="col-sm-3 col-xs-2 text-right h6 text-uppercase">
+ <div class="col-sm-6 col-xs-6 text-right h6 text-uppercase">
{{ _("Price") }}
</div>
</div>
@@ -17,8 +14,8 @@
<div class="cart-items">
{% include "templates/includes/cart/cart_items.html" %}
</div>
- <div class="text-center checkout-btn">
- <p class="text-center"><a href="/cart" class="btn btn-primary">{{ _("Checkout") }}</a></p>
+ <div class="checkout-btn">
+ <a href="/cart" class="btn btn-block btn-primary">{{ _("Checkout") }}</a>
</div>
{% else %}
<p>{{ _("Cart is Empty") }}</p>
diff --git a/erpnext/templates/includes/cart/cart_items.html b/erpnext/templates/includes/cart/cart_items.html
index cd0bb86..1445e21 100644
--- a/erpnext/templates/includes/cart/cart_items.html
+++ b/erpnext/templates/includes/cart/cart_items.html
@@ -10,7 +10,6 @@
<input class="form-control text-right cart-qty"
value = "{{ d.get_formatted('qty') }}"
data-item-code="{{ d.item_code }}"></span>
- <span class="text-muted small remove-item" data-item-code="{{ d.item_code }}">{{_("Remove")}}</span>
</div>
<div class="col-sm-2 col-xs-3 text-right col-amount">
{{ d.get_formatted("amount") }}
@@ -20,13 +19,10 @@
</div>
<div class="row cart-items cart-dropdown">
- <div class="col-sm-7 col-xs-6 col-name-description">
+ <div class="col-sm-8 col-xs-8 col-name-description">
{{ item_name_and_description(d) }}
</div>
- <div class="col-sm-2 col-xs-2 text-right col-qty">
- {{ d.get_formatted('qty') }}
- </div>
- <div class="col-sm-3 col-xs-2 text-right col-amount">
+ <div class="col-sm-4 col-xs-4 text-right col-amount">
{{ d.get_formatted("amount") }}
</div>
diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html
index 5414d7c..f19ea85 100644
--- a/erpnext/templates/includes/issue_row.html
+++ b/erpnext/templates/includes/issue_row.html
@@ -1,13 +1,14 @@
<div class="web-list-item transaction-list-item">
<a href="/issues?name={{ doc.name }}">
<div class="row">
- <div class="col-xs-8">
+ <div class="col-xs-3">
<span class="indicator {{ "red" if doc.status=="Open" else "darkgrey" }}">
{{ doc.name }}</span>
- <div class="items-preview text-ellipsis">
+ </div>
+ <div class="col-xs-6 items-preview text-ellipsis">
{{ doc.subject }}</div>
- </div>
- <div class="col-xs-4 text-right small text-muted">
+
+ <div class="col-xs-3 text-right small text-muted">
{{ frappe.format_date(doc.modified) }}
</div>
</div>
diff --git a/erpnext/templates/includes/order/order_macros.html b/erpnext/templates/includes/order/order_macros.html
index 1b0e889..1bb7b2c 100644
--- a/erpnext/templates/includes/order/order_macros.html
+++ b/erpnext/templates/includes/order/order_macros.html
@@ -16,8 +16,8 @@
<div class="row item_name_dropdown">
<div class="col-xs-4 col-sm-4 order-image-col">
<div class="order-image">
- {{ product_image_square(d.image) }}
- </div>
+ <span class="cart-count-badge pull-right small"> {{ d.get_formatted('qty') }} </span>{{ product_image_square(d.image) }}
+ </div>
</div>
<div class="col-xs-8 col-sm-8">
{{ d.item_code }}
diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html
index 5c7b3be..2165a06 100644
--- a/erpnext/templates/includes/transaction_row.html
+++ b/erpnext/templates/includes/transaction_row.html
@@ -1,18 +1,18 @@
<div class="web-list-item transaction-list-item">
<a href="/{{ pathname }}/{{ doc.name }}">
<div class="row">
- <div class="col-sm-6">
+ <div class="col-sm-5">
<span class="indicator small {{ doc.indicator_color or "darkgrey" }}">
- {{ doc.name }}</span>
- <div class="items-preview text-ellipsis">
- {{ doc.items_preview }}
- </div>
- </div>
- <div class="col-sm-6 text-right">
+ {{ doc.name }}</span>
<div class="small text-muted transaction-time"
title="{{ frappe.utils.format_datetime(doc.modified, "medium") }}">
{{ frappe.utils.format_datetime(doc.modified, "medium") }}
- </div>
+ </div>
+ </div>
+ <div class="col-sm-4 items-preview text-ellipsis">
+ {{ doc.items_preview }}
+ </div>
+ <div class="col-sm-3 text-right">
{{ doc.get_formatted("grand_total") }}
</div>
<!-- <div class="col-sm-3 text-right">