From c594bbcae0383454c6e46b11d60f710ad1466f6e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 11 Apr 2012 17:14:45 +0530 Subject: [PATCH] address html issue fixed --- erpnext/buying/doctype/supplier/supplier.js | 14 +++++--------- erpnext/selling/doctype/customer/customer.js | 8 ++++---- .../doctype/contact_control/contact_control.js | 6 +++--- .../setup/doctype/sales_partner/sales_partner.js | 8 ++++---- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js index 8291ed530d..615ffc7849 100644 --- a/erpnext/buying/doctype/supplier/supplier.js +++ b/erpnext/buying/doctype/supplier/supplier.js @@ -37,14 +37,10 @@ cur_frm.cscript.refresh = function(doc,dt,dn) { unhide_field('naming_series'); if(doc.__islocal){ - hide_field(['Address HTML','Contact HTML']); - //if(doc.country) cur_frm.cscript.get_states(doc,dt,dn); - // set message - //cur_frm.cscript.set_cl_msg(doc); - //cur_frm.cscript.set_hl_msg(doc); - } + hide_field(['address_html','contact_html']); + } else{ - unhide_field(['Address HTML','Contact HTML']); + unhide_field(['address_html','contact_html']); // make lists cur_frm.cscript.make_address(doc,dt,dn); cur_frm.cscript.make_contact(doc,dt,dn); @@ -55,7 +51,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn) { cur_frm.cscript.make_address = function() { if(!cur_frm.address_list) { cur_frm.address_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Address HTML'].wrapper, + parent: cur_frm.fields_dict['address_html'].wrapper, page_length: 2, new_doctype: "Address", get_query: function() { @@ -88,7 +84,7 @@ cur_frm.cscript.make_address = function() { cur_frm.cscript.make_contact = function() { if(!cur_frm.contact_list) { cur_frm.contact_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Contact HTML'].wrapper, + parent: cur_frm.fields_dict['contact_html'].wrapper, page_length: 2, new_doctype: "Contact", get_query: function() { diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 5b229dcb5e..78743e78da 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -53,11 +53,11 @@ cur_frm.cscript.refresh = function(doc,dt,dn) { unhide_field('naming_series'); if(doc.__islocal){ - hide_field(['Address HTML','Contact HTML']); + hide_field(['address_html','contact_html']); //cur_frm.cscript.set_hl_msg(doc); //cur_frm.cscript.set_sl_msg(doc); }else{ - unhide_field(['Address HTML','Contact HTML']); + unhide_field(['address_html','contact_html']); // make lists cur_frm.cscript.make_address(doc,dt,dn); cur_frm.cscript.make_contact(doc,dt,dn); @@ -69,7 +69,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn) { cur_frm.cscript.make_address = function() { if(!cur_frm.address_list) { cur_frm.address_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Address HTML'].wrapper, + parent: cur_frm.fields_dict['address_html'].wrapper, page_length: 2, new_doctype: "Address", get_query: function() { @@ -102,7 +102,7 @@ cur_frm.cscript.make_address = function() { cur_frm.cscript.make_contact = function() { if(!cur_frm.contact_list) { cur_frm.contact_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Contact HTML'].wrapper, + parent: cur_frm.fields_dict['contact_html'].wrapper, page_length: 2, new_doctype: "Contact", get_query: function() { diff --git a/erpnext/setup/doctype/contact_control/contact_control.js b/erpnext/setup/doctype/contact_control/contact_control.js index f58e75d9d9..51fc5cf4ae 100755 --- a/erpnext/setup/doctype/contact_control/contact_control.js +++ b/erpnext/setup/doctype/contact_control/contact_control.js @@ -5,8 +5,8 @@ // make history list body // ----------------------- cur_frm.cscript.make_hl_body = function(){ - cur_frm.fields_dict['History HTML'].wrapper.innerHTML = ''; - cur_frm.history_html = $a(cur_frm.fields_dict['History HTML'].wrapper,'div'); + cur_frm.fields_dict['history_html'].wrapper.innerHTML = ''; + cur_frm.history_html = $a(cur_frm.fields_dict['history_html'].wrapper,'div'); } @@ -120,4 +120,4 @@ if(cur_frm.fields_dict['territory']){ cur_frm.fields_dict['territory'].get_query = function(doc,dt,dn) { return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50'; } -} \ No newline at end of file +} diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js index 77da493e60..92c9966fc6 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.js +++ b/erpnext/setup/doctype/sales_partner/sales_partner.js @@ -32,12 +32,12 @@ cur_frm.cscript.onload = function(doc,dt,dn){ cur_frm.cscript.refresh = function(doc,dt,dn){ if(doc.__islocal){ - hide_field(['Address HTML','Contact HTML']); + hide_field(['address_html', 'contact_html']); //cur_frm.cscript.set_cl_msg(doc); //cur_frm.cscript.set_hl_msg(doc); } else{ - unhide_field(['Address HTML','Contact HTML']); + unhide_field(['address_html', 'contact_html']); // make lists cur_frm.cscript.make_address(doc,dt,dn); cur_frm.cscript.make_contact(doc,dt,dn); @@ -49,7 +49,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ cur_frm.cscript.make_address = function() { if(!cur_frm.address_list) { cur_frm.address_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Address HTML'].wrapper, + parent: cur_frm.fields_dict['address_html'].wrapper, page_length: 2, new_doctype: "Address", get_query: function() { @@ -73,7 +73,7 @@ cur_frm.cscript.make_address = function() { cur_frm.cscript.make_contact = function() { if(!cur_frm.contact_list) { cur_frm.contact_list = new wn.ui.Listing({ - parent: cur_frm.fields_dict['Contact HTML'].wrapper, + parent: cur_frm.fields_dict['contact_html'].wrapper, page_length: 2, new_doctype: "Contact", get_query: function() {