зеркало из https://github.com/mozilla/pjs.git
Bug #303941 --> Convert update's link widget to use the existing text-link widget. This allows link clicks
to work correctly in Thunderbird. sr=ben
This commit is contained in:
Родитель
03e37f0dca
Коммит
b7faa35899
|
@ -33,9 +33,3 @@ checkbox[type="update"] {
|
|||
-moz-binding: url("chrome://mozapps/content/update/updates.xml#updateItem");
|
||||
}
|
||||
|
||||
link {
|
||||
-moz-binding: url("chrome://mozapps/content/update/updates.xml#link");
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1325,11 +1325,10 @@ var gErrorsPage = {
|
|||
|
||||
var errorReason = document.getElementById("errorReason");
|
||||
errorReason.value = gUpdates.update.statusText;
|
||||
var errorLink = document.getElementById("errorLink");
|
||||
var manualURL = getPref("getCharPref", PREF_UPDATE_MANUAL_URL, "");
|
||||
errorLink.href = manualURL;
|
||||
var errorLinkLabel = document.getElementById("errorLinkLabel");
|
||||
errorLinkLabel.value = manualURL;
|
||||
errorLinkLabel.href = manualURL;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,57 +7,6 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="link">
|
||||
<implementation implements="nsIAccessibleProvider">
|
||||
<property name="accessible">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
return accService.createXULLinkAccessible(this);
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
<property name="href"
|
||||
onget="return this.getAttribute('href');"
|
||||
onset="this.setAttribute('href', val); return val;"/>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="keypress" keycode="VK_ENTER" action="this.click()" />
|
||||
<handler event="keypress" keycode="VK_RETURN" action="this.click()" />
|
||||
<handler event="click">
|
||||
<![CDATA[
|
||||
if (event.button != 0)
|
||||
return;
|
||||
|
||||
# If we're not a browser, use the external protocol service to load the URI.
|
||||
#ifndef MOZ_PHOENIX
|
||||
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(this.getAttribute("href"), null, null);
|
||||
|
||||
var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
|
||||
.getService(Components.interfaces.nsIExternalProtocolService);
|
||||
if (protocolSvc.isExposedProtocol(uri.scheme))
|
||||
protocolSvc.loadUrl(uri);
|
||||
# If we're a browser, open a new browser window instead.
|
||||
#else
|
||||
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
var ary = Components.classes["@mozilla.org/supports-array;1"]
|
||||
.createInstance(Components.interfaces.nsISupportsArray);
|
||||
var url = Components.classes["@mozilla.org/supports-string;1"]
|
||||
.createInstance(Components.interfaces.nsISupportsString);
|
||||
url.data = this.getAttribute("href")
|
||||
ary.AppendElement(url);
|
||||
|
||||
ww.openWindow(null, "chrome://browser/content/browser.xul",
|
||||
"_blank", "chrome,all,dialog=no", ary);
|
||||
#endif
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="update" extends="chrome://mozapps/content/shared/richview.xml#richview-item">
|
||||
<resources>
|
||||
<stylesheet src="chrome://mozapps/content/update/updates.css"/>
|
||||
|
|
|
@ -110,9 +110,7 @@
|
|||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<link id="updateMoreInfoURL">
|
||||
<label id="updateMoreInfoURLLabel">&clickHere.label;</label>
|
||||
</link>
|
||||
<label class="text-link" id="updateMoreInfoURL" value="&clickHere.label;"/>
|
||||
</vbox>
|
||||
</deck>
|
||||
</wizardpage>
|
||||
|
@ -132,9 +130,7 @@
|
|||
onpageshow="gDownloadingPage.onPageShow();">
|
||||
<hbox pack="start">
|
||||
<label id="downloadName" crop="right" flex="1">&downloading.intro;</label>
|
||||
<link id="detailsLink">
|
||||
<label>&details.link;</label>
|
||||
</link>
|
||||
<label class="text-link" id="detailsLink" value="&details.link;"/>
|
||||
</hbox>
|
||||
<progressmeter id="downloadProgress" mode="undetermined"/>
|
||||
<hbox id="downloadStatusLine">
|
||||
|
@ -159,9 +155,7 @@
|
|||
<separator/>
|
||||
<label id="errorManual">&errorManual.label;</label>
|
||||
<hbox>
|
||||
<link id="errorLink">
|
||||
<label id="errorLinkLabel"/>
|
||||
</link>
|
||||
<label class="text-link" id="errorLinkLabel"/>
|
||||
</hbox>
|
||||
</wizardpage>
|
||||
|
||||
|
@ -185,9 +179,7 @@
|
|||
<hbox align="center">
|
||||
<label>&finishedBackground.name;</label>
|
||||
<label id="updateFinishedName" flex="1" crop="right"/>
|
||||
<link id="finishedBackgroundLink">
|
||||
<label>&details.link;</label>
|
||||
</link>
|
||||
<label id="finishedBackgroundLink" class="text-link" value="&details.link;"/>
|
||||
</hbox>
|
||||
<spacer flex="1"/>
|
||||
<label>&finishedBackground.instruction1;</label>
|
||||
|
@ -201,9 +193,7 @@
|
|||
<label>&installed.intro;</label>
|
||||
<separator/>
|
||||
<hbox>
|
||||
<link id="whatsnewLink" hidden="true">
|
||||
<label>&whatsnew.label;</label>
|
||||
</link>
|
||||
<label id="whatsnewLink" class="text-link" hidden="true" value="&whatsnew.label;"/>
|
||||
</hbox>
|
||||
</wizardpage>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче