Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/DatabaseTableView.js

Issue 2894083002: [DevTools] Set row background instead of the table (Closed)
Patch Set: Fixed a comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 this.database.executeSql( 70 this.database.executeSql(
71 'SELECT rowid, * FROM "' + this._escapeTableName(this.tableName) + '"', this._queryFinished.bind(this), 71 'SELECT rowid, * FROM "' + this._escapeTableName(this.tableName) + '"', this._queryFinished.bind(this),
72 this._queryError.bind(this)); 72 this._queryError.bind(this));
73 } 73 }
74 74
75 _queryFinished(columnNames, values) { 75 _queryFinished(columnNames, values) {
76 this.detachChildWidgets(); 76 this.detachChildWidgets();
77 this.element.removeChildren(); 77 this.element.removeChildren();
78 78
79 this._dataGrid = DataGrid.SortableDataGrid.create(columnNames, values); 79 this._dataGrid = DataGrid.SortableDataGrid.create(columnNames, values);
80 this._dataGrid.setStriped(true);
80 this._visibleColumnsInput.setVisible(!!this._dataGrid); 81 this._visibleColumnsInput.setVisible(!!this._dataGrid);
81 if (!this._dataGrid) { 82 if (!this._dataGrid) {
82 this._emptyWidget = new UI.EmptyWidget(Common.UIString('The ā€œ%sā€\ntable is empty.', this.tableName)); 83 this._emptyWidget = new UI.EmptyWidget(Common.UIString('The ā€œ%sā€\ntable is empty.', this.tableName));
83 this._emptyWidget.show(this.element); 84 this._emptyWidget.show(this.element);
84 return; 85 return;
85 } 86 }
86 this._dataGrid.asWidget().show(this.element); 87 this._dataGrid.asWidget().show(this.element);
87 this._dataGrid.autoSizeColumns(5); 88 this._dataGrid.autoSizeColumns(5);
88 89
89 this._columnsMap = new Map(); 90 this._columnsMap = new Map();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 this.element.appendChild(errorMsgElement); 135 this.element.appendChild(errorMsgElement);
135 } 136 }
136 137
137 /** 138 /**
138 * @param {!Common.Event} event 139 * @param {!Common.Event} event
139 */ 140 */
140 _refreshButtonClicked(event) { 141 _refreshButtonClicked(event) {
141 this.update(); 142 this.update();
142 } 143 }
143 }; 144 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698