| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 super(Common.UIString('Database')); | 31 super(Common.UIString('Database')); |
| 32 | 32 |
| 33 this.database = database; | 33 this.database = database; |
| 34 this.tableName = tableName; | 34 this.tableName = tableName; |
| 35 | 35 |
| 36 this.element.classList.add('storage-view', 'table'); | 36 this.element.classList.add('storage-view', 'table'); |
| 37 | 37 |
| 38 this._visibleColumnsSetting = Common.settings.createSetting('databaseTableVi
ewVisibleColumns', {}); | 38 this._visibleColumnsSetting = Common.settings.createSetting('databaseTableVi
ewVisibleColumns', {}); |
| 39 | 39 |
| 40 this.refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'large
icon-refresh'); | 40 this.refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'large
icon-refresh'); |
| 41 this.refreshButton.addEventListener('click', this._refreshButtonClicked, thi
s); | 41 this.refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this._ref
reshButtonClicked, this); |
| 42 this._visibleColumnsInput = new UI.ToolbarInput(Common.UIString('Visible col
umns'), 1); | 42 this._visibleColumnsInput = new UI.ToolbarInput(Common.UIString('Visible col
umns'), 1); |
| 43 this._visibleColumnsInput.addEventListener(UI.ToolbarInput.Event.TextChanged
, this._onVisibleColumnsChanged, this); | 43 this._visibleColumnsInput.addEventListener(UI.ToolbarInput.Event.TextChanged
, this._onVisibleColumnsChanged, this); |
| 44 } | 44 } |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * @override | 47 * @override |
| 48 */ | 48 */ |
| 49 wasShown() { | 49 wasShown() { |
| 50 this.update(); | 50 this.update(); |
| 51 } | 51 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 _queryError(error) { | 127 _queryError(error) { |
| 128 this.detachChildWidgets(); | 128 this.detachChildWidgets(); |
| 129 this.element.removeChildren(); | 129 this.element.removeChildren(); |
| 130 | 130 |
| 131 var errorMsgElement = createElement('div'); | 131 var errorMsgElement = createElement('div'); |
| 132 errorMsgElement.className = 'storage-table-error'; | 132 errorMsgElement.className = 'storage-table-error'; |
| 133 errorMsgElement.textContent = Common.UIString('An error occurred trying to\n
read the ā%sā table.', this.tableName); | 133 errorMsgElement.textContent = Common.UIString('An error occurred trying to\n
read the ā%sā table.', this.tableName); |
| 134 this.element.appendChild(errorMsgElement); | 134 this.element.appendChild(errorMsgElement); |
| 135 } | 135 } |
| 136 | 136 |
| 137 /** |
| 138 * @param {!Common.Event} event |
| 139 */ |
| 137 _refreshButtonClicked(event) { | 140 _refreshButtonClicked(event) { |
| 138 this.update(); | 141 this.update(); |
| 139 } | 142 } |
| 140 }; | 143 }; |
| OLD | NEW |