From 65f5c58e51bf0f91ce1ffc35ad21e1925319fe18 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 21 Aug 2013 19:36:23 +0530 Subject: [PATCH] [fix] [minor] webshop fixes after bootstrap 3 --- patches/patch_list.py | 2 +- website/css/website.css | 11 +++++++-- .../style_settings/custom_template.css | 2 +- website/helpers/cart.py | 1 + website/templates/js/cart.js | 24 ++++++++----------- website/templates/pages/address.html | 2 +- website/templates/pages/cart.html | 4 ++-- 7 files changed, 25 insertions(+), 21 deletions(-) diff --git a/patches/patch_list.py b/patches/patch_list.py index 3dc6c76401..1d382a56bd 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -228,7 +228,6 @@ patch_list = [ "execute:webnotes.delete_doc('Report', 'Received Items To Be Billed')", "patches.july_2013.p02_copy_shipping_address", "patches.july_2013.p03_cost_center_company", - "execute:webnotes.bean('Style Settings').save() #2013-07-16", "patches.july_2013.p04_merge_duplicate_leads", "patches.july_2013.p05_custom_doctypes_in_list_view", "patches.july_2013.p06_same_sales_rate", @@ -257,4 +256,5 @@ patch_list = [ "patches.august_2013.p05_employee_birthdays", "execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16", "patches.august_2013.p06_fix_sle_against_stock_entry", + "execute:webnotes.bean('Style Settings').save() #2013-08-20", ] \ No newline at end of file diff --git a/website/css/website.css b/website/css/website.css index 91f1398b61..88bf7fd318 100644 --- a/website/css/website.css +++ b/website/css/website.css @@ -148,8 +148,15 @@ div.web-footer { } } -.accordion-heading, .accordion-inner { - padding-left: 10px; +.panel-heading, +.panel-body { + padding-left: 15px; +} + + +.breadcrumb { + margin: 0px -20px; + margin-bottom: 20px; } fieldset { diff --git a/website/doctype/style_settings/custom_template.css b/website/doctype/style_settings/custom_template.css index 2941061dc2..7abdb4b89f 100644 --- a/website/doctype/style_settings/custom_template.css +++ b/website/doctype/style_settings/custom_template.css @@ -187,7 +187,7 @@ div.web-footer, div.web-footer a { } .breadcrumb { - background-color: #{{ get_hex_shade(doc.page_background, 10) }}; + background-color: #{{ get_hex_shade(doc.page_background, 5) }}; } .breadcrumb > li { diff --git a/website/helpers/cart.py b/website/helpers/cart.py index b6a7a01e92..fc7d062d0d 100644 --- a/website/helpers/cart.py +++ b/website/helpers/cart.py @@ -228,6 +228,7 @@ def _get_cart_quotation(party=None): "company": webnotes.defaults.get_user_default("company"), "order_type": "Shopping Cart", "status": "Draft", + "docstatus": 0, "__islocal": 1, (party.doctype.lower()): party.name }) diff --git a/website/templates/js/cart.js b/website/templates/js/cart.js index ad69824d21..20090caec6 100644 --- a/website/templates/js/cart.js +++ b/website/templates/js/cart.js @@ -145,7 +145,7 @@ $.extend(wn.cart, {
\
\ \ + data-item-code="%(item_code)s" class="text-right form-control">\
\ \ @@ -160,7 +160,7 @@ $.extend(wn.cart, { render_tax_row: function($cart_taxes, doc, shipping_rules) { var shipping_selector; if(shipping_rules) { - shipping_selector = '' + $.map(shipping_rules, function(rule) { return '' }).join("\n") + ''; } @@ -206,8 +206,8 @@ $.extend(wn.cart, { render_address: function($address_wrapper, addresses, address_name) { $.each(addresses, function(i, address) { - $(repl('
\ -
\ + $(repl('
\ +
\
\
%(name)s
\ @@ -215,23 +215,19 @@ $.extend(wn.cart, { data-address-name="%(name)s">
\
\
\ -
\ -
%(display)s
\ +
\ +
%(display)s
\
\
', address)) .css({"margin": "10px auto"}) .appendTo($address_wrapper); }); - $address_wrapper.find(".accordion-heading") - .css({ - "background-color": "#eee", - "padding": "10px", - }) + $address_wrapper.find(".panel-heading") .find(".address-title") .css({"cursor": "pointer"}) .on("click", function() { - $address_wrapper.find('.accordion-body[data-address-name="' + $address_wrapper.find('.panel-collapse[data-address-name="' +$(this).attr("data-address-name")+'"]').collapse("toggle"); }); @@ -265,12 +261,12 @@ $.extend(wn.cart, { $address_wrapper.find('input[type="checkbox"][data-address-name="'+ address_name +'"]') .prop("checked", true); - $address_wrapper.find(".accordion-body").collapse({ + $address_wrapper.find(".panel-collapse").collapse({ parent: $address_wrapper, toggle: false }); - $address_wrapper.find('.accordion-body[data-address-name="'+ address_name +'"]') + $address_wrapper.find('.panel-collapse[data-address-name="'+ address_name +'"]') .collapse("show"); }, diff --git a/website/templates/pages/address.html b/website/templates/pages/address.html index 60e705befc..faf7bb04ec 100644 --- a/website/templates/pages/address.html +++ b/website/templates/pages/address.html @@ -22,7 +22,7 @@ {% elif df.fieldtype == "Select" -%}
- {% for value in df.options.split("\n") -%} {% if doc and doc.fields.get(df.fieldname) == value -%} diff --git a/website/templates/pages/cart.html b/website/templates/pages/cart.html index 70775abcbf..6708ad342b 100644 --- a/website/templates/pages/cart.html +++ b/website/templates/pages/cart.html @@ -36,14 +36,14 @@

Shipping Address

-

Billing Address

-