3 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
4 # ***** BEGIN LICENSE BLOCK *****
5 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 # The contents of this file are subject to the Mozilla Public License Version
8 # 1.1 (the "License"); you may not use this file except in compliance with
9 # the License. You may obtain a copy of the License at
10 # http://www.mozilla.org/MPL/
12 # Software distributed under the License is distributed on an "AS IS" basis,
13 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 # for the specific language governing rights and limitations under the
17 # The Original Code is The Extension Manager.
19 # The Initial Developer of the Original Code is
21 # Portions created by the Initial Developer are Copyright (C) 2004
22 # the Initial Developer. All Rights Reserved.
25 # Ben Goodger <ben@bengoodger.com>
26 # Doron Rosenberg <doronr@us.ibm.com>
27 # Robert Strong <robert.bugzilla@gmail.com>
29 # Alternatively, the contents of this file may be used under the terms of
30 # either the GNU General Public License Version 2 or later (the "GPL"), or
31 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
32 # in which case the provisions of the GPL or the LGPL are applicable instead
33 # of those above. If you wish to allow use of your version of this file only
34 # under the terms of either the GPL or the LGPL, and not to allow others to
35 # use your version of this file under the terms of the MPL, indicate your
36 # decision by deleting the provisions above and replace them with the notice
37 # and other provisions required by the GPL or the LGPL. If you do not delete
38 # the provisions above, a recipient may use your version of this file under
39 # the terms of any one of the MPL, the GPL or the LGPL.
41 # ***** END LICENSE BLOCK *****
45 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
46 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
47 <!ENTITY % extensionsDTD SYSTEM "chrome://mozapps/locale/extensions/extensions.dtd" >
53 <bindings id="addonBindings"
54 xmlns="http://www.mozilla.org/xbl"
55 xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
56 xmlns:xbl="http://www.mozilla.org/xbl">
58 <binding id="addons" extends="chrome://global/content/bindings/richlistbox.xml#richlistbox">
60 <field name="_addonStrings">
61 document.getElementById("extensionsStrings");
64 <field name="_brandShortName">null</field>
65 <method name="getBrandShortName">
67 if (!this._brandShortName)
68 this._brandShortName = document.getElementById("brandStrings").getString("brandShortName");
69 return this._brandShortName;
73 <field name="_appVersion">null</field>
74 <method name="getAppVersion">
76 if (!this._appVersion) {
77 var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
78 .getService(Components.interfaces.nsIXULAppInfo)
79 .QueryInterface(Components.interfaces.nsIXULRuntime);
80 this._appVersion = appInfo.version;
82 return this._appVersion;
88 <binding id="addon-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
90 <stylesheet src="chrome://mozapps/skin/extensions/extensions.css"/>
94 <field name="eventPrefix">"extension-"</field>
95 <property name="type" onget="return parseInt(this.getAttribute('type'));"/>
96 <property name="isCompatible" onget="return this.getAttribute('compatible') == 'true';"/>
97 <property name="isBlocklisted" onget="return this.getAttribute('blocklisted') == 'true';"/>
98 <property name="isSoftBlocklisted" onget="return this.getAttribute('blocklistedsoft') == 'true';"/>
99 <property name="isDisabled" onget="return this.getAttribute('isDisabled') == 'true';"/>
100 <property name="providesUpdatesSecurely" onget="return this.getAttribute('providesUpdatesSecurely') == 'true';"/>
101 <property name="satisfiesDependencies" onget="return this.getAttribute('satisfiesDependencies') == 'true';"/>
102 <property name="opType">
105 var opType = this.getAttribute('opType');
106 return opType == 'none' ? null : opType;
111 <method name="fireEvent">
112 <parameter name="aEventType"/>
114 var e = document.createEvent("Events");
115 e.initEvent(this.eventPrefix + aEventType, true, true);
116 this.dispatchEvent(e);
122 <handler event="DOMMenuItemActive">
123 // only ensureElementIsVisible if it wasn't selected
124 if (this.parentNode.getAttribute("last-selected") != this.getAttribute("id"))
125 this.parentNode.ensureElementIsVisible(this);
130 <binding id="addon" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
133 <xul:vbox class="addon-icon" xbl:inherits="iconURL"/>
134 <xul:vbox flex="1" class="addonTextBox">
135 <xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
136 <xul:hbox anonid="addonDescription" class="addon-description" xbl:inherits="description, opType"/>
137 <xul:vbox anonid="addonSelectedStatusMsgs" class="selectedStatusMsgs">
138 <xul:hbox flex="1" class="blocklistedBox attention" align="center">
139 <xul:label class="blocklistedLabel" value="&blocklisted.label;" crop="end"/>
140 <xul:label class="softBlocklistedLabel" value="&softBlocklisted.label;" crop="end"/>
141 <xul:label anonid="blocklistMoreInfo" class="text-link" value="&moreInfo.label;"
142 onclick="if (event.button == 0) { openURL(this.getAttribute('moreInfoURL')); }" />
148 <implementation implements="nsIAccessibleProvider, nsIDOMXULSelectControlItemElement">
151 if (this.isBlocklisted || this.isSoftBlocklisted) {
153 var blocklistMoreInfo = document.getAnonymousElementByAttribute(this, "anonid", "blocklistMoreInfo");
154 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
155 .getService(Components.interfaces.nsIPrefBranch);
156 var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
157 .getService(Components.interfaces.nsIURLFormatter);
158 var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
159 blocklistMoreInfo.setAttribute("moreInfoURL", url);
161 blocklistMoreInfo.hidden = true;
167 <field name="_addonDescription">
168 document.getAnonymousElementByAttribute(this, "anonid", "addonDescription");
171 <property name="label" readonly="true">
174 var labelPieces = [];
176 // Add name and version
177 labelPieces.push(this.getAttribute("name"));
178 labelPieces.push(this.getAttribute("version"));
181 var description = this.getAttribute("description");
182 labelPieces.push(description);
184 // Add status message, if any
185 // description is always in this.getAttribute("description"), but
186 // description is also sometimes in anonNodes[0].value. But other
187 // times (like when there's an actual status message) the binding
188 // of that hbox gets changed dynamically so anonNodes[0].value
189 // is the status message. The easiest way to sort it out is
190 // to check for duplicate strings.
191 // xxxpilgrim There is some additional weirdness here. Visually,
192 // the description is not displayed on non-selected items if
193 // the item contains a status message. However, when you arrow
194 // up and down through the list selecting different items, we want
195 // the accessible name during the OBJ_FOCUS event to include both
196 // the description and the status message. You would think this
197 // would be handled automatically because the binding changes
198 // (to "addon-selected", below) when the item gets selected.
199 // However, when the OBJ_FOCUS event occurs, the binding hasn't
200 // changed yet, so this property gets queried for the accessible name.
201 // Bottom line, we need to this property in the first place to
202 // ensure that items have any accessible name at all when you
203 // arrow through the list (bug 352388), _and_ we need to include
204 // both the description and the status message to make the
205 // accessible name you get during the OBJ_FOCUS event match the
206 // accessible name you would get if you queried the object
207 // after it was already focused (i.e. after the binding had
208 // changed to "addon-selected").
209 var anonNodes = document.getAnonymousNodes(this._addonDescription);
211 var statusMessage = anonNodes[0].value;
212 if (description != statusMessage)
213 labelPieces.push(statusMessage);
215 return labelPieces.join(" ");
222 <binding id="addon-selected" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
225 <xul:vbox class="addon-icon" xbl:inherits="iconURL"/>
226 <xul:vbox flex="1" class="addonTextBox">
227 <xul:hbox anonid="addonNameVersion" class="addon-name-version" xbl:inherits="name, version"/>
228 <xul:label anonid="addonDescriptionWrap" class="descriptionWrap" xbl:inherits="xbl:text=description"/>
229 <xul:vbox anonid="addonSelectedStatusMsgs" class="selectedStatusMsgs">
230 <xul:hbox anonid="addonOpType" class="addon-optype attention" align="center" xbl:inherits="newVersion"/>
231 <xul:hbox flex="1" class="updateAvailableBox attention">
232 <xul:label xbl:inherits="value=updateAvailableMsg" crop="end"/>
234 <xul:hbox flex="1" class="incompatibleBox attention">
235 <xul:label anonid="incompatibleLabel" crop="end"/>
237 <xul:hbox flex="1" class="insecureUpdateBox attention">
238 <xul:label value="&insecureUpdate.label;" crop="end"/>
240 <xul:hbox flex="1" class="needsDependenciesBox attention">
241 <xul:label value="&needsDependencies.label;" crop="end"/>
243 <xul:hbox flex="1" class="blocklistedBox attention" align="center">
244 <xul:label class="blocklistedLabel" value="&blocklisted.label;" crop="end"/>
245 <xul:label class="softBlocklistedLabel" value="&softBlocklisted.label;" crop="end"/>
246 <xul:label anonid="blocklistMoreInfo" class="text-link" value="&moreInfo.label;"
247 onclick="if (event.button == 0) { openURL(this.getAttribute('moreInfoURL')); }" />
250 <xul:hbox anonid="selectedButtons" flex="1" class="selectedButtons">
251 <xul:button class="uninstallHide optionsButton"
253 label="&cmd.options.label;" accesskey="&cmd.options.accesskey;"
254 tooltiptext="&cmd.options.tooltip;"
256 label="&cmd.optionsUnix.label;" accesskey="&cmd.optionsUnix.accesskey;"
257 tooltiptext="&cmd.optionsUnix.tooltip;"
259 command="cmd_options"/>
260 <xul:button class="uninstallHide themeButton useThemeButton" label="&cmd.useTheme.label;"
261 accesskey="&cmd.useTheme.accesskey;" tooltiptext="&cmd.useTheme.tooltip;"
262 command="cmd_useTheme"/>
263 <xul:spacer flex="1"/>
264 <xul:button class="disableShow enableHide uninstallHide enableButton" label="&cmd.enable.label;"
265 accesskey="&cmd.enable.accesskey;" tooltiptext="&cmd.enable.tooltip;"
266 command="cmd_enable"/>
267 <xul:button class="enableShow disableHide uninstallHide disableButton" label="&cmd.disable.label;"
268 accesskey="&cmd.disable.accesskey;" tooltiptext="&cmd.disable.tooltip;"
269 command="cmd_disable"/>
270 <xul:button class="uninstallHide uninstallButton" label="&cmd.uninstall.label;"
271 accesskey="&cmd.uninstall2.accesskey;" tooltiptext="&cmd.uninstall2.tooltip;"
272 command="cmd_uninstall"/>
273 <xul:button class="uninstallShow cancelUninstallButton" label="&cancel.label;"
274 accesskey="&cancel.accesskey;" tooltiptext="&cmd.cancelUninstall.tooltip;"
275 command="cmd_cancelUninstall"/>
276 <xul:button class="installShow cancelInstallButton" label="&cancelInstall.label;"
277 accesskey="&cancelInstall.accesskey;" tooltiptext="&cmd.cancelInstall.tooltip;"
278 command="cmd_cancelInstall"/>
279 <xul:button class="upgradeShow cancelUpgradeButton" label="&cancelUpgrade.label;"
280 accesskey="&cancelUpgrade.accesskey;" tooltiptext="&cmd.cancelUpgrade.tooltip;"
281 command="cmd_cancelUpgrade"/>
287 <implementation implements="nsIAccessibleProvider, nsIDOMXULSelectControlItemElement">
290 if (this.isBlocklisted || this.isSoftBlocklisted) {
292 var blocklistMoreInfo = document.getAnonymousElementByAttribute(this, "anonid", "blocklistMoreInfo");
293 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
294 .getService(Components.interfaces.nsIPrefBranch);
295 var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
296 .getService(Components.interfaces.nsIURLFormatter);
297 var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
298 blocklistMoreInfo.setAttribute("moreInfoURL", url);
300 blocklistMoreInfo.hidden = true;
304 if (!this.isCompatible) {
305 var label = document.getAnonymousElementByAttribute(this, "anonid", "incompatibleLabel");
306 label.setAttribute("value", this.parentNode._addonStrings.getFormattedString("incompatibleAddonMsg",
307 [this.parentNode.getBrandShortName(), this.parentNode.getAppVersion()]));
310 var updatedVersion = this.getAttribute('availableUpdateVersion');
311 if (updatedVersion) {
312 var msg = this.parentNode._addonStrings.getFormattedString("updateAvailableMsg", [updatedVersion]);
313 this.setAttribute("updateAvailableMsg", msg);
318 <field name="_nameVersion">
319 document.getAnonymousElementByAttribute(this, "anonid", "addonNameVersion");
322 <field name="_descriptionWrap">
323 document.getAnonymousElementByAttribute(this, "anonid", "addonDescriptionWrap");
326 <field name="_selectedStatusMsgs">
327 document.getAnonymousElementByAttribute(this, "anonid", "addonSelectedStatusMsgs");
330 <field name="_opType">
331 document.getAnonymousElementByAttribute(this, "anonid", "addonOpType");
334 <property name="label" readonly="true">
337 var labelPieces = [];
339 // Add name and version
340 labelPieces.push(this._nameVersion.getAttribute("name"));
341 labelPieces.push(this._nameVersion.getAttribute("version"));
344 labelPieces.push(this._descriptionWrap.textContent);
346 // Add operation message (if any)
347 // Note 1: must handle this separately from other the labels
348 // because this message is in an anonymous content node
349 // within an hbox which is dynamically bound to a different
350 // "addon-needs-*" binding based on the operation type.
351 // Note 2: must check hbox's CSS "display" property with
352 // getComputedStyle, because the XUL "hidden" attribute
354 // Note 3: can't just check whether the hbox has anonymous
355 // child nodes. If (for example) you disable an extension,
356 // the hbox gets bound to "addon-needs-disable". But if
357 // you then immediately re-enable the same extension without
358 // closing the Add-ons window, the hbox is still bound to
359 // "addon-needs-disable" (and thus still has the anonymous
360 // content child nodes with the label containing the now-unused
361 // &toBeDisabled.label text), but the hbox is no longer visible.
362 if (document.defaultView.getComputedStyle(this._opType, '').display != 'none')
363 labelPieces.push(document.getAnonymousNodes(this._opType)[0].value);
365 // Add selected status messages, if any are visible.
366 // Note 1: visibility of status messages is set by CSS rule,
367 // not XUL attributes, so we need to use getComputedStyle.
368 // Note 2: relevant CSS rule is set on the label's parent node;
369 // the label node itself always has "display:-moz-box" which is
371 var labels = this._selectedStatusMsgs.getElementsByTagNameNS(
372 "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
374 var numLabels = labels.length;
375 for (var i = 0; i < numLabels; i++) {
376 var label = labels[i];
377 var parentStyle = document.defaultView.getComputedStyle(label.parentNode, "");
379 // Optimization: we only check a few cases here that we know
380 // are used by the Add-ons window. For example, the generic
381 // richlistbox.xml label getter checks label.collapsed, but
382 // we don't check that here because we know that the Add-ons
383 // window doesn't use it.
385 label.className != "text-link" &&
386 parentStyle.display != "none") {
387 labelPieces.push(label.value);
391 return labelPieces.join(" ");
398 <!-- When an add-on displays a status messages the element may extend below the
399 bottom of the list This will ensure that the element is visible for the
400 most common cases. -->
401 <handler event="DOMAttrModified">
403 if (event.attrName != "disabled" ||
404 !this.parentNode.selectedItem ||
405 !event.originalTarget.hasAttribute("command"))
408 var cmd = event.originalTarget.getAttribute("command");
409 var opType = this.getAttribute("opType");
410 if (opType == "needs-uninstall" && cmd == "cmd_uninstall" ||
411 opType == "needs-disable" && cmd == "cmd_disable" && !this.isDisabled ||
412 opType == "needs-enable" && cmd == "cmd_disable" && this.isDisabled)
413 this.parentNode.ensureElementIsVisible(this);
419 <binding id="searchresult" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
421 <stylesheet src="chrome://mozapps/skin/extensions/extensions.css"/>
426 <xul:vbox class="addon-icon" xbl:inherits="iconURL"/>
427 <xul:vbox flex="1" class="addonTextBox">
428 <xul:hbox align="center">
429 <xul:hbox anonid="addonNameVersion" class="addon-name-version" xbl:inherits="name, version"/>
430 <xul:spacer flex="1"/>
431 <xul:image class="addonRating" xbl:inherits="rating"/>
433 <xul:hbox anonid="addonDescription" class="addon-description" xbl:inherits="description, opType"/>
438 <implementation extends="nsIAccessibleProvider">
439 <property name="label" readonly="true">
441 return this.getAttribute("name") + " " +
442 this.getAttribute("version") + " " +
443 this.getAttribute("description");
448 if (!this.hasAttribute("thumbnailURL") || this._imageBlocked(this)) {
453 if (this.hasAttribute("thumbwidth")) {
454 this._displayImage();
458 var image = new Image();
460 image.onload = function() {
461 document.getElementById(id)._imageLoaded(image);
463 image.onerror = function() {
464 document.getElementById(id)._hideImage();
466 image.src = this.getAttribute("thumbnailURL");
469 <field name="_maxSize">125</field>
471 <method name="_imageBlocked">
472 <parameter name="container"/>
474 var uri = Components.classes["@mozilla.org/network/io-service;1"]
475 .getService(Components.interfaces.nsIIOService)
476 .newURI(container.getAttribute("thumbnailURL"),
477 container.ownerDocument.characterSet, null);
478 var contentPolicy = Components.classes["@mozilla.org/layout/content-policy;1"]
479 .getService(Components.interfaces.nsIContentPolicy);
480 return contentPolicy.shouldLoad(contentPolicy.TYPE_IMAGE,
481 uri, container.ownerDocument.documentURIObject,
482 container, null, null) != contentPolicy.ACCEPT;
486 <method name="_displayImage">
491 <method name="_hideImage">
496 <method name="_imageLoaded">
497 <parameter name="image"/>
500 if ((this._maxSize >= image.width) &&
501 (this._maxSize >= image.height)) {
502 var width = image.width;
503 var height = image.height;
505 else if (image.width > image.height) {
506 width = this._maxSize;
507 height = (this._maxSize / image.width) * image.height;
510 height = this._maxSize;
511 width = (this._maxSize / image.height) * image.width;
514 this.setAttribute("thumbwidth", width);
515 this.setAttribute("thumbheight", height);
516 this._displayImage();
523 <binding id="searchresult-selected" extends="chrome://mozapps/content/extensions/extensions.xml#searchresult">
526 <xul:vbox class="addon-icon" xbl:inherits="iconURL"/>
527 <xul:vbox flex="1" class="addonTextBox">
528 <xul:hbox align="center">
529 <xul:hbox anonid="addonNameVersion" class="addon-name-version" xbl:inherits="name, version"/>
530 <xul:spacer flex="1"/>
531 <xul:image class="addonRating" xbl:inherits="rating"/>
533 <xul:hbox flex="1" align="stretch" class="addon-search-details">
534 <xul:vbox pack="start">
535 <xul:deck class="addonThumbnailContainer" selectedIndex="0">
536 <xul:vbox flex="1" align="center" pack="center">
537 <xul:image class="addonThrobber"/>
539 <xul:vbox flex="1" align="center" pack="center">
540 <xul:image class="addonThumbnail"/>
542 <xul:vbox flex="1" align="center" pack="center">
543 <xul:label class="addonMissingThumbnail" value="&missingThumbnail.label;"/>
548 <xul:label anonid="addonDescriptionWrap" class="descriptionWrap"
549 xbl:inherits="xbl:text=description"/>
550 <xul:hbox pack="start">
551 <xul:label class="addonLearnMore text-link" xbl:inherits="homepageURL"
552 value="&searchResultHomepage.value;"
553 onclick="if (event.button == 0) { openURL(this.getAttribute('homepageURL')); }"/>
555 <xul:spacer flex="1"/>
556 <xul:hbox anonid="selectedButtons" class="selectedButtons">
557 <xul:hbox align="center" class="addonType addonTypeExtension">
559 <xul:label value="&addonTypeExtension.label;"/>
561 <xul:hbox align="center" class="addonType addonTypeTheme">
563 <xul:label value="&addonTypeTheme.label;"/>
565 <xul:spacer flex="1"/>
566 <xul:hbox align="center" class="searchResultConnecting">
567 <xul:image class="addonThrobber"/>
568 <xul:label value="&searchResultConnecting.label;"/>
570 <xul:hbox align="center" class="searchResultInstalling">
571 <xul:image class="addonThrobber"/>
572 <xul:label value="&searchResultInstalling.label;"/>
574 <xul:hbox align="center" class="searchResultFailed">
575 <xul:label value="&searchResultFailed.label;"/>
577 <xul:hbox align="center" class="searchResultInstalled">
578 <xul:label value="&searchResultInstalled.label;"/>
580 <xul:button class="addonInstallButton"
581 label="&cmd.installSearchResult.label;"
582 accesskey="&cmd.installSearchResult.accesskey;"
583 tooltiptext="&cmd.installSearchResult.tooltip;"
584 command="cmd_installSearchResult"/>
592 <implementation implements="nsIAccessibleProvider">
593 <field name="_thumbnailContainer">
594 document.getAnonymousElementByAttribute(this, "class", "addonThumbnailContainer");
596 <field name="_thumbnail">
597 document.getAnonymousElementByAttribute(this, "class", "addonThumbnail");
600 <method name="_displayImage">
602 this._thumbnail.style.width = this.getAttribute("thumbwidth") + "px";
603 this._thumbnail.style.height = this.getAttribute("thumbheight") + "px";
604 this._thumbnail.src = this.getAttribute("thumbnailURL");
605 this._thumbnailContainer.selectedIndex = 1;
609 <method name="_hideImage">
611 this._thumbnailContainer.selectedIndex = 2;
617 <binding id="status-search-failure">
618 <content align="center">
619 <xul:hbox align="center" pack="center">
620 <xul:image class="addonFailure"/>
621 <xul:label value="&searchFailed.label;"/>
623 <xul:button command="cmd_resetSearch" label="&searchFailed.button;"/>
627 <binding id="status-recommended-failure">
629 <xul:hbox align="center" pack="center">
630 <xul:image class="addonFailure"/>
631 <xul:label value="&searchFailed.label;"/>
636 <binding id="status-header-recommended">
638 <xul:label value="&recommendedHeader.label;"/>
642 <binding id="status-message-nosearchresults">
644 <xul:hbox align="center" pack="center">
645 <xul:label value="&noSearchResults.label;"/>
650 <binding id="status-message-norecommended">
652 <xul:hbox align="center" pack="center">
653 <xul:label value="&noRecommendedResults.label;"/>
658 <binding id="status-footer-recommended">
659 <content align="end">
660 <xul:label class="text-link" xbl:inherits="recommendedURL=link" value="&recommendedResults.label;"
661 onclick="if (event.button == 0) { openURL(this.getAttribute('recommendedURL')); }" />
665 <binding id="status-footer-search">
666 <content align="stretch">
667 <xul:hbox align="center">
668 <xul:label class="text-link" xbl:inherits="searchURL=link" anonid="searchLink"
669 onclick="if (event.button == 0) { openURL(this.getAttribute('searchURL')); }"/>
670 <xul:spacer flex="1"/>
671 <xul:button command="cmd_resetSearch" label="&resetSearch.label;"/>
677 var strings = [this.getAttribute("count")];
678 var text = document.getElementById("extensionsStrings")
679 .getFormattedString("searchResults", strings);
680 var label = document.getAnonymousElementByAttribute(this, "anonid", "searchLink");
686 <binding id="status-footer-search-empty">
687 <content align="center">
688 <xul:label value="&emptySearch.label;"/>
689 <xul:button command="cmd_resetSearch" label="&emptySearch.button;"/>
693 <binding id="status-retrieve-search">
694 <content align="center">
695 <xul:hbox align="center" pack="center">
696 <xul:image class="addonThrobber"/>
697 <xul:label value="&searchThrobber.label;"/>
699 <xul:button command="cmd_resetSearch" label="&cancelSearch.button;"/>
703 <binding id="status-retrieve-recommended">
705 <xul:hbox align="center" pack="center">
706 <xul:image class="addonThrobber"/>
707 <xul:label value="&recommendedThrobber.label;"/>
712 <binding id="addon-icon">
714 <xul:stack class="addonIconStack">
715 <xul:vbox pack="center" align="center" class="addonIcon">
716 <xul:image xbl:inherits="src=iconURL"/>
718 <xul:vbox pack="start" align="start" class="addonIcon pluginIcon">
719 <xul:image src="chrome://mozapps/skin/plugins/pluginGeneric.png"/>
721 <xul:vbox pack="end" align="start">
722 <xul:image class="notifyBadge"/>
724 <xul:vbox pack="end" align="end">
725 <xul:image class="updateBadge"/>
728 <xul:spacer flex="1"/>
732 <binding id="addon-name-version">
734 <xul:label class="addonName" crop="end" xbl:inherits="value=name"/>
735 <xul:label class="addonVersion" xbl:inherits="value=version"/>
739 <binding id="addon-description-crop">
741 <xul:label class="descriptionCrop" xbl:inherits="value=description" flex="1" crop="end"/>
745 <binding id="addon-needs-install">
747 <xul:label value="&toBeInstalled.label;" crop="end"/>
751 <binding id="addon-needs-upgrade">
753 <xul:label value="&toBeUpdated.label;" crop="end"/>
757 <binding id="addon-needs-uninstall">
759 <xul:label value="&toBeUninstalled.label;" crop="end"/>
763 <binding id="addon-needs-enable">
765 <xul:label value="&toBeEnabled.label;" crop="end"/>
769 <binding id="addon-needs-disable">
771 <xul:label value="&toBeDisabled.label;" crop="end"/>
775 <binding id="update-checking" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
778 <xul:stack class="addonIconStack">
779 <xul:vbox pack="start" align="start">
780 <xul:image class="addonIcon" xbl:inherits="src=iconURL"/>
782 <xul:vbox pack="end" align="end">
783 <xul:image class="updateBadge"/>
785 <xul:vbox pack="end" align="start">
786 <xul:image class="notifyBadge"/>
790 <xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
792 <xul:label xbl:inherits="value=updateStatus" flex="1" crop="end"/>
799 <binding id="update-found" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
802 <xul:vbox pack="start" align="start">
803 <xul:image class="addonIcon" xbl:inherits="src=iconURL"/>
806 <xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
808 <xul:label xbl:inherits="value=updateAvailableMsg" flex="1" crop="end"/>
810 <xul:hbox pack="end" align="end">
811 <xul:checkbox anonid="includeUpdate" class="includeUpdate" checked="true"
812 label="&includeUpdate.label;" tooltiptext="&includeUpdate.tooltip;"
813 includeUpdateAccesskey="&includeUpdate.accesskey;" accesskey="&includeUpdate.accesskey;"/>
821 var updatedVersion = this.getAttribute('availableUpdateVersion');
822 var msg = this.parentNode._addonStrings.getFormattedString("updateAvailableMsg", [updatedVersion]);
823 this.setAttribute("updateAvailableMsg", msg);
828 <handler event="DOMMenuItemActive">
831 var children = this.parentNode.children;
832 for (var i = 0; i < children.length; ++i) {
833 var checkbox = document.getAnonymousElementByAttribute(children[i], "anonid", "includeUpdate");
834 if (checkbox.hasAttribute("accesskey"))
835 checkbox.removeAttribute("accesskey");
837 checkbox = document.getAnonymousElementByAttribute(this, "anonid", "includeUpdate");
838 checkbox.setAttribute("accesskey", checkbox.getAttribute("includeUpdateAccesskey"));
844 <binding id="install" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
849 <xul:stack class="addonIcon-stack">
850 <xul:vbox pack="start" align="start">
851 <xul:image class="addonIcon" xbl:inherits="src=iconURL"/>
856 <xul:hbox class="addon-name-version" xbl:inherits="name, version=newVersion"/>
857 <xul:hbox class="addon-install-status" xbl:inherits="state"/>
860 <xul:hbox flex="1" pack="end">
861 <xul:button class="upgradeShow cancelUpgradeButton" label="&cancelUpgrade.label;"
862 accesskey="&cancelUpgrade.accesskey;" tooltiptext="&cmd.cancelUpgrade.tooltip;"
863 command="cmd_cancelUpgrade"/>
864 <xul:button class="installShow cancelInstallButton" label="&cancelInstall.label;"
865 accesskey="&cancelInstall.accesskey;" tooltiptext="&cmd.cancelInstall.tooltip;"
866 command="cmd_cancelInstall"/>
872 <binding id="addon-install-waiting">
874 <xul:label value="&installWaiting.label;" flex="1" crop="end"/>
878 <binding id="addon-install-incompatibleUpdate">
880 <xul:label value="&installIncompatibleUpdate.label;" flex="1" crop="end"/>
884 <binding id="addon-install-finishing">
886 <xul:label value="&installFinishing.label;" flex="1" crop="end"/>
890 <binding id="addon-install-success">
892 <xul:label value="&installSuccess.label;" flex="1" crop="end"/>
896 <binding id="addon-install-fail">
898 <xul:label value="&installFailure.label;" flex="1" crop="end"/>
902 <binding id="addon-install-restart">
904 <xul:label value="&installSuccessRestart.label;" flex="1" crop="end"/>
908 <binding id="addon-upgrade-restart">
910 <xul:label value="&updateSuccessRestart.label;" flex="1" crop="end"/>
914 <binding id="addon-install-updated">
916 <xul:label value="&updateSuccess.label;" flex="1" crop="end"/>
920 <binding id="install-downloading" extends="chrome://mozapps/content/extensions/extensions.xml#addon-base">
923 <xul:vbox pack="start">
924 <xul:image class="addonIcon" xbl:inherits="src=iconURL"/>
926 <xul:vbox flex="1" class="addonTextBox">
927 <xul:hbox class="addon-name-version" xbl:inherits="name, version=newVersion"/>
928 <xul:progressmeter class="extension-item-progress" xbl:inherits="value=progress"/>
929 <xul:label class="extension-item-status" xbl:inherits="value=status" value="&installWaiting.label;"/>
935 <!-- based on preferences.xml paneButton -->
936 <binding id="viewbutton" extends="chrome://global/content/bindings/radio.xml#radio">
938 <stylesheet src="chrome://mozapps/skin/extensions/extensions.css"/>
941 <xul:image class="viewButtonIcon" xbl:inherits="src"/>
942 <xul:label class="viewButtonLabel" xbl:inherits="value=label"/>
944 <implementation implements="nsIAccessibleProvider">
945 <property name="accessibleType" readonly="true">
948 return Components.interfaces.nsIAccessibleProvider.XULListitem;
955 <binding id="hardblockedaddon">
956 <content align="start">
957 <xul:image xbl:inherits="src=icon"/>
959 <xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
961 <xul:spacer flex="1"/>
962 <xul:label class="blockedLabel" value="&blocklist.blocked.label;"/>
968 <binding id="softblockedaddon">
969 <content align="start">
970 <xul:image xbl:inherits="src=icon"/>
972 <xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
974 <xul:spacer flex="1"/>
975 <xul:checkbox class="disableCheckbox" checked="true" label="&blocklist.checkbox.label;"/>
980 <field name="_checkbox">
981 document.getAnonymousElementByAttribute(this, "class", "disableCheckbox")
983 <property name="checked" readonly="true">
985 return this._checkbox.checked;