зеркало из https://github.com/mozilla/pjs.git
Bug 14258, implement Send Page. R=alecf
This commit is contained in:
Родитель
9a7e4da75a
Коммит
5db19c6ffc
|
@ -172,7 +172,7 @@ function AbNewMessage()
|
||||||
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
|
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
|
||||||
|
|
||||||
msgComposeService.OpenComposeWindowWithValues(null, 0, GetSelectedAddresses(), null, null,
|
msgComposeService.OpenComposeWindowWithValues(null, 0, GetSelectedAddresses(), null, null,
|
||||||
null, null, null);
|
null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetSelectedAddresses()
|
function GetSelectedAddresses()
|
||||||
|
|
|
@ -37,7 +37,7 @@ interface nsIMsgComposeService : nsISupports {
|
||||||
/* ... */
|
/* ... */
|
||||||
void OpenComposeWindowWithValues(in wstring msgComposeWindowURL, in MSG_ComposeFormat format,
|
void OpenComposeWindowWithValues(in wstring msgComposeWindowURL, in MSG_ComposeFormat format,
|
||||||
in wstring to, in wstring cc, in wstring bcc, in wstring newsgroups,
|
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);
|
void OpenComposeWindowWithCompFields(in wstring msgComposeWindowURL, in MSG_ComposeFormat format, in nsIMsgCompFields compFields);
|
||||||
|
|
|
@ -217,6 +217,8 @@ function ComposeStartup()
|
||||||
msgCompFields.SetNewsgroups(args.newsgroups);
|
msgCompFields.SetNewsgroups(args.newsgroups);
|
||||||
if (args.subject)
|
if (args.subject)
|
||||||
msgCompFields.SetSubject(args.subject);
|
msgCompFields.SetSubject(args.subject);
|
||||||
|
if (args.attachment)
|
||||||
|
msgCompFields.SetAttachments(args.attachment);
|
||||||
|
|
||||||
var subjectValue = msgCompFields.GetSubject();
|
var subjectValue = msgCompFields.GetSubject();
|
||||||
if (subjectValue != "") {
|
if (subjectValue != "") {
|
||||||
|
|
|
@ -152,7 +152,8 @@ nsresult nsMsgComposeService::OpenComposeWindowWithValues(const PRUnichar *msgCo
|
||||||
const PRUnichar *bcc,
|
const PRUnichar *bcc,
|
||||||
const PRUnichar *newsgroups,
|
const PRUnichar *newsgroups,
|
||||||
const PRUnichar *subject,
|
const PRUnichar *subject,
|
||||||
const PRUnichar *body)
|
const PRUnichar *body,
|
||||||
|
const PRUnichar *attachment)
|
||||||
{
|
{
|
||||||
nsAutoString args = "";
|
nsAutoString args = "";
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
@ -165,7 +166,8 @@ nsresult nsMsgComposeService::OpenComposeWindowWithValues(const PRUnichar *msgCo
|
||||||
if (bcc) {args.Append(",bcc="); args.Append(bcc);}
|
if (bcc) {args.Append(",bcc="); args.Append(bcc);}
|
||||||
if (newsgroups) {args.Append(",newsgroups="); args.Append(newsgroups);}
|
if (newsgroups) {args.Append(",newsgroups="); args.Append(newsgroups);}
|
||||||
if (subject) {args.Append(",subject="); args.Append(subject);}
|
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)
|
if (msgComposeWindowURL && *msgComposeWindowURL)
|
||||||
rv = openWindow( msgComposeWindowURL, args.GetUnicode() );
|
rv = openWindow( msgComposeWindowURL, args.GetUnicode() );
|
||||||
|
|
|
@ -942,10 +942,10 @@ function OpenSearch(tabName, searchStr)
|
||||||
window.open("chrome://addressbook/content/", "_blank", "chrome,menubar,toolbar,resizable");
|
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()
|
function BrowserViewSource()
|
||||||
|
|
|
@ -93,7 +93,7 @@ Contributor(s): ______________________________________. -->
|
||||||
|
|
||||||
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
|
<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:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window.content.location.href);"/>
|
||||||
|
|
||||||
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>
|
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>
|
||||||
|
|
|
@ -942,10 +942,10 @@ function OpenSearch(tabName, searchStr)
|
||||||
window.open("chrome://addressbook/content/", "_blank", "chrome,menubar,toolbar,resizable");
|
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()
|
function BrowserViewSource()
|
||||||
|
|
|
@ -93,7 +93,7 @@ Contributor(s): ______________________________________. -->
|
||||||
|
|
||||||
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
|
<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:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window.content.location.href);"/>
|
||||||
|
|
||||||
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>
|
<broadcaster id="Browser:GoOffline" value="&offlineGoOfflineCmd.label;" disabled="true" oncommand="BrowserReload();"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче