Bug 711779 - Add Bookmark This Link to feeds' Website header link context menu. r+moa=Mnyromyr

This commit is contained in:
Jens Hatlak 2011-12-22 19:56:23 +01:00
Родитель 29aec8166e
Коммит 506d7c4340
3 изменённых файлов: 22 добавлений и 1 удалений

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

@ -46,6 +46,8 @@
<!ENTITY CreateFilterFrom.accesskey "F">
<!ENTITY copyLinkCmd.label "Copy Link Location">
<!ENTITY copyLinkCmd.accesskey "C">
<!ENTITY bookmarkLinkCmd.label "Bookmark This Link…">
<!ENTITY bookmarkLinkCmd.accesskey "B">
<!ENTITY CopyMessageId.label "Copy Message-ID">
<!ENTITY CopyMessageId.accesskey "C">
<!ENTITY OpenMessageForMsgId.label "Open Message For ID">

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

@ -1699,6 +1699,24 @@ function CopyWebsiteAddress(websiteAddressNode)
}
}
function BookmarkWebsite(aWebsiteAddressNode)
{
if (aWebsiteAddressNode)
{
let websiteAddress = aWebsiteAddressNode.getAttribute("value");
if (currentHeaderData && "content-base" in currentHeaderData)
{
let url = currentHeaderData["content-base"].headerValue;
if (url != websiteAddress)
return;
let title = currentHeaderData["subject"].headerValue;
PlacesUIUtils.showMinimalAddBookmarkUI(makeURI(url), title);
}
}
}
var attachmentAreaDNDObserver = {
onDragStart: function (aEvent, aAttachmentData, aDragAction)
{

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

@ -130,7 +130,8 @@
</menupopup>
<menupopup id="copyUrlPopup">
<menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode)"/>
<menuitem label="&copyLinkCmd.label;" accesskey="&copyLinkCmd.accesskey;" oncommand="CopyWebsiteAddress(document.popupNode);"/>
<menuitem label="&bookmarkLinkCmd.label;" accesskey="&bookmarkLinkCmd.accesskey;" oncommand="BookmarkWebsite(document.popupNode);"/>
</menupopup>
<hbox id="msgHeaderView" keywordrelated="true" originalclass="none" persist="state">