fix: Sider

This commit is contained in:
marination 2021-03-16 11:09:01 +05:30
parent 59514408b9
commit cd117149e1
2 changed files with 11 additions and 10 deletions

View File

@ -21,8 +21,7 @@ $.extend(wishlist, {
if (parseInt(wish_count) === 0 || wish_count === undefined) { if (parseInt(wish_count) === 0 || wish_count === undefined) {
$wishlist.css("display", "none"); $wishlist.css("display", "none");
} } else {
else {
$wishlist.css("display", "inline"); $wishlist.css("display", "inline");
} }
if (wish_count) { if (wish_count) {
@ -129,18 +128,21 @@ $.extend(wishlist, {
} }
frappe.call({ frappe.call({
async: async,
type: "POST", type: "POST",
method: method, method: method,
args: args, args: args,
callback: function (r) { callback: function (r) {
if (r.exc) { if (r.exc) {
if (failure_action && (typeof failure_action === 'function')) {failure_action();} if (failure_action && (typeof failure_action === 'function')) {
failure_action();
}
frappe.msgprint({ frappe.msgprint({
message: __("Sorry, something went wrong. Please refresh."), message: __("Sorry, something went wrong. Please refresh."),
indicator: "red", title: __("Note") indicator: "red", title: __("Note")
}); });
} else { } else if (success_action && (typeof success_action === 'function')) {
if (success_action && (typeof success_action === 'function')) {success_action();} success_action();
} }
} }
}); });

View File

@ -5,7 +5,6 @@ from __future__ import unicode_literals
no_cache = 1 no_cache = 1
import frappe import frappe
from erpnext.e_commerce.shopping_cart.cart import get_cart_quotation
def get_context(context): def get_context(context):
settings = frappe.get_doc("E Commerce Settings") settings = frappe.get_doc("E Commerce Settings")