Skip to content

Commit

Permalink
Merge pull request #232 from NREL/fix-options-page-grid
Browse files Browse the repository at this point in the history
#231: Fix grid on Options page
  • Loading branch information
tijcolem authored Oct 5, 2022
2 parents 551882e + 573e6da commit e815daf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 22 deletions.
4 changes: 3 additions & 1 deletion app/app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ select {
}

.ui-grid-category {
text-align: center;border-right: 0px;box-shadow: -1px 1px #d4d4d4
text-align: center;
border-right: 0px;
box-shadow: -1px 0px #d4d4d4
}

/* this allows no trim of whitespace at front or end of strings in editable grid cells */
Expand Down
52 changes: 31 additions & 21 deletions app/app/outputs/headerTemplate.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
<div role="rowgroup"
class="ui-grid-header">
<div role="rowgroup" class="ui-grid-header">
<div class="ui-grid-top-panel">
<div class="ui-grid-header-viewport">
<div class="ui-grid-header-canvas">
<div class="ui-grid-header-cell-wrapper"
ng-style="colContainer.headerCellWrapperStyle()">
<div role="row"
class="ui-grid-header-cell-row">
<div class="ui-grid-header-cell ui-grid-clearfix ui-grid-category" ng-repeat="cat in grid.options.category"
ng-if="cat.visible &&
(colContainer.renderedColumns | filter:{ colDef:{category: cat.name} }).length > 0">
{{cat.name}}
<div class="ui-grid-header-cell ui-grid-clearfix"
ng-repeat="col in colContainer.renderedColumns | filter:{ colDef:{category: cat.name} }"
ui-grid-header-cell
col="col"
render-index="$index">
<div
class="ui-grid-header-cell-wrapper"
ng-style="colContainer.headerCellWrapperStyle()"
>
<div role="row" class="ui-grid-header-cell-row">
<div
ng-repeat="cat in grid.options.category"
ng-if="cat.visible &&
(colContainer.renderedColumns | filter:{ colDef:{category: cat.name} }).length > 0"
>
<div class="ui-grid-category">{{cat.name}}</div>
<div role="row" class="ui-grid-header-cell-row">
<div
role="columnheader"
class="ui-grid-header-cell"
ng-repeat="col in colContainer.renderedColumns | filter:{ colDef:{category: cat.name} }"
ui-grid-header-cell
col="col"
render-index="$index"
></div>
</div>
</div><!--!cat.visible && -->
<div class="ui-grid-header-cell ui-grid-clearfix" ng-if="col.colDef.category === undefined"
ng-repeat="col in colContainer.renderedColumns track by col.uid"
ui-grid-header-cell
col="col"
render-index="$index">
</div>
<!--!cat.visible && -->
<div
role="columnheader"
class="ui-grid-header-cell"
ng-if="col.colDef.category === undefined"
ng-repeat="col in colContainer.renderedColumns track by col.uid"
ui-grid-header-cell
col="col"
render-index="$index"
></div>
</div>
</div>
</div>
Expand Down

0 comments on commit e815daf

Please sign in to comment.