Bug 14258, implement Send Page. R=alecf

This commit is contained in:
ducarroz%netscape.com 1999-10-23 04:50:20 +00:00
Родитель 56b2ddf147
Коммит 61963bad56
8 изменённых файлов: 18 добавлений и 14 удалений

Просмотреть файл

@ -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()

Просмотреть файл

@ -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);

Просмотреть файл

@ -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 != "") {

Просмотреть файл

@ -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() );

Просмотреть файл

@ -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 ");

Просмотреть файл

@ -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();"/>

Просмотреть файл

@ -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 ");

Просмотреть файл

@ -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();"/>