Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 /** | 31 /** |
| 32 * @unrestricted | 32 * @unrestricted |
| 33 */ | 33 */ |
| 34 UI.EmptyWidget = class extends UI.VBox { | 34 UI.EmptyWidget = class extends UI.VBox { |
| 35 /** | 35 /** |
| 36 * @param {string} text | 36 * @param {string} text |
| 37 */ | 37 */ |
| 38 constructor(text) { | 38 constructor(text) { |
| 39 super(); | 39 super(); |
| 40 this.registerRequiredCSS('ui/emptyWidget.css'); | 40 this.registerRequiredCSS('ui/emptyWidget.css'); |
| 41 this.element.classList.add('empty-view'); | 41 this.element.classList.add('empty-view-scroller'); |
| 42 this.textElement = this.element.createChild('h2'); | 42 this._panel = this.element.createChild('div', 'empty-view'); |
|
caseq
2017/05/20 00:49:05
nit: panel is a bit overloaded. _contentElement or
eostroukhov
2017/05/22 22:21:16
Done.
| |
| 43 this.textElement = this._panel.createChild('h2'); | |
|
caseq
2017/05/20 00:49:05
Can we make it private? I don't think it's used ou
eostroukhov
2017/05/22 22:21:16
Done.
| |
| 43 this.textElement.textContent = text; | 44 this.textElement.textContent = text; |
| 44 } | 45 } |
| 45 | 46 |
| 46 /** | 47 /** |
| 47 * @return {!Element} | 48 * @return {!Element} |
| 48 */ | 49 */ |
| 49 appendParagraph() { | 50 appendParagraph() { |
| 50 return this.element.createChild('p'); | 51 return this._panel.createChild('p'); |
|
caseq
2017/05/20 00:49:05
Shouldn't this be under textElement?
eostroukhov
2017/05/22 22:21:16
I don't think so. textElement is a main text, that
| |
| 51 } | 52 } |
| 52 | 53 |
| 53 /** | 54 /** |
| 54 * @param {string} text | 55 * @param {string} text |
| 55 */ | 56 */ |
| 56 set text(text) { | 57 set text(text) { |
| 57 this.textElement.textContent = text; | 58 this.textElement.textContent = text; |
| 58 } | 59 } |
| 59 }; | 60 }; |
| OLD | NEW |