From 191d91c2f8b9c95715ba7363e9af2388fb5bf1f3 Mon Sep 17 00:00:00 2001
From: "tfr@openerp.com" <>
Date: Mon, 26 Dec 2011 18:12:29 +0100
Subject: [FIX] center windows + push on partner
bzr revid: tfr@openerp.com-20111226171229-g3szzsrs6zd0vg95
---
.../plugin_thunderbird/plugin/openerp_plugin.xpi | Bin 110572 -> 109799 bytes
.../openerp_plugin/chrome/openerp_plugin.jar | Bin 48701 -> 48327 bytes
.../chrome/openerp_plugin/content/create.xul | 5 +-
.../chrome/openerp_plugin/content/js/config.js | 4 +-
.../chrome/openerp_plugin/content/js/overlay.js | 56 +--------------------
.../chrome/openerp_plugin/content/js/push.js | 2 -
.../chrome/openerp_plugin/content/overlay.xul | 2 +-
.../chrome/openerp_plugin/content/push.xul | 21 +++-----
.../chrome/openerp_plugin/content/push_dialog.xul | 4 +-
.../chrome/openerp_plugin/content/push_new.xul | 3 +-
.../plugin/openerp_plugin/install.rdf | 4 +-
11 files changed, 20 insertions(+), 81 deletions(-)
(limited to 'addons/plugin_thunderbird/plugin')
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin.xpi b/addons/plugin_thunderbird/plugin/openerp_plugin.xpi
index 2bb6a61628a..dc44f893d77 100644
Binary files a/addons/plugin_thunderbird/plugin/openerp_plugin.xpi and b/addons/plugin_thunderbird/plugin/openerp_plugin.xpi differ
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
index 14af127feea..de15f57d606 100644
Binary files a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul
index 963cddf2a36..cc47b895a3e 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/create.xul
@@ -10,7 +10,10 @@
-
+
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/config.js b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/config.js
index 0f209b89ea3..f0f2d750bd0 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/config.js
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/config.js
@@ -8,7 +8,7 @@ function load_config_data() {
function config_close() {
window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
- window.open("chrome://openerp_plugin/content/config.xul", "", "chrome");
+ open_window('chrome://openerp_plugin/content/config.xul', 580,500);
}
//set the value of the configuration fields
@@ -33,7 +33,7 @@ function config_ok()
function openConfigChange() {
window.close("chrome://openerp_plugin/content/config.xul", "", "chrome");
- window.open("chrome://openerp_plugin/content/config_change.xul", "", "chrome");
+ open_window("chrome://openerp_plugin/content/config_change.xul", 350,200);
}
//xmlrpc request handler for getting the list of database
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/overlay.js b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/overlay.js
index 0660cf7c8da..a271f72c491 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/overlay.js
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/overlay.js
@@ -23,65 +23,11 @@ function check(fun) {
}
-function searchmail()
-{
- var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
- var dirService = Components.classes["@mozilla.org/file/directory_service;1"].
- getService(Components.interfaces.nsIProperties).get("Home", Components.interfaces.nsIFile);
-
-
- //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);
-
- //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;
- log_message("subject: " + subject)
- var uri = message.folder.getUriForMsg(message);
- var messagebody = getMessage(uri);
- getPref().setCharPref('email_text', messagebody);
-
-
- //set the initial information for the selected email
- window.open("chrome://openerp_plugin/content/push.xul", "", "chrome, resizable=yes");
-}
-
-
var openPartnerHandler = {
onResult: function(client, context, result) {
res = extract_data(result)
if(res[RES_ID]==0) {
- open_window("chrome://openerp_plugin/content/create.xul", 550, 230);
+ open_window("chrome://openerp_plugin/content/create.xul", 550, 250);
return;
}
open_url(res[URL])
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/push.js b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/push.js
index 706753abf92..d4b5fcb4f76 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/push.js
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/js/push.js
@@ -111,7 +111,6 @@ function searchCheckbox()
//xmlrpc request handler for creating the record of mail
var pushHandler = {
onResult: function(client, context, result) {
- log_message("push finished")
res = extract_data(result)
alert(res[ADDITIONAL_INFORMATION])
open_url(res[URL]);
@@ -141,7 +140,6 @@ function push(op) {
var res_id = item.value;
}
- log_message("model :" + model_name + ", res_id : " + res_id)
setServerService('xmlrpc/object');
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
var xmlRpcClient = getXmlRpc();
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
index 6e2f1ee875a..bf825d91084 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
@@ -26,7 +26,7 @@
tooltiptext="&opendocumenttooltip.value;"
/>
-
+
@@ -54,10 +47,10 @@
-
+
-
+
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_dialog.xul b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_dialog.xul
index a35e8d281e7..64ea780a6f2 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_dialog.xul
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_dialog.xul
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_new.xul b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_new.xul
index 897fdb8dc55..e1d22c875ad 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_new.xul
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/push_new.xul
@@ -29,10 +29,9 @@
-
+
-
diff --git a/addons/plugin_thunderbird/plugin/openerp_plugin/install.rdf b/addons/plugin_thunderbird/plugin/openerp_plugin/install.rdf
index c0c35ab16be..e922f790b1c 100644
--- a/addons/plugin_thunderbird/plugin/openerp_plugin/install.rdf
+++ b/addons/plugin_thunderbird/plugin/openerp_plugin/install.rdf
@@ -2,7 +2,7 @@
- {d57f315a-9f5d-4366-a530-a769a4a8c949}
+ thunderbird@openerp.com
chrome://openerp_plugin/skin/tinyerp-icon.ico
OpenERP Plugin
1.0
@@ -15,7 +15,7 @@
{3550f703-e582-4d05-9a08-453d09bdfdc6}
2.0
- 8.0.*
+ 9.*
--
cgit v1.2.3