fix all context menu for the message pane. except for "Select All",

none of the menu items worked.  two problems:  move isDocumentFrame()
out to contentAreaUtils.js and move the creation of the contextMenu out
so it wouldn't go out of scope.  r=blakeross, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@84111 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com 2000-12-27 23:04:39 +00:00
parent cee05f3528
commit f0a647bf53
4 changed files with 24 additions and 20 deletions

View File

@ -321,10 +321,8 @@ function SetMenuItemAccessKey(id, accessKey)
}
function fillMessagePaneContextMenu(contextMenuNode)
function fillMessagePaneContextMenu(contextMenu)
{
var contextMenu = new nsContextMenu(contextMenuNode);
var message = GetLoadedMessage();
var numSelected = (message) ? 1 : 0;

View File

@ -32,6 +32,12 @@ Rights Reserved.
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Context menu -->
<script language="javascript">
// Global variable that holds the nsContextMenu instance.
var contextMenu = null;
</script>
<script src="chrome://messenger/content/mailCommands.js"/>
<script src="chrome://messenger/content/mailWindowOverlay.js"/>
@ -386,7 +392,7 @@ Rights Reserved.
</popup>
<popup id="messagePaneContext"
oncreate="return fillMessagePaneContextMenu(this);"
oncreate="contextMenu = new nsContextMenu(this); return fillMessagePaneContextMenu(contextMenu);"
ondestroy="contextMenu.onDestroy(); contextMenu = null;">
<menuitem id="context-openlink"
value="&openLinkCmd.label;"

View File

@ -93,22 +93,6 @@ function contentAreaFrameFocus()
}
}
/**
* Determine whether or not a given focused DOMWindow is in the content
* area.
**/
function isDocumentFrame(aFocusedWindow)
{
var contentFrames = _content.frames;
if (contentFrames.length) {
for (var i = 0; i < contentFrames.length; ++i) {
if (aFocusedWindow == contentFrames[i])
return true;
}
}
return false;
}
//////////////////////////////// BOOKMARKS ////////////////////////////////////
function UpdateBookmarksLastVisitedDate(event)

View File

@ -21,6 +21,22 @@
*
*/
/**
* Determine whether or not a given focused DOMWindow is in the content
* area.
**/
function isDocumentFrame(aFocusedWindow)
{
var contentFrames = _content.frames;
if (contentFrames.length) {
for (var i = 0; i < contentFrames.length; ++i) {
if (aFocusedWindow == contentFrames[i])
return true;
}
}
return false;
}
function openNewWindowWith( url ) {
// URL Loading Security Check