mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-05 02:43:27 -05:00
Minimise memory requirements for rendered cells and rows in SlickGrid. Fixes #2035
- The CSS class 'slick-row' has been renamed to 'sr' - The CSS class 'slick-cell' has been renamed to 'sc' - The SQL Editor included an unused 'normal_row' class on each row which has been removed as it was unreferenced in the code or CSS. The intent of these changes is to minimise memory usage by the grid, by saving a few bytes per row/cell. It's questionable how much difference this actually makes given that SlickGrid updates the document so it only includes the visible rows on the fly, but every little helps.
This commit is contained in:
@@ -279,7 +279,7 @@ li {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.slick-cell.cell-move-handle {
|
||||
.sc.cell-move-handle {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
border-right: solid gray;
|
||||
@@ -291,15 +291,15 @@ li {
|
||||
background: #b6b9bd;
|
||||
}
|
||||
|
||||
.slick-row.selected .cell-move-handle {
|
||||
.sr.selected .cell-move-handle {
|
||||
background: #D5DC8D;
|
||||
}
|
||||
|
||||
.slick-row .cell-actions {
|
||||
.sr .cell-actions {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.slick-row.complete {
|
||||
.sr.complete {
|
||||
background-color: #DFD;
|
||||
color: #555;
|
||||
}
|
||||
@@ -332,11 +332,11 @@ li {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.slick-row.selected .cell-selection {
|
||||
.sr.selected .cell-selection {
|
||||
background-color: transparent; /* show default selected row background */
|
||||
}
|
||||
|
||||
.slick-cell-checkboxsel {
|
||||
.sc-cb {
|
||||
background: #f0f0f0;
|
||||
border-right-color: silver;
|
||||
border-right-style: solid;
|
||||
@@ -395,7 +395,7 @@ input.editor-checkbox {
|
||||
}
|
||||
|
||||
/* Override selected row color */
|
||||
.slick-cell.selected {
|
||||
.sc.selected {
|
||||
background-color: #eeeeee !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -614,7 +614,7 @@ define(
|
||||
checkboxSelector;
|
||||
|
||||
checkboxSelector = new Slick.CheckboxSelectColumn({
|
||||
cssClass: "slick-cell-checkboxsel"
|
||||
cssClass: "sc-cb"
|
||||
});
|
||||
|
||||
grid_columns.push(checkboxSelector.getColumnDefinition());
|
||||
@@ -673,7 +673,7 @@ define(
|
||||
// Add-on function which allow us to identify the faulty row after insert/update
|
||||
// and apply css accordingly
|
||||
collection.getItemMetadata = function(i) {
|
||||
var res = {}, cssClass = 'normal_row';
|
||||
var res = {}, cssClass = '';
|
||||
if (_.has(self.handler, 'data_store')) {
|
||||
if (i in self.handler.data_store.added_index) {
|
||||
cssClass = 'new_row';
|
||||
|
||||
Reference in New Issue
Block a user