[IMP]: Improvement in thunderbird for usability

bzr revid: ksa@tinyerp.co.in-20100809140136-3fp05adq4tnku2ps
This commit is contained in:
ksa (Open ERP) 2010-08-09 19:31:36 +05:30
parent 886348da21
commit 0e63ce1c6e
10 changed files with 152 additions and 57 deletions

View File

@ -3,7 +3,8 @@
<!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="350" width="800">
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>
@ -11,16 +12,21 @@
<script type="text/javascript" src="chrome://openerp_plugin/content/overlay.js"></script>
<groupbox id="gpData">
<hbox>
<description>&emailid.value;</description>
<spacer width="55"/>
<textbox id="txtemail" width="260" />
<spacer width="5"/>
<button label="&bsearch.label;" oncommand="searchContactdetail();" image="&imagesearch.value;"/>
</hbox>
<hbox>
<description>&name.value;</description>
<spacer width="12"/>
<spacer width="16"/>
<textbox id="txtname" align="right" width="270" readonly="true"/>
<spacer width="5"/>
<button label="New Partner" image="&imagecreate.value;" oncommand="CreatePartner.onMenuItemCommand(event);"/>
</hbox>
<hbox>
<description>&contactname.value;</description>
<spacer width="9"/>
<textbox id="txtcontactname" align="right" width="270" />
</hbox>
<hbox>
<caption label="&postaladdress.value;" />
<spacer width="300"/>
@ -30,64 +36,63 @@
</hbox>
<hbox>
<description>&street.value;</description>
<spacer width="63"/>
<textbox id="txtstreet" width="270"/>
<description>&contactname.value;</description>
<spacer width="15"/>
<textbox id="txtcontactname" align="right" width="270" />
<spacer width="33"/>
<vbox>
<description>&office.value;</description>
<spacer width="70"/>
</vbox>
<vbox>
<spacer width="68"/>
<textbox id="txtoffice" />
</vbox>
</hbox>
<hbox>
<description>&street2.value;</description>
<spacer width="54"/>
<textbox id="txtstreet2" width="270"/>
<description>&street.value;</description>
<spacer width="68"/>
<textbox id="txtstreet" width="270"/>
<spacer width="33"/>
<vbox>
<description>&fax.value;</description>
<spacer width="53"/>
<description>&mobile.value;</description>
<spacer width="70"/>
</vbox>
<vbox>
<textbox id="txtmobile"/>
</vbox>
</hbox>
<hbox>
<description>&street2.value;</description>
<spacer width="60"/>
<textbox id="txtstreet2" width="270"/>
<spacer width="35"/>
<vbox>
<description>&fax.value;</description>
<spacer width="68"/>
</vbox>
<vbox>
<textbox id="txtfax" />
</vbox>
</hbox>
<hbox>
<description>&zip.value;</description>
<spacer width="82"/>
<textbox id="txtzip" />
<spacer width="110"/>
<vbox>
<description>&mobile.value;</description>
<spacer width="53"/>
</vbox>
<vbox>
<textbox id="txtmobile" />
</vbox>
</hbox>
<hbox>
<description>&city.value;</description>
<spacer width="79"/>
<textbox id="txtcity" />
<spacer width="110"/>
<vbox>
<description>&email.value;</description>
<spacer width="58"/>
</vbox>
<vbox>
<textbox id="txtemail" width="260" />
</vbox>
<description>&zip.value;</description>
<spacer width="87"/>
<textbox id="txtzip" />
<spacer width="115"/>
</hbox>
<hbox>
<description>&city.value;</description>
<spacer width="85"/>
<textbox id="txtcity" />
</hbox>
<hbox>
<label id="lblex3" value="&country.value;"/>
<spacer width="54"/>
<spacer width="60"/>
<menulist id="country" width="190">
<menupopup>
<menuitem label="" value=""/>
@ -97,7 +102,7 @@
<hbox>
<label id="lblex4" value="&state.value;"/>
<spacer width="68"/>
<spacer width="73"/>
<menulist id="state" width="190">
<menupopup>
<menuitem label="" value=""/>
@ -105,11 +110,16 @@
</menulist>
</hbox>
</groupbox>
<description></description>
<hbox>
<spacer width="600"/>
<spacer width="450"/>
<button label="&create.label;" accesskey="r" image="&imagecreate.value;" oncommand="Create.onMenuItemCommand(event);"/>
<button label="&ok.label;" image="&imageok.value;" oncommand="createContact();"/>
<button label="&cancel.label;" image="&imagecancel.value;" oncommand="close();" />
<button label="&ok.label;" image="&imageok.value;" oncommand="UpdateContact();close()"/>
</hbox>
</window>

View File

@ -41,8 +41,8 @@
<textbox id="txtpassword" type="password" width="300"/>
</hbox>
<hbox >
<spacer width="250"/>
<button align="center" id="btconnection" label="&connection.label;" oncommand="testConnection();" image="&imageok.value;" width="150"/>
<spacer width="290"/>
<button align="center" id="btconnection" label="&connection.label;" oncommand="testConnection();" image="&imageok.value;" width="100"/>
</hbox>
</groupbox>
</vbox>
@ -107,8 +107,7 @@
</tabpanels>
</tabbox>
<hbox align="center">
<spacer width="685"/>
<spacer width="800"/>
<button label="&close.label;" oncommand="close();" image="&imagecancel.value;"/>
<button label="&ok.label;" oncommand="okClick();" image="&imageok.value;"/>
</hbox>
</window>

View File

@ -285,7 +285,7 @@ var Address = {
},
onMenuItemCommand: function(){
open_contact();
open_contact();
searchContact();
}
};

View File

@ -20,7 +20,7 @@
<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"/> -->
<button label="&bsearch.label;" oncommand="searchCheckbox()" image="&imagesearch.value;" accesskey="s"/>
</hbox>
<vbox align="left" id="checkbox-dynamic">
</vbox>
@ -28,9 +28,12 @@
<image src='chrome://tiny_plugin/skin/perform.gif'/>
<checkbox id="cbxselectall" oncommand="selectAllCheckbox();" label="&cbxselectall.label;" checked="false"/>
<spacer width="10"/>
<button label="&bsearch.label;" oncommand="searchCheckbox()" image="&imagesearch.value;" accesskey="s"/>
</hbox>
<label id="lblex" value=" "/>
<hbox>
<description>Documents</description>
</hbox>
<listbox height="250" id="listSearchBox" >
<listhead >
<listheader label="&listSearchBox.header;"/>
@ -41,7 +44,7 @@
</listbox>
<hbox>
<spacer width="360"/>
<button label="&attach.label;" accesskey="u" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('upload');"/>
<button label="&attach.label;" image="&imagearchive.value;" oncommand="attachmentWidnowOpen('upload');"/>
</hbox>
</groupbox>

View File

@ -986,6 +986,81 @@ var listSearchContactHandler = {
}
}
var listSearchContactdetailHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
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"){
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"){
document.getElementById("txtemail").value =strlSearchResultValue;}
if(strlSearchResult=="email"){
document.getElementById("txtemailid").value =strlSearchResultValue;}
}
},
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,{});
var t = document.getElementById("txtemail").value
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) {
@ -1582,6 +1657,7 @@ var listLoginHandler = {
login = result.QueryInterface(Components.interfaces.nsISupportsPRInt32)
setUserId(login.data);
alert('Successful Login To OpenERP');
window.close();
}
else{
alert("Login Failed");
@ -1600,7 +1676,7 @@ var listLoginHandler = {
function testConnection(){
if (getconnect_server() == "false")
{
alert("Please Login To The Database First !")
alert("No Server Running..."+" "+getServer())
return false;
}
if (getDBList()=="false")

View File

@ -11,9 +11,16 @@
<!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">

View File

@ -3,7 +3,7 @@
<!ENTITY close.label "Cancel">
<!ENTITY database.label "Database: ">
<!ENTITY ok.label "OK">
<!ENTITY connection.label "Test Connection">
<!ENTITY connection.label "Connect">
<!ENTITY txturl.label "Server: ">
<!ENTITY image.label "Image : ">
<!ENTITY obj.label "Document : ">

View File

@ -3,7 +3,7 @@
<!ENTITY newobject.label "New Documents">
<!ENTITY bsearch.label "Search">
<!ENTITY close.label "Close">
<!ENTITY attach.label "Upload to OpenERP">
<!ENTITY attach.label "Archive to OpenERP">
<!ENTITY create.label "New Contact">
<!ENTITY archive.label "Create">
<!ENTITY attach.label "Attach">