зеркало из https://github.com/mozilla/gecko-dev.git
supplemental patch for Bug 262575 - 'Visit Homepage' and 'Get More Extensions/Themes' in Extension and Theme manager should respect tabbed browsing preferences. r=sspitzer
This commit is contained in:
Родитель
b690efe251
Коммит
c7ff30b577
|
@ -106,7 +106,7 @@ function init()
|
|||
|
||||
var extensionHomepage = document.getElementById("extensionHomepage");
|
||||
if (homepage) {
|
||||
extensionHomepage.setAttribute("onclick", "loadHomepage(\"" + homepage + "\");");
|
||||
extensionHomepage.setAttribute("homepageURL", homepage);
|
||||
extensionHomepage.setAttribute("tooltiptext", homepage);
|
||||
}
|
||||
else
|
||||
|
@ -137,8 +137,8 @@ function init()
|
|||
acceptButton.label = extensionsStrings.getString("aboutWindowCloseButton");
|
||||
}
|
||||
|
||||
function loadHomepage(aURI) {
|
||||
function loadHomepage(aEvent) {
|
||||
window.close();
|
||||
window.opener.openURL(aURI);
|
||||
window.opener.openURL(aEvent.target.getAttribute("homepageURL"));
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
<label id="extensionCreatorLabel" class="sectionTitle">&creator.label;</label>
|
||||
<hbox id="creatorBox" class="indent">
|
||||
<label id="extensionCreator" flex="1" crop="right"/>
|
||||
<label id="extensionHomepage" class="text-link" value="&homepage.label;"/>
|
||||
<label id="extensionHomepage" onclick="loadHomepage(event);"
|
||||
class="text-link" value="&homepage.label;"/>
|
||||
</hbox>
|
||||
|
||||
<label id="extensionDevelopers" class="sectionTitle">&developers.label;</label>
|
||||
|
|
|
@ -340,7 +340,7 @@ function showView(aView) {
|
|||
: PREF_EXTENSIONS_GETMOREEXTENSIONSURL,
|
||||
Components.interfaces.nsIPrefLocalizedString).data;
|
||||
getMoreURL = getMoreURL.replace(/%APPID%/g, gAppID);
|
||||
getMore.setAttribute("onclick", "openURL(\"" + getMoreURL + "\");");
|
||||
getMore.setAttribute("getMoreURL", getMoreURL);
|
||||
if (getMore.hidden)
|
||||
getMore.hidden = false;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,8 @@
|
|||
</xul:hbox>
|
||||
<xul:hbox flex="1" class="blocklistedBox attention" align="center">
|
||||
<xul:label value="&blocklisted.label;" crop="end"/>
|
||||
<xul:label anonid="blocklistMoreInfo" class="text-link" value="&moreInfo.label;"/>
|
||||
<xul:label anonid="blocklistMoreInfo" class="text-link" value="&moreInfo.label;"
|
||||
onclick="openURL(this.getAttribute('moreInfoURL'));"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
<xul:hbox anonid="selectedButtons" flex="1" class="selectedButtons">
|
||||
|
@ -232,8 +233,8 @@
|
|||
var blocklistMoreInfo = document.getAnonymousElementByAttribute(this, "anonid", "blocklistMoreInfo");
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
blocklistMoreInfo.setAttribute("onclick", "openURL(\"" +
|
||||
prefs.getCharPref("extensions.blocklist.detailsURL") + "\");");
|
||||
var url = prefs.getCharPref("extensions.blocklist.detailsURL");
|
||||
blocklistMoreInfo.setAttribute("moreInfoURL", url);
|
||||
} catch(e) {
|
||||
blocklistMoreInfo.hidden = true;
|
||||
}
|
||||
|
|
|
@ -219,6 +219,7 @@
|
|||
tooltiptext="&cmd.continue.tooltip;"
|
||||
command="cmd_restartApp"/>
|
||||
<label id="getMore" class="text-link"
|
||||
onclick="openURL(this.getAttribute('getMoreURL'));"
|
||||
valuethemes="&getThemes.label;"
|
||||
valueextensions="&getExtensions.label;"
|
||||
tooltiptextthemes="&getThemes.tooltip;"
|
||||
|
|
Загрузка…
Ссылка в новой задаче