Chore: Miscellaneous UI review changes

- Added bg (variable) to pages, card space separation visible
- Removed `show brand line` in settings, shown by default
- Re-arranged settings by importance
- View toggling primary colour is grey
- Only populate recent searches on successful search
- Hit only one server side api, once while searching
- List view primary button float right
- Discounts takes upper limit eg. 10% and below
- Navbar icons only wiggle on qty increase in cart/wishlist
- Pay button in SO portal
- Remove bottom white space below item full page image, min-height fits to content
- List view vertical space between heading and item code
- Empty offer subtitle handled
This commit is contained in:
marination
2021-09-01 14:57:50 +05:30
parent 1bb135b2d3
commit 45f64bd930
25 changed files with 212 additions and 167 deletions

View File

@@ -5,7 +5,7 @@ frappe.provide("erpnext.e_commerce.shopping_cart");
var shopping_cart = erpnext.e_commerce.shopping_cart;
$.extend(wishlist, {
set_wishlist_count: function() {
set_wishlist_count: function(animate=false) {
// set badge count for wishlist icon
var wish_count = frappe.get_cookie("wish_count");
if (frappe.session.user==="Guest") {
@@ -26,10 +26,12 @@ $.extend(wishlist, {
}
if (wish_count) {
$badge.html(wish_count);
$wishlist.addClass('cart-animate');
setTimeout(() => {
$wishlist.removeClass('cart-animate');
}, 500);
if (animate) {
$wishlist.addClass('cart-animate');
setTimeout(() => {
$wishlist.removeClass('cart-animate');
}, 500);
}
} else {
$badge.remove();
}
@@ -98,7 +100,7 @@ $.extend(wishlist, {
}
let success_action = function() {
erpnext.e_commerce.wishlist.set_wishlist_count();
erpnext.e_commerce.wishlist.set_wishlist_count(true);
};
if ($wish_icon.hasClass('wished')) {