зеркало из https://github.com/mozilla/pjs.git
Fix b=170499 move visitLink() to toolkit for about dialog and thunderbird
This commit is contained in:
Родитель
5e08f7bdac
Коммит
5d94067160
|
@ -54,6 +54,7 @@
|
|||
title="&aboutDialog.title;"
|
||||
style="width: 299px">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
function onLoad() {
|
||||
|
@ -74,11 +75,8 @@
|
|||
<spacer flex="1"/>
|
||||
<textbox id="userAgent" multiline="true" readonly="true" cols="60" style="height: 5.1em"/>
|
||||
<spacer flex="1"/>
|
||||
/* XXXBlake This is a workaround. I find that if I try to use href and I open
|
||||
About as a modal dialog, a new browser window opens when I click the link
|
||||
but the page doesn't load in it. */
|
||||
<html:a onclick="window.openDialog('chrome://browser/content', 'Mozilla Firebird', 'chrome,all,dialog=no', '©rightLink;');"
|
||||
href="" id="copyright"
|
||||
<html:a onclick="visitLink(event);"
|
||||
href="" id="copyright" link="©rightLink;"
|
||||
style="display: block;">©right;</html:a>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
ondialogcancel="return hPrefWindow.onCancel(event);"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
|
@ -55,17 +56,6 @@
|
|||
hPrefWindow.switchPage(newURL, "");
|
||||
}
|
||||
|
||||
function visitLink(aEvent)
|
||||
{
|
||||
var node = aEvent.target;
|
||||
while (node.nodeType != Node.ELEMENT_NODE)
|
||||
node = node.parentNode;
|
||||
|
||||
var url = node.getAttribute("link");
|
||||
if (url != "")
|
||||
window.opener.openNewWindowWith(url, null, false);
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -124,6 +124,15 @@ function goOnEvent(node, event)
|
|||
}
|
||||
}
|
||||
|
||||
function visitLink(aEvent) {
|
||||
var node = aEvent.target;
|
||||
while (node.nodeType != Node.ELEMENT_NODE)
|
||||
node = node.parentNode;
|
||||
var url = node.getAttribute("link");
|
||||
if (url != "")
|
||||
window.opener.openNewWindowWith(url, null, false);
|
||||
}
|
||||
|
||||
function isValidLeftClick(aEvent, aName)
|
||||
{
|
||||
return (aEvent.button == 0 && aEvent.originalTarget.localName == aName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче