Fix for bugs 4907, 5317; New blank editor window, and Edit Page. r akkana, kin. a chofmann.

This commit is contained in:
sfraser%netscape.com 1999-05-19 23:27:34 +00:00
Родитель 85e4ed7461
Коммит 11c68f561c
2 изменённых файлов: 34 добавлений и 2 удалений

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

@ -247,6 +247,38 @@
} }
} }
function BrowserNewEditorWindow()
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, "" );
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserEditPage(url)
{
core = XPAppCoresManager.Find("toolkitCore");
if ( !core ) {
core = new ToolkitCore();
if ( core ) {
core.Init("toolkitCore");
}
}
if ( core ) {
core.ShowWindowWithArgs( "chrome://editor/content", window, url);
} else {
dump("Error; can't create toolkitCore\n");
}
}
function BrowserOpenWindow() function BrowserOpenWindow()
{ {
core = XPAppCoresManager.Find("toolkitCore"); core = XPAppCoresManager.Find("toolkitCore");

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

@ -272,14 +272,14 @@
<menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/> <menuitem name="&newMailCmd.label;" onclick="MsgNewMessage();"/>
<menuitem name="&newChatCmd.label;" onclick=""/> <menuitem name="&newChatCmd.label;" onclick=""/>
<separator /> <separator />
<menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewWindow();"/> <menuitem name="&newBlankPageCmd.label;" onclick="BrowserNewEditorWindow();"/>
<menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/> <menuitem name="&newPageFromTemplateCmd.label;" onclick="BrowserNewWindow();"/>
<menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/> <menuitem name="&newPageFromDraftCmd.label;" onclick="BrowserNewWindow();"/>
</menu> </menu>
<menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/> <menuitem name="&openCmd.label;" onclick="BrowserOpenWindow();"/>
<separator /> <separator />
<menuitem name="&sendPageCmd.label;" onclick="BrowserReload();"/> <menuitem name="&sendPageCmd.label;" onclick="BrowserReload();"/>
<menuitem name="&editPageCmd.label;" onclick="BrowserReload();" /> <menuitem name="&editPageCmd.label;" onclick="BrowserEditPage(window.frames[0].frames[1].location.href);" />
<separator /> <separator />
<menu name="&offlineMenu.label;"> <menu name="&offlineMenu.label;">
<menuitem name="&offlineGoOfflineCmd.label;" onclick="BrowserReload();"/> <menuitem name="&offlineGoOfflineCmd.label;" onclick="BrowserReload();"/>