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:
parent
cee05f3528
commit
f0a647bf53
@ -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;
|
||||
|
||||
|
||||
@ -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;"
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user