tfr (Openerp) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-fix-thunderbird-mozilla into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-thunderbird-mozilla/+merge/93372
FIX mozilla according mozilla recomandation.
1) The codebase_principal_support preference and enablePrivilege function are
considered unsafe to use and support for them will be removed very soon:
https://bugzilla.mozilla.org/show_bug.cgi?id=546866.
2) Your add-on stores passwords or other sensitive user information in the
preferences, which are stored in clear text in the user's file system. We
recommend that you use the Login Manager instead
(https://developer.mozilla.org/en/XPCOM_Interface_Reference/Using_nsILoginManager).
This gives users more choice over what is stored, and some additional security
to the stored data.
3) your add-on contains duplicate or hidden files or folders. These files
difficult the review process and may contain sensitive information about the
system you created the XPI on. Please correct your packaging process so that
these files aren't included.
need to merge this branch to have the same code as the one on mozilla website
https://addons.mozilla.org/en-US/thunderbird/addon/openerp-plugin/?src=userprofile
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-thunderbird-mozilla/+merge/93372
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-fix-thunderbird-mozilla.
=== modified file 'plugin_thunderbird/static/openerp_plugin.xpi'
Binary files plugin_thunderbird/static/openerp_plugin.xpi 2012-01-30 20:54:50 +0000 and plugin_thunderbird/static/openerp_plugin.xpi 2012-02-16 10:39:20 +0000 differ
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin.jar'
Binary files plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin.jar 2012-01-31 13:36:57 +0000 and plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin.jar 2012-02-16 10:39:20 +0000 differ
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/config.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/config.js 2011-12-26 17:12:29 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/config.js 2012-02-16 10:39:20 +0000
@@ -1,8 +1,9 @@
function load_config_data() {
getDbList('DBlist');
document.getElementById("txturl").value = getServer();
- document.getElementById("txtusername").value = getUsername();
- document.getElementById("txtpassword").value = getPassword();
+ var login = get_login()
+ document.getElementById("txtusername").value = login.username;
+ document.getElementById("txtpassword").value = login.password;
document.getElementById("DBlist_text").value = getDbName();
}
@@ -27,7 +28,7 @@
}
setPreference('serverport', document.getElementById('txtcport').value)
setPreference('server_name', document.getElementById('txtcurl').value)
- setServer(document.getElementById("dbprotocol_list").value+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
+ setPreference('serverurl', document.getElementById("dbprotocol_list").value+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value);
config_close()
}
@@ -39,7 +40,6 @@
//xmlrpc request handler for getting the list of database
var listDbHandler = {
onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var arrMethodList = result.QueryInterface(Components.interfaces.nsISupportsArray);
var count = arrMethodList.Count();
if (count < 1) {
@@ -84,7 +84,6 @@
function getDbList(argControl) {
setDBList("false");
setServerService('xmlrpc/db');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var cmbDbList = document.getElementById(argControl);
@@ -109,10 +108,13 @@
function connection() {
callback = check_connection(login_success)
- setPreference('serverdbname', check_database())
- setServer(document.getElementById('txturl').value);
- setUsername(document.getElementById('txtusername').value);
- setPassword(document.getElementById('txtpassword').value);
+ db_name = check_database()
+ server = document.getElementById('txturl').value
+ username = document.getElementById('txtusername').value
+ password = document.getElementById('txtpassword').value
+ setPreference('serverurl', server)
+ setPreference('serverdbname', db_name)
+ setLogin(username, password, db_name)
login()
}
//function to check the login information
@@ -120,3 +122,19 @@
alert("login successfull");
window.close("chrome://openerp_plugin/content/config.xul", "", "chrome");
}
+
+
+
+//set preference value of password for login
+function setLogin(username, password, db_name){
+ var nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Components.interfaces.nsILoginInfo, "init");
+ var loginInfo = new nsLoginInfo('chrome://openerp_plugin', null, db_name, username, password, '', '');
+ var loginManager = Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager);
+ old_login = get_login()
+ if (old_login == null) {
+ loginManager.addLogin(loginInfo);
+ }
+ else {
+ loginManager.modifyLogin(old_login, loginInfo);
+ }
+}
\ No newline at end of file
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/create.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/create.js 2011-12-26 17:23:19 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/create.js 2012-02-16 10:39:20 +0000
@@ -40,7 +40,6 @@
var listPartnerHandler = {
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();
@@ -69,7 +68,6 @@
//function to get the list of partners
function getPartnerList(){
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var cmdPartnerList = document.getElementById('listPartnerBox');
@@ -77,7 +75,7 @@
var name = document.getElementById('txtselectpartner').value;
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strmethod = get_rpc_string(xmlRpcClient, 'list_document_get');
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var strmodel = get_rpc_string(xmlRpcClient, 'res.partner');
@@ -107,11 +105,10 @@
//function to create a new contact
function createContact(){
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strmethod = get_rpc_string(xmlRpcClient, 'list_document_get');
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var strmethod = get_rpc_string(xmlRpcClient, 'contact_create');
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/overlay.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/overlay.js 2011-12-26 17:12:29 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/overlay.js 2012-02-16 10:39:20 +0000
@@ -48,12 +48,11 @@
function searchPartner(email)
{
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var strmethod = get_rpc_string(xmlRpcClient, 'partner_get');
var strname = get_rpc_string(xmlRpcClient, email);
@@ -117,20 +116,17 @@
}
function open_document() {
- var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
-
//gives the selected email uri
var messageUri = gDBView.URIForFirstSelectedMessage;
var branchobj = getPref();
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, branchobj.getCharPref("serverdbname"));
var struids = get_rpc_int(xmlRpcClient, branchobj.getIntPref('userid'));
- var strpass = get_rpc_string(xmlRpcClient, branchobj.getCharPref("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strmethod = get_rpc_string(xmlRpcClient, 'document_get');
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/push.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/push.js 2011-12-26 17:23:19 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/push.js 2012-02-16 10:39:20 +0000
@@ -1,7 +1,6 @@
//xmlrpc request handler for list of search object exist in database or not.
var DocumentTypeHandler = {
onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var modelListRPC = result.QueryInterface(Components.interfaces.nsISupportsArray);
var menu_popup = document.getElementById("model_list");
@@ -33,11 +32,10 @@
//function to create a new attachment record
function getDocumentType(){
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var strmethod = get_rpc_string(xmlRpcClient, 'document_type');
xmlRpcClient.asyncCall(DocumentTypeHandler,null,'execute',[strDbName,struid,strpass,strobj,strmethod], 5);
@@ -49,7 +47,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();
@@ -88,12 +85,11 @@
name = document.getElementById('txtvalueobj').value
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var cmbSearchList = document.getElementById('listSearchBox');
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strmethod = get_rpc_string(xmlRpcClient, 'list_document_get');
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var strmodel = get_rpc_string(xmlRpcClient, model_name);
@@ -137,12 +133,11 @@
}
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password);
var strmethod = get_rpc_string(xmlRpcClient, 'push_message');
var strobj = get_rpc_string(xmlRpcClient, 'plugin.handler');
var stremail = get_rpc_string(xmlRpcClient, getPreference('email_text'));
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tiny_xmlrpc.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tiny_xmlrpc.js 2011-12-26 17:23:19 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tiny_xmlrpc.js 2012-02-16 10:39:20 +0000
@@ -27,7 +27,6 @@
var rpc= {
servers: {},
addserver: function(name,ip,port,path) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
this.servers[name]= {
ip: ip,
port: port,
@@ -36,19 +35,16 @@
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');
@@ -71,13 +67,11 @@
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;
@@ -93,7 +87,6 @@
},
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;
@@ -109,7 +102,6 @@
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 = {
@@ -140,7 +132,6 @@
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
@@ -187,16 +178,6 @@
}
}
-
-
-function setServerName(server) {
- setPreference('server_name', server)
-}
-
-function getServerName(server) {
- getPreference('server_name')
-}
-
//set preference value for server port
function setPort(argPort){
getPref().setCharPref('serverport',argPort)
@@ -207,25 +188,6 @@
return getPref().getCharPref('serverport');
}
-
-
-
-//set preference value for server url
-function setServer(argServer){
- getPref().setCharPref('serverurl',argServer);
-}
-
-//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 server service
function setServerService(argServerService){
strServerService = argServerService;
@@ -280,15 +242,7 @@
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(){
@@ -315,7 +269,6 @@
//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);
}
@@ -356,12 +309,11 @@
setmodule_install("no")
setServerService('xmlrpc/object');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
var struid = get_rpc_int(xmlRpcClient, getPreference('userid', 'INT'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
+ var strpass = get_rpc_string(xmlRpcClient, get_login().password)
var strmethod = get_rpc_string(xmlRpcClient, "is_installed");
var strobj = get_rpc_string(xmlRpcClient, "plugin.handler");
xmlRpcClient.asyncCall(listinstallmodulehandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod], 5);
@@ -371,7 +323,6 @@
//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)
if(login.type == 12){
login = result.QueryInterface(Components.interfaces.nsISupportsPRInt32)
@@ -397,12 +348,14 @@
function login(){
setServerService('xmlrpc/common');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
var strDbName = get_rpc_string(xmlRpcClient, getPreference("serverdbname"));
- var strusername = get_rpc_string(xmlRpcClient, getPreference('username'));
- var strpass = get_rpc_string(xmlRpcClient, getPreference("password"));
- xmlRpcClient.asyncCall(listcreateLoginHandler,null,'login',[strDbName,strusername,strpass],3);
+ var login = get_login()
+ var strpass = get_rpc_string(xmlRpcClient, login.password)
+ var strlogin = get_rpc_string(xmlRpcClient, login.username)
+ log_message(login.username)
+ log_message(login.password)
+ xmlRpcClient.asyncCall(listcreateLoginHandler,null,'login',[strDbName,strlogin,strpass],3);
}
function get_rpc_string(rpc_client, val) {
@@ -417,5 +370,19 @@
return integer;
}
-
+function get_login() {
+ // Get Login Manager
+ var myLoginManager = Components.classes["@mozilla.org/login-manager;1"].
+ getService(Components.interfaces.nsILoginManager);
+ db_name = getPreference("serverdbname")
+ // Find users for the given parameters
+ var logins = myLoginManager.findLogins({}, 'chrome://openerp_plugin', null, db_name);
+ if (logins.length > 0) {
+ log_message(logins[0].username)
+ log_message(logins[0].password)
+ return logins[0]
+ }
+ return null
+
+}
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tools.js'
--- plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tools.js 2011-12-26 17:23:19 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/chrome/openerp_plugin/content/js/tools.js 2012-02-16 10:39:20 +0000
@@ -41,7 +41,6 @@
}
function open_url(url) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
messenger.launchExternalURL(url);
}
@@ -49,7 +48,6 @@
function extract_data(result) {
var returnArray = new Array();
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
returnArray[0] = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
returnArray[1] = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/defaults/preferences/tiny.js'
--- plugin_thunderbird/static/thunderbird_plugin/defaults/preferences/tiny.js 2011-12-23 10:22:53 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/defaults/preferences/tiny.js 2012-02-16 10:39:20 +0000
@@ -1,36 +1,14 @@
- pref("network.protocol-handler.app.http","/usr/bin/firefox");
+pref("network.protocol-handler.app.http","/usr/bin/firefox");
pref("network.protocol-handler.app.https","/usr/bin/firefox");
pref("extensions.tiny.serverurl", "http://localhost");
pref("extensions.tiny.serverport", "8069");
-pref("extensions.tiny.webserverurl", "http://localhost:8080");
-pref("extensions.tiny.webserverport", "8080");
pref("extensions.tiny.serverdbname", "terp");
-pref("extensions.tiny.username","admin");
-pref("extensions.tiny.password","admin");
pref("extensions.tiny.senderemail","");
pref("extensions.tiny.sendername","");
pref("extensions.tiny.statutdoc","");// add to have a statut to hidde or not the button
pref("extensions.tiny.message_label","");// add to message in push dialog
-pref("extensions.tiny.receiveremail","");
-pref("extensions.tiny.subject","");
-pref("extensions.tiny.receiveddate","");
pref("extensions.tiny.partnerid","");
-pref("extensions.tiny.contactid","");
-pref("extensions.tiny.attachvalue","");
-pref("extensions.tiny.cclist","");
-pref("extensions.tiny.messagebody","");
-pref("extensions.tiny.displayName","");
-pref("extensions.tiny.attachmentdata","");
-pref("extensions.tiny.userid",3);
-pref("extensions.tiny.partnername","");
-pref("extensions.tiny.officeno","");
-pref("extensions.tiny.phoneno","");
-pref("extensions.tiny.address","");
-pref("extensions.tiny.listobject","Partner,Account Invoice,Product,Sale Order,Lead and opportunities");
-pref("extensions.tiny.object","res.partner,account.invoice,product.product,sale.order,crm.lead");
-pref("extensions.tiny.imagename","chrome://openerp_plugin/skin/Partner.png,chrome://openerp_plugin/skin/Invoice.png,chrome://openerp_plugin/skin/Product.png,chrome://openerp_plugin/skin/Sale.png,chrome://openerp_plugin/skin/Case.png");
-pref("extensions.tiny.attachmentlength","");
-pref("extensions.tiny.attachment","");
+pref("extensions.tiny.userid",1);
pref("extensions.tiny.db_list","false");
pref("extensions.tiny.connect_server","false");
pref("extensions.tiny.module_install","yes");
=== removed file 'plugin_thunderbird/static/thunderbird_plugin/install.js'
--- plugin_thunderbird/static/thunderbird_plugin/install.js 2011-12-19 10:53:43 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/install.js 1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-// constants
-const APP_DISPLAY_NAME = "OpenERP Thunderbird Plugins";
-const APP_NAME = "OpenERP";
-const APP_VERSION = "1.0";
-const WARNING = "WARNING: You need administrator privileges to install OpenERP Thunderbird Plugin. It will be installed in the application directory for all users.";
-const VERSION_ERROR = "This extension can only be installed in a version higher than 2.0";
-const NOT_WRITABLE_ERROR = "This extension requires write access to the application directory to install properly."
-const locales = [
- "en-US",
- null
-];
-
-// Gecko 1.7 doesn't support custom button labels
-var incompatible = (typeof Install.BUTTON_POS_0 == "undefined");
-if (incompatible)
- alert(VERSION_ERROR);
-
-if (!incompatible) {
- // Check whether all directories can be accessed
- var dirList = [
- getFolder("Components"),
- getFolder(getFolder("Program", "defaults"), "pref")
- ];
- for (var i = 0; i < dirList.length; i++)
- if (!File.isWritable(dirList[i]))
- incompatible = true;
-
- if (incompatible)
- alert(NOT_WRITABLE_ERROR);
-}
-
-if (!incompatible && confirm(WARNING, APP_DISPLAY_NAME)) {
- /* Pre-Install Cleanup (for prior versions) */
-
- // List of files to be checked
- var checkFiles = [
- [getFolder("Components"), "nsXmlRpcClient.js"], // Root component
- [getFolder("Components"), "xml-rpc.xpt"], // Component interface
- ];
-
- // Remove any existing files
- initInstall("pre-install", "/rename", "0.0"); // open dummy-install
- for (var i = 0 ; i < checkFiles.length ; i++) {
- var currentDir = checkFiles[i][0];
- var name = checkFiles[i][1];
- var oldFile = getFolder(currentDir, name);
-
- // Find a name to rename the file into
- var newName = name + "-uninstalled";
- for (var n = 1; File.exists(oldFile) && File.exists(getFolder(currentDir, newName)); n++)
- newName = name + n + "-uninstalled";
-
- if (File.exists(oldFile))
- File.rename(oldFile, newName);
- }
- performInstall(); // commit renamed files
-
- /* Main part of the installation */
-
- var chromeType = DELAYED_CHROME;
-
- var files = [
- ["components/nsXmlRpcClient.js", getFolder("Components")],
- ["components/xml-rpc.xpt", getFolder("Components")],
- ["defaults/preferences/tiny.js", getFolder(getFolder("Program", "defaults"), "pref")],
- ];
-
- // initialize our install
- initInstall(APP_NAME, APP_PACKAGE, APP_VERSION);
-
- // Add files
- for (var i = 0; i < files.length; i++)
- addFile(APP_NAME, APP_VERSION, files[i][0], files[i][1], null);
-
- try {
- var err = registerChrome(CONTENT | chromeType, jar, "content/");
- if (err != SUCCESS)
- throw "Chrome registration for content failed (error code " + err + ").";
-
- err = registerChrome(SKIN | chromeType, jar, "skin/classic/");
- if (err != SUCCESS)
- throw "Chrome registration for skin failed (error code " + err + ").";
-
- for (i = 0; i < locales.length; i++) {
- if (!locales[i])
- continue;
-
- err = registerChrome(LOCALE | chromeType, jar, "locale/" + locales[i] + "/");
- if (err != SUCCESS)
- throw "Chrome registration for " + locales[i] + " locale failed (error code " + err + ").";
- }
-
- var err = performInstall();
- if (err != SUCCESS && err != 999)
- throw "Committing installation failed (error code " + err + ").";
-
- alert("OpenERP Thunderbird Plugin " + APP_VERSION + " is now installed.\n" +
- "It will become active after you restart your browser.");
- }
- catch (ex) {
- alert("Installation failed: " + ex + "\n" +
- "You probably don't have the necessary permissions (log in as system administrator).");
- cancelInstall(err);
- }
-}
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/install.rdf'
--- plugin_thunderbird/static/thunderbird_plugin/install.rdf 2011-12-26 17:12:29 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/install.rdf 2012-02-16 10:39:20 +0000
@@ -5,7 +5,8 @@
<em:id>[email protected]</em:id>
<em:iconURL>chrome://openerp_plugin/skin/tinyerp-icon.ico</em:iconURL>
<em:name>OpenERP Plugin</em:name>
- <em:version>1.0</em:version>
+ <em:version>1.0.1</em:version>
+ <em:type>2</em:type>
<em:description>OpenERP Thunderbird Integration</em:description>
<em:creator>OpenERP SA</em:creator>
<!-- optional items -->
@@ -14,8 +15,8 @@
<em:targetApplication>
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
- <em:minVersion>2.0</em:minVersion>
- <em:maxVersion>9.*</em:maxVersion>
+ <em:minVersion>5.*</em:minVersion>
+ <em:maxVersion>10.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
=== modified file 'plugin_thunderbird/static/thunderbird_plugin/makefile'
--- plugin_thunderbird/static/thunderbird_plugin/makefile 2011-12-19 10:53:43 +0000
+++ plugin_thunderbird/static/thunderbird_plugin/makefile 2012-02-16 10:39:20 +0000
@@ -1,10 +1,10 @@
all: xpi
jar:
- jar cvf chrome/openerp_plugin.jar -C chrome/openerp_plugin/ .
+ jar cvf chrome/openerp_plugin.jar -C chrome/openerp_plugin/ content -C chrome/openerp_plugin/ locale -C chrome/openerp_plugin/ skin
xpi: jar
- zip -r ../openerp_plugin.xpi *
+ zip -r ../openerp_plugin.xpi chrome/openerp_plugin.jar chrome.manifest components defaults install.rdf
clean:
rm ../openerp_plugin.xpi
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp