Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2013-08-22 10:49:13 +05:30
commit 80a2f70bad
7 changed files with 25 additions and 21 deletions

View File

@ -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",
]

View File

@ -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 {

View File

@ -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 {

View File

@ -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
})

View File

@ -145,7 +145,7 @@ $.extend(wn.cart, {
<div class="col-md-3 col-sm-3 text-right">\
<div class="input-group item-update-cart">\
<input type="text" placeholder="Qty" value="%(qty)s" \
data-item-code="%(item_code)s" class="text-right">\
data-item-code="%(item_code)s" class="text-right form-control">\
<div class="input-group-btn">\
<button class="btn btn-primary" data-item-code="%(item_code)s">\
<i class="icon-ok"></i></button>\
@ -160,7 +160,7 @@ $.extend(wn.cart, {
render_tax_row: function($cart_taxes, doc, shipping_rules) {
var shipping_selector;
if(shipping_rules) {
shipping_selector = '<select>' + $.map(shipping_rules, function(rule) {
shipping_selector = '<select class="form-control">' + $.map(shipping_rules, function(rule) {
return '<option value="' + rule[0] + '">' + rule[1] + '</option>' }).join("\n") +
'</select>';
}
@ -206,8 +206,8 @@ $.extend(wn.cart, {
render_address: function($address_wrapper, addresses, address_name) {
$.each(addresses, function(i, address) {
$(repl('<div class="accordion-group"> \
<div class="accordion-heading"> \
$(repl('<div class="panel panel-default"> \
<div class="panel-heading"> \
<div class="row"> \
<div class="col-md-10 address-title" \
data-address-name="%(name)s"><strong>%(name)s</strong></div> \
@ -215,23 +215,19 @@ $.extend(wn.cart, {
data-address-name="%(name)s"></div> \
</div> \
</div> \
<div class="accordion-body collapse" data-address-name="%(name)s"> \
<div class="accordion-inner">%(display)s</div> \
<div class="panel-collapse collapse" data-address-name="%(name)s"> \
<div class="panel-body">%(display)s</div> \
</div> \
</div>', 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");
},

View File

@ -22,7 +22,7 @@
{% elif df.fieldtype == "Select" -%}
<fieldset>
<label>{{ df.label }}</label>
<select data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}">
<select class="form-control" data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}">
{% for value in df.options.split("\n") -%}
{% if doc and doc.fields.get(df.fieldname) == value -%}
<option selected="selected">{{ value }}</option>

View File

@ -36,14 +36,14 @@
<div class="row">
<div class="col-md-6">
<h4>Shipping Address</h4>
<div id="cart-shipping-address" class="accordion"
<div id="cart-shipping-address" class="panel-group"
data-fieldname="shipping_address_name"></div>
<button class="btn btn-default" type="button" id="cart-add-shipping-address">
<span class="icon icon-plus"></span> New Shipping Address</button>
</div>
<div class="col-md-6">
<h4>Billing Address</h4>
<div id="cart-billing-address" class="accordion"
<div id="cart-billing-address" class="panel-group"
data-fieldname="customer_address"></div>
<button class="btn btn-default" type="button" id="cart-add-billing-address">
<span class="icon icon-plus"></span> New Billing Address</button>