Bug 14258, implement Send Page. R=alecf

git-svn-id: svn://10.0.0.236/trunk@51634 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ducarroz%netscape.com
1999-10-23 04:50:20 +00:00
parent 35cf097c8a
commit 798afa71eb
8 changed files with 18 additions and 14 deletions

View File

@@ -172,7 +172,7 @@ function AbNewMessage()
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
msgComposeService.OpenComposeWindowWithValues(null, 0, GetSelectedAddresses(), null, null,
null, null, null);
null, null, null, null);
}
function GetSelectedAddresses()

View File

@@ -37,7 +37,7 @@ interface nsIMsgComposeService : nsISupports {
/* ... */
void OpenComposeWindowWithValues(in wstring msgComposeWindowURL, in MSG_ComposeFormat format,
in wstring to, in wstring cc, in wstring bcc, in wstring newsgroups,
in wstring subject, in wstring body);
in wstring subject, in wstring body, in wstring attachment);
/* ... */
void OpenComposeWindowWithCompFields(in wstring msgComposeWindowURL, in MSG_ComposeFormat format, in nsIMsgCompFields compFields);

View File

@@ -217,6 +217,8 @@ function ComposeStartup()
msgCompFields.SetNewsgroups(args.newsgroups);
if (args.subject)
msgCompFields.SetSubject(args.subject);
if (args.attachment)
msgCompFields.SetAttachments(args.attachment);
var subjectValue = msgCompFields.GetSubject();
if (subjectValue != "") {

View File

@@ -152,7 +152,8 @@ nsresult nsMsgComposeService::OpenComposeWindowWithValues(const PRUnichar *msgCo
const PRUnichar *bcc,
const PRUnichar *newsgroups,
const PRUnichar *subject,
const PRUnichar *body)
const PRUnichar *body,
const PRUnichar *attachment)
{
nsAutoString args = "";
nsresult rv;
@@ -165,7 +166,8 @@ nsresult nsMsgComposeService::OpenComposeWindowWithValues(const PRUnichar *msgCo
if (bcc) {args.Append(",bcc="); args.Append(bcc);}
if (newsgroups) {args.Append(",newsgroups="); args.Append(newsgroups);}
if (subject) {args.Append(",subject="); args.Append(subject);}
if (body) {args.Append(",body="); args.Append(body);}
if (attachment) {args.Append(",attachment="); args.Append(attachment);}
if (body) {args.Append(",body="); args.Append(body);} //Body need to be the last one!
if (msgComposeWindowURL && *msgComposeWindowURL)
rv = openWindow( msgComposeWindowURL, args.GetUnicode() );

View File

@@ -942,12 +942,12 @@ function OpenSearch(tabName, searchStr)
window.open("chrome://addressbook/content/", "_blank", "chrome,menubar,toolbar,resizable");
}
function MsgNewMessage()
function BrowserSendPage(pageUrl, pageTitle)
{
// Open message compose window.
window.openDialog( "chrome://messengercompose/content/", "_blank", "chrome,all,dialog=no", "" );
window.openDialog( "chrome://messengercompose/content/", "_blank", "chrome,all,dialog=no",
"attachment=" + pageUrl + ",body=" + pageUrl + ",subject='" + pageTitle + "'");
}
function BrowserViewSource()
{
dump("BrowserViewSource(); \n ");

View File

@@ -93,7 +93,7 @@ Contributor(s): ______________________________________. -->
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
<broadcaster id="Browser:SendPage" value="&sendPageCmd.label;" disabled ="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:SendPage" value="&sendPageCmd.label;" oncommand="BrowserSendPage(window.content.location.href, window.content.document.title);"/>
<broadcaster id="Browser:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window.content.location.href);"/>
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>

View File

@@ -942,12 +942,12 @@ function OpenSearch(tabName, searchStr)
window.open("chrome://addressbook/content/", "_blank", "chrome,menubar,toolbar,resizable");
}
function MsgNewMessage()
function BrowserSendPage(pageUrl, pageTitle)
{
// Open message compose window.
window.openDialog( "chrome://messengercompose/content/", "_blank", "chrome,all,dialog=no", "" );
window.openDialog( "chrome://messengercompose/content/", "_blank", "chrome,all,dialog=no",
"attachment=" + pageUrl + ",body=" + pageUrl + ",subject='" + pageTitle + "'");
}
function BrowserViewSource()
{
dump("BrowserViewSource(); \n ");

View File

@@ -93,7 +93,7 @@ Contributor(s): ______________________________________. -->
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
<broadcaster id="Browser:SendPage" value="&sendPageCmd.label;" disabled ="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:SendPage" value="&sendPageCmd.label;" oncommand="BrowserSendPage(window.content.location.href, window.content.document.title);"/>
<broadcaster id="Browser:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window.content.location.href);"/>
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>