[IMP]: Change also in source file
bzr revid: atp@tinyerp.com-20110615095003-dhf33a3b6jv414jb
This commit is contained in:
parent
a36f550914
commit
fd77c1ef12
Binary file not shown.
Binary file not shown.
|
@ -148,13 +148,14 @@ function getPredefinedFolder(type) {
|
||||||
// type 2 = selected messages
|
// type 2 = selected messages
|
||||||
|
|
||||||
var use_dir = "mboximport.exportMSG.use_dir";
|
var use_dir = "mboximport.exportMSG.use_dir";
|
||||||
|
var username = Components.classes["@mozilla.org/process/environment;1"].
|
||||||
|
getService(Components.interfaces.nsIEnvironment).get('USERNAME')
|
||||||
var dir_path="";
|
var dir_path="";
|
||||||
if(navigator.userAgent.indexOf('Linux')!= -1){
|
if(navigator.userAgent.indexOf('Linux')!= -1){
|
||||||
dir_path ="/tmp"
|
dir_path ="/tmp"
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Win')!= -1){
|
else if(navigator.userAgent.indexOf('Win')!= -1){
|
||||||
dir_path ="C:\\"
|
dir_path ="C:\\Users\\"+ username +"\\"
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
||||||
dir_path ="/tmp"
|
dir_path ="/tmp"
|
||||||
|
|
|
@ -38,6 +38,8 @@ function searchmail()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
|
||||||
|
var username = Components.classes["@mozilla.org/process/environment;1"].
|
||||||
|
getService(Components.interfaces.nsIEnvironment).get('USERNAME')
|
||||||
var version_obj = prefService.getBranch("extensions.");
|
var version_obj = prefService.getBranch("extensions.");
|
||||||
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
version = version_obj.getCharPref("lastAppVersion");
|
version = version_obj.getCharPref("lastAppVersion");
|
||||||
|
@ -152,7 +154,7 @@ function searchmail()
|
||||||
obj.initWithPath("/tmp/");
|
obj.initWithPath("/tmp/");
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Win')!= -1){
|
else if(navigator.userAgent.indexOf('Win')!= -1){
|
||||||
obj.initWithPath("c:\\");
|
obj.initWithPath("C:\\Users\\"+ username +"\\");
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
||||||
obj.initWithPath("/tmp/");
|
obj.initWithPath("/tmp/");
|
||||||
|
@ -335,11 +337,13 @@ var listDocumentHandler = {
|
||||||
//function to archive the mail content through xmlrpc request
|
//function to archive the mail content through xmlrpc request
|
||||||
function parse_eml(){
|
function parse_eml(){
|
||||||
var fpath =""
|
var fpath =""
|
||||||
|
var username = Components.classes["@mozilla.org/process/environment;1"].
|
||||||
|
getService(Components.interfaces.nsIEnvironment).get('USERNAME')
|
||||||
if(navigator.userAgent.indexOf('Linux')!= -1){
|
if(navigator.userAgent.indexOf('Linux')!= -1){
|
||||||
fpath ="/tmp/"
|
fpath ="/tmp/"
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Win')!= -1){
|
else if(navigator.userAgent.indexOf('Win')!= -1){
|
||||||
fpath ="C:\\"
|
fpath ="C:\\Users\\"+ username +"\\"
|
||||||
}
|
}
|
||||||
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
else if(navigator.userAgent.indexOf('Mac OS X')!= -1){
|
||||||
fpath ="/tmp/"
|
fpath ="/tmp/"
|
||||||
|
|
|
@ -1434,34 +1434,6 @@ var listArchiveHandler = {
|
||||||
}
|
}
|
||||||
|
|
||||||
//function to archive the mail content through xmlrpc request
|
//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()
|
function upload_archivemail()
|
||||||
{
|
{
|
||||||
list_documents = document.getElementById('listSearchBox')
|
list_documents = document.getElementById('listSearchBox')
|
||||||
|
|
Loading…
Reference in New Issue