[IMP] overlay.js orverlay.js, skin : change Icon + remove email in searchbox + openurl with menu in webclient + move menu
bzr revid: tfr@openerp.com-20101207161502-yo2b9i902uzml72l
|
@ -3,101 +3,104 @@
|
||||||
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/create.dtd">
|
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/create.dtd">
|
||||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
title="&title.label;" onload="myPrefObserver.createContact();" height="460" width="860">
|
title="&title.label;" onload="myPrefObserver.createContact();" height="415" width="720">
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/loaddata.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/loaddata.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/static.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/static.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
||||||
<tabpanel id="contact">
|
<tabpanel id="contact">
|
||||||
<groupbox id="contact" style="border:1px solid black">
|
<groupbox id="contact" >
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
<separator class="groove-thin" orient="horizontal" width="94"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
<label align="right" id="partner" value="&selectpartner.value;" width="97" />
|
<label align="right" id="partner" value="&selectpartner.value;" width="97" />
|
||||||
<textbox id="txtselectpartner" readonly="true" value="" width="270"/>
|
<textbox id="txtselectpartner" readonly="true" value="" width="270"/>
|
||||||
<button label="&bsearch.label;" oncommand="Select.onMenuItemCommand(event);" image="&imagesearch.value;"/>
|
<button label="&bsearch.label;" oncommand="Select.onMenuItemCommand(event);" image="&imagesearch.value;"/>
|
||||||
<button label="Create Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
|
<button label="Create Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox>
|
|
||||||
<label align="right" id="name" value="&name.value;" width="80" />
|
|
||||||
<textbox id="txtname" align="right" width="270"/>
|
|
||||||
</hbox>
|
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
|
||||||
</groupbox>
|
|
||||||
</tabpanel>
|
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
|
||||||
<tabpanel id="address">
|
|
||||||
<groupbox id="address" style="border:1px solid black">
|
|
||||||
<hbox>
|
|
||||||
<caption label="&postaladdress.value;" />
|
|
||||||
</hbox>
|
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
|
||||||
<hbox>
|
|
||||||
<label align="right" id="street" value="&street.value;" width="97" />
|
|
||||||
<textbox id="txtstreet" width="270" align="right"/>
|
|
||||||
<spacer width="33"/>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<hbox>
|
<separator class="groove-thin" orient="horizontal" width="80"/>
|
||||||
<label align="right" id="street2" value="&street2.value;" width="97" />
|
</groupbox>
|
||||||
<textbox id="txtstreet2" width="270" align="right"/>
|
</tabpanel>
|
||||||
<spacer width="35"/>
|
<tabpanel id="address">
|
||||||
</hbox>
|
|
||||||
<hbox>
|
<groupbox id="address" style="border:1px solid black">
|
||||||
<label align="right" id="zip" value="&zip.value;" width="97" />
|
<hbox>
|
||||||
<textbox id="txtzip" align="right" />
|
<caption label="&postaladdress.value;" />
|
||||||
<spacer width="114"/>
|
</hbox>
|
||||||
</hbox>
|
<separator class="groove-thin" orient="horizontal" width="94"/>
|
||||||
|
<hbox>
|
||||||
|
<label align="right" id="name" value="&name.value;" width="97" />
|
||||||
|
<textbox id="txtname" align="right" />
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label align="right" id="street" value="&street.value;" width="97" />
|
||||||
|
<textbox id="txtstreet" align="right"/>
|
||||||
|
<spacer width="33"/>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
<hbox>
|
<hbox>
|
||||||
<label align="right" id="city" value="&city.value;" width="97"/>
|
<label align="right" id="street2" value="&street2.value;" width="97" />
|
||||||
<textbox id="txtcity" align="right" />
|
<textbox id="txtstreet2" align="right"/>
|
||||||
<spacer width="112"/>
|
<spacer width="33"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<hbox>
|
||||||
<hbox>
|
<label align="right" id="zip" value="&zip.value;" width="97" />
|
||||||
<label align="right" id="countryname" value="&country.value;" width="97" />
|
<textbox id="txtzip" align="right" />
|
||||||
<menulist id="country" width="190" oncommand= "getAllState();" >
|
<spacer width="33"/>
|
||||||
<menupopup>
|
</hbox>
|
||||||
<menuitem label="" value=""/>
|
|
||||||
</menupopup>
|
|
||||||
</menulist>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
<hbox>
|
<hbox>
|
||||||
<label align="right" id="statename" value="&state.value;" width="97" />
|
<label align="right" id="city" value="&city.value;" width="97"/>
|
||||||
<menulist id="state" width="190">
|
<textbox id="txtcity" align="right" />
|
||||||
<menupopup>
|
<spacer width="33"/>
|
||||||
<menuitem label="" value=""/>
|
</hbox>
|
||||||
</menupopup>
|
|
||||||
</menulist>
|
<hbox>
|
||||||
</hbox>
|
<label align="right" id="countryname" value="&country.value;" width="97" />
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
<menulist id="country" width="190" oncommand= "getAllState();" >
|
||||||
</groupbox>
|
<menupopup>
|
||||||
<groupbox id="communication" style="border:1px solid black">
|
<menuitem label="" value=""/>
|
||||||
<vbox>
|
</menupopup>
|
||||||
<caption label="&communication.value;" />
|
</menulist>
|
||||||
</vbox>
|
</hbox>
|
||||||
<separator class="groove-thin" orient="horizontal" width="94"/>
|
|
||||||
<hbox>
|
<hbox>
|
||||||
<label align="right" id="office" value="&office.value;" width="97" />
|
<label align="right" id="statename" value="&state.value;" width="97" />
|
||||||
<textbox id="txtoffice" align="right" />
|
<menulist id="state" width="190">
|
||||||
</hbox>
|
<menupopup>
|
||||||
<hbox>
|
<menuitem label="" value=""/>
|
||||||
<label align="right" id="mobile" value="&mobile.value;" width="97" />
|
</menupopup>
|
||||||
<textbox id="txtmobile" align="right"/>
|
</menulist>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox>
|
<separator class="groove-thin" orient="horizontal" width="60"/>
|
||||||
<label align="right" id="fax" value="&fax.value;" width="97" />
|
</groupbox>
|
||||||
<textbox id="txtfax" align="right" />
|
|
||||||
</hbox>
|
<groupbox id="communication" style="border:1px solid black">
|
||||||
<hbox>
|
<vbox>
|
||||||
<label align="right" id="emailid" value="&email.value;" width="97" />
|
<caption label="&communication.value;" />
|
||||||
<textbox id="txtemail" width="280" align="right"/>
|
</vbox>
|
||||||
</hbox>
|
<separator class="groove-thin" orient="horizontal" width="94"/>
|
||||||
</groupbox>
|
<hbox>
|
||||||
</tabpanel>
|
<label align="right" id="office" value="&office.value;" width="97" />
|
||||||
<description></description>
|
<textbox id="txtoffice" align="right" />
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label align="right" id="mobile" value="&mobile.value;" width="97" />
|
||||||
|
<textbox id="txtmobile" align="right"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label align="right" id="fax" value="&fax.value;" width="97" />
|
||||||
|
<textbox id="txtfax" align="right" />
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<label align="right" id="emailid" value="&email.value;" width="97" />
|
||||||
|
<textbox id="txtemail" align="right"/>
|
||||||
|
<spacer width="30"/>
|
||||||
|
</hbox>
|
||||||
|
</groupbox>
|
||||||
|
</tabpanel>
|
||||||
|
<description></description>
|
||||||
<hbox align="right">
|
<hbox align="right">
|
||||||
<button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
|
<button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
|
||||||
<button label="&ok.label;" image="&imageok.value;" oncommand="createContact();"/>
|
<button label="&ok.label;" image="&imageok.value;" oncommand="createContact();"/>
|
||||||
|
|
|
@ -6,185 +6,185 @@ var name = new Array();
|
||||||
var test = new Array();
|
var test = new Array();
|
||||||
|
|
||||||
var MBstrBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
|
var MBstrBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
|
||||||
getService(Components.interfaces.nsIStringBundleService);
|
getService(Components.interfaces.nsIStringBundleService);
|
||||||
var mboximportbundle = MBstrBundleService.createBundle("chrome://mboximport/locale/mboximport.properties");
|
var mboximportbundle = MBstrBundleService.createBundle("chrome://mboximport/locale/mboximport.properties");
|
||||||
//function to get the required details of the selected email
|
//function to get the required details of the selected email
|
||||||
|
|
||||||
function check()
|
function check()
|
||||||
{
|
{
|
||||||
setTimeout("createConnection()",5000)
|
setTimeout("createConnection()",5000)
|
||||||
if (getconnect_server() == "false")
|
if (getconnect_server() == "false")
|
||||||
{
|
{
|
||||||
alert("Please Login To The Database First !")
|
alert("Please Login To The Database First !")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
setTimeout("module_install()", 10000)
|
setTimeout("module_install()", 10000)
|
||||||
if (getmodule_install() == "no")
|
if (getmodule_install() == "no")
|
||||||
{
|
{
|
||||||
alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
|
alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(GetNumSelectedMessages() < 1 || GetNumSelectedMessages() > 1){
|
if(GetNumSelectedMessages() < 1 || GetNumSelectedMessages() > 1){
|
||||||
alert("You must select only one mail to archive");
|
alert("You must select only one mail to archive");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchmail()
|
function searchmail()
|
||||||
{
|
{
|
||||||
if (check() == false){
|
if (check() == false){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
var version_obj = prefService.getBranch("extensions.");
|
var version_obj = prefService.getBranch("extensions.");
|
||||||
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
version = version_obj.getCharPref("lastAppVersion");
|
version = version_obj.getCharPref("lastAppVersion");
|
||||||
version = parseInt(version[0])
|
version = parseInt(version[0])
|
||||||
|
|
||||||
file = getPredefinedFolder(2);
|
file = getPredefinedFolder(2);
|
||||||
|
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
{
|
{
|
||||||
var emlsArray = gFolderDisplay.selectedMessages;
|
var emlsArray = gFolderDisplay.selectedMessages;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var emlsArray = GetSelectedMessages();
|
var emlsArray = GetSelectedMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
IETtotal = emlsArray.length;
|
IETtotal = emlsArray.length;
|
||||||
IETexported = 0;
|
IETexported = 0;
|
||||||
var msguri = emlsArray[0];
|
var msguri = emlsArray[0];
|
||||||
|
|
||||||
|
|
||||||
//gives the selected email uri
|
//gives the selected email uri
|
||||||
var messageUri= gDBView.URIForFirstSelectedMessage;
|
var messageUri= gDBView.URIForFirstSelectedMessage;
|
||||||
|
|
||||||
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
||||||
|
|
||||||
//gives the selected email object
|
//gives the selected email object
|
||||||
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
||||||
|
|
||||||
|
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
{
|
{
|
||||||
m_uri = message.folder.getUriForMsg(message);
|
m_uri = message.folder.getUriForMsg(message);
|
||||||
saveMsgAsEML(m_uri,file,false,emlsArray,null);
|
saveMsgAsEML(m_uri,file,false,emlsArray,null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
saveMsgAsEML(msguri,file,false,emlsArray,null);
|
saveMsgAsEML(msguri,file,false,emlsArray,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
//gives the received email date
|
//gives the received email date
|
||||||
var stdate = new Date(message.date / 1000);
|
var stdate = new Date(message.date / 1000);
|
||||||
|
|
||||||
//functionality to split the author name and email
|
//functionality to split the author name and email
|
||||||
if(message.author.charAt(0) == '"'){
|
if(message.author.charAt(0) == '"'){
|
||||||
sendername = message.author.split('"')[1].split('"')[0];
|
sendername = message.author.split('"')[1].split('"')[0];
|
||||||
}
|
}
|
||||||
else if(message.author.indexOf('<')!=-1){
|
else if(message.author.indexOf('<')!=-1){
|
||||||
sendername = message.author.split('<')[0];
|
sendername = message.author.split('<')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sendername = message.author;
|
sendername = message.author;
|
||||||
}
|
}
|
||||||
if(message.author.indexOf('<')!=-1){
|
if(message.author.indexOf('<')!=-1){
|
||||||
senderemail = message.author.split('<')[1].split('>')[0];
|
senderemail = message.author.split('<')[1].split('>')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
senderemail = message.author
|
senderemail = message.author
|
||||||
}
|
}
|
||||||
|
|
||||||
//gives the receiver email address
|
//gives the receiver email address
|
||||||
receiveremail = message.mime2DecodedRecipients;
|
receiveremail = message.mime2DecodedRecipients;
|
||||||
|
|
||||||
//parsing the received date in the particular format
|
//parsing the received date in the particular format
|
||||||
receivedDate = stdate.getFullYear()+'/'+(stdate.getMonth()+1)+'/'+stdate.getDate();
|
receivedDate = stdate.getFullYear()+'/'+(stdate.getMonth()+1)+'/'+stdate.getDate();
|
||||||
|
|
||||||
//gives the selected email subject
|
//gives the selected email subject
|
||||||
subject = message.subject;
|
subject = message.subject;
|
||||||
|
|
||||||
//gives the selected email cclist
|
//gives the selected email cclist
|
||||||
cclist = message.ccList;
|
cclist = message.ccList;
|
||||||
|
|
||||||
//gives the selected email message body in text format
|
//gives the selected email message body in text format
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
{
|
{
|
||||||
var listener = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(Components.interfaces.nsISyncStreamListener);
|
var listener = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(Components.interfaces.nsISyncStreamListener);
|
||||||
var uri = message.folder.getUriForMsg(message);
|
var uri = message.folder.getUriForMsg(message);
|
||||||
messenger.messageServiceFromURI(uri)
|
messenger.messageServiceFromURI(uri)
|
||||||
.streamMessage(uri, listener, null, null, false, "");
|
.streamMessage(uri, listener, null, null, false, "");
|
||||||
var folder = message.folder;
|
var folder = message.folder;
|
||||||
messagebody = folder.getMsgTextFromStream(listener.inputStream,message.Charset,65536,32768,false,true,{})
|
messagebody = folder.getMsgTextFromStream(listener.inputStream,message.Charset,65536,32768,false,true,{})
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messagebody = getMessageBrowser().docShell.contentViewer.DOMDocument.body.textContent;
|
messagebody = getMessageBrowser().docShell.contentViewer.DOMDocument.body.textContent;
|
||||||
}
|
}
|
||||||
//gives the selected email message body in html format
|
//gives the selected email message body in html format
|
||||||
msghtmlbody = ""// getMessageBrowser().docShell.contentViewer.DOMDocument.body.innerHTML;
|
msghtmlbody = ""// getMessageBrowser().docShell.contentViewer.DOMDocument.body.innerHTML;
|
||||||
|
|
||||||
//set the initial information for the selected email
|
//set the initial information for the selected email
|
||||||
setSenderEmail(senderemail);
|
setSenderEmail(senderemail);
|
||||||
setSenderName(sendername);
|
setSenderName(sendername);
|
||||||
setReceiverEmail(receiveremail);
|
setReceiverEmail(receiveremail);
|
||||||
setSubject(subject);
|
setSubject(subject);
|
||||||
setReceivedDate(receivedDate);
|
setReceivedDate(receivedDate);
|
||||||
setCCList(cclist);
|
setCCList(cclist);
|
||||||
setMessageBody(messagebody);
|
setMessageBody(messagebody);
|
||||||
getPref().setCharPref('displayName','');
|
getPref().setCharPref('displayName','');
|
||||||
getPref().setCharPref('attachmentdata','');
|
getPref().setCharPref('attachmentdata','');
|
||||||
name = [];
|
name = [];
|
||||||
test = [];
|
test = [];
|
||||||
getPref().setCharPref('attachmentlength',currentAttachments.length);
|
getPref().setCharPref('attachmentlength',currentAttachments.length);
|
||||||
//retrieving the information for the selected email's attachment
|
//retrieving the information for the selected email's attachment
|
||||||
if(currentAttachments.length > 0){
|
if(currentAttachments.length > 0){
|
||||||
for(i=0;i<currentAttachments.length;i++){
|
for(i=0;i<currentAttachments.length;i++){
|
||||||
contentType[i] = currentAttachments[i].contentType;
|
contentType[i] = currentAttachments[i].contentType;
|
||||||
uri = currentAttachments[i].uri;
|
uri = currentAttachments[i].uri;
|
||||||
url[i] = currentAttachments[i].url;
|
url[i] = currentAttachments[i].url;
|
||||||
name[i] = currentAttachments[i].displayName;
|
name[i] = currentAttachments[i].displayName;
|
||||||
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||||
if(navigator.userAgent.indexOf('Linux')!= -1){
|
if(navigator.userAgent.indexOf('Linux')!= -1){
|
||||||
obj.initWithPath("/tmp/");
|
obj.initWithPath("/tmp/");
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Win')!= -1){
|
else if(navigator.userAgent.indexOf('Win')!= -1){
|
||||||
obj.initWithPath("c:\\");
|
obj.initWithPath("c:\\");
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
||||||
obj.initWithPath("/tmp/");
|
obj.initWithPath("/tmp/");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("Not Compatible for this Operating System");
|
alert("Not Compatible for this Operating System");
|
||||||
false();
|
false();
|
||||||
}
|
}
|
||||||
//saving the attachment files in system's temp folder
|
//saving the attachment files in system's temp folder
|
||||||
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
|
test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
|
||||||
}
|
}
|
||||||
//function to read the attachment file contents
|
//function to read the attachment file contents
|
||||||
att =getAttachValue()
|
att =getAttachValue()
|
||||||
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
||||||
createInstance(name,test)
|
createInstance(name,test)
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var openPartnerHandler = {
|
var openPartnerHandler = {
|
||||||
onResult: function(client, context, result) {
|
onResult: function(client, context, result) {
|
||||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||||
// var sendername = getSenderEmail();
|
// var sendername = getSenderEmail();
|
||||||
var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
||||||
var count = arrIdList.Count();
|
var count = arrIdList.Count();
|
||||||
for (i = 0; i < count; i++) {
|
for (var i = 0; i < count; i++) {
|
||||||
var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
|
var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
|
||||||
var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
||||||
var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
|
var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
|
||||||
if(strlSearchResult=="email" && strlSearchResultValue=='')
|
if(strlSearchResult=="email" && strlSearchResultValue=='')
|
||||||
|
@ -192,246 +192,286 @@ var openPartnerHandler = {
|
||||||
alert("Partner is not Available.");
|
alert("Partner is not Available.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(strlSearchResult=="partner_id"){
|
if(strlSearchResult=="partner_id"){
|
||||||
partner_id = strlSearchResultValue;
|
partner_id = strlSearchResultValue;
|
||||||
weburl = getWebServerURL();
|
weburl = getWebServerURL();
|
||||||
|
|
||||||
if (parseInt(partner_id) > 0){
|
if (parseInt(partner_id) > 0){
|
||||||
var t = weburl + "/openerp/form/view?model=res.partner&id="+partner_id;
|
//Encode the url and form an url to have menu in webclient
|
||||||
window.open(t, "", "chrome","resizable=yes,scrollbars=yes,status=yes");
|
var encoded = encodeURIComponent("/openerp/form/view?model=res.partner&id="+partner_id)
|
||||||
|
var t = weburl + "?next=" + encoded
|
||||||
|
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||||
|
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||||
|
messenger.launchExternalURL(t);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("Partner is not Available.");
|
alert("Partner is not Available.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onFault: function (client, ctxt, fault) {
|
onFault: function (client, ctxt, fault) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: function (client, ctxt, status, errorMsg) {
|
onError: function (client, ctxt, status, errorMsg) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchPartner(email)
|
function searchPartner(email)
|
||||||
{
|
{
|
||||||
var branchobj = getPref();
|
var branchobj = getPref();
|
||||||
setServerService('xmlrpc/object');
|
setServerService('xmlrpc/object');
|
||||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||||
arrFinalList = [];
|
arrFinalList = [];
|
||||||
var xmlRpcClient = getXmlRpc();
|
var xmlRpcClient = getXmlRpc();
|
||||||
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
strDbName.data = branchobj.getCharPref("serverdbname");
|
strDbName.data = branchobj.getCharPref("serverdbname");
|
||||||
var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
||||||
struid.data = branchobj.getIntPref('userid');
|
struid.data = branchobj.getIntPref('userid');
|
||||||
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
strpass.data = branchobj.getCharPref("password");
|
strpass.data = branchobj.getCharPref("password");
|
||||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
strobj.data = 'thunderbird.partner';
|
strobj.data = 'thunderbird.partner';
|
||||||
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
strmethod.data = 'search_contact';
|
strmethod.data = 'search_contact';
|
||||||
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
strname.data = email;
|
strname.data = email;
|
||||||
xmlRpcClient.asyncCall(openPartnerHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
|
xmlRpcClient.asyncCall(openPartnerHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function open_partner()
|
function open_partner()
|
||||||
{
|
{
|
||||||
if (check() == false){
|
if (check() == false){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
var version_obj = prefService.getBranch("extensions.");
|
var version_obj = prefService.getBranch("extensions.");
|
||||||
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
version = version_obj.getCharPref("lastAppVersion");
|
version = version_obj.getCharPref("lastAppVersion");
|
||||||
version = parseInt(version[0])
|
version = parseInt(version[0])
|
||||||
|
|
||||||
file = getPredefinedFolder(2);
|
file = getPredefinedFolder(2);
|
||||||
|
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
{
|
{
|
||||||
var emlsArray = gFolderDisplay.selectedMessages;
|
var emlsArray = gFolderDisplay.selectedMessages;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var emlsArray = GetSelectedMessages();
|
var emlsArray = GetSelectedMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
IETtotal = emlsArray.length;
|
IETtotal = emlsArray.length;
|
||||||
IETexported = 0;
|
IETexported = 0;
|
||||||
var msguri = emlsArray[0];
|
var msguri = emlsArray[0];
|
||||||
|
|
||||||
|
|
||||||
//gives the selected email uri
|
//gives the selected email uri
|
||||||
var messageUri= gDBView.URIForFirstSelectedMessage;
|
var messageUri= gDBView.URIForFirstSelectedMessage;
|
||||||
|
|
||||||
|
|
||||||
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
||||||
|
|
||||||
//gives the selected email object
|
//gives the selected email object
|
||||||
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
||||||
|
|
||||||
//functionality to split the author name and email
|
//functionality to split the author name and email
|
||||||
if(message.author.charAt(0) == '"'){
|
if(message.author.charAt(0) == '"'){
|
||||||
sendername = message.author.split('"')[1].split('"')[0];
|
sendername = message.author.split('"')[1].split('"')[0];
|
||||||
}
|
}
|
||||||
else if(message.author.indexOf('<')!=-1){
|
else if(message.author.indexOf('<')!=-1){
|
||||||
sendername = message.author.split('<')[0];
|
sendername = message.author.split('<')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sendername = message.author;
|
sendername = message.author;
|
||||||
}
|
}
|
||||||
if(message.author.indexOf('<')!=-1){
|
if(message.author.indexOf('<')!=-1){
|
||||||
senderemail = message.author.split('<')[1].split('>')[0];
|
senderemail = message.author.split('<')[1].split('>')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
senderemail = message.author
|
senderemail = message.author
|
||||||
}
|
}
|
||||||
searchPartner(senderemail);
|
searchPartner(senderemail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var listDocumentHandler = {
|
var listDocumentHandler = {
|
||||||
onResult: function(client, context, result) {
|
onResult: function(client, context, result) {
|
||||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||||
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
|
||||||
res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
|
res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
|
||||||
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
|
||||||
weburl = getWebServerURL();
|
weburl = getWebServerURL();
|
||||||
if(res_id==0)
|
if(res_id==0)
|
||||||
{
|
{
|
||||||
alert("Document is not available.");
|
alert("Document is not available.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var t = weburl + "/openerp/form/view?model=" + model +"&id=" + res_id;
|
|
||||||
window.open(t, "", "chrome","resizable=yes,scrollbars=yes,status=yes,");
|
var encoded = encodeURIComponent("/openerp/form/view?model=" + model +"&id=" + res_id)
|
||||||
}
|
var t = weburl + "?next=" + encoded
|
||||||
|
var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
|
||||||
},
|
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
|
||||||
onFault: function (client, ctxt, fault) {
|
messenger.launchExternalURL(t);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onFault: function (client, ctxt, fault) {
|
||||||
|
|
||||||
onError: function (client, ctxt, status, errorMsg) {
|
},
|
||||||
|
|
||||||
}
|
onError: function (client, ctxt, status, errorMsg) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//function to archive the mail content through xmlrpc request
|
||||||
|
function parse_eml(){
|
||||||
|
var fpath =""
|
||||||
|
if(navigator.userAgent.indexOf('Linux')!= -1){
|
||||||
|
fpath ="/tmp/"
|
||||||
|
}
|
||||||
|
else if(navigator.userAgent.indexOf('Win')!= -1){
|
||||||
|
fpath ="C:\\"
|
||||||
|
}
|
||||||
|
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
||||||
|
fpath ="/tmp/"
|
||||||
|
}
|
||||||
|
name = fpath + getPref().getCharPref('fname') +".eml"
|
||||||
|
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
|
||||||
|
file.initWithPath( name );
|
||||||
|
if ( file.exists() == false ) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
var is = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance( Components.interfaces.nsIFileInputStream );
|
||||||
|
is.init( file,0x01, 00004, null);
|
||||||
|
var sis = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance( Components.interfaces.nsIScriptableInputStream );
|
||||||
|
sis.init( is );
|
||||||
|
var output = sis.read( sis.available() );
|
||||||
|
return output
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
function open_document()
|
function open_document()
|
||||||
{
|
{
|
||||||
if (check() == false){
|
if (check() == false){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
var version_obj = prefService.getBranch("extensions.");
|
var version_obj = prefService.getBranch("extensions.");
|
||||||
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
version = version_obj.getCharPref("lastAppVersion");
|
version = version_obj.getCharPref("lastAppVersion");
|
||||||
version = parseInt(version[0])
|
version = parseInt(version[0])
|
||||||
|
file = getPredefinedFolder(2);
|
||||||
file = getPredefinedFolder(2);
|
if (version > 2)
|
||||||
|
{
|
||||||
if (version > 2)
|
var emlsArray = gFolderDisplay.selectedMessages;
|
||||||
{
|
}
|
||||||
var emlsArray = gFolderDisplay.selectedMessages;
|
else
|
||||||
}
|
{
|
||||||
else
|
var emlsArray = GetSelectedMessages();
|
||||||
{
|
}
|
||||||
var emlsArray = GetSelectedMessages();
|
IETtotal = emlsArray.length;
|
||||||
}
|
IETexported = 0;
|
||||||
|
var msguri = emlsArray[0];
|
||||||
IETtotal = emlsArray.length;
|
|
||||||
IETexported = 0;
|
|
||||||
var msguri = emlsArray[0];
|
|
||||||
|
|
||||||
//gives the selected email uri
|
//gives the selected email uri
|
||||||
var messageUri= gDBView.URIForFirstSelectedMessage;
|
var messageUri= gDBView.URIForFirstSelectedMessage;
|
||||||
|
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
||||||
|
//gives the selected email object
|
||||||
|
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
||||||
|
if (version > 2)
|
||||||
|
{
|
||||||
|
m_uri = message.folder.getUriForMsg(message);
|
||||||
|
saveMsgAsEML(m_uri,file,false,emlsArray,null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
saveMsgAsEML(msguri,file,false,emlsArray,null);
|
||||||
|
}
|
||||||
|
//gives the received email date
|
||||||
|
var stdate = new Date(message.date / 1000);
|
||||||
|
var branchobj = getPref();
|
||||||
|
setServerService('xmlrpc/object');
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||||
|
var xmlRpcClient = getXmlRpc();
|
||||||
|
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
|
strDbName.data = branchobj.getCharPref("serverdbname");
|
||||||
|
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
||||||
|
struids.data = branchobj.getIntPref('userid');
|
||||||
|
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
|
strpass.data = branchobj.getCharPref("password");
|
||||||
|
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
|
strmethod.data = 'search_message';
|
||||||
|
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||||
|
strobj.data = 'thunderbird.partner';
|
||||||
|
var eml_string = parse_eml()
|
||||||
|
var a = ['message'];
|
||||||
|
var b = [eml_string];
|
||||||
|
var arrofarr = dictcontact(a,b);
|
||||||
|
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||||
|
}
|
||||||
|
|
||||||
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
|
||||||
|
|
||||||
//gives the selected email object
|
|
||||||
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
|
||||||
|
|
||||||
|
|
||||||
var branchobj = getPref();
|
|
||||||
setServerService('xmlrpc/object');
|
|
||||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
|
||||||
var xmlRpcClient = getXmlRpc();
|
|
||||||
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
|
||||||
strDbName.data = branchobj.getCharPref("serverdbname");
|
|
||||||
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
|
||||||
struids.data = branchobj.getIntPref('userid');
|
|
||||||
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
|
||||||
strpass.data = branchobj.getCharPref("password");
|
|
||||||
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
|
||||||
strmethod.data = 'search_message';
|
|
||||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
|
||||||
strobj.data = 'thunderbird.partner';
|
|
||||||
var a = ['message_id'];
|
|
||||||
var b = ['<'+message.messageId+'>'];
|
|
||||||
var arrofarr = dictcontact(a,b);
|
|
||||||
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
|
||||||
}
|
|
||||||
|
|
||||||
function open_contact()
|
function open_contact()
|
||||||
{
|
{
|
||||||
if (check() == false){
|
if (check() == false){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
var version_obj = prefService.getBranch("extensions.");
|
var version_obj = prefService.getBranch("extensions.");
|
||||||
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
version = version_obj.getCharPref("lastAppVersion");
|
version = version_obj.getCharPref("lastAppVersion");
|
||||||
version = parseInt(version[0])
|
version = parseInt(version[0])
|
||||||
|
|
||||||
file = getPredefinedFolder(2);
|
file = getPredefinedFolder(2);
|
||||||
|
|
||||||
if (version > 2)
|
if (version > 2)
|
||||||
{
|
{
|
||||||
var emlsArray = gFolderDisplay.selectedMessages;
|
var emlsArray = gFolderDisplay.selectedMessages;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var emlsArray = GetSelectedMessages();
|
var emlsArray = GetSelectedMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
IETtotal = emlsArray.length;
|
IETtotal = emlsArray.length;
|
||||||
IETexported = 0;
|
IETexported = 0;
|
||||||
var msguri = emlsArray[0];
|
var msguri = emlsArray[0];
|
||||||
|
|
||||||
|
|
||||||
//gives the selected email uri
|
//gives the selected email uri
|
||||||
var messageUri= gDBView.URIForFirstSelectedMessage;
|
var messageUri= gDBView.URIForFirstSelectedMessage;
|
||||||
|
|
||||||
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
|
||||||
|
|
||||||
//gives the selected email object
|
//gives the selected email object
|
||||||
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
|
||||||
|
|
||||||
//functionality to split the author name and email
|
//functionality to split the author name and email
|
||||||
if(message.author.charAt(0) == '"'){
|
if(message.author.charAt(0) == '"'){
|
||||||
sendername = message.author.split('"')[1].split('"')[0];
|
sendername = message.author.split('"')[1].split('"')[0];
|
||||||
}
|
}
|
||||||
else if(message.author.indexOf('<')!=-1){
|
else if(message.author.indexOf('<')!=-1){
|
||||||
sendername = message.author.split('<')[0];
|
sendername = message.author.split('<')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sendername = message.author;
|
sendername = message.author;
|
||||||
}
|
}
|
||||||
if(message.author.indexOf('<')!=-1){
|
if(message.author.indexOf('<')!=-1){
|
||||||
senderemail = message.author.split('<')[1].split('>')[0];
|
senderemail = message.author.split('<')[1].split('>')[0];
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
senderemail = message.author
|
senderemail = message.author
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the initial information for the selected email
|
//set the initial information for the selected email
|
||||||
setSenderEmail(senderemail);
|
setSenderEmail(senderemail);
|
||||||
setSenderName(sendername);
|
setSenderName(sendername);
|
||||||
setPartnerName("");
|
setPartnerName("");
|
||||||
|
@ -461,61 +501,61 @@ window.addEventListener("load", function(e) { Config.onLoad(e); }, false);
|
||||||
|
|
||||||
//function to open the plugin window for searching the records for a particular object
|
//function to open the plugin window for searching the records for a particular object
|
||||||
var Plugin = {
|
var Plugin = {
|
||||||
onLoad: function() {
|
onLoad: function() {
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMenuItemCommand: function() {
|
onMenuItemCommand: function() {
|
||||||
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener("load", function(e) { Plugin.onLoad(e); }, false);
|
window.addEventListener("load", function(e) { Plugin.onLoad(e); }, false);
|
||||||
|
|
||||||
//function to open the window for creating a new partner contact
|
//function to open the window for creating a new partner contact
|
||||||
var Create = {
|
var Create = {
|
||||||
onLoad: function(){
|
onLoad: function(){
|
||||||
this.initialized=true;
|
this.initialized=true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMenuItemCommand: function(){
|
onMenuItemCommand: function(){
|
||||||
window.open("chrome://openerp_plugin/content/create.xul", "", "chrome");
|
window.open("chrome://openerp_plugin/content/create.xul", "", "chrome");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener("load", function(e) { Create.onLoad(e); }, false);
|
window.addEventListener("load", function(e) { Create.onLoad(e); }, false);
|
||||||
|
|
||||||
var Address = {
|
var Address = {
|
||||||
onLoad: function(){
|
onLoad: function(){
|
||||||
this.initialized=true;
|
this.initialized=true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMenuItemCommand: function(){
|
onMenuItemCommand: function(){
|
||||||
open_contact();
|
open_contact();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//function to open the window for selecting the partner for a new contact creation
|
//function to open the window for selecting the partner for a new contact creation
|
||||||
var Select = {
|
var Select = {
|
||||||
onLoad: function(){
|
onLoad: function(){
|
||||||
this.initialized=true;
|
this.initialized=true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMenuItemCommand: function(){
|
onMenuItemCommand: function(){
|
||||||
// document.getElementById("txtselectpartner").value="";
|
// document.getElementById("txtselectpartner").value="";
|
||||||
window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
|
window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var CreatePartner = {
|
var CreatePartner = {
|
||||||
onLoad: function(){
|
onLoad: function(){
|
||||||
this.initialized=true;
|
this.initialized=true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMenuItemCommand: function(){
|
onMenuItemCommand: function(){
|
||||||
window.open("chrome://openerp_plugin/content/createpartner.xul", "", "chrome");
|
window.open("chrome://openerp_plugin/content/createpartner.xul", "", "chrome");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addEventListener("load", function(e) { CreatePartner.onLoad(e); }, false);
|
window.addEventListener("load", function(e) { CreatePartner.onLoad(e); }, false);
|
||||||
|
|
||||||
|
|
|
@ -8,54 +8,89 @@
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
|
||||||
|
|
||||||
<menupopup id="taskPopup">
|
<menubar id="mail-menubar" >
|
||||||
<menuitem id="tiny-plugin2" label="&tinyplugin;"
|
<menu insertafter="messageMenu" id="menu_openerp" label="&openerpMenu.label;" accesskey="&openerpMenu.accesskey;">
|
||||||
oncommand="Config.onMenuItemCommand(event);"
|
<menupopup id="taskPopup">
|
||||||
image="&menuicon.value;"
|
<menuitem id="tiny-plugin3" label="&tinyplugin;"
|
||||||
class="menuitem-iconic"
|
oncommand="Config.onMenuItemCommand(event);"
|
||||||
tooltiptext="&pluginconfig.value;"/>
|
image="&menuicon.settings;"
|
||||||
</menupopup>
|
class="menuitem-iconic"
|
||||||
|
tooltiptext="&pluginconfig.value;"
|
||||||
|
/>
|
||||||
|
<menuseparator/>
|
||||||
|
<menuitem id="tiny-plugin4" label="&tinypluginconfig;"
|
||||||
|
oncommand="searchmail();"
|
||||||
|
image="&menuicon.value;"
|
||||||
|
class="menuitem-iconic"
|
||||||
|
tooltiptext="&pluginconfigvalue.value;"
|
||||||
|
/>
|
||||||
|
<menuseparator/>
|
||||||
|
<menuitem id="tiny-openpartner" label="&openpartner.value;"
|
||||||
|
oncommand="open_partner();"
|
||||||
|
image="&menuicon.value;"
|
||||||
|
class="menuitem-iconic"
|
||||||
|
tooltiptext="&openpartnertooltip.value;"
|
||||||
|
/>
|
||||||
|
|
||||||
<menupopup id="taskPopup">
|
<menuitem id="tiny-opendocument" label="&opendocument.value;"
|
||||||
<menuitem id="tiny-plugin1" label="&tinypluginconfig;"
|
oncommand="open_document();"
|
||||||
oncommand="searchmail();"
|
image="&menuicon.value;"
|
||||||
image="&menuicon.value;"
|
class="menuitem-iconic"
|
||||||
class="menuitem-iconic"
|
tooltiptext="&opendocumenttooltip.value;"
|
||||||
tooltiptext="&pluginconfigvalue.value;"/>
|
/>
|
||||||
</menupopup>
|
|
||||||
|
</menupopup>
|
||||||
|
</menu>
|
||||||
|
</menubar>
|
||||||
|
|
||||||
|
<!--<menupopup id="taskPopup">-->
|
||||||
|
<!-- <menuitem id="tiny-plugin2" label="&tinyplugin;"-->
|
||||||
|
<!-- oncommand="Config.onMenuItemCommand(event);"-->
|
||||||
|
<!-- image="&menuicon.value;"-->
|
||||||
|
<!-- class="menuitem-iconic"-->
|
||||||
|
<!-- tooltiptext="&pluginconfig.value;"/>-->
|
||||||
|
<!--</menupopup>-->
|
||||||
|
|
||||||
|
<!--<menupopup id="taskPopup">-->
|
||||||
|
<!-- <menuitem id="tiny-plugin1" label="&tinypluginconfig;"-->
|
||||||
|
<!-- oncommand="searchmail();"-->
|
||||||
|
<!-- image="&menuicon.value;"-->
|
||||||
|
<!-- class="menuitem-iconic"-->
|
||||||
|
<!-- tooltiptext="&pluginconfigvalue.value;"/>-->
|
||||||
|
<!--</menupopup>-->
|
||||||
|
|
||||||
<popup id="threadPaneContext">
|
<popup id="threadPaneContext">
|
||||||
<menuitem id="threadPaneContext-saveAsMultiple"
|
<menuitem id="threadPaneContext-saveAsMultiple"
|
||||||
insertbefore="threadPaneContext-print"
|
insertbefore="threadPaneContext-print"
|
||||||
class="menuitem-iconic"
|
class="menuitem-iconic"
|
||||||
image="&menuicon.value;"
|
image="&menuicon.value;"
|
||||||
label="Archive To OpenERP"
|
label="Archive To OpenERP"
|
||||||
accesskey="T"
|
accesskey="T"
|
||||||
oncommand="searchmail();"/>
|
oncommand="searchmail();"/>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<toolbarpalette id="MailToolbarPalette">
|
<toolbarpalette id="MailToolbarPalette">
|
||||||
<toolbarbutton id="GA-button"
|
<toolbarbutton id="GA-button"
|
||||||
class="toolbarbutton-1"
|
class="toolbarbutton-1"
|
||||||
image="&menuicon.value;"
|
image="&menuicon.value;"
|
||||||
label= "Push To OpenERP"
|
label= "Push"
|
||||||
oncommand="searchmail();" />
|
oncommand="searchmail();" />
|
||||||
</toolbarpalette>
|
</toolbarpalette>
|
||||||
|
|
||||||
<toolbarpalette id="MailToolbarPalette">
|
<toolbarpalette id="MailToolbarPalette">
|
||||||
<toolbarbutton id="GA-button2"
|
<toolbarbutton id="GA-button2"
|
||||||
class="toolbarbutton-1"
|
class="toolbarbutton-1"
|
||||||
image="&partnericon.value;"
|
image="&partnericon.value;"
|
||||||
label= "Open Partner"
|
label= "Partner"
|
||||||
oncommand="open_partner();"
|
oncommand="open_partner();"
|
||||||
/>
|
/>
|
||||||
</toolbarpalette>
|
</toolbarpalette>
|
||||||
<toolbarpalette id="MailToolbarPalette">
|
<toolbarpalette id="MailToolbarPalette">
|
||||||
<toolbarbutton id="GA-button3"
|
<toolbarbutton id="GA-button3"
|
||||||
class="toolbarbutton-1"
|
class="toolbarbutton-1"
|
||||||
image="&imagearchive.value;"
|
image="&imagearchive.value;"
|
||||||
label= "Open Document"
|
label= "Document"
|
||||||
oncommand="open_document();" />
|
oncommand="open_document();" />
|
||||||
</toolbarpalette>
|
</toolbarpalette>
|
||||||
|
|
||||||
</overlay>
|
</overlay>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/plugin.dtd">
|
<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/plugin.dtd">
|
||||||
<window id="pluginwindows" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
<window id="pluginwindows" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
title="&title.label;" onload="myPrefObserver.loaddata()" height="650" width="1000">
|
title="&title.label;" onload="myPrefObserver.loaddata()" height="560" width="960">
|
||||||
|
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/config.js"></script>
|
||||||
|
@ -12,11 +12,9 @@
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
|
||||||
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
|
<script type="text/javascript" src="chrome://openerp_plugin/content/exportTools.js"></script>
|
||||||
<description></description>
|
<description></description>
|
||||||
<hbox id="root" height="10" width="800" style="padding:12px;border:1px solid black">
|
<hbox id="root" height="10" width="800" >
|
||||||
|
|
||||||
<caption label="&title.label;" />
|
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox id="root1" height="380" width="800" style="padding:12px;border:1px solid black">
|
<hbox id="root1" height="380" width="800" >
|
||||||
<vbox>
|
<vbox>
|
||||||
<caption label="&gptinyobj.label;" />
|
<caption label="&gptinyobj.label;" />
|
||||||
<groupbox id="existsobjectgroup" width="400" style="border:1px solid black">
|
<groupbox id="existsobjectgroup" width="400" style="border:1px solid black">
|
||||||
|
@ -42,6 +40,7 @@
|
||||||
<listbox height="250" width="100%" id="listSearchBox" style="border:1px solid red" seltype="multiple">
|
<listbox height="250" width="100%" id="listSearchBox" style="border:1px solid red" seltype="multiple">
|
||||||
<listhead>
|
<listhead>
|
||||||
<listheader label="&listSearchBox.header;"/>
|
<listheader label="&listSearchBox.header;"/>
|
||||||
|
<!-- <listheader label="&listSearchBox.header2;"/>-->
|
||||||
</listhead>
|
</listhead>
|
||||||
<listcols>
|
<listcols>
|
||||||
<listcol flex="1"/>
|
<listcol flex="1"/>
|
||||||
|
@ -58,42 +57,42 @@
|
||||||
|
|
||||||
<vbox>
|
<vbox>
|
||||||
<caption label="&newobject.label;" />
|
<caption label="&newobject.label;" />
|
||||||
<groupbox id="newobjectgroup" width="400" align="left" style="border:1px solid black;">
|
<groupbox id="newobjectgroup" width="400" align="left" style="border:1px solid black;">
|
||||||
|
<separator class="groove-thin" orient="horizontal" width="400" height="30"/>
|
||||||
<separator class="groove-thin" orient="horizontal" width="400"/>
|
<hbox align="left">
|
||||||
<hbox align="left">
|
<vbox>
|
||||||
<vbox>
|
<label id="lblex3" align="right" width="135" control="section" value="&object.label;"/>
|
||||||
<label id="lblex3" align="right" width="135" control="section" value="&object.label;"/>
|
</vbox>
|
||||||
</vbox>
|
<vbox>
|
||||||
<vbox>
|
<menulist id="section" width="150">
|
||||||
<menulist id="section" width="150">
|
<menupopup>
|
||||||
<menupopup>
|
<menuitem label="" value=""/>
|
||||||
<menuitem label="" value=""/>
|
</menupopup>
|
||||||
</menupopup>
|
</menulist>
|
||||||
</menulist>
|
</vbox>
|
||||||
</vbox>
|
<vbox>
|
||||||
<vbox>
|
<button width="50" label="&archive.label;" accesskey="c" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('create');"/>
|
||||||
<button width="50" label="&archive.label;" accesskey="c" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('create');"/>
|
</vbox>
|
||||||
</vbox>
|
</hbox>
|
||||||
</hbox>
|
<separator class="groove-thin" orient="horizontal" width="180" height="100"/>
|
||||||
|
</groupbox>
|
||||||
|
<caption label="&newcontact.label;" />
|
||||||
|
<groupbox id="newcontactgroup" width="400" align="left" style="border:1px solid black;">
|
||||||
|
<separator class="groove-thin" orient="horizontal" width="400" height="30"/>
|
||||||
|
<hbox align="left">
|
||||||
|
<vbox>
|
||||||
|
<label align="right" width="135" id="lblsection" control="section" value="&partner.label;"/>
|
||||||
|
</vbox>
|
||||||
|
<vbox>
|
||||||
|
<button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
|
||||||
|
</vbox>
|
||||||
|
</hbox>
|
||||||
|
<separator class="groove-thin" orient="horizontal" width="180" height="215"/>
|
||||||
|
</groupbox>
|
||||||
|
|
||||||
<separator class="groove-thin" orient="horizontal" width="180"/>
|
</vbox>
|
||||||
|
</hbox>
|
||||||
<hbox align="left">
|
<hbox height="60" align="right" width="800">
|
||||||
<vbox>
|
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
|
||||||
<label align="right" width="135" id="lblsection" control="section" value="&partner.label;"/>
|
</hbox>
|
||||||
</vbox>
|
|
||||||
<vbox>
|
|
||||||
<button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
|
|
||||||
</vbox>
|
|
||||||
</hbox>
|
|
||||||
<separator class="groove-thin" orient="horizontal" width="480"/>
|
|
||||||
</groupbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
|
|
||||||
</hbox>
|
|
||||||
<hbox height="60" align="right" width="800">
|
|
||||||
<button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
|
|
||||||
</hbox>
|
|
||||||
</window>
|
</window>
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
<!ENTITY tinyplugin "OpenERP Configuration">
|
<!ENTITY tinyplugin "Configuration">
|
||||||
<!ENTITY tinypluginconfig "Push To OpenERP">
|
<!ENTITY tinypluginconfig "Push">
|
||||||
<!ENTITY tinyarchive "Push to OpenERP">
|
<!ENTITY tinyarchive "Push to OpenERP">
|
||||||
<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
|
<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
|
||||||
|
<!ENTITY menuicon.settings "chrome://openerp_plugin/skin/settings.png">
|
||||||
<!ENTITY menuicon.value "chrome://openerp_plugin/skin/openerp-icon.png">
|
<!ENTITY menuicon.value "chrome://openerp_plugin/skin/openerp-icon.png">
|
||||||
<!ENTITY partnericon.value "chrome://openerp_plugin/skin/partner_icon.png">
|
<!ENTITY partnericon.value "chrome://openerp_plugin/skin/partner_icon.png">
|
||||||
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/document-new.png">
|
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/document-new.png">
|
||||||
<!ENTITY tooltip.value "Add To Archive">
|
<!ENTITY tooltip.value "Add To Archive">
|
||||||
<!ENTITY pluginconfig.value "OpenERP Configuration Settings">
|
<!ENTITY pluginconfig.value "OpenERP Configuration Settings">
|
||||||
<!ENTITY pluginconfigvalue.value "Archieve To OpenERP Settings">
|
<!ENTITY pluginconfigvalue.value "Archieve To OpenERP Settings">
|
||||||
|
<!ENTITY openerpMenu.label "OpenERP">
|
||||||
|
<!ENTITY openerpMenu.accesskey "OE">
|
||||||
|
<!ENTITY openpartner.value "Partner">
|
||||||
|
<!ENTITY openpartnertooltip.value "Click to Open Partner Realted to Sender Eamil address.">
|
||||||
|
<!ENTITY opendocument.value "Document">
|
||||||
|
<!ENTITY opendocumenttooltip.value "Click to See the Mail if it is archived to OpenERP.">
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!ENTITY title.label "Push To OpenERP">
|
<!ENTITY title.label "Push To OpenERP">
|
||||||
<!ENTITY gptinyobj.label "Link to an Existing Document">
|
<!ENTITY gptinyobj.label "Link to an Existing Document">
|
||||||
<!ENTITY newobject.label "New Documents">
|
<!ENTITY newobject.label "Create a New Documents">
|
||||||
<!ENTITY document.label "Documents">
|
<!ENTITY document.label "Documents">
|
||||||
<!ENTITY bsearch.label "Search">
|
<!ENTITY bsearch.label "Search">
|
||||||
<!ENTITY close.label "Close">
|
<!ENTITY close.label "Close">
|
||||||
|
@ -27,3 +27,5 @@
|
||||||
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/Archive.png">
|
<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/Archive.png">
|
||||||
<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
|
<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
|
||||||
<!ENTITY gptinyobjexe.label "Documents">
|
<!ENTITY gptinyobjexe.label "Documents">
|
||||||
|
<!ENTITY newcontact.label "Create a New Contact">
|
||||||
|
<!ENTITY listSearchBox.header2 "Document Type">
|
||||||
|
|
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 897 B |
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 888 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 848 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 796 B |
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -24,7 +24,7 @@ pref("extensions.tiny.partnername","");
|
||||||
pref("extensions.tiny.officeno","");
|
pref("extensions.tiny.officeno","");
|
||||||
pref("extensions.tiny.phoneno","");
|
pref("extensions.tiny.phoneno","");
|
||||||
pref("extensions.tiny.address","");
|
pref("extensions.tiny.address","");
|
||||||
pref("extensions.tiny.listobject","Partner,Accout Invoice,Product,Sale Order,Lead and opportunities");
|
pref("extensions.tiny.listobject","Partner,Account Invoice,Product,Sale Order,Lead and opportunities");
|
||||||
pref("extensions.tiny.object","res.partner,account.invoice,product.product,sale.order,crm.lead");
|
pref("extensions.tiny.object","res.partner,account.invoice,product.product,sale.order,crm.lead");
|
||||||
pref("extensions.tiny.imagename","chrome://openerp_plugin/skin/Partner.png,chrome://openerp_plugin/skin/Invoice.png,chrome://openerp_plugin/skin/Product.png,chrome://openerp_plugin/skin/Sale.png,chrome://openerp_plugin/skin/Case.png");
|
pref("extensions.tiny.imagename","chrome://openerp_plugin/skin/Partner.png,chrome://openerp_plugin/skin/Invoice.png,chrome://openerp_plugin/skin/Product.png,chrome://openerp_plugin/skin/Sale.png,chrome://openerp_plugin/skin/Case.png");
|
||||||
pref("extensions.tiny.attachmentlength","");
|
pref("extensions.tiny.attachmentlength","");
|
||||||
|
|