OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 * @this {UI.Toolbar} | 348 * @this {UI.Toolbar} |
349 */ | 349 */ |
350 function appendItemsInOrder(items) { | 350 function appendItemsInOrder(items) { |
351 for (var i = 0; i < items.length; ++i) { | 351 for (var i = 0; i < items.length; ++i) { |
352 var item = items[i]; | 352 var item = items[i]; |
353 if (item) | 353 if (item) |
354 this.appendToolbarItem(item); | 354 this.appendToolbarItem(item); |
355 } | 355 } |
356 } | 356 } |
357 } | 357 } |
358 | |
359 /** | |
360 * @param {boolean} visible | |
361 */ | |
362 setVisible(visible) { | |
dgozman
2017/01/24 17:32:14
Don't introduce a method for this, since toolbar d
eostroukhov
2017/01/24 17:40:28
Done.
| |
363 this.element.classList.toggle('hidden', !visible); | |
364 } | |
358 }; | 365 }; |
359 | 366 |
360 /** | 367 /** |
361 * @unrestricted | 368 * @unrestricted |
362 */ | 369 */ |
363 UI.ToolbarItem = class extends Common.Object { | 370 UI.ToolbarItem = class extends Common.Object { |
364 /** | 371 /** |
365 * @param {!Element} element | 372 * @param {!Element} element |
366 */ | 373 */ |
367 constructor(element) { | 374 constructor(element) { |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
930 | 937 |
931 /** | 938 /** |
932 * @override | 939 * @override |
933 * @param {boolean} enabled | 940 * @param {boolean} enabled |
934 */ | 941 */ |
935 _applyEnabledState(enabled) { | 942 _applyEnabledState(enabled) { |
936 super._applyEnabledState(enabled); | 943 super._applyEnabledState(enabled); |
937 this.inputElement.disabled = !enabled; | 944 this.inputElement.disabled = !enabled; |
938 } | 945 } |
939 }; | 946 }; |
OLD | NEW |