[form] added icon in section break

This commit is contained in:
Rushabh Mehta
2013-07-03 10:32:33 +05:30
parent e6bf83e653
commit 78979dca9b
7 changed files with 103 additions and 27 deletions

View File

@@ -32,7 +32,7 @@ cur_frm.add_fetch('lead_name', 'company_name', 'customer_name');
cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_rate');
cur_frm.cscript.refresh = function(doc,dt,dn) {
cur_frm.layout.clear_dashboard();
cur_frm.cscript.setup_dashboard(doc);
if(sys_defaults.cust_master_name == 'Customer Name')
hide_field('naming_series');
else
@@ -41,7 +41,6 @@ cur_frm.cscript.refresh = function(doc,dt,dn) {
if(doc.__islocal){
hide_field(['address_html','contact_html']);
}else{
cur_frm.cscript.setup_dashboard(doc);
unhide_field(['address_html','contact_html']);
// make lists
cur_frm.cscript.make_address(doc,dt,dn);
@@ -56,16 +55,18 @@ cur_frm.cscript.refresh = function(doc,dt,dn) {
}
cur_frm.cscript.setup_dashboard = function(doc) {
cur_frm.layout.dashboard.toggle(true);
cur_frm.layout.dashboard.empty().toggle(doc.__islocal ? false : true);
if(doc.__islocal)
return;
var headline = $('<div class="form-headline col col-lg-12">\
<span class="text-muted">Loading...</span></div>')
.appendTo(cur_frm.layout.dashboard);
cur_frm.layout.add_doctype_badge(wn._("Opportunities"), "Opportunity", "customer");
cur_frm.layout.add_doctype_badge(wn._("Quotations"), "Quotation", "customer");
cur_frm.layout.add_doctype_badge(wn._("Sales Orders"), "Sales Order", "customer");
cur_frm.layout.add_doctype_badge(wn._("Delivery Notes"), "Delivery Note", "customer");
cur_frm.layout.add_doctype_badge(wn._("Sales Invoices"), "Sales Invoice", "customer");
cur_frm.layout.add_doctype_badge("Opportunity", "customer");
cur_frm.layout.add_doctype_badge("Quotation", "customer");
cur_frm.layout.add_doctype_badge("Sales Order", "customer");
cur_frm.layout.add_doctype_badge("Delivery Note", "customer");
cur_frm.layout.add_doctype_badge("Sales Invoice", "customer");
wn.call({
type: "GET",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-11 14:26:44",
"docstatus": 0,
"modified": "2013-06-11 14:27:57",
"modified": "2013-07-03 10:26:04",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -43,6 +43,7 @@
"fieldtype": "Section Break",
"label": "Basic Info",
"oldfieldtype": "Section Break",
"options": "icon-user",
"permlevel": 0,
"reqd": 0
},
@@ -142,6 +143,7 @@
"fieldname": "address_contacts",
"fieldtype": "Section Break",
"label": "Address & Contacts",
"options": "icon-map-marker",
"permlevel": 0
},
{
@@ -190,6 +192,8 @@
"doctype": "DocField",
"fieldname": "communication_history",
"fieldtype": "Section Break",
"label": "Communication History",
"options": "icon-comments",
"permlevel": 0
},
{
@@ -205,6 +209,7 @@
"fieldtype": "Section Break",
"label": "More Info",
"oldfieldtype": "Section Break",
"options": "icon-file-text",
"permlevel": 0
},
{
@@ -295,6 +300,7 @@
"fieldtype": "Section Break",
"label": "Sales Team",
"oldfieldtype": "Section Break",
"options": "icon-group",
"permlevel": 0
},
{