diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi index a0734681fd9..79d0f8a14fa 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar index f046e937a92..8d5068fd39b 100644 Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js index 064f8453d28..6bc2a6e885f 100644 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config.js @@ -5,11 +5,22 @@ function config_close() window.open("chrome://openerp_plugin/content/config.xul", "", "chrome"); } + +function createMenuItem(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; +} //set the value of the configuration fields function config_change_load() { var s = getServer(); var a =s.split(':'); + var popup = document.getElementById("dbprotocol_list"); + popup.menupopup.appendChild(createMenuItem('XML-RPC','http://')); + popup.menupopup.appendChild(createMenuItem('XML-RPCS','https://')); if (String(a)=="" || String(a)=="undefined"){ document.getElementById('txtcurl').value = "localhost" document.getElementById('txtcport').value = "8069" @@ -91,6 +102,7 @@ function config_change_load_web() function config_ok() { + var protocol = document.getElementById("dbprotocol_list").value if (document.getElementById('txtcurl').value == '') { alert("You Must Enter Server Name!") @@ -102,7 +114,12 @@ function config_ok() alert("You Must Enter Port!") return false; } - setServer("http://"+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value); + if (protocol == '') + { + alert("Invalid Porotocol!\nPlease Select protocol from Connection protocol list.") + return false; + } + setServer(document.getElementById("dbprotocol_list").value+document.getElementById('txtcurl').value +":" + document.getElementById('txtcport').value); window.close("chrome://openerp_plugin/content/config_change.xul", "", "chrome"); window.open("chrome://openerp_plugin/content/config.xul", "", "chrome"); } diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change.xul index dece3457710..441c426c97d 100644 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change.xul +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/config_change.xul @@ -3,23 +3,33 @@ + title="Openerp Connection" height="180" width="320"> - - + + + + + diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd index 5ec72d0b250..19558a9f077 100644 --- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd +++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/config_change.dtd @@ -1,6 +1,6 @@ - - + + - +