summaryrefslogtreecommitdiff
path: root/addons/thunderbird/plugin/chrome
diff options
context:
space:
mode:
authorksa (Open ERP) <ksa@tinyerp.co.in>2010-08-17 17:01:58 +0530
committerksa (Open ERP) <ksa@tinyerp.co.in>2010-08-17 17:01:58 +0530
commit81611a030d147fdf9bfa4e48ffa1daedf7144d31 (patch)
tree7d56e188782fd07868ecff808007abba325c52ad /addons/thunderbird/plugin/chrome
parent67d33f1853b55764d8772d8daec3a4d36867e95a (diff)
[REM] : unnecessary files
bzr revid: ksa@tinyerp.co.in-20100817113158-d4pzimk9v67gyd4h
Diffstat (limited to 'addons/thunderbird/plugin/chrome')
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin.jarbin69294 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/address.xul117
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/config.js163
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/config.xul113
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/config_change.xul33
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/create.xul109
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/createpartner.xul26
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/exportTools.js248
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/loaddata.js134
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.js315
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.xul62
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/plugin.xul92
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/selectpartner.xul35
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/content/static.js19
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js2046
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/address.dtd26
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config.dtd49
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd5
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/create.dtd37
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/createpartner.dtd7
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/mboximport.properties31
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd11
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/plugin.dtd28
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/selectpartner.dtd12
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Account.pngbin897 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Archive.pngbin852 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Case.pngbin816 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Contact.pngbin703 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Create.pngbin888 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Error.gifbin1037 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Invoice.pngbin852 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Move.gifbin155 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveDown.pngbin352 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveLeft.pngbin363 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT.pngbin789 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT1.pngbin2020 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Partner.pngbin790 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Product.pngbin796 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Project.pngbin823 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Sale.pngbin802 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Search.gifbin582 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Success.gifbin604 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/Task.pngbin867 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/developped_by.pngbin11303 -> 0 bytes
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/skin/document-new.pngbin1302 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/openerp-icon.pngbin1356 -> 0 bytes
-rwxr-xr-xaddons/thunderbird/plugin/chrome/openerp_plugin/skin/overlay.css3
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/partner.pngbin1429 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/perform.gifbin89 -> 0 bytes
-rw-r--r--addons/thunderbird/plugin/chrome/openerp_plugin/skin/tinyerp-icon.icobin1406 -> 0 bytes
50 files changed, 0 insertions, 3721 deletions
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/chrome/openerp_plugin.jar
deleted file mode 100644
index 986c9fa7551..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin.jar
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/address.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/address.xul
deleted file mode 100644
index 2d6f0e2dec1..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/address.xul
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/address.dtd">
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&title.label;" onload="myPrefObserver.createContactAddress()" height="380" width="800">
-
-<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/loaddata.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>
-
-<tabpanel id="contact">
- <groupbox id="contact">
- <hbox>
- <label align="right" id="emailid" value="&emailid.value;" width="94" />
- <textbox id="txtemail" width="268" align="right"/>
- <spacer width="5"/>
- <button label="&create.label;" accesskey="r" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
- <button label="&bsearch.label;" oncommand="searchContactdetail();" image="&imagesearch.value;"/>
- </hbox>
- <hbox>
- <label align="right" id="name" value="&name.value;" width="80" />
- <textbox id="txtname" align="right" width="270" readonly="true"/>
- <spacer width="5"/>
- <button label="New Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);" width="133"/>
- </hbox>
- </groupbox>
-</tabpanel>
-
-<tabpanel id="address">
- <groupbox id="address">
- <hbox>
- <caption label="&postaladdress.value;" />
- <spacer width="300"/>
- <vbox>
- <caption label="&communication.value;" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="contactname" value="&contactname.value;" width="80" />
- <textbox id="txtcontactname" align="right" width="270" />
- <spacer width="33"/>
- <vbox>
- <label align="right" id="office" value="&office.value;" width="50" />
- </vbox>
- <vbox>
- <textbox id="txtoffice" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="street" value="&street.value;" width="97" />
- <textbox id="txtstreet" width="270"/>
- <spacer width="33"/>
- <vbox>
- <label align="right" id="mobile" value="&mobile.value;" width="50" />
- </vbox>
- <vbox>
- <textbox id="txtmobile"/>
- </vbox>
- </hbox>
- <hbox>
- <label align="right" id="street2" value="&street2.value;" width="97" />
- <textbox id="txtstreet2" width="270"/>
- <spacer width="35"/>
- <vbox>
- <label align="right" id="fax" value="&fax.value;" width="48" />
- </vbox>
- <vbox>
- <textbox id="txtfax" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="zip" value="&zip.value;" width="97" />
- <textbox id="txtzip" />
- <spacer width="115"/>
- </hbox>
-
- <hbox>
- <label align="right" id="city" value="&city.value;" width="97" />
- <textbox id="txtcity" />
- </hbox>
-
- <hbox>
- <label align="right" id="countryname" value="&country.value;" width="97" />
- <menulist id="country" width="190">
- <menupopup>
- <menuitem label="" value=""/>
- </menupopup>
- </menulist>
- </hbox>
-
- <hbox>
- <label align="right" id="statename" value="&state.value;" width="97" />
- <menulist id="state" width="190">
- <menupopup>
- <menuitem label="" value=""/>
- </menupopup>
- </menulist>
- </hbox>
-</groupbox>
-</tabpanel>
-
-<description></description>
-
-<hbox>
- <spacer width="600"/>
- <button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
- <button label="&ok.label;" image="&imageok.value;" oncommand="UpdateContact();"/>
-
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.js
deleted file mode 100755
index 5757897de96..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.js
+++ /dev/null
@@ -1,163 +0,0 @@
-
-function config_close()
-{
- //window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- //ksa
- window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
-}
-
-//set the value of the configuration fields
-function config_change_load()
-{
- var s = getServer();
- var a =s.split(':');
- if (String(a)=="" || String(a)=="undefined"){
- document.getElementById('txtcurl').value = "localhost"
- document.getElementById('txtcport').value = "8069"
- }
- else
- {
- len = a[1];
- var url = "";
- for (i=0;i<len.length;i++)
- { if (len[i] == "/")
- {
- continue
- }
- url += len[i]
- }
- if (String(url) == "" || String(url) == "undefined"){
- document.getElementById('txtcurl').value = "localhost"
- }
- else
- {
- document.getElementById('txtcurl').value = url
- }
-
- if (String(a[2]) == "" || String(a[2]) == "undefined"){
- document.getElementById('txtcport').value = "8069"
- setPort("8069");
- }
- else
- {
- document.getElementById('txtcport').value = a[2]
- setPort(a[2]);
- }
-
- }
-}
-function config_ok()
-{
- if (document.getElementById('txtcurl').value == '')
- {
- alert("You Must Enter Server Name!")
- return false;
-
- }
- if (document.getElementById('txtcport').value == '')
- {
- alert("You Must Enter Port!")
- return false;
- }
- setServer("http://"+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
- window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- //ksa
- window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
-}
-function openConfigChange()
-{
- //window.open("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- //ksa
- window.close("chrome://openerp_plugin/content/config.xul", "", "chrome");
- window.open("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
-}
-
-function appendDbList()
-{
- setServerService('xmlrpc/db');
- getDbList('DBlist');
-}
-
-//set the database list in the listbox in configuration window
-function setDb()
-{
- var cmbDbList = document.getElementById('listDBListBox');
- document.getElementById('DBlist').value = cmbDbList.getItemAtIndex(cmbDbList.selectedIndex).value;
-}
-
-//stores the value of configuration fields in preferences
-function okClick()
-{
- if (getDBList()=="false")
- {
- if (document.getElementById('DBlist_text').value =='')
- {
- alert("You Must Enter Database Name");
- return false;
- }
- setDbName(document.getElementById('DBlist_text').value);
- }
- else if(document.getElementById('DBlist') != null)
- {
- setDbName(document.getElementById('DBlist').value);
- }
- setServer(document.getElementById('txturl').value);
- var s = document.getElementById('txturl').value;
- var a =s.split(':');
- setPort(a[a.length-1]);
- setUsername(document.getElementById('txtusername').value);
- setPassword(document.getElementById('txtpassword').value);
- window.close();
-}
-
-//deletes the value of the selected value in the listbox in configuraton menu
-function deleteDocument(){
- if(document.getElementById("listObjectListBox").selectedItem){
- var objectlist = getPref().getCharPref("object").split(',');
- var imagelist = getPref().getCharPref("imagename").split(',');
- var objlist = getPref().getCharPref("listobject").split(',');
- if(objectlist.length>0){
- var objectcharpref = '';
- var imagecharpref = '';
- var objcharpref = '';
- var nodelist = document.getElementById("listObjectListBox").selectedItem.childNodes
- var childnode = document.getElementById("listObjectListBox").childNodes
- for(i=2;i<childnode.length;i++){
- if(childnode[i].hasChildNodes){
- var secondchild = childnode[i].childNodes;
- if (secondchild[1].getAttribute("label") != nodelist[1].getAttribute("label")){
- objcharpref += secondchild[0].getAttribute("label")+',';
- objectcharpref += secondchild[1].getAttribute("label")+',';
- imagecharpref += secondchild[2].getAttribute("image")+',';
- }
- }
- }
- var demo3 = objectcharpref.substring(0,objectcharpref.length-1);
- var demo4 = imagecharpref.substring(0,imagecharpref.length-1);
- var demo5 = objcharpref.substring(0,objcharpref.length-1);
-
- getPref().setCharPref("listobject",demo5);
- getPref().setCharPref("object",demo3);
- getPref().setCharPref("imagename",demo4);
- }
- document.getElementById("listObjectListBox").removeItemAt(document.getElementById("listObjectListBox").selectedIndex)
- }
- else{
- alert("No Document Selected");
- }
-}
-
-//function to add the image file for the checkbox
-function addFile(){
- var nsIFilePicker = Components.interfaces.nsIFilePicker;
- var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- fp.init(this, "Select a File", nsIFilePicker.modeOpen);
- fp.appendFilters(nsIFilePicker.filterImages);
- var res = fp.show();
- if (res == nsIFilePicker.returnOK){
- var thefile = fp.file;
- document.getElementById("txtimagename").value = thefile.path
- }
-}
-
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.xul
deleted file mode 100755
index 348ef92309a..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config.xul
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/config.dtd">
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&title.label;" onload="myPrefObserver.register();" unload="myPrefObserver.unregister()" height="410" width="900">
-<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/loaddata.js"></script>
-<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
-<tabbox>
- <tabs>
- <tab label="Configuration Settings"/>
- <tab label="Document Settings"/>
- <tab label="About"/>
- </tabs>
- <tabpanels>
- <tabpanel id="configtab">
- <vbox >
- <groupbox id="gpConnection" width="770" height="300" align ="center" >
- <caption label="&gpConnection.label;"/>
- <hbox>
- <label align="right" id="url" value="&txturl.label;" width="80" />
- <textbox id="txturl" width="200" readonly="true" />
- <button label="&getdblist.label;" oncommand="openConfigChange();" image="&imagesearch.value;" width="90"/>
- </hbox>
- <hbox align="center" id="database_option">
- </hbox>
- <hbox id="first">
- <label align="right" id="lbldb_list1" control="DBlist" value="&database.label;" width="80"/>
- <textbox id="DBlist_text" width="300"/>
- </hbox>
-
- <hbox >
- <label align="right" control="txtusername" value="&username.label;" width="80"/>
- <textbox id="txtusername" width="300"/>
- </hbox>
- <hbox>
- <label align="right" control="txtpassword" value="&password.label;" width="80"/>
- <textbox id="txtpassword" type="password" width="300"/>
- </hbox>
- <hbox >
- <spacer width="290"/>
- <button align="center" id="btconnection" label="&connection.label;" oncommand="testConnection();" image="&imageok.value;" width="100"/>
- </hbox>
- </groupbox>
- </vbox>
- </tabpanel>
- <tabpanel id="objecttab">
- <groupbox id="gpObject" width="700" >
- <caption label="&listDocument.header;"/>
- <hbox>
- <vbox>
- <hbox>
- <label control="txtobject" value="Title : " />
- <textbox id="txtobj" width="100"/>
- <label control="txtobject" value="&document.label;"/>
- <textbox id="txtobject" width="100"/>
- <label control="txtimagename" value="&image.label;"/>
- <textbox id="txtimagename" width="100" readonly="true" />
- <button id="btaddfile" label="&addfile.label;" oncommand="addFile();" image="&imagemoveleft.value;"/>
-
- <button id="btobjectcreate" label="&documentcreate.label;" oncommand="searchDocument();" image="&imagemovedown.value;"/>
- <button id="btobjectdelete" label="&documentdelete.label;" oncommand="deleteDocument();" image="&imagecancel.value;"/>
- </hbox>
-
- <listbox id="listObjectListBox" flex="1" rows="10">
- <listhead>
- <listheader label="Title"/>
- <listheader label="&listDocumentListBox.header;"/>
- <listheader label="Image"/>
- </listhead>
- <listcols>
- <listcol flex="1"/>
- <listcol flex="2"/>
- <listcol flex="3"/>
- </listcols>
- </listbox>
- </vbox>
- <vbox>
- <description> </description>
- </vbox>
- </hbox>
- </groupbox>
- </tabpanel>
- <tabpanel id="abouttab">
- <groupbox id="gpAbout" width="770" align="center">
- <caption label="&gpAbout.label;"/>
- <image src="chrome://openerp_plugin/skin/developped_by.png" sizemode="stretch" align="center"/>
- <description> </description>
- <description> </description>
- <description>&develop.value;</description>
- <description> </description>
- <description> </description>
- <description>&information.value;</description>
- <description><html:a href="&openerp.value;">&openerp.value;</html:a></description>
- <description><html:a href="&axelor.value;">&axelor.value;</html:a></description>
- <description><html:a href="&tinyerp.value;">&tinyerp.value;</html:a></description>
- <description> </description>
- <description> </description>
- <description>Copyright © 2006-TODAY OpenERP SA All Rights Reserved.</description>
- <description>OpenERP is a trademark of the OpenERP SA Company. OpenERP Web is jointly developed by OpenERP SA and Axelor.</description>
- <description>Licenced under the terms of <html:a href="https://tiny.odoo.com/LICENSE.txt"> OpenERP Public License (OEPL) v1.1 (https://tiny.odoo.com/LICENSE.txt)</html:a> </description>
- </groupbox>
- </tabpanel>
- </tabpanels>
-</tabbox>
-<hbox align="center">
- <spacer width="800"/>
- <button label="&close.label;" oncommand="close();" image="&imagecancel.value;"/>
-</hbox>
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config_change.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/config_change.xul
deleted file mode 100644
index 1e23652d98b..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/config_change.xul
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/config_change.dtd">
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml" onload="config_change_load()"
- title="Openerp Connection" height="140" width="280">
-<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/loaddata.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>
- <hbox>
- <spacer width="70"/>
- <description>Openerp Connection</description>
- </hbox>
-<groupbox id="gpData" width="200">
- <hbox >
- <label id="lblurl" control="txtcurl" value="&lblurl.label;" width="80"/>
- <textbox id="txtcurl" width="100" />
- </hbox>
- <hbox>
- <label id="lblport" control="txtcport" value="&lblport.label;" width="80"/>
- <textbox id="txtcport" width="100" />
- </hbox>
-
-</groupbox>
-<hbox align="right">
- <spacer width="50"/>
- <button label="Cancel" image="&imagecancel.value;" oncommand="config_close();" />
- <button label="OK" image="&imageok.value;" oncommand="config_ok()"/>
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/create.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/create.xul
deleted file mode 100644
index d3d551d63e8..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/create.xul
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/create.dtd">
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&title.label;" onload="myPrefObserver.createContact()" height="350" width="780">
-<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/loaddata.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>
-<tabpanel id="contact">
- <groupbox id="contact">
- <hbox>
- <label align="right" id="partner" value="&selectpartner.value;" width="97" />
- <textbox id="txtselectpartner" readonly="true" value="" width="270"/>
- <button label="&bsearch.label;" oncommand="Select.onMenuItemCommand(event);" image="&imagesearch.value;"/>
- </hbox>
- <hbox>
- <label align="right" id="name" value="&name.value;" width="80" />
- <textbox id="txtname" align="right" width="270"/>
- </hbox>
- </groupbox>
- </tabpanel>
-
- <tabpanel id="address">
- <groupbox id="address">
- <hbox>
- <caption label="&postaladdress.value;" />
- <spacer width="300"/>
- <vbox>
- <caption label="&communication.value;" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="street" value="&street.value;" width="97" />
- <textbox id="txtstreet" width="270"/>
- <spacer width="33"/>
- <vbox>
- <label align="right" id="office" value="&office.value;" width="50" />
- </vbox>
- <vbox>
- <textbox id="txtoffice" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="street2" value="&street2.value;" width="97" />
- <textbox id="txtstreet2" width="270"/>
- <spacer width="35"/>
- <vbox>
- <label align="right" id="fax" value="&fax.value;" width="48" />
- </vbox>
- <vbox>
- <textbox id="txtfax" />
- </vbox>
- </hbox>
- <hbox>
- <label align="right" id="zip" value="&zip.value;" width="97" />
- <textbox id="txtzip" />
- <spacer width="114"/>
- <vbox>
- <label align="right" id="mobile" value="&mobile.value;" width="48" />
- </vbox>
- <vbox>
- <textbox id="txtmobile"/>
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="city" value="&city.value;" width="97"/>
- <textbox id="txtcity" />
- <spacer width="112"/>
- <vbox>
- <label align="right" id="emailid" value="&email.value;" width="50" />
- </vbox>
- <vbox>
- <textbox id="txtemail" width="260" />
- </vbox>
- </hbox>
-
- <hbox>
- <label align="right" id="countryname" value="&country.value;" width="97" />
- <menulist id="country" width="190">
- <menupopup>
- <menuitem label="" value=""/>
- </menupopup>
- </menulist>
- </hbox>
-
- <hbox>
- <label align="right" id="statename" value="&state.value;" width="97" />
- <menulist id="state" width="190">
- <menupopup>
- <menuitem label="" value=""/>
- </menupopup>
- </menulist>
- </hbox>
-</groupbox>
-</tabpanel>
-<description></description>
-<hbox>
- <spacer width="580"/>
- <button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
- <button label="&ok.label;" image="&imageok.value;" oncommand="createContact();"/>
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/createpartner.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/createpartner.xul
deleted file mode 100644
index abc23a5b430..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/createpartner.xul
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/createpartner.dtd">
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&title.label;" height="100" width="325">
-<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/loaddata.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>
-<groupbox id="gpData">
- <hbox>
- <description>&name.value;</description>
- <spacer width="50"/>
- <textbox id="txtname" align="right" />
- </hbox>
-</groupbox>
-<description></description>
-<hbox>
- <spacer width="140"/>
- <button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
- <button label="&ok.label;" image="&imageok.value;" oncommand="createPartner();"/>
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/exportTools.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/exportTools.js
deleted file mode 100644
index 7da3701b1f3..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/exportTools.js
+++ /dev/null
@@ -1,248 +0,0 @@
-
-var MBstrBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
- getService(Components.interfaces.nsIStringBundleService);
-var mboximportbundle = MBstrBundleService.createBundle("chrome://openerp_plugin/locale/mboximport.properties");
-
-
-function saveMsgAsEML(msguri,file,append,uriArray,hdrArray,fileArray) {
-
- var myEMLlistner = {
-
- scriptStream : null,
- emailtext : "",
-
- QueryInterface : function(iid) {
- if (iid.equals(Components.interfaces.nsIStreamListener) ||
- iid.equals(Components.interfaces.nsIMsgHeaderSink) ||
- iid.equals(Components.interfaces.nsISupports))
- return this;
-
- throw Components.results.NS_NOINTERFACE;
- return 0;
- },
-
- onStartRequest : function (aRequest, aContext) {
- this.scriptStream = Components.classes['@mozilla.org/binaryinputstream;1'].createInstance(Components.interfaces.nsIBinaryInputStream);
- },
-
- onStopRequest : function (aRequest, aContext, aStatusCode) {
- this.scriptStream = null;
-
- if (append) {
- if (this.emailtext != "") {
- var data = this.emailtext + "\n";
- // Some Imap servers don't add to the message the "From" prologue
- if (data && ! data.match(/^From/)) {
- var now = new Date;
- var prologue = "From - " + now.toString() + "\n";
- data = prologue+data;
- }
- data = IETescapeBeginningFrom(data);
- }
- var fileClone = file.clone();
- IETwriteDataOnDisk(fileClone,data,true,this.sub,null);
- }
- else {
- if (! hdrArray)
- var sub = getSubjectForHdr(hdr);
- else {
- var parts = hdrArray[IETexported].split("§][§^^§");
- var sub = parts[4];
- }
-
- var data = this.emailtext.replace(/^From.+\r?\n]/, "");
- data = IETescapeBeginningFrom(data);
- var clone = file.clone();
- // The name is taken from the subject "corrected"
- clone.append(sub+".eml");
- clone.createUnique(0,0644);
- var time = (hdr.dateInSeconds)*1000;
- IETwriteDataOnDisk(clone,data,false,null,time);
- }
- IETexported = IETexported + 1;
- IETwritestatus(mboximportbundle.GetStringFromName("exported")+" "+IETexported+" "+mboximportbundle.GetStringFromName("msgs")+" "+IETtotal);
-
- if (IETexported < IETtotal) {
- if (fileArray) {
- var nextUri = uriArray[IETexported];
- var nextFile = fileArray[IETexported];
- }
- else if (! hdrArray) {
- var nextUri = uriArray[IETexported];
- var nextFile = file;
- }
- else {
- parts = hdrArray[IETexported].split("§][§^^§");
- var nextUri = parts[5];
- var nextFile = file;
- }
- saveMsgAsEML(nextUri,nextFile,append,uriArray,hdrArray,fileArray);
- }
- else {
- IETexported = 0;
- IETtotal = 0;
- }
- },
-
- onDataAvailable : function (aRequest, aContext, aInputStream, aOffset, aCount) {
- this.scriptStream.setInputStream(aInputStream);
- var chunk = this.scriptStream.readBytes(aCount);
- this.emailtext += chunk;
- }
- };
- var mms = messenger.messageServiceFromURI(msguri).QueryInterface(Components.interfaces.nsIMsgMessageService);
- var hdr = mms.messageURIToMsgHdr(msguri);
- mms.streamMessage(msguri, myEMLlistner, msgWindow, null, false, null);
-}
-
-
-function nametoascii(str) {
- if (! gPrefBranch.getBoolPref("mboximport.export.filenames_toascii")) {
- str = str.replace(/[\x00-\x19]/g,"_");
- return str.replace(/[\/\\:,<>*\?\"\|]/g,"_");
- }
- if (str)
- str = str.replace(/[^a-zA-Z0-9]/g,"_");
- else
- str = "Undefinied_or_empty";
- return str;
-}
-
-
-function IETwriteDataOnDisk(file,data,append,name,time) {
- var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
- .createInstance(Components.interfaces.nsIFileOutputStream);
- if (append) {
- file.append(name);
- foStream.init(file, 0x02 | 0x08 | 0x10, 0664, 0); // write, create, append
- }
- else
- foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0); // write, create, truncate
- if (data)
- foStream.write(data,data.length);
- foStream.close();
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (time && prefs.getBoolPref("mboximport.export.set_filetime"))
- file.lastModifiedTime = time;
-}
-
-
-
-function IETescapeBeginningFrom(data) {
- // Workaround to fix the "From " in beginning line problem in body messages
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=119441 and
- // https://bugzilla.mozilla.org/show_bug.cgi?id=194382
- // TB2 has uncorrect beahviour with html messages
- // This is not very fine, but I didnt' find anything better...
- var datacorrected = data.replace(/\nFrom /g, "\n From ");
- return datacorrected;
-}
-
-
-function getPredefinedFolder(type) {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- // type 0 = folder
- // type 1 = all messages
- // type 2 = selected messages
-
- var use_dir = "mboximport.exportMSG.use_dir";
-
- var dir_path="";
- if(navigator.userAgent.indexOf('Linux')!= -1){
- dir_path ="/tmp"
- }
- else if(navigator.userAgent.indexOf('Win')!= -1){
- dir_path ="C:\\"
- }
- else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
- dir_path ="/tmp"
- }
- try {
- var localFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
- localFile.initWithPath(dir_path);
- return localFile;
-
- }
- catch(e) {
- return null;
- }
-}
-
-function getSubjectForHdr(hdr) {
- var emlNameType = gPrefBranch.getIntPref("mboximport.exportEML.filename_format");
- var mustcorrectname = gPrefBranch.getBoolPref("mboximport.export.filenames_toascii");
- var subMaxLen = gPrefBranch.getIntPref("mboximport.subject.max_length")-1;
- if (hdr.mime2DecodedSubject)
-
- var subj = hdr.mime2DecodedSubject.substring(0, subMaxLen);
- else
- var subj =IETnosub;
- subj = nametoascii(subj);
- var dateInSec = hdr.dateInSeconds;
- var msgDate8601string = dateInSecondsTo8601(dateInSec);
- var key = hdr.messageKey;
- if (emlNameType == 2) {
- var pattern = gPrefBranch.getCharPref("mboximport.export.filename_pattern");
- pattern = pattern.replace("%s",subj);
- pattern = pattern.replace("%k",key);
- pattern = pattern.replace("%d", msgDate8601string);
- pattern = pattern.replace(/-%e/g, "");
- pattern = pattern.replace(/[\x00-\x19]/g,"_");
- var fname = pattern;
- }
- else {
-
- var fname = msgDate8601string+"-"+subj+"-"+hdr.messageKey;
- }
- setFileName(fname)
- fname = fname.replace(/[\x00-\x19]/g,"_");
- if (mustcorrectname)
- fname = nametoascii(fname);
- else
- fname = fname.replace(/[\/\\:,<>*\?\"\|]/g,"_");
- return fname;
-}
-
-function dateInSecondsTo8601(secs) {
- var addTime = gPrefBranch.getBoolPref("mboximport.export.filenames_addtime");
- var msgDate = new Date(secs*1000);
- var msgDate8601 = msgDate.getFullYear();
- if (msgDate.getMonth() < 9)
- var month = "0"+(msgDate.getMonth()+1);
- else
- var month = msgDate.getMonth()+1;
- if (msgDate.getDate() < 10)
- var day = "0"+ msgDate.getDate();
- else
- var day = msgDate.getDate();
- var msgDate8601string = msgDate8601.toString()+month.toString()+day.toString();
- if (addTime && gPrefBranch.getIntPref("mboximport.exportEML.filename_format") == 2) {
- if (msgDate.getHours() < 10)
- var hours = "0"+msgDate.getHours();
- else
- var hours = msgDate.getHours();
- if (msgDate.getMinutes() < 10)
- var min = "0"+msgDate.getMinutes();
- else
- var min = msgDate.getMinutes();
- msgDate8601string += "-"+ hours.toString() + min.toString();
- }
- return msgDate8601string;
-}
-
-function IETwritestatus(text) {
- document.getElementById("statusText").setAttribute("label", text);
- var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
- var delay = prefs.getIntPref("mboximport.delay.clean_statusbar");
- if (delay > 0)
- window.setTimeout(function(){IETdeletestatus(text);}, delay);
-}
-
-function IETdeletestatus(text) {
- if (document.getElementById("statusText").getAttribute("label") == text)
- document.getElementById("statusText").setAttribute("label", "");
-}
-
-
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/loaddata.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/loaddata.js
deleted file mode 100755
index 93d21f56f5c..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/loaddata.js
+++ /dev/null
@@ -1,134 +0,0 @@
-//gives the preference branch instance
-var preferenceBranch = getPref();
-
-//returns the selected checkbox for searching
-function getnamesearch()
-{
- var checkboxlist = [];
- var j=0;
- var objectlist = preferenceBranch.getCharPref("object").split(',');
- if (objectlist[0]!=''){
- for (var i=1;i<=objectlist.length;i++)
- {
- if(document.getElementById('cbx'+i) && document.getElementById('cbx'+i).checked == true)
- {
- checkboxlist[j] = objectlist[i-1] //document.getElementById('cbx'+i).label;
- j++;
- }
- }
- }
- return checkboxlist;
-}
-//function to set the text value for the selected partner for contact creation
-function selectPartner(){
- if(document.getElementById('listPartnerBox').selectedItem){
- var listselectedItem = document.getElementById('listPartnerBox').selectedItem;
- var value = listselectedItem.firstChild.getAttribute('label');
- setPartnerId(listselectedItem.value);
- document.getElementById('txtselectpartner').setAttribute('value',value);
- window.opener.document.getElementById('txtselectpartner').setAttribute('value',value);
- }
- else{
- window.opener.document.getElementById('txtselectpartner').setAttribute('value','');
- }
-}
-
-//function for the intialization procedure //used while loading and unloading of the window
-var myPrefObserver =
-{
- //set the intial value of the email for the text field in plugin window and also loads the listbox of objects with image
- loaddata: function()
- {
- setTimeout("listSearchDocumentAttachment()", 0)
- },
-
- //set the initial value of name and email field of create contact window
- createContact: function()
- {
- document.getElementById("txtname").value = getSenderName();
- document.getElementById("txtemail").value = getSenderEmail();
- document.getElementById("country").value = getAllCountry();
- document.getElementById("state").value = getAllState();
- setPartnerId(0);
- },
-
- //sets the value of email information in preferences and adds observer for the window
- register: function()
- {
- appendDbList()
- preferenceBranch.addObserver("", myPrefObserver, false);
- document.getElementById("txturl").value = getServer();
- var s = document.getElementById('txturl').value;
- var a =s.split(':');
- setPort(a[a.length-1]);
- document.getElementById("txtusername").value = getUsername();
- document.getElementById("txtpassword").value = getPassword();
- document.getElementById("DBlist_text").value = getDbName();
- if(getPref().getCharPref("object") != ''){
- var objectlist = getPref().getCharPref("object").split(',');
- var imagelist = getPref().getCharPref("imagename").split(',');
- var obj = getPref().getCharPref("listobject").split(',');
- if(objectlist.length>0){
- for(i=0;i<objectlist.length;i++){
- var listItem = document.createElement("listitem");
- var listcell1 = document.createElement("listcell");
- var listcell2 = document.createElement("listcell");
- var listcell3 = document.createElement("listcell");
- listcell1.setAttribute("label",obj[i]);
- listcell2.setAttribute("label",objectlist[i]);
- listcell3.setAttribute("image",imagelist[i]);
- listcell3.setAttribute("class","listcell-iconic")
- listcell3.setAttribute("width",16)
- listcell3.setAttribute("height",16)
- listItem.appendChild(listcell1);
- listItem.appendChild(listcell2);
- listItem.appendChild(listcell3);
- document.getElementById("listObjectListBox").appendChild(listItem);
-
- }
- }
- }
- },
-
- createContactAddress: function()
- {
- document.getElementById("txtname").value = getPartnerName();
- document.getElementById("txtcontactname").value = getSenderName();
- document.getElementById("txtstreet").value = getStreet();
- document.getElementById("txtstreet2").value = getStreet2();
- document.getElementById("txtzip").value = getZipCode();
- document.getElementById("txtcity").value = getCity();
- document.getElementById("txtoffice").value = getOfficenumber();
- document.getElementById("txtfax").value = getFax();
- document.getElementById("txtmobile").value = getMobilenumber();
- document.getElementById("txtemail").value = getSenderEmail();
- document.getElementById("country").value =getAllCountry();
- document.getElementById("state").value = getAllState();
- },
-
- //unregistering the window observer
- unregister: function()
- {
- if(!preferenceBranch) return;
- preferenceBranch.removeObserver("", myPrefObserver);
- },
-
- observe: function(aSubject, aTopic, aData)
- {
- if(aTopic != "nsPref:changed") return;
- // aSubject is the nsIPrefBranch we're observing (after appropriate QI)
- // aData is the name of the pref that's been changed (relative to aSubject)
- switch (aData) {
- case "serverport":
- break;
- case "serverurl":
- break;
- case "serverdbname":
- break;
- }
- },
-}
-
-function runMoreCode()
-{
-}
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.js
deleted file mode 100755
index 7d7c9098bce..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.js
+++ /dev/null
@@ -1,315 +0,0 @@
-//global array creation and declaration
-var contentType = new Array();
-var uri = new Array();
-var url = new Array();
-var name = new Array();
-var test = new Array();
-
-var MBstrBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].
- getService(Components.interfaces.nsIStringBundleService);
-var mboximportbundle = MBstrBundleService.createBundle("chrome://mboximport/locale/mboximport.properties");
-//function to get the required details of the selected email
-
-function searchmail()
-{
- setTimeout("createConnection()",5000)
- if (getconnect_server() == "false")
- {
- alert("Please Login To The Database First !")
- return false;
- }
- setTimeout("module_install()", 10000)
- if (getmodule_install() == "no")
- {
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- return false
- }
- var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
- var version_obj = prefService.getBranch("extensions.");
- version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
- version = version_obj.getCharPref("lastAppVersion");
- version = parseInt(version[0])
-
- file = getPredefinedFolder(2);
-
- if (version > 2)
- {
- var emlsArray = gFolderDisplay.selectedMessages;
- }
- else
- {
- var emlsArray = GetSelectedMessages();
- }
-
- IETtotal = emlsArray.length;
- IETexported = 0;
- var msguri = emlsArray[0];
-
- if(GetNumSelectedMessages() < 1 || GetNumSelectedMessages() > 1){
- alert("You must select only one mail to archive");
- return false
- }
-
- //gives the selected email uri
- 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);
-
- //functionality to split the author name and email
- if(message.author.charAt(0) == '"'){
- sendername = message.author.split('"')[1].split('"')[0];
- }
- else if(message.author.indexOf('<')!=-1){
- sendername = message.author.split('<')[0];
- }
- else{
- sendername = message.author;
- }
- if(message.author.indexOf('<')!=-1){
- senderemail = message.author.split('<')[1].split('>')[0];
- }
- else{
- senderemail = message.author
- }
-
- //gives the receiver email address
- receiveremail = message.mime2DecodedRecipients;
-
- //parsing the received date in the particular format
- receivedDate = stdate.getFullYear()+'/'+(stdate.getMonth()+1)+'/'+stdate.getDate();
-
- //gives the selected email subject
- subject = message.subject;
-
- //gives the selected email cclist
- cclist = message.ccList;
-
- //gives the selected email message body in text format
- if (version > 2)
- {
- var listener = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance(Components.interfaces.nsISyncStreamListener);
- var uri = message.folder.getUriForMsg(message);
- messenger.messageServiceFromURI(uri)
- .streamMessage(uri, listener, null, null, false, "");
- var folder = message.folder;
- messagebody = folder.getMsgTextFromStream(listener.inputStream,message.Charset,65536,32768,false,true,{})
- }
- else
- {
- messagebody = getMessageBrowser().docShell.contentViewer.DOMDocument.body.textContent;
- }
- //gives the selected email message body in html format
- msghtmlbody = ""// getMessageBrowser().docShell.contentViewer.DOMDocument.body.innerHTML;
-
- //set the initial information for the selected email
- setSenderEmail(senderemail);
- setSenderName(sendername);
- setReceiverEmail(receiveremail);
- setSubject(subject);
- setReceivedDate(receivedDate);
- setCCList(cclist);
- setMessageBody(messagebody);
- getPref().setCharPref('displayName','');
- getPref().setCharPref('attachmentdata','');
- name = [];
- test = [];
- getPref().setCharPref('attachmentlength',currentAttachments.length);
- //retrieving the information for the selected email's attachment
- if(currentAttachments.length > 0){
- for(i=0;i<currentAttachments.length;i++){
- contentType[i] = currentAttachments[i].contentType;
- uri = currentAttachments[i].uri;
- url[i] = currentAttachments[i].url;
- name[i] = currentAttachments[i].displayName;
- var obj = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
- if(navigator.userAgent.indexOf('Linux')!= -1){
- obj.initWithPath("/tmp/");
- }
- else if(navigator.userAgent.indexOf('Win')!= -1){
- obj.initWithPath("c:\\");
- }
- else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
- obj.initWithPath("/tmp/");
- }
- else{
- alert("Not Compatible for this Operating System");
- false();
- }
- //saving the attachment files in system's temp folder
- test[i] = messenger.saveAttachmentToFolder(contentType[i],url[i],name[i],uri,obj);
- }
- //function to read the attachment file contents
- att =getAttachValue()
- if (getmodule_install() == "no")
- {
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- return false
- }
- window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
- createInstance(name,test)
-
- }
- else
- {
- if (getmodule_install() == "no")
- {
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- return false
- }
- window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
- }
-}
-
-function open_contact()
-{
- setTimeout("createConnection()",5000)
- if (getconnect_server() == "false")
- {
- alert("Please Login To The Database First !")
- return false;
- }
- setTimeout("module_install()", 10000)
- if (getmodule_install() == "no")
- {
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- return false
- }
- if(GetNumSelectedMessages() < 1 || GetNumSelectedMessages() > 1){
- alert("You must select only one mail For Open Contact Detail");
- return false
- }
-
- //gives the selected email uri
- 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);
-
- //functionality to split the author name and email
- if(message.author.charAt(0) == '"'){
- sendername = message.author.split('"')[1].split('"')[0];
- }
- else if(message.author.indexOf('<')!=-1){
- sendername = message.author.split('<')[0];
- }
- else{
- sendername = message.author;
- }
- if(message.author.indexOf('<')!=-1){
- senderemail = message.author.split('<')[1].split('>')[0];
- }
- else{
- senderemail = message.author
- }
-
- //set the initial information for the selected email
- setSenderEmail(senderemail);
- setSenderName(sendername);
- setPartnerName("");
- setStreet("");
- setStreet2("");
- setZipCode("");
- setCity("");
- setOfficenumber("");
- setFax("");
- setMobilenumber("");
-
- if (getmodule_install() == "no")
- {
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- return false
- }
- window.open("chrome://openerp_plugin/content/address.xul", "", "chrome, resizable=yes");
-
-}
-
-//function to open the configuration window
-var Config = {
- onLoad: function() {
- // initialization code
- this.initialized = true;
- },
-
- onMenuItemCommand: function() {
- window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
- }
-};
-window.addEventListener("load", function(e) { Config.onLoad(e); }, false);
-
-//function to open the plugin window for searching the records for a particular object
-var Plugin = {
- onLoad: function() {
- this.initialized = true;
- },
-
- onMenuItemCommand: function() {
- window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
- }
-};
-window.addEventListener("load", function(e) { Plugin.onLoad(e); }, false);
-
-//function to open the window for creating a new partner contact
-var Create = {
- onLoad: function(){
- this.initialized=true;
- },
-
- onMenuItemCommand: function(){
- window.open("chrome://openerp_plugin/content/create.xul", "", "chrome");
- }
-};
-window.addEventListener("load", function(e) { Create.onLoad(e); }, false);
-
-var Address = {
- onLoad: function(){
- this.initialized=true;
- },
-
- onMenuItemCommand: function(){
- open_contact();
- searchContact();
- }
-};
-
-
-//function to open the window for selecting the partner for a new contact creation
-var Select = {
- onLoad: function(){
- this.initialized=true;
- },
-
- onMenuItemCommand: function(){
- window.open("chrome://openerp_plugin/content/selectpartner.xul", "", "chrome");
- }
-};
-
-var CreatePartner = {
- onLoad: function(){
- this.initialized=true;
- },
-
- onMenuItemCommand: function(){
- window.open("chrome://openerp_plugin/content/createpartner.xul", "", "chrome");
- }
-};
-window.addEventListener("load", function(e) { CreatePartner.onLoad(e); }, false);
-
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.xul
deleted file mode 100755
index c48dc0d70b9..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/overlay.xul
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://openerp_plugin/skin/overlay.css" type="text/css"?>
-<!DOCTYPE overlay SYSTEM "chrome://openerp_plugin/locale/overlay.dtd">
-<overlay id="tiny-overlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml">
-<script type="text/javascript" src="chrome://openerp_plugin/content/tiny_xmlrpc.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>
-
-<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">
- <menuitem id="threadPaneContext-saveAsMultiple"
- insertbefore="threadPaneContext-print"
- class="menuitem-iconic"
- image="&menuicon.value;"
- label="Archive To OpenERP"
- accesskey="T"
- oncommand="searchmail();"/>
-</popup>
-
-<toolbarpalette id="MailToolbarPalette">
- <toolbarbutton id="GA-button"
- class="toolbarbutton-1"
- image="&menuicon.value;"
- label= "Archive To OpenERP"
- oncommand="searchmail();" />
-</toolbarpalette>
-
-<toolbarpalette id="MailToolbarPalette">
- <toolbarbutton id="GA-button1"
- class="toolbarbutton-1"
- image="&partnericon.value;"
- label= "Open Contact"
- oncommand="Address.onMenuItemCommand(event);" />
-</toolbarpalette>
-
-<toolbarpalette id="MailToolbarPalette">
- <toolbarbutton id="GA-button2"
- class="toolbarbutton-1"
- image="&imagearchive.value;"
- label= "Open Document"
- oncommand="archivemail();" />
-</toolbarpalette>
-
-
-</overlay>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/plugin.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/plugin.xul
deleted file mode 100644
index 45c552452bb..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/plugin.xul
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://openerp_plugin/skin/line.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/plugin.dtd">
-<window id="pluginwindows" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- title="&title.label;" onload="myPrefObserver.loaddata()" height="480" width="1000">
-
-<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/loaddata.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/exportTools.js"></script>
-<description></description>
-<hbox id="root">
- <vbox width="400">
- <groupbox height="30" id="existsobjectgroup" width="400">
- <caption label="&gptinyobj.label;" />
- <hbox>
- <label id="lblsearch" control="txtvalueobj" value="&search.label;"/>
- <textbox id="txtvalueobj" size="30"/>
- <button label="&bsearch.label;" oncommand="searchCheckbox()" image="&imagesearch.value;" accesskey="s"/>
- </hbox>
- <vbox align="left" id="checkbox-dynamic">
- </vbox>
- <hbox align="center">
- <image src='chrome://tiny_plugin/skin/perform.gif'/>
- <checkbox id="cbxselectall" oncommand="selectAllCheckbox();" checked="false"/>
- <caption label="&cbxselectall.label;" />
- <spacer width="10"/>
-
- </hbox>
- <label id="lblex" value=" "/>
- <hbox>
- <description>Documents</description>
- </hbox>
- <listbox height="250" id="listSearchBox" seltype="multiple">
- <listhead >
- <listheader label="&listSearchBox.header;"/>
- </listhead>
- <listcols>
- <listcol flex="1"/>
- </listcols>
- </listbox>
- <hbox>
- <spacer width="360"/>
- <button label="&attach.label;" accesskey="u" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('upload');"/>
- </hbox>
- </groupbox>
-
- </vbox>
- <vbox>
- <groupbox id="newobjectgroup" align="center" width="170" height="375">
- <caption label="&newobject.label;" />
- <hbox>
- <label id="lblex" value=" "/>
- <label id="lblex3" control="section" value="&object.label;"/>
- <menulist id="section" width="150">
- <menupopup>
- <menuitem label="" value=""/>
- </menupopup>
- </menulist>
- <vbox>
- <button width="50" label="&archive.label;" accesskey="c" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('create');"/>
- </vbox>
- </hbox>
-
- <label id="lblsection" value=" "/>
- <separator class="groove-thin" orient="horizontal" width="180"/>
-
-
- <hbox>
- <label id="lblsection" control="section" value="&partner.label;"/>
- <vbox>
- <button label="&create.label;" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
- </vbox>
- </hbox>
-
- </groupbox>
- <label id="lblex" value=" "/>
- <label id="lblex" value=" "/>
- <hbox align="right">
- <spacer width="330"/>
- <button label="&close.label;" accesskey="l" image="&imagecancel.value;" oncommand="win_close();"/>
- </hbox>
-
-
- </vbox>
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/selectpartner.xul b/addons/thunderbird/plugin/chrome/openerp_plugin/content/selectpartner.xul
deleted file mode 100644
index f0512339a40..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/selectpartner.xul
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://openerp_plugin/locale/selectpartner.dtd">
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml" onload="getPartnerList()"
- title="&title.label;" height="500" width="375">
-<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/loaddata.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>
-<groupbox id="gpPartner">
- <hbox>
- <textbox id="txtselectpartner"/>
- <spacer width="25"/>
- <button label="&bsearch.label;" image="&imagesearch.value;" oncommand="getPartnerList();"/>
- </hbox>
-</groupbox>
-<listbox id="listPartnerBox" flex="1" rows="5">
- <listhead>
- <listheader label="&listPartnerName.header;"/>
- </listhead>
- <listcols>
- <listcol flex="1"/>
- </listcols>
-</listbox>
-<description></description>
-<hbox>
- <button label="Create Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
- <spacer width="45"/>
- <button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
- <button label="&select.label;" image="&imageok.value;" oncommand="selectPartner();close()"/>
-</hbox>
-
-</window>
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/static.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/static.js
deleted file mode 100644
index c44c5bf7bb4..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/static.js
+++ /dev/null
@@ -1,19 +0,0 @@
-
-//function to check all the checkbox
-function selectAllCheckbox()
-{
- var objectlist = preferenceBranch.getCharPref("object").split(',');
- if(objectlist.length == 1 && objectlist[0]==''){
- return false;
- }
- for (var i=1;i<=objectlist.length;i++)
- {
- var checkboxobj = document.getElementById('cbx'+i);
- if (!checkboxobj)
- continue
- if(document.getElementById('cbxselectall').checked == true)
- checkboxobj.checked = true;
- else
- checkboxobj.checked = false;
- }
-}
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
deleted file mode 100755
index b5057a8cd09..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
+++ /dev/null
@@ -1,2046 +0,0 @@
-/**
-* Global instance stored here
-*/
-
-var xmlRpcClient;
-
-//Service name on server like /common,/db etc...
-var strServerService;
-
-//temporary variables
-var strobject;
-
-//Array
-var arrDbList = new Array();
-var arrPartnerList = new Array();
-var arrFinalList = new Array();
-
-
-var contentType = new Array();
-var uri = new Array();
-var url = new Array();
-var name = new Array();
-var attach_eml ="no";
-var popup_display = "yes"
-var rpc= {
- servers: {},
- addserver: function(name,ip,port,path) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- this.servers[name]= {
- ip: ip,
- port: port,
- path: path,
- avaible: true,
- sock: Components.classes['@mozilla.org/xml-rpc/client;1'].createInstance(Components.interfaces.nsIXmlRpcClient)};
- },
- getany: function(rpcval,n) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var t = ['PRUint8','PRUint16','PRInt16','PRInt32','PRBool','Char','CString','Float','Double','PRTime','InputStream','Array','Dictionary'];
- for (var i=0; i<t.length; i++)
- try { return [t[i],this.Iget(rpcval,Components.interfaces[((i==10 || i==12)? 'nsI': 'nsISupports')+t[i]],n)]; } catch(e) {}
- return [false,'error getany','Undefined type'];
- },
- onfault: function(t) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- return (t.constructor==Array && t.length==3 && !t[0] && (t[1].substr(0,5)=='error' || t[1].substr(0,5)=='fault'))?
- true : false;
- },
- getall: function(rpcval,n) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var t = this.getany(rpcval,n);
- if (this.onfault(t)) return t;
- if (t[0]=='PRBool') return (t[1]=='true');
- if (t[0]=='PRInt32') return parseInt(t[1]+'');
- if (t[0]=='PRTime') {
- dte= new Date("January 1, 1970, 00:00:00");
- dte.setUTCMilliseconds(t[1]+'');
- return dte; }
- if (t[0]=='Double' || t[0]=='Float') return parseFloat(t[1]+'');
- if (t[0]=='Char' || t[0]=='CString') return (t[1]+'').replace(/¬/g,'€');
- if (t[0]=='Array') {
- var a=[];
- for (var i=0; i<t[1].Count(); i++) a[i]= this.getall(t[1],i);
- } else if (t[0]=='Dictionary') {
- var a={};
- var keys = t[1].getKeys({});
- for (var k = 0; k < keys.length; k++)
- a[keys[k]]= this.getall(t[1],keys[k]);
- } else return t[1];
- return a;
- },
- Iget: function(rpcval,itype,n) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- if (n == undefined) return rpcval.QueryInterface(itype);
- else if (n==parseInt(n)) return rpcval.QueryElementAt(n,itype);
- else return rpcval.getValue(n).QueryInterface(itype);
- },
- checktype: function(val) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- if (val != undefined) {
- switch (val.constructor) {
- case Number: return (val==parseInt(val))? 1:4;
- case Boolean: return 2;
- case String: return 3;
- case Date: return 5;
- case Object: return 7;
- case Array: return 6;
-
- }
- }
- return 7;
-
- },
- set: function(rpcobj,param) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- if (param==undefined) return [false,'error set','Undefined parameter'];
- var itype= this.checktype(param);
- if (this.onfault(itype)) return itype;
- var p = this.servers[rpcobj].sock.createType(itype,{});
- if (itype==6) {
- if (param.length>0)
- for (var i=0; i<param.length; i++) p.AppendElement( this.set(rpcobj,param[i]) );
- } else if (itype==7) {
- for (var i in param) p.setValue( i, this.set(rpcobj,param[i]) );
- } else if (itype==4) {
- p.data=(''+param).replace(',','.');
- } else p.data=param;
- return p;
- },
- ask: function(rpcobj,method,params,func_out) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var a=this.disableNset(rpcobj) ;
- if (this.onfault(a)) return a;
- var handler = {
- onResult: function(client, async, result) {
- rpc.servers[rpcobj].avaible= true;
- func_out(rpc.getall(result)); },
- onFault: function (client, async, faute) {alert("in ask infault"+result)
- rpc.servers[rpcobj].avaible= true; func_out([false,'fault',faute]); },
- onError: function (client, async, status, msg) {
- rpc.servers[rpcobj].avaible= true;
- if (status=='2147500037') {
- status= "no network or no server";
- msg= "1. Check your network connection.";
- msg+= "\n2. Check your server connection parameters:";
- msg+= "\n\t"+rpc.servers[rpcobj].ip+":"+rpc.servers[rpcobj].port+"=>"+params[0];
- msg+= "\n3. Your server may not be launched or connected to the network.";
- }
- func_out([false,'error '+status,msg]);
- } };
- var p = [];
- for (var i=0; i<params.length; i++)
- p[i]= this.set(rpcobj,params[i]);
- try { this.servers[rpcobj].sock.asyncCall(handler, null, method, p, p.length);
- } catch(e) {
- this.servers[rpcobj].avaible= true;
- this.servers[rpcobj].sock= Components.classes['@mozilla.org/xml-rpc/client;1'].createInstance(Components.interfaces.nsIXmlRpcClient) ;
- func_out([false,'error catch',e]); }
- return true;
- },
- disableNset: function(rpcobj) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- if (this.servers[rpcobj]) {
- this.servers[rpcobj].avaible= false;//alert('http://'+this.servers[rpcobj].ip+':'+this.servers[rpcobj].port+this.servers[rpcobj].path);
- server_path=this.servers[rpcobj].ip+':'+this.servers[rpcobj].port+this.servers[rpcobj].path
- this.servers[rpcobj].sock.init(server_path);
-
- return true; }
- return [false,'error disableNset','Server vars not set'];
- }
-}
-function handler_function( result ) {
- if ( rpc.onfault( result ) ) { alert( result[0] + "\n" + result[1] ); return; }
- else{
- alert("got result>>>>"+result)
- }
-}
-
-//Sets the preference service
-function getPref(){
- var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
- var branchobj = prefService.getBranch("extensions.tiny.");
- branchobj.QueryInterface(Components.interfaces.nsIPrefBranch2);
- return branchobj
-}
-
-function setFileName(fname){
- getPref().setCharPref('fname',fname);
-}
-
-//set attachment file save or not
-function setAttachment(argAttac){
- getPref().setCharPref('attachment',argAttac);
-}
-
-//set preference value for server url
-function setServer(argServer){
- getPref().setCharPref('serverurl',argServer);
-}
-
-//set preference value for server port
-function setPort(argPort){
- getPref().setCharPref('serverport',argPort)
-}
-
-//set preference value of database name for data searching and selection
-function setDbName(argDbName){
- getPref().setCharPref('serverdbname',argDbName);
-}
-
-//set preference value of username for login
-function setUsername(argUsername){
- getPref().setCharPref('username',argUsername);
-}
-
-//set preference value of password for login
-function setPassword(argPassword){
- getPref().setCharPref('password',argPassword);
-}
-
-//set preference value for storing partner id
-function setPartnerId(argPartnerId){
- getPref().setCharPref('partnerid',argPartnerId)
-}
-
-//set preference value for Resource Id
-function setResourceId(argResourceId){
- getPref().setCharPref('res_id',argResourceId)
-}
-//set server service
-function setServerService(argServerService){
- strServerService = argServerService;
-}
-
-//set preference value for sender email
-function setSenderEmail(argSenderEmail){
- getPref().setCharPref('senderemail',argSenderEmail)
-}
-
-//set preference value for receiver email
-function setReceiverEmail(argReceiverEmail){
- getPref().setCharPref('receiveremail',argReceiverEmail)
-}
-
-//set preference value for sender name
-function setSenderName(argSenderName){
- getPref().setCharPref('sendername',argSenderName)
-}
-
-//set preference value for email subject
-function setSubject(argSubject){
- getPref().setCharPref('subject',argSubject)
-}
-
-//set preference value for email received date
-function setReceivedDate(argReceivedDate){
- getPref().setCharPref('receiveddate',argReceivedDate)
-}
-
-//set preference value for storing contact id which is used while storing mail contents after creating a new partner contact
-function setContactId(argContactId){
- getPref().setCharPref('contactid',argContactId)
-}
-
-//set preference value for storing attachment option in config
-function setAttachValue(argAttachValue){
- getPref().setCharPref('attachvalue',argAttachValue)
-}
-
-//set preference value for email cclist
-function setCCList(argCCList){
- getPref().setCharPref('cclist',argCCList)
-}
-
-//set preference value for email message body
-function setMessageBody(argMessageBody){
- getPref().setCharPref('messagebody',argMessageBody)
-}
-
-//set preference value for Partner Name
-function setPartnerName(argPartnerName){
- getPref().setCharPref('partnername',argPartnerName)
-}
-
-//set preference value for Contact Name
-function setContactName(argContactName){
- getPref().setCharPref('contactname',argContactName)
-}
-
-//set preference value for street
-function setStreet(argStreet){
- getPref().setCharPref('street',argStreet)
-}
-
-//set preference value for street2
-function setStreet2(argStreet2){
- getPref().setCharPref('street2',argStreet2)
-}
-
-//set preference value for zipcode
-function setZipCode(argZipcode){
- getPref().setCharPref('zipcode',argZipcode)
-}
-
-//set preference value for Office Number
-function setOfficenumber(argOfficenumber){
- getPref().setCharPref('officeno',argOfficenumber)
-}
-
-//set preference value for Phone Number
-function setMobilenumber(argMobilenumber){
- getPref().setCharPref('phoneno',argMobilenumber)
-}
-
-//set preference value for Fax
-function setFax(argFax){
- getPref().setCharPref('fax',argFax)
-}
-
-//set preference value for city
-function setCity(argCity){
- getPref().setCharPref('city',argCity)
-}
-
-//set preference value for country
-function setCountry(argCountry){
- getPref().setCharPref('country',argCountry)
-}
-
-//set preference value for state
-function setState(argState){
- getPref().setCharPref('state',argState)
-}
-
-
-//set the value for the whole server url
-function setServerUrl(argServerUrl)
-{
- var seperateUrl = argServerUrl.split(':');
- setServer(seperateUrl.slice(0,seperateUrl.length-1).join(":"));
- setPort(seperateUrl[seperateUrl.length-1]);
-}
-
-//set preference value for storing user id
-function setUserId(argUserId){
- getPref().setIntPref('userid',argUserId);
-}
-
-//set database list is displaye or not
-function setDBList(argDBList){
- getPref().setCharPref('db_list',argDBList)
-}
-
-//set server connect or not
-function setconnect_server(argconnect_server){
- getPref().setCharPref('connect_server',argconnect_server)
-}
-
-//set module install or not
-function setmodule_install(argconnect_module){
- getPref().setCharPref('module_install',argconnect_module)
-}
-
-//get module install or not
-function getmodule_install(){
- return getPref().getCharPref('module_install');
-}
-
-
-//get server connect or not
-function getconnect_server(){
- return getPref().getCharPref('connect_server');
-}
-
-
-//get partner id
-function getPartnerId(){
- return getPref().getCharPref('partnerid');
-}
-//get database list is displaye or not
-function getDBList(){
- return getPref().getCharPref('db_list');
-}
-
-function getFileName(){
- return getPref().getCharPref('fname');
-}
-
-//get attachment save or not
-function getAttachment(){
- return getPref().getCharPref('attachment');
-}
-
-//get serverurl
-function getServer(){
- return getPref().getCharPref('serverurl');
-}
-
-//get server port
-function getPort(){
- return getPref().getCharPref('serverport');
-}
-
-//get database name
-function getDbName(){
- return getPref().getCharPref('serverdbname');
-}
-
-//get username from config settings
-function getUsername(){
- return getPref().getCharPref('username');
-}
-
-//get password from config settings
-function getPassword(){
- return getPref().getCharPref('password');
-}
-
-//get serverservice
-function getServerService(){
- return strServerService;
-
-}
-
-//get sender email
-function getSenderEmail(){
- return getPref().getCharPref('senderemail');
-}
-
-//get receiver email
-function getReceiverEmail(){
- return getPref().getCharPref('receiveremail');
-}
-
-//get resource id
-function getResourceId(){
- return getPref().getCharPref('res_id');
-}
-
-
-//get sender name
-function getSenderName(){
- str = getPref().getCharPref('sendername');
- if(!str.toString().match(/=?utf-8?q?/))
- {
- return str;
- }
- else
- {
-
- string = str.replace(/[\'Š',\'Ž',\'š',\'ž',\'Ÿ',\'À',\'Á',\'Â',\'Ã',\'Ä',\'Å',\'Ç',\'È',\'É',\'Ê',\'Ë',\'Ì',\'Í',\'Î',\'Ï',\'Ñ',\'Ò',\'Ó',\'Ô',\'Õ',\'Ö',\'Ø',\'Ù',\'Ú',\'Û',\'Ü',\'Ý',\'à',\'á',\'â',\'ã',\'ä',\'å',\'ç',\'è',\'é',\'ê',\'ë',\'ì',\'í',\'î',\'ï',\'ñ',\'ò',\'ó',\'ô',\'õ',\'ö',\'ø',\'ù',\'ú',\'û',\'ü',\'ý',\'ÿ',\'Þ',\'þ',\'Ð',\'ð',\'ß',\'Œ',\'œ',\'Æ',\'æ',\'µ']/g,'"',"'",'“','”',"\n","\r",'_/',"'S','Z','s','z','Y','A','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N','O','O','O','O','O','O','U','U','U','U','Y','a','a','a','a','a','a','c','e','e','e','e','i','i','i','i','n','o','o','o','o','o','o','u','u','u','u','y','y','TH','th','DH','dh','ss','OE','oe','AE','ae','u','','','','','','','-'");
-
- var utftext = "";
- var encoded_string = "";
- var convertedString = "";
- for (var n = 0; n < string.length; n++)
- {
- var c = string.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- }
- }
-
- encoded_string = encode64(utftext);
- return encoded_string;
- }
-}
-
-//ger partner name
-function getPartnerName(){
- return getPref().getCharPref('partnername');
-}
-
-//get contact name
-function getContactName(){
- return getPref().getCharPref('contactname');
-}
-
-
-//get street name
-function getStreet(){
- return getPref().getCharPref('street');
-}
-
-//get street2 name
-function getStreet2(){
- return getPref().getCharPref('street2');
-}
-
-//get zip code
-function getZipCode(){
- return getPref().getCharPref('zipcode');
-}
-
-//get city name
-function getCity(){
- return getPref().getCharPref('city');
-}
-
-//get country name
-function getCountry(){
- return getPref().getCharPref('country');
-}
-
-//get state name
-function getState(){
- return getPref().getCharPref('state');
-}
-
-//get office no
-function getOfficenumber(){
- return getPref().getCharPref('officeno');
-}
-
-//get mobile no
-function getMobilenumber(){
- return getPref().getCharPref('phoneno');
-}
-
-//get fax no
-function getFax(){
- return getPref().getCharPref('fax');
-}
-
-
-//get email subject
-function getSubject(){
- return getPref().getCharPref('subject');
-}
-
-//get email received date
-function getReceivedDate(){
- return getPref().getCharPref('receiveddate');
-}
-
-//get contact id which is used while storing mail contents after creating a new partner contact
-function getContactId(){
- return getPref().getCharPref('contactid');
-}
-
-//get attachment option information from the configuration settings
-function getAttachValue(){
- return getPref().getCharPref('attachvalue');
-}
-
-//get email cclist information
-function getCCList(){
- return getPref().getCharPref('cclist');
-}
-
-//get email message body
-function getMessageBody(){
- return getPref().getCharPref('messagebody');
-}
-
-//get the whole server path
-function getServerUrl(){
- return getServer()+":"+getPort()+"/"+getServerService();
-}
-
-//get user id for the xmlrpc request
-function getUserId(){
- return getPref().getIntPref('userid');
-}
-
-//Creates and returns and instance of the XML-RPC client
-function getClient() {
- // Enable correct security
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- return Components.classes['@mozilla.org/xml-rpc/client;1'].createInstance(Components.interfaces.nsIXmlRpcClient);
-}
-
-//returns the xmlrpc client instance
-function getXmlRpc() {
- if (!xmlRpcClient) {
- xmlRpcClient = getClient();
- }
-
- // Initialize the client with the URL
- xmlRpcClient.init(getServerUrl());
- return xmlRpcClient;
-}
-
-// function to get all basic parameters
-function getBasicList(){
- var branchobj = getPref();
- arrBasicList = [];
- arrBasicList[0] = branchobj.getCharPref("serverdbname");
- arrBasicList[1] = branchobj.getIntPref('userid');
- arrBasicList[2] = branchobj.getCharPref("password");
- arrBasicList[3] = getServer()
- arrBasicList[4] = getPort()
- return arrBasicList
-}
-
-function createMenuItem_db(aLabel) {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var item = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem
- item.setAttribute("label", aLabel);
- item.setAttribute("value", aLabel);
- return item;
-}
-
-//xmlrpc request handler for getting the list of database
-var listDbHandler = {
- onResult: function(client, context, result) {
- setconnect_server("true")
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrMethodList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- // Set the number of results
- var count = arrMethodList.Count();
- // Loop through the results, adding items to the list
- for (i = 0; i < count; i++) {
- var strlDbName = arrMethodList.QueryElementAt(i, Components.interfaces.nsISupportsCString);
- arrDbList[i] = strlDbName.data;
- }
- var database = ""
- if (count > 0)
- {
- setDBList("true")
- var label = document.getElementById("database_option");
- var vbox = document.createElement("vbox");
- var hbox = document.createElement("hbox");
- var label1 = document.createElement("label");
- label1.setAttribute("width","80");
- label1.setAttribute("value","Database:");
- label1.setAttribute("id","label111");
- var menu1 = document.createElement("menulist");
- var menupopup1 = document.createElement("menupopup");
- menu1.setAttribute("id","DBlist");
- menu1.setAttribute("width","300");
- var menuitem1 = document.createElement("menuitem");
- database = arrDbList[0]
- menuitem1.setAttribute("label", arrDbList[0]);
- menuitem1.setAttribute("value", arrDbList[0]);
- menupopup1.appendChild(menuitem1);
- menu1.appendChild(menupopup1)
- hbox.appendChild(label1);
- hbox.appendChild(menu1);
- vbox.appendChild(hbox);
- label.appendChild(vbox);
-
- var d = document.getElementById("first");
- var d_nested = document.getElementById("lbldb_list1");
- var throwawayNode = d.removeChild(d_nested);
- var d_nested = document.getElementById("DBlist_text");
- var throwawayNode = d.removeChild(d_nested);
-
-
- }
- else
- {
- setDBList("false")
- }
- // Loop through the results, adding items to the list
- if (count)
- {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var popup = document.getElementById("DBlist"); // a <menupopup> element
- var arrsec=new Array()
- for (var i=0;i<popup.menupopup.childNodes.length;i++) {
- arrsec.push(popup.menupopup.childNodes[i].label)
- }
- for (i=0;i<arrDbList.length;i++){
-
- if (arrsec.indexOf(arrDbList[i])==-1) {
- if (arrDbList[i] != database){
- popup.menupopup.appendChild(createMenuItem_db(arrDbList[i]));
- }
- }
- }
- }
- },
-
-
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-};
-//function to get the database list
-function getDbList(argControl)
-{
- setDBList("false")
- setconnect_server("false")
- // Enable correct security
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- // Get the instance of the XML-RPC client
- var xmlRpcClient = getXmlRpc();
- arrDbList = [];
- var cmbDbList = document.getElementById(argControl);
-
- xmlRpcClient.asyncCall(listDbHandler,cmbDbList,'list',[],0);
- return arrDbList;
-}
-
-function createMenuItem_partner(aLabel, aValue) {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var item = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem
- item.setAttribute("label", aLabel);
- item.setAttribute("value", aValue);
- return item;
-}
-
-//xmlrpc request handler for getting the list of All objects
-var listAllDocumentHandler = {
-
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- // Set the number of results
- var count = arrIdList.Count();
-
- // Loop through the results, adding items to the list
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var resultcount = strlResult.Count();
- var arrDataPair = new Array();
- arrDataPair[0] = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
- arrDataPair[1] = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- arrPartnerList[i] = arrDataPair;
- }
- if (context)
- {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var popup = document.getElementById("section"); // a <menupopup> element
- for (i=0;i<arrPartnerList.length;i++){
- popup.menupopup.appendChild(createMenuItem_partner(arrPartnerList[i][1],arrPartnerList[i][0]));
- }
- }
- popup_display = "no"
- searchCheckbox()
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-var listAllCountryHandler = {
-
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- var count = arrIdList.Count();
- // Loop through the results, adding items to the list
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var resultcount = strlResult.Count();
- var arrDataPair = new Array();
- arrDataPair[0] = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsPRInt32);
-
- arrDataPair[1] = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- arrPartnerList[i] = arrDataPair;
- }
- if (!context)
- {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var popup = document.getElementById("country"); // a <menupopup> element
- for (i=0;i<arrPartnerList.length;i++){
- popup.menupopup.appendChild(createMenuItem_partner(arrPartnerList[i][1],arrPartnerList[i][0]));
-
- }
- }
-
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-var listAllStateHandler = {
-
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- // Set the number of results
- var count = arrIdList.Count();
-
- // Loop through the results, adding items to the list
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var resultcount = strlResult.Count();
- var arrDataPair = new Array();
- arrDataPair[0] = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsPRInt32);
- arrDataPair[1] = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- arrPartnerList1[i] = arrDataPair;
- }
- if (!context)
- {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var popup = document.getElementById("state");
- // a <menupopup> element
- for (i=0;i<arrPartnerList1.length;i++){
- popup.menupopup.appendChild(createMenuItem_partner(arrPartnerList1[i][1],arrPartnerList1[i][0]));
-
- }
- }
-
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-
-//function to get the list of All object
-function getAllDocument(){
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- var xmlRpcClient = getXmlRpc();
- arrPartnerList = [];
- var end = document.getElementById("section")
- length = end.itemCount
- for (i = 0; i < length; i++) {
- end.removeItemAt(0)
- }
- var cmdObjectList = document.getElementById("section");
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'list_alldocument';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = ""
- xmlRpcClient.asyncCall(listAllDocumentHandler,cmdObjectList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strvalue ],6);
-}
-
-function getAllCountry(){
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- var xmlRpcClient = getXmlRpc();
- arrPartnerList = [];
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'list_allcountry';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = document.getElementById("country").value;
- xmlRpcClient.asyncCall(listAllCountryHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strvalue ],6);
-}
-
-function getAllState(){
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- var xmlRpcClient = getXmlRpc();
- arrPartnerList1 = [];
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'list_allstate';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = document.getElementById("state").value;
- xmlRpcClient.asyncCall(listAllStateHandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod,strvalue ],6);
-}
-
-
-//function to create array object to pass as an parameter for xmlrpc request
-function dictcreation(value,checkboxobj){
- var temp = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
- var test = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
- var strkey = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strkey.data = value;
- test.AppendElement(strkey);
- temp.AppendElement(test);
- var test1 = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
- for(i=0;i<checkboxobj.length;i++){
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = checkboxobj[i];
- test1.AppendElement(strvalue);
- }
- if(checkboxobj.length>0){
- temp.AppendElement(test1);
- }
- return temp;
-}
-
-//function to search and fillup section selection box
-function createMenuItem(aLabel) {
- const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
- var item = document.createElementNS(XUL_NS, "menuitem"); // create a new XUL menuitem
- item.setAttribute("label", aLabel[1]);
- item.setAttribute("value", aLabel[0]);
- return item;
-}
-
-
-function listinstallmodule( result ) {
- if ( rpc.onfault( result ) )
- {
- setmodule_install('no')
- }
-}
-
-function module_install()
-{
- setmodule_install("yes")
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var xmlRpcClient = getXmlRpc();
- strDbName = branchobj.getCharPref("serverdbname");
- struid = branchobj.getIntPref('userid');
- strpass = branchobj.getCharPref("password");
- strmethod = 'search';
- strobj = 'thunderbird.partner'; // TOFIX: Find module 'thunderbird' into 'module.module' model.
- var temp = new Array()
- server=getServer()
- port=getPort()
- basicList=getBasicList()
- rpc.addserver('object',basicList[3] , basicList[4],'/xmlrpc/object');
- srcids=rpc.ask( 'object', 'execute', [basicList[0],basicList[1],basicList[2],strobj,strmethod,[]],listinstallmodule)
-}
-
-
-var listSearchContactHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var sendername = getSenderEmail();
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- var count = arrIdList.Count();
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
- var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- if(strlSearchResult=="partner_name"){
- setPartnerName(strlSearchResultValue);
- var t = getPartnerName();}
-
- if(strlSearchResult=="contactname"){
- setSenderName(strlSearchResultValue);
- var t = getSenderName();}
-
- if(strlSearchResult=="street"){
- setStreet(strlSearchResultValue);
- var t = getStreet();}
-
- if(strlSearchResult=="street2"){
- setStreet2(strlSearchResultValue);
- var t = getStreet2();}
-
- if(strlSearchResult=="zip"){
- setZipCode(strlSearchResultValue);
- var t = getZipCode();}
-
- if(strlSearchResult=="city"){
- setCity(strlSearchResultValue);
- var t = getCity();}
-
- if(strlSearchResult=="phone"){
- setOfficenumber(strlSearchResultValue);
- var t = getOfficenumber();}
-
- if(strlSearchResult=="fax"){
- setFax(strlSearchResultValue);
- var t = getFax();}
-
- if(strlSearchResult=="mobile"){
- setMobilenumber(strlSearchResultValue);
- var t = getMobilenumber();}
-
- if(strlSearchResult=="email" && strlSearchResultValue!=''){
- setSenderEmail(strlSearchResultValue);
- var t = getSenderEmail();}
-
- if(strlSearchResult=="res_id"){
- setResourceId(strlSearchResultValue);
- var t = getResourceId();}
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-
-}
-var listSearchContactdetailHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- // var sendername = getSenderEmail();
- var sendername = document.getElementById("txtemail").value
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- var count = arrIdList.Count();
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
- var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- if(strlSearchResult=="email" && strlSearchResultValue=='')
- {
- alert("Contact is not Available")
- document.getElementById("txtemail").value = sendername;
- }
- if(strlSearchResult=="partner_name"){
- document.getElementById("txtname").value =strlSearchResultValue;}
-
- if(strlSearchResult=="contactname"){
- document.getElementById("txtcontactname").value =strlSearchResultValue;}
-
- if(strlSearchResult=="street"){
- document.getElementById("txtstreet").value =strlSearchResultValue;}
-
- if(strlSearchResult=="street2"){
- document.getElementById("txtstreet2").value =strlSearchResultValue;}
- if(strlSearchResult=="zip"){
- document.getElementById("txtzip").value =strlSearchResultValue;}
-
- if(strlSearchResult=="city"){
- document.getElementById("txtcity").value =strlSearchResultValue;}
- if(strlSearchResult=="phone"){
- document.getElementById("txtoffice").value =strlSearchResultValue;}
-
- if(strlSearchResult=="fax"){
- document.getElementById("txtfax").value =strlSearchResultValue;}
-
- if(strlSearchResult=="mobile"){
- document.getElementById("txtmobile").value =strlSearchResultValue;}
-
- if(strlSearchResult=="email"&& strlSearchResultValue!=''){
- document.getElementById("txtemail").value =strlSearchResultValue;}
-
- if(strlSearchResult=="res_id"){
- setResourceId(strlSearchResultValue);
- var t = getResourceId();}
-
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-
-}
-
-function searchContactdetail()
-{
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- arrFinalList = [];
- var xmlRpcClient = getXmlRpc();
- var cmbSearchList = document.getElementById('listSearchBox');
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'search_contact';
- var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strname.data =document.getElementById("txtemail").value;
- xmlRpcClient.asyncCall(listSearchContactdetailHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
-}
-
-//xmlrpc request handler for getting the search results for the particular selected check box object
-var listSearchCheckboxHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrMethodList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- // Set the number of results
- var count = arrMethodList.Count();
- var close=0;
- if(count == 0 && popup_display != "no"){
- alert("No records Found");
- return false;
- }
- else if(count ==2 )
- {
- if (arrMethodList.QueryElementAt(0, Components.interfaces.nsISupportsCString)=="error")
- {
- close =1;
- }
- }
- popup_display = "yes"
- // Loop through the results, adding items to the list
- var arr1 = new Array();
- var arr2 = new Array();
- var flag1 = 0;
- var flag2 = 0;
- var er ="";
- var er_val =new Array();
- for (i = 0; i < count; i++)
- {
- if(i%2==0){
- if (arrMethodList.QueryElementAt(i, Components.interfaces.nsISupportsCString)=="error")
- {
- er = arrMethodList.QueryElementAt(i, Components.interfaces.nsISupportsCString);
- er_val[0] =arrMethodList.QueryElementAt(i+1, Components.interfaces.nsISupportsArray);
- i +=1;
- continue;
- }
- arr1[flag1] = arrMethodList.QueryElementAt(i, Components.interfaces.nsISupportsCString);
- flag1++;
- }
- else{
- arr2[flag2] = arrMethodList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- flag2++;
- }
- }
- if (er)
- {
- var arrSearchList1 = new Array();
- for(j=0;j<er_val[0].Count();j++)
- {
- var arrDataPair = new Array();
- arrDataPair[0] = er_val[0].QueryElementAt(j, Components.interfaces.nsISupportsCString)
- arrSearchList1[j]=arrDataPair;
- }
- alert( arrSearchList1 + " model not exists")
- if (close == 1)
- {
- alert("No records Found");
- return false;
- }
- }
- for (i = 0; i < arr2.length; i++) {
- var arrSearchList1 = new Array();
- for(j=0;j<arr2[i].Count();j++){
- var strlSearchResult = arr2[i].QueryElementAt(j, Components.interfaces.nsISupportsArray);
- var resultcount = strlSearchResult.Count();
- var arrDataPair = new Array();
- arrDataPair[0] = strlSearchResult.QueryElementAt(0, Components.interfaces.nsISupportsPRInt32);
- arrDataPair[1] = strlSearchResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- arrDataPair[2] = arr1[i];
- arrSearchList1[j] = arrDataPair;
- }
- arrFinalList[i]=arrSearchList1;
- }
- if (context)
- {
-
- var row_count = context.getRowCount();
- var cmbSearchList = document.getElementById('listSearchBox');
- for (i=0;i<row_count;i++)
- {
- context.removeItemAt(0);
- }
- for (i=0;i<arrFinalList.length;i++)
- {
- for(j=0;j<arrFinalList[i].length;j++){
- //creates the dynamic listbox which shows the searched records for the selected object in checkbox
- var listcell = document.createElement("listcell");
- var listItem = document.createElement("listitem");
-
- var objectcharpref = getPref().getCharPref("object").split(',');
- var imagecharpref = getPref().getCharPref("imagename").split(',');
- var imagename = ''
- for(k=0;k<objectcharpref.length;k++){
- if(arr1[i] == objectcharpref[k]){
- imagename = imagecharpref[k]
- }
- }
-
- listcell.setAttribute("image",imagename); // stores the image of the object
- listcell.setAttribute("class","listcell-iconic");
- listcell.setAttribute("width",12);
- listcell.setAttribute("height",12);
- listcell.setAttribute("label",arrFinalList[i][j][1]); //stores the name ofthe record
- listItem.appendChild(listcell);
- listItem.value = arrFinalList[i][j][0]; //stores the id of the record
- listItem.label = arr1[i]; // stores the value of the object
- cmbSearchList.appendChild(listItem);
- }
- }
- }
- },
-
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-};
-
-//function to search the records of selected checkbox object
-function searchCheckbox()
-{
- var checkboxlist = getnamesearch();
- if(checkboxlist.length == 0){
- alert("Select One or More Document");
- return false;
- }
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- arrFinalList = [];
- var xmlRpcClient = getXmlRpc();
- var end = document.getElementById('listSearchBox').getRowCount();
- for(i=0; i< end; i++){
- document.getElementById('listSearchBox').removeItemAt(0);
- }
- var cmbSearchList = document.getElementById('listSearchBox');
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'search_checkbox';
- var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strname.data = document.getElementById('txtvalueobj').value;
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var arrofarr = dictcreation(strname,checkboxlist);
- xmlRpcClient.asyncCall(listSearchCheckboxHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,arrofarr ],6);
-}
-
-function searchContact()
-{
- var branchobj = getPref();
- setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- arrFinalList = [];
- var xmlRpcClient = getXmlRpc();
- var cmbSearchList = document.getElementById('listSearchBox');
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'search_contact';
- var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strname.data =getSenderEmail();
-
- xmlRpcClient.asyncCall(listSearchContactHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
-}
-
-//xmlrpc request handler for getting the list of partners
-var listPartnerHandler = {
-
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
- // Set the number of results
- var count = arrIdList.Count();
- // Loop through the results, adding items to the list
- for (i = 0; i < count; i++) {
- var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
- var resultcount = strlResult.Count();
- var arrDataPair = new Array();
- arrDataPair[0] = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsPRInt32);
- arrDataPair[1] = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
- arrPartnerList[i] = arrDataPair;
- }
- if (context)
- {
- var row_count = context.getRowCount();
- var cmdPartnerList = document.getElementById('listPartnerBox');
- for (i=0;i<row_count;i++)
- {
- context.removeItemAt(0);
- }
- for (i=0;i<arrPartnerList.length;i++)
- {
- var listcell = document.createElement("listcell");
- var listItem = document.createElement("listitem");
- listcell.setAttribute("label",arrPartnerList[i][1]);
- listItem.appendChild(listcell);
- listItem.value = arrPartnerList[i][0];
- cmdPartnerList.appendChild(listItem);
- }
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-//function to get the list of partners
-function getPartnerList(){
- var branchobj = getPref();
- window.opener.document.getElementById('txtselectpartner').setAttribute('value','');
- setServerService('xmlrpc/object');
- var xmlRpcClient = getXmlRpc();
- arrPartnerList = [];
- var end = document.getElementById('listPartnerBox').getRowCount();
- for(i=0; i< end; i++){
- document.getElementById('listPartnerBox').removeItemAt(0);
- }
- var cmdPartnerList = document.getElementById('listPartnerBox');
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = branchobj.getCharPref("serverdbname");
- var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
- struid.data = branchobj.getIntPref('userid');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = branchobj.getCharPref("password");
- var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strmethod.data = 'name_search';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'res.partner';
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = document.getElementById('txtselectpartner').value;
- xmlRpcClient.asyncCall(listPartnerHandler,cmdPartnerList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strvalue ],6);
-}
-//function to create the xmlrpc supported variables for xmlrpc request
-function dictcontact(a,b){
- var temp = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
- for(i=0;i<a.length;i++){
- var strkey = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strkey.data = a[i]
- var strvalue = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strvalue.data = b[i]
- var test = xmlRpcClient.createType(xmlRpcClient.ARRAY,{});
- test.AppendElement(strkey);
- test.AppendElement(strvalue);
- temp.AppendElement(test);
- }
- return temp;
-}
-
-//xmlrpc request handler for creating the record of mail
-var listArchiveHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
-
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- 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 + getFileName() +".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 upload_archivemail()
-{
- list_documents = document.getElementById('listSearchBox')
- var context = []
- var cnt = list_documents.selectedCount
- for(i=0;i<cnt;i++)
- {
- var object = list_documents.getSelectedItem(i);
- var eml_string = parse_eml();
- var model = object.label;
- var res_id = object.value;
- 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 = 'history_message';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- var a = ['model', 'res_id','message'];
- var b = [model, res_id,eml_string];
- var arrofarr = dictcontact(a,b)
- xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
- alert("Mail Archive Successfully");
- }
- window.close();
-
-}
-
-function create_archivemail(){
- var popup = document.getElementById("section").selectedItem; // a <menupopup> element
-
- if (String(popup) != "null"){
- object=popup.value;
- if (object == undefined) { alert("select At Least one Document !")}
- else{
- 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 = 'process_email';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var eml_string = parse_eml()
- var a = ['model', 'message'];
- var b = [object, eml_string];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
- alert("Mail Archive Successfully");
- }
- window.close();
- }
- else
- {
- alert(" select At Least one Document !")
- }
-}
-
-
-//xmlrpc request handler for creating a new contact
-var listCreateContactHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
- setContactId(createId);
- alert("Contact Created Successfully.");
- window.close();
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-var listUpdateContactHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- alert("Contact Update Successfully.");
- window.close();
- var partnerId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
- setResourceId(partnerId);
- window.close();
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-//function to create a new contact
-function createContact(){
- 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 = 'create_contact';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var a = ['partner_id','name','street','street2','zip','city','country_id','state_id','phone','fax','mobile','email'];
- var b = [getPartnerId(),getSenderName(),document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listCreateContactHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
-
-function UpdateContact(){
- 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 = 'update_contact';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var a = ['res_id','partner_id','name','street','street2','zip','city','country_id','state_id','phone','fax','mobile','email'];
- var b = [getResourceId(),getPartnerName(),document.getElementById("txtcontactname").value,document.getElementById("txtstreet").value,document.getElementById("txtstreet2").value,document.getElementById("txtzip").value, document.getElementById("txtcity").value,document.getElementById("country").value,document.getElementById("state").value,document.getElementById("txtoffice").value,document.getElementById("txtfax").value,document.getElementById("txtmobile").value,document.getElementById("txtemail").value];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listUpdateContactHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
-
-//xmlrpc request handler for creating a attachment record
-var listAttachHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
-
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-
-//function to encode the string into base64
-var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split("");
-function base64_encode (s)
- {
- // the result/encrypted string, the padding string, and the pad count
- var r = ""; var p = ""; var c = s.length % 3;
-
- // add a right zero pad to make this string a multiple of 3 characters
- if (c > 0) { for (; c < 3; c++) { p += '='; s += "\0"; } }
-
- // increment over the length of the string, three characters at a time
- for (c = 0; c < s.length; c += 3) {
-
- // we add newlines after every 76 output characters, according to the MIME specs
- if (c > 0 && (c / 3 * 4) % 76 == 0) { r += "\r\n"; }
-
- // these three 8-bit (ASCII) characters become one 24-bit number
- var n = (s.charCodeAt(c) << 16) + (s.charCodeAt(c+1) << 8) + s.charCodeAt(c+2);
-
- // this 24-bit number gets separated into four 6-bit numbers
- n = [(n >>> 18) & 63, (n >>> 12) & 63, (n >>> 6) & 63, n & 63];
-
- // those four 6-bit numbers are used as indices into the base64 character list
- r += base64chars[n[0]] + base64chars[n[1]] + base64chars[n[2]] + base64chars[n[3]];
-
- // add the actual padding string, after removing the zero pad
- } return r.substring(0, r.length - p.length) + p;
- }
-
-//function to encode the string into base64
-var keyStr = "ABCDEFGHIJKLMNOP" +
- "QRSTUVWXYZabcdef" +
- "ghijklmnopqrstuv" +
- "wxyz0123456789+/" +
- "="+"-_.!~*'()";
-
-function encode64(input) {
-var output = "";
-var chr1, chr2, chr3 = "";
-var enc1, enc2, enc3, enc4 = "";
-var i = 0;
-
-do {
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
-
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
- enc4 = chr3 & 63;
-
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
-
- output = output +
- keyStr.charAt(enc1) +
- keyStr.charAt(enc2) +
- keyStr.charAt(enc3) +
- keyStr.charAt(enc4);
- chr1 = chr2 = chr3 = "";
- enc1 = enc2 = enc3 = enc4 = "";
-} while (i < input.length);
-
-return output;
-}
-
-
-//function to read the contents of the attachment files from the temp folder
-function createInstance(name,test){
- var encoded_string = '';
- var file_name = ''
-
- for(i=0;i<test.length;i++){
- var stream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
- stream.init(test[i], 0x01, 00004, 0);
- var bstream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
- bstream.setInputStream(stream);
- var r = new Array();
- var fileContents = bstream.readByteArray(bstream.available(),r);
- bstream.close();
- var printstring = '';
- for(j=0;j<fileContents.length;j++)
- {
- printstring += String.fromCharCode(fileContents[j]);
- }
- encoded_string += encode64(printstring)+',';
- file_name += name[i]+',';
- test[i].remove(true);
- }
- encoded_string = encoded_string.substring(0,encoded_string.length-1);
- file_name = file_name.substring(0,file_name.length-1);
- getPref().setCharPref('displayName',file_name);
- getPref().setCharPref('attachmentdata',encoded_string);
-
-
-}
-
-//xmlrpc request handler for handling the login information
-var listLoginHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var login = result.QueryInterface(Components.interfaces.nsISupportsPrimitive)
- if(login.type == 12){
- login = result.QueryInterface(Components.interfaces.nsISupportsPRInt32)
- setUserId(login.data);
- alert('Successful Login To OpenERP');
- window.close();
- }
- else{
- alert("Login Failed");
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
- alert("Database does not Exist!\n\n Please specify proper database name.");
- }
-}
-
-//function to check the login information
-function testConnection(){
- if (getconnect_server() == "false")
- {
- alert("No Server Running..."+" "+getServer())
- return false;
- }
- if (getDBList()=="false")
- {
- if (document.getElementById('DBlist_text').value =='')
- {
- alert("You Must Enter Database Name");
- return false;
- }
- setDbName(document.getElementById('DBlist_text').value);
- }
- else
- {
- if (document.getElementById('DBlist').value == 0 || document.getElementById('DBlist').value =="--select--")
- {
- alert("You Must Select Database Name");
- return false;
- }
- setDbName(document.getElementById('DBlist').value);
- }
- var branchobj = getPref();
- setServer(document.getElementById('txturl').value);
- var s = document.getElementById('txturl').value;
- var a =s.split(':');
- setPort(a[a.length-1]);
- setUsername(document.getElementById('txtusername').value);
- setPassword(document.getElementById('txtpassword').value);
- setServerService('xmlrpc/common');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var xmlRpcClient = getXmlRpc();
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = getPref().getCharPref('serverdbname');
- var strusername = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strusername.data = getPref().getCharPref('username');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = getPref().getCharPref('password');
- xmlRpcClient.asyncCall(listLoginHandler,null,'login',[strDbName,strusername,strpass],3);
-}
-
-
-//xmlrpc request handler for handling the login information
-var listcreateLoginHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var login = result.QueryInterface(Components.interfaces.nsISupportsPrimitive)
- setconnect_server("true")
- if(login.type == 12){
- login = result.QueryInterface(Components.interfaces.nsISupportsPRInt32)
- setUserId(login.data);
- }
- else{
- alert("Login Failed");
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
- setconnect_server("false")
- }
-}
-
-//function to check the login information
-function createConnection(){
- var branchobj = getPref();
- setServerService('xmlrpc/common');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var xmlRpcClient = getXmlRpc();
- var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strDbName.data = getPref().getCharPref('serverdbname');
- var strusername = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strusername.data = getPref().getCharPref('username');
- var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strpass.data = getPref().getCharPref('password');
- xmlRpcClient.asyncCall(listcreateLoginHandler,null,'login',[strDbName,strusername,strpass],3);
-}
-
-//xmlrpc request handler for handling the partner information
-var listCreatePartnerHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var createId = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
-
- if(typeof(createId.data) == 'number' && createId!=0){
- window.close();
- }
- if(createId == 0){
- alert("Partner Already Exist");
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-//function to create the tiny partner object
-function createPartner(){
- 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 = 'create_partner';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- if(document.getElementById('txtname').value ==''){
- alert("You Must Enter Partner Name");
- return false;
- }
- var a = ['name'];
- var b = [document.getElementById('txtname').value];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listCreatePartnerHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
-//xmlrpc request handler for handling the object information
-var listSearchDocumentHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var searchResult = result.QueryInterface(Components.interfaces.nsISupportsPRInt32);
- if(searchResult.data == 0){
- alert("Document Does Not Exist");
- return false;
- }
- var objvalue = getPref().getCharPref("listobject");
- var objectvalue = getPref().getCharPref("object");
- var imagevalue = getPref().getCharPref("imagename");
-
- var objcharpref = getPref().getCharPref("listobject").split(',');
- var objectcharpref = getPref().getCharPref("object").split(',');
- var imagecharpref = getPref().getCharPref("imagename").split(',');
-
-
- if(objectcharpref.indexOf(document.getElementById("txtobject").value) != -1){
- alert("Document already in List");
- }
- else{
- var listItem = document.createElement("listitem");
- var listcell1 = document.createElement("listcell");
- var listcell2 = document.createElement("listcell");
- var listcell3 = document.createElement("listcell");
- listcell1.setAttribute("label",document.getElementById("txtobj").value);
- listcell2.setAttribute("label",document.getElementById("txtobject").value);
- listcell3.setAttribute("image",'file://'+document.getElementById("txtimagename").value);
- listcell3.setAttribute("class","listcell-iconic")
- listcell3.setAttribute("width",16)
- listcell3.setAttribute("height",16)
- listItem.appendChild(listcell1);
- listItem.appendChild(listcell2);
- listItem.appendChild(listcell3);
- document.getElementById("listObjectListBox").appendChild(listItem)
- if(getPref().getCharPref("object")!=''){
- getPref().setCharPref("listobject",objvalue+','+document.getElementById("txtobj").value);
- getPref().setCharPref("object",objectvalue+','+document.getElementById("txtobject").value);
- getPref().setCharPref("imagename",imagevalue+','+"file://"+document.getElementById("txtimagename").value);
- }
- else{
- getPref().setCharPref("listobject",document.getElementById("txtobj").value);
- getPref().setCharPref("object",document.getElementById("txtobject").value);
- getPref().setCharPref("imagename","file://"+document.getElementById("txtimagename").value);
- }
- }
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-//function to search the tiny objects for configuration settings
-function searchDocument(){
- 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_document';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- if(document.getElementById('txtobj').value =='' ){
- alert("You Must Enter Document");
- return false;
- }
- if(document.getElementById('txtobject').value =='' ){
- alert("You Must Enter Document Name");
- return false;
- }
- var a = ['model'];
- var b = [document.getElementById('txtobject').value];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listSearchDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
-
-//xmlrpc request handler for list of search object exist in database or not.
-var listsearchAttachmentHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var objectlist = result.QueryInterface(Components.interfaces.nsISupportsCString);
- getPref().setCharPref('tempobject',objectlist)
- document.getElementById("txtvalueobj").value= getSenderEmail();
- var checkbox = document.getElementById("checkbox-dynamic");
-
- var object = preferenceBranch.getCharPref("listobject").split(',');
- var obj = preferenceBranch.getCharPref("tempobject").split(',');
- var imagelist = preferenceBranch.getCharPref("imagename").split(',');
-
- count = 0
- if (object[0]!=''){
- for(var i=0; i<object.length; i++){
- if (obj[i] == "null")
- {
- continue
- }
-
- if(count%3==0){
- var vbox = document.createElement("hbox");
- }
- count += 1
- var hbox = document.createElement("vbox");
- var checkbox1 = document.createElement("checkbox");
-
- checkbox1.setAttribute("label",object[i]);
- checkbox1.setAttribute("id","cbx"+(i+1));
- checkbox1.setAttribute("width",150)
- if (obj[i] =="res.partner.address")
- {
- checkbox1.setAttribute("checked",true);
- }
- if(i==0){
- checkbox1.setAttribute("checked",true);
- }
-
- var image1 = document.createElement("image");
- image1.setAttribute("src",imagelist[i]);
- image1.setAttribute("width",16)
- image1.setAttribute("height",16)
-
- vbox.appendChild(image1);
- hbox.appendChild(checkbox1);
- vbox.appendChild(hbox);
- checkbox.appendChild(vbox);
- }
- }
- setTimeout("getAllDocument()", 0)
- exis_grp = document.getElementById("existsobjectgroup")
- new_grp = document.getElementById("newobjectgroup")
-
- new_grp.height = parseInt(parseInt(new_grp.height) + parseInt((count /3) * 23.5))
- win = document.getElementById("pluginwindows").setAttribute("height",1000)
-
- },
- onFault: function (client, ctxt, fault) {
-
- },
-
- onError: function (client, ctxt, status, errorMsg) {
-
- }
-}
-
-//function to create a new attachment record
-function listSearchDocumentAttachment(){
- 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_document_attachment';
- var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- strobj.data = 'thunderbird.partner';
- var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
- var popup = document.getElementById("section").selectedItem; // a <menupopup> element
- object=popup.value;
- resobj.data = object;
- var a = ['object'];
- var b = [getPref().getCharPref("object")];
- var arrofarr = dictcontact(a,b);
- xmlRpcClient.asyncCall(listsearchAttachmentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
-
-
-//function to create a new attachment record
-
-function win_close()
-{
- 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/"
- }
- try
- {
- name = fpath + getFileName() +".eml"
-
- var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
- file.initWithPath( name );
- file.remove(true);
- window.close();
- }
- catch(err)
- {
- window.close();
- }
-}
-
-function attachmentWidnowOpen(msg)
-{
-
- if (msg=="create")
- {
- var popup = document.getElementById("section").selectedItem; // a <menupopup> element
- if (String(popup) != "null"){
- object=popup.value;
- if (object=="" || object == undefined) { alert("select at least one document !")}
- else{
- create_archivemail()
- }
- }
- else
- {
- alert("select at least one Document !")
- }
- }
- else if (msg=="upload")
- {
- if(document.getElementById('listSearchBox').selectedItem)
- {
- upload_archivemail()
- }
- else{
- alert("Please select at least one record");
- }
- }
-}
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/address.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/address.dtd
deleted file mode 100644
index 3b5b95e2a32..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/address.dtd
+++ /dev/null
@@ -1,26 +0,0 @@
-<!ENTITY title.label "Open Contact">
-<!ENTITY name.value "Partner Name:">
-<!ENTITY contactname.value "Contact Name:">
-<!ENTITY street.value "Street:">
-<!ENTITY street2.value "Street2:">
-<!ENTITY zip.value "Zip:">
-<!ENTITY city.value "City:">
-<!ENTITY country.value "Country:">
-<!ENTITY state.value "State:">
-<!ENTITY office.value "Office:">
-<!ENTITY fax.value "Fax:">
-<!ENTITY mobile.value "Mobile:">
-<!ENTITY email.value "Email:">
-<!ENTITY emailid.value "Email ID:">
-<!ENTITY communication.value "Communication:">
-<!ENTITY postaladdress.value "Postal Address:">
-<!ENTITY ok.label "Save">
-<!ENTITY partner.label "Create New Contact :">
-<!ENTITY create.label "New Contact">
-<!ENTITY cancel.label "Cancel">
-<!ENTITY newpartner.label "New Partner">
-<!ENTITY bsearch.label "Search Contact">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
-<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
-<!ENTITY imagesearch.value "chrome://openerp_plugin/skin/Search.gif">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config.dtd
deleted file mode 100755
index 23cd94efa05..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config.dtd
+++ /dev/null
@@ -1,49 +0,0 @@
-<!ENTITY title.label "OpenERP Configuration">
-<!ENTITY separate.label "Configuration Login for OpenERP!">
-<!ENTITY close.label "Cancel">
-<!ENTITY database.label "Database:">
-<!ENTITY ok.label "OK">
-<!ENTITY connection.label "Connect">
-<!ENTITY txturl.label "Server: ">
-<!ENTITY image.label "Image : ">
-<!ENTITY obj.label "Document : ">
-<!ENTITY username.label "Username: ">
-<!ENTITY password.label "Password: ">
-<!ENTITY setdb.label "Move &gt;">
-<!ENTITY getdblist.label "Change">
-<!ENTITY gpConnection.label "Connection Parameters">
-<!ENTITY listDBListBox.header "Available DBs">
-<!ENTITY listDocument.header "Document">
-<!ENTITY listDocumentListBox.header "Document Name">
-<!ENTITY document.label "Document Name : ">
-<!ENTITY documentcreate.label "Add">
-<!--<!ENTITY objectdelete.label "Delete Selected Object From The List"> -->
-<!ENTITY documentdelete.label "Delete">
-<!ENTITY gpArchive.label "Archived Email Attachment Options">
-<!ENTITY rdAlwaysAttached.label "Always Send Email Attachments to OpenERP">
-<!ENTITY rdPromptAttached.label "Prompt Before Sending Email Attachments">
-<!ENTITY rdNeverAttached.label "Never Send Email attachments to OpenERP">
-<!ENTITY reserve.value "Copyright © 2006-TODAY OpenERP SA All Rights Reserved.
-OpenERP is a trademark of the OpenERP SA Company. OpenERP Web is jointly developed by OpenERP SA and Axelor.\n
-Licenced under the terms of OpenERP Public License (OEPL) v1.1 ">
-<!ENTITY openerp.value "http://www.openerp.com/">
-<!ENTITY axelor.value "http://www.axelor.com">
-<!ENTITY tinyerp.value "http://tiny.be/">
-
-<!ENTITY openerp_s.value "OpenERP">
-<!ENTITY axelor_s.value "The Axelor Company">
-<!ENTITY tinyerp_s.value "The Tiny Company">
-
-<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
-<!ENTITY gpAbout.label "About OpenERP Thunderbird Plugin">
-<!ENTITY develop.value "This Thunderbird Plugin for OpenERP has been developed by OpenERP SA &amp; Axelor">
-<!ENTITY information.value "For more information, please visit our website">
-<!ENTITY contact.label "Contact Us">
-<!ENTITY contact.value "info@axelor.com">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imagesearch.value "chrome://openerp_plugin/skin/Search.gif">
-<!ENTITY imagemove.value "chrome://openerp_plugin/skin/Move.gif">
-<!ENTITY imagemoveleft.value "chrome://openerp_plugin/skin/MoveLeft.png">
-<!ENTITY imagemovedown.value "chrome://openerp_plugin/skin/MoveDown.png">
-<!ENTITY addfile.label "Load Image">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd
deleted file mode 100644
index a926d3a980d..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd
+++ /dev/null
@@ -1,5 +0,0 @@
-<!ENTITY lblurl.label "Server: ">
-<!ENTITY lblport.label "Port: ">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
-
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/create.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/create.dtd
deleted file mode 100644
index 181d408a3e9..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/create.dtd
+++ /dev/null
@@ -1,37 +0,0 @@
-<!ENTITY title.label "Create a new Contact">
-<!ENTITY name.value "Contact Name:">
-<!ENTITY street.value "Street:">
-<!ENTITY street2.value "Street2:">
-<!ENTITY zip.value "Zip:">
-<!ENTITY city.value "City:">
-<!ENTITY country.value "Country:">
-<!ENTITY state.value "State:">
-<!ENTITY office.value "Office:">
-<!ENTITY fax.value "Fax:">
-<!ENTITY mobile.value "Mobile:">
-<!ENTITY email.value "Email:">
-<!ENTITY communication.value "Communication:">
-<!ENTITY postaladdress.value "Postal Address:">
-
-
-<!ENTITY selectpartner.value "Partner:">
-<!ENTITY listEmail.header "Email">
-<!ENTITY listName.header "Name">
-<!ENTITY bsearch.label "Search">
-<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
-<!ENTITY cbxarchive.label "Archive">
-<!ENTITY ok.label "Save">
-<!ENTITY cancel.label "Cancel">
-<!ENTITY imagesearch.value "chrome://openerp_plugin/skin/Search.gif">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
-
-<!ENTITY title.label "Select Partner">
-<!ENTITY listPartnerName.header "Partner Name">
-<!ENTITY bsearch.label "Search">
-<!ENTITY create.label "Create">
-<!ENTITY select.label "Select">
-<!ENTITY cancel.label "Cancel">
-<!ENTITY reload.label "Reload">
-<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
-<!ENTITY imagereload.value "chrome://openerp_plugin/skin/Archive.png">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/createpartner.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/createpartner.dtd
deleted file mode 100644
index 67b32b32907..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/createpartner.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<!ENTITY title.label "Create a new Partner">
-<!ENTITY name.value "Name:">
-<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
-<!ENTITY ok.label "Save">
-<!ENTITY cancel.label "Cancel">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/mboximport.properties b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/mboximport.properties
deleted file mode 100644
index 33845423f7d..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/mboximport.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-nomboxfile=není mbox souborem
-folderexists=Není možné importovat: složka se stejným názvem již existuje
-fileexists=Není možné importovat: soubor se stejným názvem již existuje
-nowritable=Není možné importovat: nemáte právo zápisu do složky
-exportOK=Export byl úspěšně dokončen
-isNewsgroup=Tato funkce není dostupná: export složky z IMAP účtů nebo diskuzních \nskupin je možný, pouze pokud je nastavené čtení v režimu Offline
-nofolder=Nebyla vybrána žádná cílová složka
-badfolder=Není možné importovat do této složky (typ IMAP nebo diskuzní skupina)
-exportAccount=Export všech složek
-exportFolder=Export složky
-filePickerImport=Výběr souboru k importu
-filePickerExport=Výběr cílové složky
-extensions.{3ed8cc52-86fc-4613-9026-c1ef969da4c3}.description=Umožňuje import a export souborů ve formátu mbox a eml
-virtualfolder=Toto je virtuální složka. Pro export jejich\nzpráv musíte tyto zprávy nejdříve\nzkopírovat do normální složky.
-searchdir=Vyberte složku, ve které budou vyhledány mbox soubory
-confirmimport=Chcete importovat soubor?
-endscan=Konec prohledávání složek
-internalerror=Není možné provést import, protože nastala neznámá chyba
-exportstart=Probíhá export, čekejte prosím...
-exported=Exportovalo se
-msgs=zpráv z
-nosubjectmsg=bez_predmetu
-messsubdir=zprávy
-badfolder2=Není možné importovat do této složky (IMAP nebo diskuzní skupina nebo virtuální složka)
-temp_error=Není možné importovat: nastala chyba při vytváření dočasného souboru
-importEMLstart=Pobíhá import, čekejte prosím...
-numEML=Naimportovány eml soubory:
-CSVseparator=,
-noEML=No eml file found in this directory
-backupWarning=During this operation, the program could be\nunresponsive for some minutes.\nDo you want to go on?\n
-noWaring=Don't show again this warning
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
deleted file mode 100755
index a2345f0aaaf..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
+++ /dev/null
@@ -1,11 +0,0 @@
-<!ENTITY tinyplugin "OpenERP Configuration">
-<!ENTITY tinypluginconfig "Archieve To OpenERP">
-<!ENTITY tinyarchive "Archive to OpenERP">
-<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
-<!ENTITY menuicon.value "chrome://openerp_plugin/skin/openerp-icon.png">
-<!ENTITY partnericon.value "chrome://openerp_plugin/skin/partner.png">
-<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/document-new.png">
-<!ENTITY tooltip.value "Add To Archive">
-<!ENTITY pluginconfig.value "OpenERP Configuration Settings">
-<!ENTITY pluginconfigvalue.value "Archieve To OpenERP Settings">
-
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/plugin.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/plugin.dtd
deleted file mode 100644
index ed26728b0d0..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/plugin.dtd
+++ /dev/null
@@ -1,28 +0,0 @@
-<!ENTITY title.label "Archive To OpenERP">
-<!ENTITY gptinyobj.label "Link to an Existing Document">
-<!ENTITY newobject.label "New Documents">
-<!ENTITY bsearch.label "Search">
-<!ENTITY close.label "Close">
-<!ENTITY attach.label "Archive to OpenERP">
-<!ENTITY create.label "New Contact">
-<!ENTITY archive.label "Create">
-<!ENTITY attach.label "Attach">
-<!ENTITY cbxcontact.label "Contact">
-<!ENTITY cbxinvoice.label "Invoice">
-<!ENTITY cbxproject.label "Project">
-<!ENTITY cbxpartner.label "Partner">
-<!ENTITY cbxproduct.label "Product">
-<!ENTITY cbxaccount.label "Account">
-<!ENTITY cbxsale.label "Sale">
-<!ENTITY cbxcase.label "Case">
-<!ENTITY cbxtask.label "Task">
-<!ENTITY cbxselectall.label "Select All">
-<!ENTITY object.label "Type of Document :">
-<!ENTITY partner.label "Create New Contact :">
-<!ENTITY search.label "Search :">
-<!ENTITY listSearchBox.header "Name">
-<!ENTITY imagesearch.value "chrome://openerp_plugin/skin/Search.gif">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imagearchive.value "chrome://openerp_plugin/skin/Archive.png">
-<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
-<!ENTITY gptinyobjexe.label "Documents">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/selectpartner.dtd b/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/selectpartner.dtd
deleted file mode 100644
index e6a62c16003..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/locale/en-US/selectpartner.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ENTITY title.label "Select Partner">
-<!ENTITY selectpartner.value "Partner">
-<!ENTITY listPartnerName.header "Partner Name">
-<!ENTITY bsearch.label "Search">
-<!ENTITY create.label "Create">
-<!ENTITY imageicon.value "chrome://openerp_plugin/skin/NEWT1.png">
-<!ENTITY select.label "Select">
-<!ENTITY cancel.label "Cancel">
-<!ENTITY imagesearch.value "chrome://openerp_plugin/skin/Search.gif">
-<!ENTITY imagecancel.value "chrome://openerp_plugin/skin/Error.gif">
-<!ENTITY imageok.value "chrome://openerp_plugin/skin/Success.gif">
-<!ENTITY imagecreate.value "chrome://openerp_plugin/skin/Create.png">
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Account.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Account.png
deleted file mode 100644
index b13f2b0f523..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Account.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Archive.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Archive.png
deleted file mode 100644
index 5aa6a958d37..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Archive.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Case.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Case.png
deleted file mode 100644
index 9b950b8ea9d..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Case.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Contact.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Contact.png
deleted file mode 100644
index 9bd6f9f6059..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Contact.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Create.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Create.png
deleted file mode 100644
index 1ab240c32cb..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Create.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Error.gif b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Error.gif
deleted file mode 100644
index 38c3523781b..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Error.gif
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Invoice.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Invoice.png
deleted file mode 100644
index 4551107ec3b..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Invoice.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Move.gif b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Move.gif
deleted file mode 100644
index 401bf861213..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Move.gif
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveDown.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveDown.png
deleted file mode 100644
index 3761ff1e747..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveDown.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveLeft.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveLeft.png
deleted file mode 100644
index 031d7532673..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/MoveLeft.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT.png
deleted file mode 100644
index 373464bd53e..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT1.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT1.png
deleted file mode 100644
index 2daac224a51..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/NEWT1.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Partner.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Partner.png
deleted file mode 100644
index c661339598e..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Partner.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Product.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Product.png
deleted file mode 100644
index 51451e422ae..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Product.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Project.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Project.png
deleted file mode 100644
index 0f8ea2af8f5..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Project.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Sale.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Sale.png
deleted file mode 100644
index 1b0b44f890e..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Sale.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Search.gif b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Search.gif
deleted file mode 100644
index b29c3cf1054..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Search.gif
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Success.gif b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Success.gif
deleted file mode 100644
index fb3bff729c5..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Success.gif
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Task.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Task.png
deleted file mode 100644
index 52056b1e713..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/Task.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/developped_by.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/developped_by.png
deleted file mode 100644
index 54dc465b421..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/developped_by.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/document-new.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/document-new.png
deleted file mode 100755
index bdbe31c4bff..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/document-new.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/openerp-icon.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/openerp-icon.png
deleted file mode 100644
index e2b45b52211..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/openerp-icon.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/overlay.css b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/overlay.css
deleted file mode 100755
index 1f71b8fdcbe..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/overlay.css
+++ /dev/null
@@ -1,3 +0,0 @@
-menuitem#tiny-plugin {
- color: red !important;
-}
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/partner.png b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/partner.png
deleted file mode 100644
index 37b29e13382..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/partner.png
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/perform.gif b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/perform.gif
deleted file mode 100644
index 16cc3873858..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/perform.gif
+++ /dev/null
Binary files differ
diff --git a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/tinyerp-icon.ico b/addons/thunderbird/plugin/chrome/openerp_plugin/skin/tinyerp-icon.ico
deleted file mode 100644
index b1e78c0047e..00000000000
--- a/addons/thunderbird/plugin/chrome/openerp_plugin/skin/tinyerp-icon.ico
+++ /dev/null
Binary files differ