diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/chrome/openerp_plugin.jar index b5ce0747bcd..5a74b44629e 100644 Binary files a/addons/thunderbird/plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/chrome/openerp_plugin.jar differ diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js index 535b8417c7b..61afb1571a1 100755 --- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js +++ b/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js @@ -970,7 +970,7 @@ var listSearchContactHandler = { var t = getMobilenumber();} if(strlSearchResult=="email" && strlSearchResultValue!=''){ - setSenderEmail(strlSearchResultValue); + setSenderEmail(sendername); var t = getSenderEmail();} if(strlSearchResult=="res_id"){ @@ -1000,7 +1000,7 @@ var listSearchContactdetailHandler = { if(strlSearchResult=="email" && strlSearchResultValue=='') { alert("Contact is not Available") - document.getElementById("txtemail").value = strlSearchResultValue; + document.getElementById("txtemail").value = sendername; } if(strlSearchResult=="partner_name"){ document.getElementById("txtname").value =strlSearchResultValue;} @@ -1342,33 +1342,6 @@ var listArchiveHandler = { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess'); var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32); - //condition to handle the automatic attachment creation - attach = getAttachment() - attachment = "no" - var popup = document.getElementById("section").selectedItem.value; // a element - if(getPref().getCharPref('attachmentlength')>0){ - if (getAttachValue() == '1'){ - //calling the method to create the attachments - createAttachment(popup, createId); - attachment = "yes" - } - //condition to handle the manual attachment creation - if(attach =="yes"){ - //calling the method to create the attachments - createAttachment(popup, createId); - attachment = "yes" - } - else{ - - attachment = "no" - } - } - else{ - - attachment = "no" - } - createAttachmentEML_CRM(popup, createId, attachment) - }, onFault: function (client, ctxt, fault) { @@ -1413,7 +1386,7 @@ function upload_archivemail() list_documents = document.getElementById('listSearchBox') var context = [] var cnt = list_documents.selectedCount - for(i=0;i<=cnt;i++) + for(i=0;i 60) - { - filename = filename.substring(0,60) ; - - } - filename = filename + ".eml" - var a = ['name','datas','res_model','description','res_id','datas_fname']; - var b = [getFileName(),encoded_string, model ,getSubject()+'\n'+getSenderEmail() , id ,filename]; - var arrofarr = dictcontact(a,b); - xmlRpcClient.asyncCall(listAttachHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6); -} - - function win_close() { var fpath ="" @@ -2161,46 +2017,6 @@ function win_close() function attachmentWidnowOpen(msg) { - /* if(getPref().getCharPref('attachmentlength')>0) - { - - if (msg=="create"){ - var popup = document.getElementById("section").selectedItem; // a element - - if (String(popup) != "null"){ - object=popup.value; - if (object=="" || object == undefined) { alert("select at least one Document !")} - else{ - var answer = confirm("Mail Contain Attachment? \n\t Ok :- Create Document with attachments. \n\t Cancel :- Create Document Only(Attachment not attach).") - if (answer) - setAttachment('yes') - else - setAttachment('no') - archivemail() - } - } - else - { - alert("select Document !") - } - } - else{ - if(document.getElementById('listSearchBox').selectedItem) - { - var answer = confirm("Mail Contain Attachment? \n\t Ok :- Attachments attach with selected record. \n\t Cancel :- Attachment not attach with selected record.") - if (answer) - setAttachment('yes') - else - setAttachment('no') - createAttachmentEML() - } - else{ - alert("you must select only one record"); - } - } - } - else - { */ if (msg=="create") { var popup = document.getElementById("section").selectedItem; // a element @@ -2223,8 +2039,7 @@ function attachmentWidnowOpen(msg) upload_archivemail() } else{ - alert("you must select only one record"); + alert("Please select at least one record"); } } - //} } diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index 1031f6a6f99..c9715e48e50 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar index a828062c10a..26bdfe94a26 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js index 535b8417c7b..61afb1571a1 100755 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js @@ -970,7 +970,7 @@ var listSearchContactHandler = { var t = getMobilenumber();} if(strlSearchResult=="email" && strlSearchResultValue!=''){ - setSenderEmail(strlSearchResultValue); + setSenderEmail(sendername); var t = getSenderEmail();} if(strlSearchResult=="res_id"){ @@ -1000,7 +1000,7 @@ var listSearchContactdetailHandler = { if(strlSearchResult=="email" && strlSearchResultValue=='') { alert("Contact is not Available") - document.getElementById("txtemail").value = strlSearchResultValue; + document.getElementById("txtemail").value = sendername; } if(strlSearchResult=="partner_name"){ document.getElementById("txtname").value =strlSearchResultValue;} @@ -1342,33 +1342,6 @@ var listArchiveHandler = { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess'); var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32); - //condition to handle the automatic attachment creation - attach = getAttachment() - attachment = "no" - var popup = document.getElementById("section").selectedItem.value; // a element - if(getPref().getCharPref('attachmentlength')>0){ - if (getAttachValue() == '1'){ - //calling the method to create the attachments - createAttachment(popup, createId); - attachment = "yes" - } - //condition to handle the manual attachment creation - if(attach =="yes"){ - //calling the method to create the attachments - createAttachment(popup, createId); - attachment = "yes" - } - else{ - - attachment = "no" - } - } - else{ - - attachment = "no" - } - createAttachmentEML_CRM(popup, createId, attachment) - }, onFault: function (client, ctxt, fault) { @@ -1413,7 +1386,7 @@ function upload_archivemail() list_documents = document.getElementById('listSearchBox') var context = [] var cnt = list_documents.selectedCount - for(i=0;i<=cnt;i++) + for(i=0;i 60) - { - filename = filename.substring(0,60) ; - - } - filename = filename + ".eml" - var a = ['name','datas','res_model','description','res_id','datas_fname']; - var b = [getFileName(),encoded_string, model ,getSubject()+'\n'+getSenderEmail() , id ,filename]; - var arrofarr = dictcontact(a,b); - xmlRpcClient.asyncCall(listAttachHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6); -} - - function win_close() { var fpath ="" @@ -2161,46 +2017,6 @@ function win_close() function attachmentWidnowOpen(msg) { - /* if(getPref().getCharPref('attachmentlength')>0) - { - - if (msg=="create"){ - var popup = document.getElementById("section").selectedItem; // a element - - if (String(popup) != "null"){ - object=popup.value; - if (object=="" || object == undefined) { alert("select at least one Document !")} - else{ - var answer = confirm("Mail Contain Attachment? \n\t Ok :- Create Document with attachments. \n\t Cancel :- Create Document Only(Attachment not attach).") - if (answer) - setAttachment('yes') - else - setAttachment('no') - archivemail() - } - } - else - { - alert("select Document !") - } - } - else{ - if(document.getElementById('listSearchBox').selectedItem) - { - var answer = confirm("Mail Contain Attachment? \n\t Ok :- Attachments attach with selected record. \n\t Cancel :- Attachment not attach with selected record.") - if (answer) - setAttachment('yes') - else - setAttachment('no') - createAttachmentEML() - } - else{ - alert("you must select only one record"); - } - } - } - else - { */ if (msg=="create") { var popup = document.getElementById("section").selectedItem; // a element @@ -2223,8 +2039,7 @@ function attachmentWidnowOpen(msg) upload_archivemail() } else{ - alert("you must select only one record"); + alert("Please select at least one record"); } } - //} }