зеркало из https://github.com/mozilla/pjs.git
107311 - make Mail Message Pane context window code not rely on menuitem visibility specified via style attribute, since this is now specified with the hidden attribute. Also remove unused parameter to fillMessagePaneContextMenu
r=jst, sr=sspitzer
This commit is contained in:
Родитель
f3119d97c0
Коммит
6f65e1743c
|
@ -340,7 +340,7 @@ function SetMenuItemAccessKey(id, accessKey)
|
|||
|
||||
}
|
||||
|
||||
function fillMessagePaneContextMenu(contextMenu)
|
||||
function fillMessagePaneContextMenu()
|
||||
{
|
||||
var message = GetLoadedMessage();
|
||||
var numSelected = (message) ? 1 : 0;
|
||||
|
@ -378,20 +378,20 @@ function fillMessagePaneContextMenu(contextMenu)
|
|||
|
||||
function AreBrowserItemsShowing()
|
||||
{
|
||||
return(IsMenuItemShowingWithStyle("context-openlink") ||
|
||||
IsMenuItemShowingWithStyle("context-editlink") ||
|
||||
IsMenuItemShowingWithStyle("context-viewimage") ||
|
||||
IsMenuItemShowingWithStyle("context-copylink") ||
|
||||
IsMenuItemShowingWithStyle("context-copyimage") ||
|
||||
IsMenuItemShowingWithStyle("context-savelink") ||
|
||||
IsMenuItemShowingWithStyle("context-saveimage") ||
|
||||
IsMenuItemShowingWithStyle("context-bookmarklink"));
|
||||
return(IsMenuItemShowing("context-openlink") ||
|
||||
IsMenuItemShowing("context-editlink") ||
|
||||
IsMenuItemShowing("context-viewimage") ||
|
||||
IsMenuItemShowing("context-copylink") ||
|
||||
IsMenuItemShowing("context-copyimage") ||
|
||||
IsMenuItemShowing("context-savelink") ||
|
||||
IsMenuItemShowing("context-saveimage") ||
|
||||
IsMenuItemShowing("context-bookmarklink"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneOpenSeparator()
|
||||
{
|
||||
return(IsMenuItemShowingWithStyle("context-selectall") ||
|
||||
IsMenuItemShowingWithStyle("context-copy"));
|
||||
return(IsMenuItemShowing("context-selectall") ||
|
||||
IsMenuItemShowing("context-copy"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneReplySeparator()
|
||||
|
@ -415,19 +415,19 @@ function ShowMessagePaneEditSeparator()
|
|||
|
||||
function ShowMessagePaneLinkSeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-openlink") ||
|
||||
IsMenuItemShowingWithStyle("context-editlink"));
|
||||
return (IsMenuItemShowing("context-openlink") ||
|
||||
IsMenuItemShowing("context-editlink"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneImageSeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-viewimage"));
|
||||
return (IsMenuItemShowing("context-viewimage"));
|
||||
}
|
||||
|
||||
function ShowMessagePaneCopySeparator()
|
||||
{
|
||||
return (IsMenuItemShowingWithStyle("context-copylink") ||
|
||||
IsMenuItemShowingWithStyle("context-copyimage"));
|
||||
return (IsMenuItemShowing("context-copylink") ||
|
||||
IsMenuItemShowing("context-copyimage"));
|
||||
}
|
||||
|
||||
function IsMenuItemShowing(menuID)
|
||||
|
@ -441,17 +441,6 @@ function IsMenuItemShowing(menuID)
|
|||
return false;
|
||||
}
|
||||
|
||||
function IsMenuItemShowingWithStyle(menuID)
|
||||
{
|
||||
var item = document.getElementById(menuID);
|
||||
if(item)
|
||||
{
|
||||
var style = item.getAttribute( "style" );
|
||||
return ( style.indexOf( "display:none;" ) == -1 )
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function CopyMessageUrl()
|
||||
{
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче