OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * | 10 * |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 }); | 1499 }); |
1500 | 1500 |
1501 UI.registerCustomElement('div', 'dt-close-button', { | 1501 UI.registerCustomElement('div', 'dt-close-button', { |
1502 /** | 1502 /** |
1503 * @this {Element} | 1503 * @this {Element} |
1504 */ | 1504 */ |
1505 createdCallback: function() { | 1505 createdCallback: function() { |
1506 var root = UI.createShadowRootWithCoreStyles(this, 'ui/closeButton.css'); | 1506 var root = UI.createShadowRootWithCoreStyles(this, 'ui/closeButton.css'); |
1507 this._buttonElement = root.createChild('div', 'close-button'); | 1507 this._buttonElement = root.createChild('div', 'close-button'); |
1508 var regularIcon = UI.Icon.create('smallicon-cross', 'default-icon'); | 1508 var regularIcon = UI.Icon.create('smallicon-cross', 'default-icon'); |
1509 this._hoverIcon = UI.Icon.create('smallicon-red-cross-hover', 'hover-icon'
); | 1509 this._hoverIcon = UI.Icon.create('mediumicon-red-cross-hover', 'hover-icon
'); |
1510 this._activeIcon = UI.Icon.create('smallicon-red-cross-active', 'active-ic
on'); | 1510 this._activeIcon = UI.Icon.create('mediumicon-red-cross-active', 'active-i
con'); |
1511 this._buttonElement.appendChild(regularIcon); | 1511 this._buttonElement.appendChild(regularIcon); |
1512 this._buttonElement.appendChild(this._hoverIcon); | 1512 this._buttonElement.appendChild(this._hoverIcon); |
1513 this._buttonElement.appendChild(this._activeIcon); | 1513 this._buttonElement.appendChild(this._activeIcon); |
1514 }, | 1514 }, |
1515 | 1515 |
1516 /** | 1516 /** |
1517 * @param {boolean} gray | 1517 * @param {boolean} gray |
1518 * @this {Element} | 1518 * @this {Element} |
1519 */ | 1519 */ |
1520 set gray(gray) { | 1520 set gray(gray) { |
1521 if (gray) { | 1521 if (gray) { |
1522 this._hoverIcon.setIconType('smallicon-gray-cross-hover'); | 1522 this._hoverIcon.setIconType('mediumicon-gray-cross-hover'); |
1523 this._activeIcon.setIconType('smallicon-gray-cross-active'); | 1523 this._activeIcon.setIconType('mediumicon-gray-cross-active'); |
1524 } else { | 1524 } else { |
1525 this._hoverIcon.setIconType('smallicon-red-cross-hover'); | 1525 this._hoverIcon.setIconType('mediumicon-red-cross-hover'); |
1526 this._activeIcon.setIconType('smallicon-red-cross-active'); | 1526 this._activeIcon.setIconType('mediumicon-red-cross-active'); |
1527 } | 1527 } |
1528 }, | 1528 }, |
1529 | 1529 |
1530 __proto__: HTMLDivElement.prototype | 1530 __proto__: HTMLDivElement.prototype |
1531 }); | 1531 }); |
1532 })(); | 1532 })(); |
1533 | 1533 |
1534 /** | 1534 /** |
1535 * @param {!Element} input | 1535 * @param {!Element} input |
1536 * @param {function(string)} apply | 1536 * @param {function(string)} apply |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 */ | 2064 */ |
2065 constructor(message, okCallback, cancelCallback) { | 2065 constructor(message, okCallback, cancelCallback) { |
2066 super(true); | 2066 super(true); |
2067 this.registerRequiredCSS('ui/confirmDialog.css'); | 2067 this.registerRequiredCSS('ui/confirmDialog.css'); |
2068 this.contentElement.createChild('div', 'message').createChild('span').textCo
ntent = message; | 2068 this.contentElement.createChild('div', 'message').createChild('span').textCo
ntent = message; |
2069 var buttonsBar = this.contentElement.createChild('div', 'button'); | 2069 var buttonsBar = this.contentElement.createChild('div', 'button'); |
2070 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Ok'), okCallback
)); | 2070 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Ok'), okCallback
)); |
2071 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Cancel'), cancel
Callback)); | 2071 buttonsBar.appendChild(UI.createTextButton(Common.UIString('Cancel'), cancel
Callback)); |
2072 } | 2072 } |
2073 }; | 2073 }; |
OLD | NEW |