зеркало из https://github.com/mozilla/gecko-dev.git
Bug 711291 - Add support for icon URL option to PopupNotifications.show. r=gavin
This commit is contained in:
Родитель
00e141b03b
Коммит
cdd292a399
|
@ -944,7 +944,7 @@
|
|||
<binding id="geolocation-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
|
||||
<content align="start">
|
||||
<xul:image class="popup-notification-icon"
|
||||
xbl:inherits="popupid"/>
|
||||
xbl:inherits="popupid,src=icon"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:description class="popup-notification-description"
|
||||
xbl:inherits="xbl:text=label"/>
|
||||
|
@ -988,7 +988,7 @@
|
|||
<binding id="addon-progress-notification" extends="chrome://global/content/bindings/notification.xml#popup-notification">
|
||||
<content align="start">
|
||||
<xul:image class="popup-notification-icon"
|
||||
xbl:inherits="popupid"/>
|
||||
xbl:inherits="popupid,src=icon"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:description class="popup-notification-description addon-progress-description"
|
||||
xbl:inherits="xbl:text=label"/>
|
||||
|
|
|
@ -225,6 +225,10 @@ PopupNotifications.prototype = {
|
|||
* removed when they would have otherwise been dismissed
|
||||
* (i.e. any time the popup is closed due to user
|
||||
* interaction).
|
||||
* popupIconURL:
|
||||
* A string. URL of the image to be displayed in the popup.
|
||||
* Normally specified in CSS using list-style-image and the
|
||||
* .popup-notification-icon[popupid=...] selector.
|
||||
* @returns the Notification object corresponding to the added notification.
|
||||
*/
|
||||
show: function PopupNotifications_show(browser, id, message, anchorID,
|
||||
|
@ -401,6 +405,8 @@ PopupNotifications.prototype = {
|
|||
popupnotification.setAttribute("menucommand", "PopupNotifications._onMenuCommand(event);");
|
||||
popupnotification.setAttribute("closeitemcommand", "PopupNotifications._dismiss();event.stopPropagation();");
|
||||
}
|
||||
if (n.options.popupIconURL)
|
||||
popupnotification.setAttribute("icon", n.options.popupIconURL);
|
||||
popupnotification.notification = n;
|
||||
|
||||
if (n.secondaryActions) {
|
||||
|
|
|
@ -435,7 +435,7 @@
|
|||
<binding id="popup-notification">
|
||||
<content align="start">
|
||||
<xul:image class="popup-notification-icon"
|
||||
xbl:inherits="popupid"/>
|
||||
xbl:inherits="popupid,src=icon"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:description class="popup-notification-description"
|
||||
xbl:inherits="xbl:text=label"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче