Bug 562902: Implement the final detail view mockups. r=Unfocused, a=blocking-b6

This commit is contained in:
Dave Townsend 2010-09-01 09:57:48 -07:00
parent 51c6b7daf5
commit a29c57459f
18 changed files with 1264 additions and 456 deletions

View File

@ -56,6 +56,8 @@
<!ENTITY cmd.enableAddon.accesskey "E">
<!ENTITY cmd.disableAddon.label "Disable">
<!ENTITY cmd.disableAddon.accesskey "D">
<!ENTITY cmd.installAddon.label "Install">
<!ENTITY cmd.installAddon.accesskey "I">
<!ENTITY cmd.uninstallAddon.label "Remove">
<!ENTITY cmd.uninstallAddon.accesskey "R">
<!ENTITY cmd.showPreferencesWin.label "Options">
@ -73,14 +75,22 @@
<!-- detail view -->
<!ENTITY detail.version.label "Version">
<!ENTITY detail.updated.label "Updated">
<!ENTITY detail.lastupdated.label "Last Updated">
<!ENTITY detail.creator.label "Developer">
<!ENTITY detail.homepage.label "Homepage">
<!ENTITY detail.numberOfDownloads.label "Downloads">
<!ENTITY detail.updateAutomatically.label "Update automatically">
<!ENTITY detail.updateAutomatically.accesskey "U">
<!ENTITY detail.updateAutomatically.tooltip "Update this add-on automatically whenever there is an update available">
<!ENTITY detail.contributions.description "The developer of this add-on asks that you help support its continued development by making a small contribution.">
<!ENTITY detail.updateType "Automatic Updates">
<!ENTITY detail.updateAutomatic.label "On">
<!ENTITY detail.updateAutomatic.tooltip "Automatically install updates">
<!ENTITY detail.updateManual.label "Off">
<!ENTITY detail.updateManual.tooltip "Don't automaticall install updates">
<!ENTITY detail.home "Homepage">
<!ENTITY detail.repository "Add-on Profile">
<!ENTITY detail.size "Size">
<!ENTITY detail.checkForUpdates.label "Check for updates">
<!ENTITY detail.checkForUpdates.accesskey "F">
<!ENTITY detail.checkForUpdates.tooltip "Check for updates for this add-on">

View File

@ -34,6 +34,9 @@ notification.uninstall=%1$S will be uninstalled after you restart %2$S.
#LOCALIZATION NOTE (notification.upgrade) %1$S is the add-on name, %2$S is brand name
notification.upgrade=%1$S will be updated after you restart %2$S.
#LOCALIZATION NOTE (contributionAmount) %S is the currency amount recommended for contributions
contributionAmount=Suggested Donation: %S
installDownloading=Downloading
installDownloaded=Downloaded
installDownloadFailed=Error downloading
@ -44,11 +47,24 @@ installDisablePending=Restart to disable
installFailed=Error installing
installCancelled=Install cancelled
#LOCALIZATION NOTE: %1$S is the addon name, %2$S is brand name
restartToEnable2=%1$S will be enabled after you restart %2$S
restartToDisable=%1$S will be disabled after you restart %2$S
restartToUninstall=%1$S will be removed after you restart %2$S
restartToUpgrade=%1$S will be updated after you restart %2$S
#LOCALIZATION NOTE (details.notification.incompatible) %1$S is the add-on name, %2$S is brand name, %3$S is application version
details.notification.incompatible=%1$S is incompatible with %2$S %3$S.
#LOCALIZATION NOTE (details.notification.blocked) %1$S is the add-on name
details.notification.blocked=%1$S has been disabled due to security or stability issues.
details.notification.blocked.link=More Information
#LOCALIZATION NOTE (details.notification.softblocked) %1$S is the add-on name
details.notification.softblocked=%1$S is known to cause security or stability issues.
details.notification.softblocked.link=More Information
#LOCALIZATION NOTE (details.notification.enable) %1$S is the add-on name, %2$S is brand name
details.notification.enable=%1$S will be enabled after you restart %2$S.
#LOCALIZATION NOTE (details.notification.disable) %1$S is the add-on name, %2$S is brand name
details.notification.disable=%1$S will be disabled after you restart %2$S.
#LOCALIZATION NOTE (details.notification.install) %1$S is the add-on name, %2$S is brand name
details.notification.install=%1$S will be installed after you restart %2$S.
#LOCALIZATION NOTE (details.notification.uninstall) %1$S is the add-on name, %2$S is brand name
details.notification.uninstall=%1$S will be uninstalled after you restart %2$S.
#LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name
details.notification.upgrade=%1$S will be updated after you restart %2$S.
installFromFile.dialogTitle=Select add-on to install
installFromFile.filterName=Add-ons

View File

@ -83,6 +83,10 @@ xhtml|link {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#install-status");
}
.detail-row {
-moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#detail-row");
}
#header-searching:not([active]) {
visibility: hidden;
}
@ -92,6 +96,10 @@ xhtml|link {
visibility: collapse;
}
#detail-view {
overflow-y: auto;
}
.addon:not([notification="warning"]) .warning,
.addon:not([notification="error"]) .error,
.addon:not([notification="info"]) .info,
@ -100,7 +108,14 @@ xhtml|link {
.addon[active="true"] .disabled-postfix,
.addon[pending="install"] .update-postfix,
.addon[pending="install"] .disabled-postfix,
#detail-view[loading] > .detail-view-container {
#detail-view:not([notification="warning"]) .warning,
#detail-view:not([notification="error"]) .error,
#detail-view:not([notification="info"]) .info,
#detail-view:not([pending]) .pending,
#detail-view:not([upgrade="true"]) .update-postfix,
#detail-view[active="true"] .disabled-postfix,
#detail-view[loading] > .detail-view-container,
.detail-row:not([value]) {
display: none;
}

View File

@ -682,6 +682,24 @@ var gViewController = {
}
},
cmd_installItem: {
isEnabled: function(aAddon) {
if (!aAddon)
return false;
return aAddon.install && aAddon.install.state == AddonManager.STATE_AVAILABLE;
},
doCommand: function(aAddon) {
// This case should never happen
if (gViewController.currentViewObj != gDetailView)
return;
gViewController.popState(function() {
gViewController.currentViewObj.getListItemForID(aAddon.id)._installStatus.installRemote();
});
}
},
cmd_uninstallItem: {
isEnabled: function(aAddon) {
if (!aAddon)
@ -758,6 +776,39 @@ var gViewController = {
buildNextInstall();
}
},
cmd_cancelOperation: {
isEnabled: function(aAddon) {
if (!aAddon)
return false;
return aAddon.pendingOperations != AddonManager.PENDING_NONE;
},
doCommand: function(aAddon) {
if (isPending(aAddon, "install")) {
aAddon.install.cancel();
} else if (isPending(aAddon, "upgrade")) {
this.mAddon.pendingUpgrade.install.cancel();
this._updateState();
} else if (isPending(aAddon, "uninstall")) {
aAddon.cancelUninstall();
} else if (isPending(aAddon, "enable")) {
aAddon.userDisabled = true;
} else if (isPending(aAddon, "disable")) {
aAddon.userDisabled = false;
}
}
},
cmd_contribute: {
isEnabled: function(aAddon) {
if (!aAddon)
return false;
return ("contributeURL" in aAddon && aAddon.contributeURL);
},
doCommand: function(aAddon) {
openURL(aAddon.contributeURL);
}
}
},
@ -843,7 +894,7 @@ function isInState(aInstall, aState) {
function createItem(aObj, aIsInstall, aIsRemote) {
let item = document.createElement("richlistitem");
item.setAttribute("class", "addon");
item.setAttribute("class", "addon addon-view");
item.setAttribute("name", aObj.name);
item.setAttribute("type", aObj.type);
item.setAttribute("remote", !!aIsRemote);
@ -1531,24 +1582,155 @@ var gDetailView = {
_addon: null,
_loadingTimer: null,
_notificationContainer: null,
_notificationText: null,
_autoUpdate: null,
initialize: function() {
this.node = document.getElementById("detail-view");
this._notificationContainer = document.getElementById("detail-notification");
this._notificationText = document.getElementById("detail-notification-text");
this._autoUpdate = document.getElementById("detail-autoUpdate");
var self = this;
var autoUpdate = document.getElementById("detail-autoUpdate");
autoUpdate.addEventListener("command", function() {
self._addon.applyBackgroundUpdates = autoUpdate.checked;
this._autoUpdate.addEventListener("command", function() {
self._addon.applyBackgroundUpdates = self._autoUpdate.value == "true";
}, true);
},
_updateView: function(aAddon, aIsRemote) {
this.clearLoading();
this._addon = aAddon;
gEventManager.registerAddonListener(this, aAddon.id);
if (aAddon.install)
gEventManager.registerInstallListener(this);
this.node.setAttribute("type", aAddon.type);
document.getElementById("detail-name").value = aAddon.name;
var icon = aAddon.icon64URL ? aAddon.icon64URL : aAddon.iconURL;
document.getElementById("detail-icon").src = icon ? icon : null;
document.getElementById("detail-creator").setCreator(aAddon.creator, aAddon.homepageURL);
var version = document.getElementById("detail-version");
if (aAddon.version) {
version.hidden = false;
version.value = aAddon.version;
} else {
version.hidden = true;
}
var screenshot = document.getElementById("detail-screenshot");
if (aAddon.screenshots && aAddon.screenshots.length > 0) {
if (aAddon.screenshots[0].thumbnail)
screenshot.src = aAddon.screenshots[0].thumbnail;
else
screenshot.src = aAddon.screenshots[0].url;
screenshot.hidden = false;
} else {
screenshot.hidden = true;
}
var desc = document.getElementById("detail-desc");
desc.textContent = aAddon.fullDescription ? aAddon.fullDescription
: aAddon.description;
var contributions = document.getElementById("detail-contributions");
if ("contributeURL" in aAddon && aAddon.contributeURL) {
contributions.hidden = false;
var amount = document.getElementById("detail-contrib-suggested");
amount.value = gStrings.ext.formatStringFromName("contributionAmount",
[aAddon.contributionAmount],
1);
} else {
contributions.hidden = true;
}
var updateDateRow = document.getElementById("detail-dateUpdated");
if (aAddon.updateDate) {
var date = formatDate(aAddon.updateDate);
updateDateRow.value = date;
} else {
updateDateRow.value = null;
}
// TODO if the add-on was downloaded from releases.mozilla.org link to the
// AMO profile (bug 590344)
if (false) {
document.getElementById("detail-repository-row").hidden = false;
document.getElementById("detail-homepage-row").hidden = true;
var repository = document.getElementById("detail-repository");
repository.value = aAddon.homepageURL;
repository.href = aAddon.homepageURL;
} else if (aAddon.homepageURL) {
document.getElementById("detail-repository-row").hidden = true;
document.getElementById("detail-homepage-row").hidden = false;
var homepage = document.getElementById("detail-homepage");
homepage.value = aAddon.homepageURL;
homepage.href = aAddon.homepageURL;
} else {
document.getElementById("detail-repository-row").hidden = true;
document.getElementById("detail-homepage-row").hidden = true;
}
var rating = document.getElementById("detail-rating");
if (aAddon.averageRating) {
rating.averageRating = aAddon.averageRating;
rating.hidden = false;
} else {
rating.hidden = true;
}
var reviews = document.getElementById("detail-reviews");
if (aAddon.reviewURL) {
var text = gStrings.ext.GetStringFromName("numReviews");
text = PluralForm.get(aAddon.reviewCount, text)
text = text.replace("#1", aAddon.reviewCount);
reviews.value = text;
reviews.hidden = false;
reviews.href = aAddon.reviewURL;
} else {
reviews.hidden = true;
}
document.getElementById("detail-rating-row").hidden = !aAddon.averageRating && !aAddon.reviewURL;
var sizeRow = document.getElementById("detail-size");
if (aAddon.size && aIsRemote) {
let [size, unit] = DownloadUtils.convertByteUnits(parseInt(aAddon.size));
formatted = gStrings.dl.GetStringFromName("doneSize");
formatted = formatted.replace("#1", size).replace("#2", unit);
sizeRow.value = formatted;
} else {
sizeRow.value = null;
}
var downloadsRow = document.getElementById("detail-downloads");
if (aAddon.totalDownloads && aIsRemote) {
var downloads = aAddon.totalDownloads;
downloadsRow.value = downloads;
} else {
downloadsRow.value = null;
}
var canUpdate = !aIsRemote && hasPermission(aAddon, "upgrade");
document.getElementById("detail-updates-row").hidden = !canUpdate;
if ("applyBackgroundUpdates" in aAddon) {
this._autoUpdate.hidden = false;
this._autoUpdate.value = aAddon.applyBackgroundUpdates;
document.getElementById("detail-findUpdates").hidden = this._addon.applyBackgroundUpdates;
} else {
this._autoUpdate.hidden = true;
document.getElementById("detail-findUpdates").hidden = false;
}
document.getElementById("detail-prefs").hidden = !aIsRemote && !aAddon.optionsURL;
this.updateState();
gViewController.updateCommands();
gViewController.notifyViewChanged();
},
show: function(aAddonId, aRequest) {
var self = this;
this._loadingTimer = setTimeout(function() {
@ -1558,90 +1740,95 @@ var gDetailView = {
var view = gViewController.currentViewId;
AddonManager.getAddonByID(aAddonId, function(aAddon) {
self.clearLoading();
if (gViewController && aRequest != gViewController.currentViewRequest)
return;
if (!aAddon && (aAddonId in gCachedAddons))
aAddon = gCachedAddons[aAddonId];
self._addon = aAddon;
gEventManager.registerAddonListener(self, aAddon.id);
self.node.setAttribute("type", aAddon.type);
document.getElementById("detail-name").value = aAddon.name;
document.getElementById("detail-icon").src = aAddon.iconURL ?
aAddon.iconURL :
"";
document.getElementById("detail-name").value = aAddon.name;
document.getElementById("detail-creator").setCreator(aAddon.creator,
aAddon.creatorURL || aAddon.homepageURL);
document.getElementById("detail-homepage").href = aAddon.homepageURL;
document.getElementById("detail-version").value = aAddon.version;
var dateUpdated = document.getElementById("detail-dateUpdated");
if (aAddon.updateDate) {
var date = formatDate(aAddon.updateDate);
dateUpdated.value = gStrings.ext.formatStringFromName("dateUpdated",
[date], 1);
if (aAddon) {
self._updateView(aAddon, false);
return;
}
dateUpdated.hidden = !aAddon.updateDate;
var desc = document.getElementById("detail-desc");
desc.textContent = aAddon.fullDescription ? aAddon.fullDescription
: aAddon.description;
// Look for an add-on pending install
AddonManager.getAllInstalls(function(aInstalls) {
for (let i = 0; i < aInstalls.length; i++) {
if (aInstalls[i].state == AddonManager.STATE_INSTALLED &&
aInstalls[i].addon.id == aAddonId) {
self._updateView(aInstalls[i].addon, false);
return;
}
}
self._autoUpdate.checked = aAddon.applyBackgroundUpdates;
var canUpdate = hasPermission(aAddon, "upgrade");
self._autoUpdate.hidden = !canUpdate;
document.getElementById("detail-findUpdates").hidden = !canUpdate;
document.getElementById("detail-prefs").hidden = !aAddon.optionsURL;
if (aAddonId in gCachedAddons) {
self._updateView(gCachedAddons[aAddonId], true);
return;
}
self.updateState();
gViewController.updateCommands();
gViewController.notifyViewChanged();
// This case should never happen in normal operation
});
});
},
hide: function() {
this.clearLoading();
gEventManager.unregisterAddonListener(this, this._addon.id);
gEventManager.unregisterInstallListener(this);
this._addon = null;
},
updateState: function() {
gViewController.updateCommands();
var showAsActive = this._addon.isActive;
var showUndo = false;
var notificationMsg = null;
if (isPending(this._addon, "enable")) {
showAsActive = true;
notificationMsg = "restartToEnable2";
} else if (isPending(this._addon, "disable")) {
showAsActive = false;
notificationMsg = "restartToDisable";
} else if (isPending(this._addon, "uninstall")) {
showUndo = true;
notificationMsg = "restartToUninstall";
} else if (isPending(this._addon, "upgrade")) {
notificationMsg = "restartToUpgrade";
var pending = this._addon.pendingOperations;
if (pending != AddonManager.PENDING_NONE) {
this.node.removeAttribute("notification");
var pending = null;
["enable", "disable", "install", "uninstall", "upgrade"].forEach(function(aOp) {
if (isPending(this._addon, aOp))
pending = aOp;
}, this);
this.node.setAttribute("pending", pending);
document.getElementById("detail-pending").textContent = gStrings.ext.formatStringFromName(
"details.notification." + pending,
[this._addon.name, gStrings.brandShortName], 2
);
} else {
this.node.removeAttribute("pending");
if (this._addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
this.node.setAttribute("notification", "error");
document.getElementById("detail-error").textContent = gStrings.ext.formatStringFromName(
"details.notification.blocked",
[this._addon.name], 1
);
var errorLink = document.getElementById("detail-error-link");
errorLink.value = gStrings.ext.GetStringFromName("details.notification.blocked.link");
errorLink.href = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL");
errorLink.hidden = false;
} else if (!this._addon.isCompatible) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.incompatible",
[this._addon.name, gStrings.brandShortName, gStrings.appVersion], 3
);
document.getElementById("detail-warning-link").hidden = true;
} else if (this._addon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.softblocked",
[this._addon.name], 1
);
var warningLink = document.getElementById("detail-warning-link");
warningLink.value = gStrings.ext.GetStringFromName("details.notification.softblocked.link");
warningLink.href = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL");
warningLink.hidden = false;
} else {
this.node.removeAttribute("notification");
}
}
this.node.setAttribute("active", showAsActive);
document.getElementById("detail-cancel-uninstall").hidden = !showUndo;
if (notificationMsg) {
var text = gStrings.ext.formatStringFromName(notificationMsg,
[this._addon.name,
gStrings.brandShortName],
2);
this._notificationText.value = text;
}
this._notificationContainer.hidden = !notificationMsg;
this.node.setAttribute("active", this._addon.isActive);
},
clearLoading: function() {
@ -1687,8 +1874,14 @@ var gDetailView = {
onPropertyChanged: function(aProperties) {
if (aProperties.indexOf("applyBackgroundUpdates") != -1) {
this._autoUpdate.checked = this._addon.applyBackgroundUpdates;
this._autoUpdate.value = this._addon.applyBackgroundUpdates;
document.getElementById("detail-findUpdates").hidden = this._addon.applyBackgroundUpdates;
}
},
onInstallCancelled: function(aInstall) {
if (aInstall.addon.id == this._addon.id)
gViewController.popState();
}
};

View File

@ -443,20 +443,21 @@
</field>
<method name="setCreator">
<parameter name="aName"/>
<parameter name="aURL"/>
<parameter name="aCreator"/>
<parameter name="aHomepageURL"/>
<body><![CDATA[
if (!aName) {
if (!aCreator) {
this.collapsed = true;
return;
}
this.collapsed = false;
var showLink = !!aURL;
var url = aCreator.url || aHomepageURL;
var showLink = !!url;
if (showLink) {
this._creatorLink.value = aName;
this._creatorLink.href = aURL;
this._creatorLink.value = aCreator.name;
this._creatorLink.href = url;
} else {
this._creatorName.value = aName;
this._creatorName.value = aCreator.name;
}
this._creatorLink.hidden = !showLink;
this._creatorName.hidden = showLink;
@ -845,11 +846,7 @@
else
this._version.hidden = true;
var homepageURL = this.mAddon.homepageURL;
var creator = this.mAddon.creator;
var creatorURL = this.mAddon.creatorURL;
// XXxunf api
this._creator.setCreator(creator, homepageURL || creatorURL);
this._creator.setCreator(this.mAddon.creator);
if (this.mAddon.description)
this._description.value = this.mAddon.description;
@ -1256,19 +1253,7 @@
<method name="undo">
<body><![CDATA[
if (this.isPending("install")) {
this.mInstall.cancel();
this.parentNode.removeChild(this);
} else if (this.isPending("enable")) {
this.userDisabled = true;
} else if (this.isPending("disable")) {
this.userDisabled = false;
} else if (this.isPending("uninstall")) {
this.mAddon.cancelUninstall();
} else if (this.isPending("upgrade")) {
this.mAddon.pendingUpgrade.install.cancel();
this._updateState();
}
gViewController.commands["cmd_cancelOperation"].doCommand(this.mAddon);
]]></body>
</method>
@ -1545,4 +1530,25 @@
</implementation>
</binding>
<binding id="detail-row">
<content>
<xul:label class="detail-row-label" xbl:inherits="value=label"/>
<xul:label class="detail-row-value" xbl:inherits="value"/>
</content>
<implementation>
<property name="value">
<getter><![CDATA[
return this.getAttribute("value");
]]></getter>
<setter><![CDATA[
if (!val)
this.removeAttribute("value");
else
this.setAttribute("value", val);
]]></setter>
</property>
</implementation>
</binding>
</bindings>

View File

@ -58,6 +58,8 @@
<script type="application/javascript"
src="chrome://mozapps/content/extensions/extensions.js"/>
<script type="application/javascript"
src="chrome://global/content/contentAreaUtils.js"/>
<popupset>
<!-- menu for an addon item -->
@ -109,8 +111,11 @@
<command id="cmd_showItemAbout"/>
<command id="cmd_enableItem"/>
<command id="cmd_disableItem"/>
<command id="cmd_installItem"/>
<command id="cmd_uninstallItem"/>
<command id="cmd_cancelUninstallItem"/>
<command id="cmd_cancelOperation"/>
<command id="cmd_contribute"/>
</commandset>
<!-- main header -->
@ -284,7 +289,7 @@
</vbox>
<!-- detail view -->
<hbox id="detail-view" flex="1" class="view-pane">
<scrollbox id="detail-view" flex="1" class="view-pane addon-view" orient="horizontal" pack="stretch" align="start">
<spacer flex="1"/>
<!-- "loading" splash screen -->
<hbox class="loading" flex="1">
@ -292,47 +297,120 @@
<label value="&loading.label;"/>
</hbox>
<!-- actual detail view -->
<vbox class="detail-view-container" flex="8">
<!-- restart notification -->
<hbox id="detail-notification" hidden="true">
<label id="detail-notification-text"/>
<button class="button-link" label="&addon.restartNow.label;"
command="cmd_restartApp"/>
<button id="detail-cancel-uninstall" class="button-link"
label="&addon.undoUninstall.label;"
command="cmd_cancelUninstallItem"/>
</hbox>
<hbox class="detail-basicinfo fade">
<image id="detail-icon"/>
<vbox>
<label id="detail-name"/>
<label id="detail-creator" class="creator"/>
</vbox>
<spacer flex="1"/>
<label id="detail-dateUpdated"/>
</hbox>
<hbox class="detail-desc">
<!-- XXXunf placeholder - bug 553461 -->
<vbox hidden="true" class="fade">
<image id="detail-screenshot"/>
<label value="1 of 5"/>
<spacer flex="1"/>
</vbox>
<vbox class="detail-view-container" flex="3">
<vbox id="detail-notifications">
<hbox id="warning-container" align="center" class="warning">
<image class="warning-icon"/>
<label id="detail-warning" flex="1"/>
<label id="detail-warning-link" class="text-link"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<hbox id="error-container" align="center" class="error">
<image class="error-icon"/>
<label id="detail-error" flex="1"/>
<label id="detail-error-link" class="text-link"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
<hbox id="pending-container" align="center" class="pending">
<image class="pending-icon"/>
<label id="detail-pending" flex="1"/>
<button class="button-link"
label="&addon.restartNow.label;"
command="cmd_restartApp"/>
<button id="detail-undo" class="button-link"
label="&addon.undo.label;"
tooltipText="&addon.undo.tooltip;"
command="cmd_cancelOperation"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
</vbox>
<hbox align="start">
<image id="detail-icon" class="icon"/>
<vbox flex="1">
<description flex="1" id="detail-desc" class="fade"/>
<hbox>
<!-- XXXunf placeholder - bug 553463 -->
<label value="&rating.label;"/>
<label class="meta-value meta-rating" userrating="3"
showrating="average"/>
<spacer flex="1"/>
<label id="detail-homepage" class="text-link" value="&addon.homepage;"/>
<vbox id="detail-summary">
<hbox id="detail-name-container">
<label id="detail-name"/>
<label id="detail-version"/>
<label class="disabled-postfix" value="&addon.disabled.postfix;"/>
<label class="update-postfix" value="&addon.update.postfix;"/>
</hbox>
<label id="detail-creator" class="creator"/>
</vbox>
<hbox id="detail-desc-container" align="end">
<image id="detail-screenshot" hidden="true"/>
<description id="detail-desc" flex="1"/>
</hbox>
<hbox>
<button id="detail-contribute" class="contribute"
label="&cmd.contribute.label;"
accesskey="&cmd.contribute.accesskey;"
tooltiptext="&cmd.contribute.tooltip;"/>
<vbox id="detail-contributions">
<description id="detail-contrib-description">
&detail.contributions.description;
</description>
<hbox align="center">
<label id="detail-contrib-suggested"/>
<spacer flex="1"/>
<button id="detail-contrib-button" class="addon-control"
label="&cmd.contribute.label;"
accesskey="&cmd.contribute.accesskey;"
tooltiptext="&cmd.contribute.tooltip;"
command="cmd_contribute"/>
</hbox>
</vbox>
<grid id="detail-grid">
<columns>
<column flex="1"/>
<column flex="2"/>
</columns>
<rows>
<row class="detail-row" id="detail-dateUpdated" label="&detail.lastupdated.label;"/>
<row class="detail-row-complex" id="detail-updates-row">
<label class="detail-row-label" value="&detail.updateType;"/>
<hbox align="center">
<radiogroup id="detail-autoUpdate" orient="horizontal">
<radio label="&detail.updateAutomatic.label;"
tooltiptext="&detail.updateAutomatic.tooltip;"
value="true"/>
<radio label="&detail.updateManual.label;"
tooltiptext="&detail.updateAutomatic.tooltip;"
value="false"/>
</radiogroup>
<button id="detail-findUpdates" class="button-link"
label="&detail.checkForUpdates.label;"
accesskey="&detail.checkForUpdates.accesskey;"
tooltiptext="&detail.checkForUpdates.tooltip;"
command="cmd_findItemUpdates"/>
</hbox>
</row>
<row class="detail-row-complex" id="detail-homepage-row" label="&detail.home;">
<label class="detail-row-label" value="&detail.home;"/>
<label id="detail-homepage" class="detail-row-value text-link"/>
</row>
<row class="detail-row-complex" id="detail-repository-row" label="&detail.repository;">
<label class="detail-row-label" value="&detail.repository;"/>
<label id="detail-repository" class="detail-row-value text-link"/>
</row>
<row class="detail-row" id="detail-size" label="&detail.size;"/>
<row class="detail-row-complex" id="detail-rating-row">
<label class="detail-row-label" value="&rating.label;"/>
<hbox>
<label id="detail-rating" class="meta-value meta-rating"
showrating="average"/>
<label id="detail-reviews" class="text-link"/>
</hbox>
</row>
<row class="detail-row" id="detail-downloads" label="&detail.numberOfDownloads.label;"/>
</rows>
</grid>
<hbox id="detail-controls">
<button id="detail-prefs" class="addon-control"
#ifdef XP_WIN
label="&detail.showPreferencesWin.label;"
accesskey="&detail.showPreferencesWin.accesskey;"
tooltiptext="&detail.showPreferencesWin.tooltip;"
#else
label="&detail.showPreferencesUnix.label;"
accesskey="&detail.showPreferencesUnix.accesskey;"
tooltiptext="&detail.showPreferencesUnix.tooltip;"
#endif
command="cmd_showItemPreferences"/>
<spacer flex="1"/>
<button id="detail-uninstall" class="addon-control remove"
label="&cmd.uninstallAddon.label;"
@ -346,60 +424,16 @@
label="&cmd.disableAddon.label;"
accesskey="&cmd.disableAddon.accesskey;"
command="cmd_disableItem"/>
<button id="detail-install" class="addon-control install"
label="&cmd.installAddon.label;"
accesskey="&cmd.installAddon.accesskey;"
command="cmd_installItem"/>
</hbox>
</vbox>
</hbox>
<hbox class="detail-extra">
<vbox class="detail-prefs" flex="1">
<checkbox id="detail-autoUpdate" checked="true"
label="&detail.updateAutomatically.label;"
accesskey="&detail.updateAutomatically.accesskey;"
tooltiptext="&detail.updateAutomatically.tooltip;"/>
<button id="detail-findUpdates" class="addon-control"
label="&detail.checkForUpdates.label;"
accesskey="&detail.checkForUpdates.accesskey;"
tooltiptext="&detail.checkForUpdates.tooltip;"
command="cmd_findItemUpdates"/>
<button id="detail-prefs" class="addon-control"
#ifdef XP_WIN
label="&detail.showPreferencesWin.label;"
accesskey="&detail.showPreferencesWin.accesskey;"
tooltiptext="&detail.showPreferencesWin.tooltip;"
#else
label="&detail.showPreferencesUnix.label;"
accesskey="&detail.showPreferencesUnix.accesskey;"
tooltiptext="&detail.showPreferencesUnix.tooltip;"
#endif
command="cmd_showItemPreferences"/>
</vbox>
<grid class="detail-meta fade" flex="1">
<columns>
<column flex="1"/>
<column flex="2"/>
</columns>
<rows>
<row>
<label class="meta-label"
value="&detail.version.label;"/>
<label class="meta-value" id="detail-version"/>
</row>
<row>
<label class="meta-label"
value="&detail.updated.label;"/>
<label class="meta-value" id="detail-updatedate"/>
</row>
<row>
<label class="meta-label"
value="&detail.numberOfDownloads.label;"/>
<!-- XXXunf placeholder - bug 553475 -->
<label class="meta-value" value="5,341"/>
</row>
</rows>
</grid>
</hbox>
</vbox>
<spacer flex="1"/>
</hbox>
</scrollbox>
</deck>

View File

@ -60,6 +60,7 @@ _TEST_FILES = \
browser_bug567137.js \
browser_bug572561.js \
browser_bug577990.js \
browser_details.js \
browser_dragdrop.js \
browser_list.js \
browser_searching.js \

View File

@ -0,0 +1,542 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// Tests various aspects of the details view
const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url";
const SEARCH_URL = TESTROOT + "browser_details.xml";
var gManagerWindow;
var gCategoryUtilities;
var gApp = document.getElementById("bundle_brand").getString("brandShortName");
var gVersion = Services.appinfo.version;
var gBlocklistURL = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL");
var gDate = new Date(2010, 7, 1);
function open_details(aId, aType, aCallback) {
gCategoryUtilities.openType(aType, function() {
var list = gManagerWindow.document.getElementById("addon-list");
var item = list.firstChild;
while (item) {
if ("mAddon" in item && item.mAddon.id == aId) {
list.ensureElementIsVisible(item);
EventUtils.synthesizeMouse(item, 2, 2, { clickCount: 2 }, gManagerWindow);
wait_for_view_load(gManagerWindow, aCallback);
return;
}
item = item.nextSibling;
}
ok(false, "Should have found the add-on in the list");
});
}
function get(aId) {
return gManagerWindow.document.getElementById(aId);
}
function test() {
// Turn on searching for this test
Services.prefs.setIntPref(PREF_SEARCH_MAXRESULTS, 15);
Services.prefs.setCharPref(PREF_GETADDONS_GETSEARCHRESULTS, SEARCH_URL);
waitForExplicitFinish();
gProvider = new MockProvider();
gProvider.createAddons([{
id: "addon1@tests.mozilla.org",
name: "Test add-on 1",
version: "2.1",
description: "Short description",
fullDescription: "Longer description",
type: "extension",
iconURL: "chrome://foo/skin/icon.png",
icon64URL: "chrome://foo/skin/icon64.png",
contributeURL: "http://foo.com",
contributionAmount: "$0.99",
sourceURI: Services.io.newURI("http://example.com/foo", null, null),
averageRating: 4,
reviewCount: 5,
reviewURL: "http://example.com/reviews",
homepageURL: "http://example.com/addon1",
applyBackgroundUpdates: true
}, {
id: "addon2@tests.mozilla.org",
name: "Test add-on 2",
version: "2.2",
description: "Short description",
creator: { name: "Mozilla", url: null },
type: "extension",
iconURL: "chrome://foo/skin/icon.png",
updateDate: gDate,
permissions: 0,
screenshots: [{url: "http://example.com/screenshot"}],
}, {
id: "addon3@tests.mozilla.org",
name: "Test add-on 3",
description: "Short description",
creator: { name: "Mozilla", url: "http://www.mozilla.org" },
type: "extension",
sourceURI: Services.io.newURI("http://example.com/foo", null, null),
updateDate: gDate,
reviewCount: 1,
reviewURL: "http://example.com/reviews",
applyBackgroundUpdates: false,
isActive: false,
isCompatible: false,
appDisabled: true,
permissions: AddonManager.PERM_CAN_ENABLE |
AddonManager.PERM_CAN_DISABLE |
AddonManager.PERM_CAN_UPGRADE
}, {
id: "addon4@tests.mozilla.org",
name: "Test add-on 4",
_userDisabled: true,
isActive: false,
blocklistState: Ci.nsIBlocklistService.STATE_SOFTBLOCKED
}, {
id: "addon5@tests.mozilla.org",
name: "Test add-on 5",
isActive: false,
blocklistState: Ci.nsIBlocklistService.STATE_BLOCKED,
appDisabled: true
}, {
id: "addon6@tests.mozilla.org",
name: "Test add-on 6",
operationsRequiringRestart: AddonManager.OP_NEEDS_RESTART_NONE
}, {
id: "addon7@tests.mozilla.org",
name: "Test add-on 7",
_userDisabled: true,
isActive: false
}]);
open_manager(null, function(aWindow) {
gManagerWindow = aWindow;
gCategoryUtilities = new CategoryUtilities(gManagerWindow);
run_next_test();
});
}
function end_test() {
close_manager(gManagerWindow, function() {
finish();
});
}
// Opens and tests the details view for add-on 1
add_test(function() {
open_details("addon1@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 1", "Name should be correct");
is_element_visible(get("detail-version"), "Version should not be hidden");
is(get("detail-version").value, "2.1", "Version should be correct");
is(get("detail-icon").src, "chrome://foo/skin/icon64.png", "Icon should be correct");
is_element_hidden(get("detail-creator"), "Creator should be hidden");
is_element_hidden(get("detail-screenshot"), "Screenshot should be hidden");
is(get("detail-desc").textContent, "Longer description", "Description should be correct");
is_element_visible(get("detail-contributions"), "Contributions section should be visible");
ok(get("detail-contrib-suggested").value, "$0.99");
is_element_hidden(get("detail-dateUpdated"), "Update date should be hidden");
is_element_visible(get("detail-rating-row"), "Rating row should not be hidden");
is_element_visible(get("detail-rating"), "Rating should not be hidden");
is(get("detail-rating").averageRating, 4, "Rating should be correct");
is_element_visible(get("detail-reviews"), "Reviews should not be hidden");
is(get("detail-reviews").href, "http://example.com/reviews", "Review URL should be correct");
is(get("detail-reviews").value, "5 reviews", "Review text should be correct");
is_element_visible(get("detail-homepage-row"), "Homepage should be visible");
ok(get("detail-homepage").href, "http://example.com/addon1");
is_element_hidden(get("detail-repository-row"), "Repository profile should not be visible");
is_element_hidden(get("detail-size"), "Size should be hidden");
is_element_hidden(get("detail-downloads"), "Downloads should be hidden");
is_element_visible(get("detail-autoUpdate"), "Updates should not be hidden");
ok(get("detail-autoUpdate").firstChild.selected, "Updates ahould be automatic");
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
EventUtils.synthesizeMouse(get("detail-autoUpdate").lastChild, 2, 2, {}, gManagerWindow);
ok(get("detail-autoUpdate").lastChild.selected, "Updates should be manual");
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
EventUtils.synthesizeMouse(get("detail-autoUpdate").firstChild, 2, 2, {}, gManagerWindow);
ok(get("detail-autoUpdate").firstChild.selected, "Updates should be automatic");
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
// Disable it
EventUtils.synthesizeMouse(get("detail-disable"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 1 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
// Reopen it
open_details("addon1@tests.mozilla.org", "extension", function() {
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 1 will be disabled after you restart " + gApp + ".", "Pending message should be correct");
// Undo disabling
EventUtils.synthesizeMouse(get("detail-undo"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
});
// Opens and tests the details view for add-on 2
add_test(function() {
open_details("addon2@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 2", "Name should be correct");
is_element_visible(get("detail-version"), "Version should not be hidden");
is(get("detail-version").value, "2.2", "Version should be correct");
is(get("detail-icon").src, "chrome://foo/skin/icon.png", "Icon should be correct");
is_element_visible(get("detail-creator"), "Creator should not be hidden");
is_element_visible(get("detail-creator")._creatorName, "Creator name should not be hidden");
is(get("detail-creator")._creatorName.value, "Mozilla", "Creator should be correct");
is_element_hidden(get("detail-creator")._creatorLink, "Creator link should be hidden");
is_element_visible(get("detail-screenshot"), "Screenshot should be visible");
ok(get("detail-screenshot").src, "http://example.com/screenshot");
is(get("detail-desc").textContent, "Short description", "Description should be correct");
is_element_hidden(get("detail-contributions"), "Contributions section should be hidden");
is_element_visible(get("detail-dateUpdated"), "Update date should not be hidden");
is(Date.parse(get("detail-dateUpdated").value), gDate.getTime(), "Update date should be correct");
is_element_hidden(get("detail-rating-row"), "Rating should be hidden");
is_element_hidden(get("detail-homepage-row"), "Homepage should not be visible");
is_element_hidden(get("detail-repository-row"), "Repository profile should not be visible");
is_element_hidden(get("detail-size"), "Size should be hidden");
is_element_hidden(get("detail-downloads"), "Downloads should be hidden");
is_element_hidden(get("detail-updates-row"), "Updates should be hidden");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_hidden(get("detail-uninstall"), "Remove button should be hidden");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
// Opens and tests the details view for add-on 3
add_test(function() {
open_details("addon3@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 3", "Name should be correct");
is_element_hidden(get("detail-version"), "Version should be hidden");
is(get("detail-icon").src, "", "Icon should be correct");
is_element_visible(get("detail-creator"), "Creator should not be hidden");
is_element_hidden(get("detail-creator")._creatorName, "Creator name should be hidden");
is_element_visible(get("detail-creator")._creatorLink, "Creator link should not be hidden");
is(get("detail-creator")._creatorLink.value, "Mozilla", "Creator link should be correct");
is(get("detail-creator")._creatorLink.href, "http://www.mozilla.org", "Creator link href should be correct");
is_element_hidden(get("detail-screenshot"), "Screenshot should not be visible");
is_element_hidden(get("detail-contributions"), "Contributions section should be hidden");
is_element_visible(get("detail-dateUpdated"), "Update date should not be hidden");
is(Date.parse(get("detail-dateUpdated").value), gDate.getTime(), "Update date should be correct");
is_element_visible(get("detail-rating-row"), "Rating row should not be hidden");
is_element_hidden(get("detail-rating"), "Rating should be hidden");
is_element_visible(get("detail-reviews"), "Reviews should not be hidden");
is(get("detail-reviews").href, "http://example.com/reviews", "Review URL should be correct");
is(get("detail-reviews").value, "1 review", "Review text should be correct");
is_element_hidden(get("detail-size"), "Size should be hidden");
is_element_hidden(get("detail-downloads"), "Downloads should be hidden");
is_element_visible(get("detail-autoUpdate"), "Updates should not be hidden");
ok(get("detail-autoUpdate").lastChild.selected, "Updates ahould be manual");
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
EventUtils.synthesizeMouse(get("detail-autoUpdate").firstChild, 2, 2, {}, gManagerWindow);
ok(get("detail-autoUpdate").firstChild.selected, "Updates ahould be automatic");
is_element_hidden(get("detail-findUpdates"), "Check for updates should be hidden");
EventUtils.synthesizeMouse(get("detail-autoUpdate").lastChild, 2, 2, {}, gManagerWindow);
ok(get("detail-autoUpdate").lastChild.selected, "Updates ahould be manual");
is_element_visible(get("detail-findUpdates"), "Check for updates should be visible");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_hidden(get("detail-uninstall"), "Remove button should be hidden");
is_element_visible(get("detail-warning"), "Warning message should be visible");
is(get("detail-warning").textContent, "Test add-on 3 is incompatible with " + gApp + " " + gVersion + ".", "Warning message should be correct");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
// Opens and tests the details view for add-on 4
add_test(function() {
open_details("addon4@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 4", "Name should be correct");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_visible(get("detail-warning"), "Warning message should be visible");
is(get("detail-warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
is_element_visible(get("detail-warning-link"), "Warning link should be visible");
is(get("detail-warning-link").value, "More Information", "Warning link text should be correct");
is(get("detail-warning-link").href, gBlocklistURL, "Warning link should be correct");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
// Enable it
EventUtils.synthesizeMouse(get("detail-enable"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
// Reopen it
open_details("addon4@tests.mozilla.org", "extension", function() {
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 4 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
// Undo enabling
EventUtils.synthesizeMouse(get("detail-undo"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_visible(get("detail-warning"), "Warning message should be visible");
is(get("detail-warning").textContent, "Test add-on 4 is known to cause security or stability issues.", "Warning message should be correct");
is_element_visible(get("detail-warning-link"), "Warning link should be visible");
is(get("detail-warning-link").value, "More Information", "Warning link text should be correct");
is(get("detail-warning-link").href, gBlocklistURL, "Warning link should be correct");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
});
// Opens and tests the details view for add-on 5
add_test(function() {
open_details("addon5@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 5", "Name should be correct");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_visible(get("detail-error"), "Error message should be visible");
is(get("detail-error").textContent, "Test add-on 5 has been disabled due to security or stability issues.", "Error message should be correct");
is_element_visible(get("detail-error-link"), "Error link should be visible");
is(get("detail-error-link").value, "More Information", "Error link text should be correct");
is(get("detail-error-link").href, gBlocklistURL, "Error link should be correct");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
// Opens and tests the details view for add-on 6
add_test(function() {
open_details("addon6@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 6", "Name should be correct");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
// Disable it
EventUtils.synthesizeMouse(get("detail-disable"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
// Reopen it
open_details("addon6@tests.mozilla.org", "extension", function() {
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be visible");
// Enable it
EventUtils.synthesizeMouse(get("detail-enable"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
});
// Opens and tests the details view for add-on 7
add_test(function() {
open_details("addon7@tests.mozilla.org", "extension", function() {
is(get("detail-name").value, "Test add-on 7", "Name should be correct");
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
// Enable it
EventUtils.synthesizeMouse(get("detail-enable"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 7 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
// Reopen it
open_details("addon7@tests.mozilla.org", "extension", function() {
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_hidden(get("detail-enable"), "Enable button should be hidden");
is_element_visible(get("detail-disable"), "Disable button should be visible");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_visible(get("detail-pending"), "Pending message should be visible");
is(get("detail-pending").textContent, "Test add-on 7 will be enabled after you restart " + gApp + ".", "Pending message should be correct");
// Undo enabling
EventUtils.synthesizeMouse(get("detail-undo"), 2, 2, {}, gManagerWindow);
is_element_hidden(get("detail-prefs"), "Preferences button should be hidden");
is_element_visible(get("detail-enable"), "Enable button should be visible");
is_element_hidden(get("detail-disable"), "Disable button should be hidden");
is_element_visible(get("detail-uninstall"), "Remove button should be visible");
is_element_hidden(get("detail-warning"), "Warning message should be hidden");
is_element_hidden(get("detail-warning-link"), "Warning link should be hidden");
is_element_hidden(get("detail-error"), "Error message should be hidden");
is_element_hidden(get("detail-error-link"), "Error link should be hidden");
is_element_hidden(get("detail-pending"), "Pending message should be hidden");
run_next_test();
});
});
});

View File

@ -223,7 +223,7 @@ function CategoryUtilities(aManagerWindow) {
var self = this;
this.window.addEventListener("unload", function() {
self.removeEventListener("unload", arguments.callee, false);
self.window.removeEventListener("unload", arguments.callee, false);
self.window = null;
}, false);
}

View File

@ -337,29 +337,23 @@
max-height: 48px;
}
.addon[type="theme"] .icon {
.addon-view[type="theme"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
}
.addon[type="locale"] .icon {
.addon-view[type="locale"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
.addon[type="plugin"] .icon {
.addon-view[type="plugin"] .icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
.name,
.version,
.update-postfix {
.name-container {
font-size: 150%;
margin-bottom: 0px;
}
.disabled-postfix {
font-size: 130%;
}
.description-container {
margin-top: 8px;
-moz-margin-start: 6px;
@ -373,60 +367,60 @@
-moz-margin-start: 48px;
}
.addon:not([selected]) .warning {
.addon-view:not([selected]) .warning {
color: #90792E;
}
.addon:not([selected]) .error {
.addon-view:not([selected]) .error {
color: #7C322B;
}
.addon:not([selected]) .pending {
.addon-view:not([selected]) .pending {
color: #4F7939;
}
.addon .warning-icon {
.warning-icon {
list-style-image: url("chrome://global/skin/icons/warning-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .error-icon {
.error-icon {
list-style-image: url("chrome://global/skin/icons/error-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .pending-icon,
.addon .info-icon {
.pending-icon,
.info-icon {
list-style-image: url("chrome://global/skin/icons/information-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon[notification="warning"] {
.addon-view[notification="warning"] {
background-image: -moz-linear-gradient(rgba(255, 255, 0, 0.2), rgba(255, 255, 0, 0.1));
}
.addon[notification="error"] {
.addon-view[notification="error"] {
background-image: -moz-linear-gradient(rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
}
.addon[notification="info"] {
.addon-view[notification="info"] {
background-image: -moz-linear-gradient(rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.1));
}
.addon[pending="enable"],
.addon[pending="upgrade"],
.addon[pending="install"] {
.addon-view[pending="enable"],
.addon-view[pending="upgrade"],
.addon-view[pending="install"] {
background-image: -moz-linear-gradient(rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
}
.addon[pending="disable"],
.addon[pending="uninstall"] {
.addon-view[pending="disable"],
.addon-view[pending="uninstall"] {
background-image: -moz-linear-gradient(rgba(128, 128, 128, 0.2), rgba(128, 128, 128, 0.1));
}
@ -541,70 +535,77 @@
.detail-view-container {
overflow: auto;
padding: 10px 20px;
padding: 2em;
font-size: 110%;
}
.detail-basicinfo {
padding: 10px 0px;
-moz-box-align: center;
#detail-notifications {
margin-bottom: 2em;
}
.detail-extra {
margin-top: 20px;
}
#detail-desc {
min-height: 40px;
margin-bottom: 20px;
#detail-notifications .warning,
#detail-notifications .pending,
#detail-notifications .error,
#detail-notifications .info {
-moz-margin-start: 0;
}
#detail-icon {
width: 32px;
height: 32px;
-moz-margin-end: 10px;
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png");
}
#detail-view[type="theme"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
#detail-summary {
margin-bottom: 2em;
}
#detail-view[type="locale"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
#detail-view[type="plugin"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
#detail-name {
#detail-name-container {
font-size: 200%;
}
#detail-screenshot {
width: 140px;
height: 140px;
background-color: blue;
margin: 0px 10px 00px 0px;
-moz-margin-end: 2em;
}
.detail-prefs {
-moz-box-align: start;
#detail-desc-container {
margin-bottom: 2em;
/* This is necessary to fix layout issues with multi-line descriptions, see
bug 592712*/
outline: solid transparent;
}
.meta-label {
font-weight: bold;
#detail-desc {
-moz-margin-start: 6px;
}
#detail-notification {
#detail-contributions {
-moz-border-radius: 5px;
border: 1px solid #B0C8D1;
margin-bottom: 2em;
padding: 1em;
background: #D8DDE4;
}
#detail-contrib-description {
font-style: italic;
margin-bottom: 1em;
}
#detail-contrib-suggested {
color: grey;
}
#detail-grid {
margin-bottom: 2em;
}
.detail-row,
.detail-row-complex {
border-bottom: 1px solid grey;
-moz-box-align: center;
-moz-box-pack: center;
margin: 0px 50px;
padding: 4px 20px;
background-color: #FDFFA8;
-moz-border-radius: 8px;
font-size: 120%;
border: 2px solid #F0F6A3;
}
.detail-row-value {
-moz-margin-start: 0;
}
@ -749,6 +750,7 @@
margin: 0;
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
min-width: 0;
margin: 0;
}
.remove-button .button-text {
@ -763,23 +765,6 @@
padding: 0;
}
.contribute {
-moz-appearance: none;
color: #FFF;
font-weight: bold;
text-shadow: #4C9EF8 -1px -1px 1px;
border: 1px solid #4C9EF8;
-moz-border-radius: 10000px;
background-image: -moz-linear-gradient(#93C5FA, #4C9EF8);
-moz-padding-start: 20px;
-moz-padding-end: 4px;
}
.contribute:hover {
border-color: #4271FF;
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
}
.button-link {
-moz-appearance: none;
background: transparent;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -24,6 +24,7 @@ toolkit.jar:
+ skin/classic/mozapps/extensions/cancel.png (extensions/cancel.png)
+ skin/classic/mozapps/extensions/pause.png (extensions/pause.png)
+ skin/classic/mozapps/extensions/utilities.png (extensions/utilities.png)
+ skin/classic/mozapps/extensions/heart.png (extensions/heart.png)
+ skin/classic/mozapps/passwordmgr/key.png (passwordmgr/key.png)
+ skin/classic/mozapps/plugins/notifyPluginBlocked.png (plugins/pluginBlocked-16.png)
+ skin/classic/mozapps/plugins/notifyPluginCrashed.png (plugins/pluginGeneric-16.png)

View File

@ -350,29 +350,23 @@
max-height: 48px;
}
.addon[type="theme"] .icon {
.addon-view[type="theme"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
}
.addon[type="locale"] .icon {
.addon-view[type="locale"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
.addon[type="plugin"] .icon {
.addon-view[type="plugin"] .icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
.name,
.version,
.update-postfix {
.name-container {
font-size: 150%;
margin-bottom: 0px;
}
.disabled-postfix {
font-size: 130%;
}
.description-container {
margin-top: 8px;
-moz-margin-start: 6px;
@ -386,60 +380,60 @@
-moz-margin-start: 47px;
}
.addon:not([selected]) .warning {
.addon-view:not([selected]) .warning {
color: #90792E;
}
.addon:not([selected]) .error {
.addon-view:not([selected]) .error {
color: #7C322B;
}
.addon:not([selected]) .pending {
.addon-view:not([selected]) .pending {
color: #4F7939;
}
.addon .warning-icon {
.warning-icon {
list-style-image: url("chrome://global/skin/icons/warning-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .error-icon {
.error-icon {
list-style-image: url("chrome://global/skin/icons/error-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .pending-icon,
.addon .info-icon {
.pending-icon,
.info-icon {
list-style-image: url("chrome://global/skin/icons/information-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon[notification="warning"] {
.addon-view[notification="warning"] {
background-image: -moz-linear-gradient(rgba(255, 255, 0, 0.2), rgba(255, 255, 0, 0.1));
}
.addon[notification="error"] {
.addon-view[notification="error"] {
background-image: -moz-linear-gradient(rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
}
.addon[notification="info"] {
.addon-view[notification="info"] {
background-image: -moz-linear-gradient(rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.1));
}
.addon[pending="enable"],
.addon[pending="upgrade"],
.addon[pending="install"] {
.addon-view[pending="enable"],
.addon-view[pending="upgrade"],
.addon-view[pending="install"] {
background-image: -moz-linear-gradient(rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
}
.addon[pending="disable"],
.addon[pending="uninstall"] {
.addon-view[pending="disable"],
.addon-view[pending="uninstall"] {
background-image: -moz-linear-gradient(rgba(128, 128, 128, 0.2), rgba(128, 128, 128, 0.1));
}
@ -564,71 +558,91 @@
}
.detail-view-container {
overflow: auto;
padding: 10px 20px;
padding: 2em;
font-size: 110%;
}
.detail-basicinfo {
padding: 10px 0px;
-moz-box-align: center;
#detail-notifications {
margin-bottom: 2em;
}
.detail-extra {
margin-top: 20px;
}
#detail-desc {
min-height: 40px;
margin-bottom: 20px;
#detail-notifications .warning,
#detail-notifications .pending,
#detail-notifications .error,
#detail-notifications .info {
-moz-margin-start: 0;
}
#detail-icon {
width: 32px;
height: 32px;
-moz-margin-end: 10px;
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png");
}
#detail-view[type="theme"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
#detail-summary {
margin-bottom: 2em;
}
#detail-view[type="locale"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
#detail-view[type="plugin"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
#detail-name {
#detail-name-container {
font-size: 200%;
}
#detail-screenshot {
width: 140px;
height: 140px;
background-color: blue;
margin: 0px 10px 00px 0px;
-moz-margin-end: 2em;
}
.detail-prefs {
-moz-box-align: start;
#detail-desc-container {
margin-bottom: 2em;
}
.meta-label {
#detail-desc {
-moz-margin-start: 6px;
/* This is necessary to fix layout issues with multi-line descriptions, see
bug 592712*/
outline: solid transparent;
}
#detail-contributions {
-moz-border-radius: 5px;
border: 1px solid #B0C8D1;
margin-bottom: 2em;
padding: 1em;
background: #D8DDE4;
}
#detail-contrib-description {
font-style: italic;
margin-bottom: 1em;
}
#detail-contrib-suggested {
color: grey;
}
#detail-contrib-button {
color: #FFF;
font-weight: bold;
text-shadow: #4C9EF8 -1px -1px 1px;
border: 1px solid #4C9EF8;
background-image: -moz-linear-gradient(#93C5FA, #4C9EF8);
list-style-image: url("chrome://mozapps/skin/extensions/heart.png");
}
#detail-notification {
#detail-contrib-button:hover {
border-color: #4271FF;
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
}
#detail-grid {
margin-bottom: 2em;
}
.detail-row,
.detail-row-complex {
border-bottom: 1px solid grey;
-moz-box-align: center;
-moz-box-pack: center;
margin: 0px 50px;
padding: 4px 20px;
background-color: #FDFFA8;
-moz-border-radius: 8px;
font-size: 120%;
border: 2px solid #F0F6A3;
}
.detail-row-value {
-moz-margin-start: 0;
}
@ -799,6 +813,7 @@
list-style-image: url("chrome://global/skin/icons/closetab.png");
border: none;
min-width: 0;
margin: 0;
}
.remove-button .button-text {
@ -812,24 +827,7 @@
.remove-button:hover:active {
list-style-image: url("chrome://global/skin/icons/closetab-active.png");
}
.contribute {
-moz-appearance: none;
color: #FFF;
font-weight: bold;
text-shadow: #4C9EF8 -1px -1px 1px;
border: 1px solid #4C9EF8;
-moz-border-radius: 10000px;
background-image: -moz-linear-gradient(#93C5FA, #4C9EF8);
-moz-padding-start: 20px;
-moz-padding-end: 4px;
}
.contribute:hover {
border-color: #4271FF;
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
}
.button-link {
-moz-appearance: none;
background: transparent;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -26,6 +26,7 @@ toolkit.jar:
skin/classic/mozapps/extensions/cancel.png (extensions/cancel.png)
skin/classic/mozapps/extensions/pause.png (extensions/pause.png)
skin/classic/mozapps/extensions/utilities.png (extensions/utilities.png)
skin/classic/mozapps/extensions/heart.png (extensions/heart.png)
skin/classic/mozapps/extensions/navigation.png (extensions/navigation.png)
skin/classic/mozapps/extensions/about.css (extensions/about.css)
* skin/classic/mozapps/extensions/extensions.css (extensions/extensions.css)

View File

@ -317,29 +317,23 @@
max-height: 48px;
}
.addon[type="theme"] .icon {
.addon-view[type="theme"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
}
.addon[type="locale"] .icon {
.addon-view[type="locale"] .icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
.addon[type="plugin"] .icon {
.addon-view[type="plugin"] .icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
.name,
.version,
.update-postfix {
.name-container {
font-size: 150%;
margin-bottom: 0px;
}
.disabled-postfix {
font-size: 130%;
}
.description-container {
margin-top: 8px;
-moz-margin-start: 6px;
@ -353,60 +347,60 @@
-moz-margin-start: 48px;
}
.addon:not([selected]) .warning {
.addon-view:not([selected]) .warning {
color: #90792E;
}
.addon:not([selected]) .error {
.addon-view:not([selected]) .error {
color: #7C322B;
}
.addon:not([selected]) .pending {
.addon-view:not([selected]) .pending {
color: #4F7939;
}
.addon .warning-icon {
.warning-icon {
list-style-image: url("chrome://global/skin/icons/warning-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .error-icon {
.error-icon {
list-style-image: url("chrome://global/skin/icons/error-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon .pending-icon,
.addon .info-icon {
.pending-icon,
.info-icon {
list-style-image: url("chrome://global/skin/icons/information-16.png");
width: 16px;
height: 16px;
margin: 0;
margin: 3px 0;
}
.addon[notification="warning"] {
.addon-view[notification="warning"] {
background-image: -moz-linear-gradient(rgba(255, 255, 0, 0.2), rgba(255, 255, 0, 0.1));
}
.addon[notification="error"] {
.addon-view[notification="error"] {
background-image: -moz-linear-gradient(rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
}
.addon[notification="info"] {
.addon-view[notification="info"] {
background-image: -moz-linear-gradient(rgba(0, 0, 255, 0.2), rgba(0, 0, 255, 0.1));
}
.addon[pending="enable"],
.addon[pending="upgrade"],
.addon[pending="install"] {
.addon-view[pending="enable"],
.addon-view[pending="upgrade"],
.addon-view[pending="install"] {
background-image: -moz-linear-gradient(rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
}
.addon[pending="disable"],
.addon[pending="uninstall"] {
.addon-view[pending="disable"],
.addon-view[pending="uninstall"] {
background-image: -moz-linear-gradient(rgba(128, 128, 128, 0.2), rgba(128, 128, 128, 0.1));
}
@ -532,70 +526,96 @@
.detail-view-container {
overflow: auto;
padding: 10px 20px;
padding: 2em;
font-size: 110%;
}
.detail-basicinfo {
padding: 10px 0px;
-moz-box-align: center;
#detail-notifications {
margin-bottom: 2em;
}
.detail-extra {
margin-top: 20px;
}
#detail-desc {
min-height: 40px;
margin-bottom: 20px;
#detail-notifications .warning,
#detail-notifications .pending,
#detail-notifications .error,
#detail-notifications .info {
-moz-margin-start: 0;
}
#detail-icon {
width: 32px;
height: 32px;
-moz-margin-end: 10px;
list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.png");
}
#detail-view[type="theme"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
#detail-summary {
margin-bottom: 2em;
}
#detail-view[type="locale"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
}
#detail-view[type="plugin"] #detail-icon {
list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
}
#detail-name {
#detail-name-container {
font-size: 200%;
}
#detail-screenshot {
width: 140px;
height: 140px;
background-color: blue;
margin: 0px 10px 00px 0px;
-moz-margin-end: 2em;
}
.detail-prefs {
-moz-box-align: start;
#detail-desc-container {
margin-bottom: 2em;
/* This is necessary to fix layout issues with multi-line descriptions, see
bug 592712*/
outline: solid transparent;
}
.meta-label {
font-weight: bold;
#detail-desc {
-moz-margin-start: 6px;
}
#detail-notification {
#detail-contributions {
-moz-border-radius: 5px;
border: 1px solid #B0C8D1;
margin-bottom: 2em;
padding: 1em;
background: #D8DDE4;
}
#detail-contrib-description {
font-style: italic;
margin-bottom: 1em;
}
#detail-contrib-suggested {
color: grey;
}
#detail-contrib-button {
-moz-appearance: none;
color: #FFF;
text-shadow: #4C9EF8 -1px -1px 1px;
border: 1px solid #4C9EF8;
-moz-border-radius: 2px;
background-image: -moz-linear-gradient(#93C5FA, #4C9EF8);
list-style-image: url("chrome://mozapps/skin/extensions/heart.png");
}
#detail-contrib-button .button-icon {
-moz-margin-end: 3px;
}
#detail-contrib-button:hover {
border-color: #4271FF;
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
}
#detail-grid {
margin-bottom: 2em;
}
.detail-row,
.detail-row-complex {
border-bottom: 1px solid grey;
-moz-box-align: center;
-moz-box-pack: center;
margin: 0px 50px;
padding: 4px 20px;
background-color: #FDFFA8;
-moz-border-radius: 8px;
font-size: 120%;
border: 2px solid #F0F6A3;
}
.detail-row-value {
-moz-margin-start: 0;
}
@ -744,6 +764,7 @@
-moz-image-region: rect(0, 64px, 16px, 48px);
border: none;
min-width: 0;
margin: 0;
}
.remove-button .button-box {
@ -766,23 +787,6 @@
display: none;
}
.contribute {
-moz-appearance: none;
color: #FFF;
font-weight: bold;
text-shadow: #4C9EF8 -1px -1px 1px;
border: 1px solid #4C9EF8;
-moz-border-radius: 10000px;
background-image: -moz-linear-gradient(#93C5FA, #4C9EF8);
-moz-padding-start: 20px;
-moz-padding-end: 4px;
}
.contribute:hover {
border-color: #4271FF;
background-image: -moz-linear-gradient(#49CEFF, #4271FF);
}
.button-link {
-moz-appearance: none;
background: transparent;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -32,6 +32,7 @@ toolkit.jar:
skin/classic/mozapps/extensions/cancel.png (extensions/cancel.png)
skin/classic/mozapps/extensions/pause.png (extensions/pause.png)
skin/classic/mozapps/extensions/utilities.png (extensions/utilities.png)
skin/classic/mozapps/extensions/heart.png (extensions/heart.png)
skin/classic/mozapps/extensions/navigation.png (extensions/navigation.png)
skin/classic/mozapps/extensions/eula.css (extensions/eula.css)
skin/classic/mozapps/handling/handling.css (handling/handling.css)
@ -96,6 +97,7 @@ toolkit.jar:
skin/classic/aero/mozapps/extensions/cancel.png (extensions/cancel.png)
skin/classic/aero/mozapps/extensions/pause.png (extensions/pause.png)
skin/classic/aero/mozapps/extensions/utilities.png (extensions/utilities.png)
skin/classic/aero/mozapps/extensions/heart.png (extensions/heart.png)
skin/classic/aero/mozapps/extensions/navigation.png (extensions/navigation.png)
skin/classic/aero/mozapps/extensions/eula.css (extensions/eula.css)
skin/classic/aero/mozapps/handling/handling.css (handling/handling.css)