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:
rob_strong%exchangecode.com 2006-07-21 22:10:36 +00:00
Родитель b690efe251
Коммит c7ff30b577
5 изменённых файлов: 11 добавлений и 8 удалений

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

@ -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;"