Skip to content

Commit

Permalink
Merge pull request #4060 from JLLeitschuh/templateFixup
Browse files Browse the repository at this point in the history
Makes AllTemplates Multiline
  • Loading branch information
c0bra committed Jul 28, 2015
2 parents 287d86d + a687105 commit d48fc96
Show file tree
Hide file tree
Showing 30 changed files with 267 additions and 111 deletions.
11 changes: 8 additions & 3 deletions src/features/edit/templates/cellEditor.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<div>
<form name="inputForm">
<input type="INPUT_TYPE" ng-class="'colt' + col.uid" ui-grid-editor ng-model="MODEL_COL_FIELD" />
</form>
<form
name="inputForm">
<input
type="INPUT_TYPE"
ng-class="'colt' + col.uid"
ui-grid-editor
ng-model="MODEL_COL_FIELD" />
</form>
</div>
10 changes: 8 additions & 2 deletions src/features/edit/templates/dropdownEditor.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<div>
<form name="inputForm">
<select ng-class="'colt' + col.uid" ui-grid-edit-dropdown ng-model="MODEL_COL_FIELD" ng-options="field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray"></select>
<form
name="inputForm">
<select
ng-class="'colt' + col.uid"
ui-grid-edit-dropdown
ng-model="MODEL_COL_FIELD"
ng-options="field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray">
</select>
</form>
</div>
11 changes: 9 additions & 2 deletions src/features/edit/templates/fileChooserEditor.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<div>
<form name="inputForm">
<input ng-class="'colt' + col.uid" ui-grid-edit-file-chooser type="file" id="files" name="files[]" ng-model="MODEL_COL_FIELD"/>
<form
name="inputForm">
<input
ng-class="'colt' + col.uid"
ui-grid-edit-file-chooser
type="file"
id="files"
name="files[]"
ng-model="MODEL_COL_FIELD"/>
</form>
</div>
11 changes: 7 additions & 4 deletions src/features/expandable/templates/expandableRow.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div ui-grid-expandable-row ng-if="expandableRow.shouldRenderExpand()" class="expandableRow"
style="float:left; margin-top: 1px; margin-bottom: 1px"
ng-style="{width: (grid.renderContainers.body.getCanvasWidth()) + 'px'
, height: grid.options.expandableRowHeight + 'px'}"></div>
<div
ui-grid-expandable-row
ng-if="expandableRow.shouldRenderExpand()"
class="expandableRow"
style="float:left; margin-top: 1px; margin-bottom: 1px"
ng-style="{width: (grid.renderContainers.body.getCanvasWidth()) + 'px', height: grid.options.expandableRowHeight + 'px'}">
</div>
16 changes: 10 additions & 6 deletions src/features/expandable/templates/expandableRowHeader.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell">
<div class="ui-grid-cell-contents">
<i ng-class="{ 'ui-grid-icon-plus-squared' : !row.isExpanded, 'ui-grid-icon-minus-squared' : row.isExpanded }"
ng-click="grid.api.expandable.toggleRowExpansion(row.entity)"></i>
</div>
</div>
<div
class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell">
<div
class="ui-grid-cell-contents">
<i
ng-class="{ 'ui-grid-icon-plus-squared' : !row.isExpanded, 'ui-grid-icon-minus-squared' : row.isExpanded }"
ng-click="grid.api.expandable.toggleRowExpansion(row.entity)">
</i>
</div>
</div>
18 changes: 9 additions & 9 deletions src/features/expandable/templates/expandableScrollFiller.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div ng-if="expandableRow.shouldRenderFiller()"
ng-class="{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}"
ng-style="{ width: (grid.getViewportWidth()) + 'px',
height: grid.options.expandableRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }"
>
<i class="ui-grid-icon-spin5 ui-grid-animate-spin" ng-style=
"{ 'margin-top': ( grid.options.expandableRowHeight/2 - 5) + 'px',
'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px' }">
</i></div>
<div
ng-if="expandableRow.shouldRenderFiller()"
ng-class="{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}"
ng-style="{ width: (grid.getViewportWidth()) + 'px', height: grid.options.expandableRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }">
<i
class="ui-grid-icon-spin5 ui-grid-animate-spin"
ng-style="{'margin-top': ( grid.options.expandableRowHeight/2 - 5) + 'px', 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px'}">
</i>
</div>
16 changes: 10 additions & 6 deletions src/features/expandable/templates/expandableTopRowHeader.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell">
<div class="ui-grid-cell-contents">
<i ng-class="{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }"
ng-click="grid.api.expandable.toggleAllRows()"></i>
</div>
</div>
<div
class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell">
<div
class="ui-grid-cell-contents">
<i
ng-class="{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }"
ng-click="grid.api.expandable.toggleAllRows()">
</i>
</div>
</div>
11 changes: 7 additions & 4 deletions src/features/exporter/templates/csvLink.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<span class="ui-grid-exporter-csv-link-span">
<a href="data:text/csv;charset=UTF-8,CSV_CONTENT" download="FILE_NAME">
LINK_LABEL
</a>
<span
class="ui-grid-exporter-csv-link-span">
<a
href="data:text/csv;charset=UTF-8,CSV_CONTENT"
download="FILE_NAME">
LINK_LABEL
</a>
</span>
11 changes: 10 additions & 1 deletion src/features/importer/templates/importerMenuItem.html
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
<li class="ui-grid-menu-item"><form><input class="ui-grid-importer-file-chooser" type="file" id="files" name="files[]" /></form></li>
<li
class="ui-grid-menu-item">
<form>
<input
class="ui-grid-importer-file-chooser"
type="file"
id="files"
name="files[]"/>
</form>
</li>
31 changes: 23 additions & 8 deletions src/features/pagination/templates/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
ui-grid-one-bind-aria-label="aria.pageToFirst"
ng-click="pageFirstPageClick()"
ng-disabled="cantPageBackward()">
<div class="first-triangle">
<div class="first-bar"></div>
<div
class="first-triangle">
<div
class="first-bar">
</div>
</div>
</button>
<button
Expand All @@ -43,7 +46,11 @@
<span
class="ui-grid-pager-max-pages-number"
ng-show="paginationApi.getTotalPages() > 0">
<abbr ui-grid-one-bind-title="paginationOf">/</abbr> {{ paginationApi.getTotalPages() }}
<abbr
ui-grid-one-bind-title="paginationOf">
/
</abbr>
{{ paginationApi.getTotalPages() }}
</span>
<button
type="button"
Expand Down Expand Up @@ -88,11 +95,19 @@
{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}
</span>
</div>
<div class="ui-grid-pager-count-container">
<div class="ui-grid-pager-count">
<span ng-show="grid.options.totalItems > 0">
{{showingLow}} <abbr ui-grid-one-bind-title="paginationThrough">-</abbr> {{showingHigh}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}
</span>
<div
class="ui-grid-pager-count-container">
<div
class="ui-grid-pager-count">
<span
ng-show="grid.options.totalItems > 0">
{{showingLow}}
<abbr
ui-grid-one-bind-title="paginationThrough">
-
</abbr>
{{showingHigh}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}
</span>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<span ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})</span>
<span
ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">
({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})
</span>
8 changes: 6 additions & 2 deletions src/features/selection/templates/selectionHeaderCell.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div>
<!-- <div class="ui-grid-vertical-bar">&nbsp;</div> -->
<div class="ui-grid-cell-contents" col-index="renderIndex">
<ui-grid-selection-select-all-buttons ng-if="grid.options.enableSelectAll"></ui-grid-selection-select-all-buttons>
<div
class="ui-grid-cell-contents"
col-index="renderIndex">
<ui-grid-selection-select-all-buttons
ng-if="grid.options.enableSelectAll">
</ui-grid-selection-select-all-buttons>
</div>
</div>
11 changes: 7 additions & 4 deletions src/features/selection/templates/selectionRowHeader.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<div class="ui-grid-disable-selection">
<div class="ui-grid-cell-contents">
<ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons>
<div
class="ui-grid-disable-selection">
<div
class="ui-grid-cell-contents">
<ui-grid-selection-row-header-buttons>
</ui-grid-selection-row-header-buttons>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{'ui-grid-row-selected': row.isSelected}" ng-click="selectButtonClick(row, $event)">
<div
class="ui-grid-selection-row-header-buttons ui-grid-icon-ok"
ng-class="{'ui-grid-row-selected': row.isSelected}"
ng-click="selectButtonClick(row, $event)">
&nbsp;
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{'ui-grid-all-selected': grid.selection.selectAll}" ng-click="headerButtonClick($event)">
</div>
<div
class="ui-grid-selection-row-header-buttons ui-grid-icon-ok"
ng-class="{'ui-grid-all-selected': grid.selection.selectAll}"
ng-click="headerButtonClick($event)">
</div>
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<div class="ui-grid-tree-base-row-header-buttons" ng-class="{'ui-grid-icon-minus-squared': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, 'ui-grid-icon-plus-squared': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}" ng-click="headerButtonClick($event)">
</div>
<div
class="ui-grid-tree-base-row-header-buttons"
ng-class="{'ui-grid-icon-minus-squared': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, 'ui-grid-icon-plus-squared': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}"
ng-click="headerButtonClick($event)">
</div>
7 changes: 5 additions & 2 deletions src/features/tree-base/templates/treeBaseHeaderCell.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<div>
<div class="ui-grid-cell-contents" col-index="renderIndex">
<ui-grid-tree-base-expand-all-buttons ></ui-grid-tree-base-expand-all-buttons>
<div
class="ui-grid-cell-contents"
col-index="renderIndex">
<ui-grid-tree-base-expand-all-buttons>
</ui-grid-tree-base-expand-all-buttons>
</div>
</div>
6 changes: 4 additions & 2 deletions src/features/tree-base/templates/treeBaseRowHeader.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="ui-grid-cell-contents">
<ui-grid-tree-base-row-header-buttons></ui-grid-tree-base-row-header-buttons>
<div
class="ui-grid-cell-contents">
<ui-grid-tree-base-row-header-buttons>
</ui-grid-tree-base-row-header-buttons>
</div>
12 changes: 9 additions & 3 deletions src/features/tree-base/templates/treeBaseRowHeaderButtons.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<div class="ui-grid-tree-base-row-header-buttons" ng-class="{'ui-grid-tree-base-header': row.treeLevel > -1 }" ng-click="treeButtonClick(row, $event)">
<i ng-class="{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}" ng-style="{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}"></i>
<div
class="ui-grid-tree-base-row-header-buttons"
ng-class="{'ui-grid-tree-base-header': row.treeLevel > -1 }"
ng-click="treeButtonClick(row, $event)">
<i
ng-class="{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}"
ng-style="{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}">
</i>
&nbsp;
</div>
</div>
6 changes: 4 additions & 2 deletions src/templates/ui-grid/ui-grid-filter.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
class="ui-grid-filter-container"
ng-repeat="colFilter in col.filters"
ng-class="{'ui-grid-filter-cancel-button-hidden' : colFilter.disableCancelFilterButton === true }">
<div ng-if="colFilter.type !== 'select'">
<div
ng-if="colFilter.type !== 'select'">
<input
type="text"
class="ui-grid-filter-input ui-grid-filter-input-{{$index}}"
Expand All @@ -25,7 +26,8 @@
</div>
</div>

<div ng-if="colFilter.type === 'select'">
<div
ng-if="colFilter.type === 'select'">
<select
class="ui-grid-filter-select ui-grid-filter-input-{{$index}}"
ng-model="colFilter.term"
Expand Down
26 changes: 20 additions & 6 deletions src/templates/ui-grid/ui-grid-footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
<div class="ui-grid-footer-panel ui-grid-footer-aggregates-row"> <!-- tfooter -->
<div class="ui-grid-footer ui-grid-footer-viewport">
<div class="ui-grid-footer-canvas">
<div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()">
<div role="row" class="ui-grid-footer-cell-row">
<div role="gridcell" ng-repeat="col in colContainer.renderedColumns track by col.uid" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div>
<div
class="ui-grid-footer-panel ui-grid-footer-aggregates-row"> <!-- tfooter -->
<div
class="ui-grid-footer ui-grid-footer-viewport">
<div
class="ui-grid-footer-canvas">
<div
class="ui-grid-footer-cell-wrapper"
ng-style="colContainer.headerCellWrapperStyle()">
<div
role="row"
class="ui-grid-footer-cell-row">
<div
ui-grid-footer-cell
role="gridcell"
ng-repeat="col in colContainer.renderedColumns track by col.uid"
col="col"
render-index="$index"
class="ui-grid-footer-cell ui-grid-clearfix">
</div>
</div>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/templates/ui-grid/ui-grid-grid-footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="ui-grid-footer-info ui-grid-grid-footer">
<span>{{'search.totalItems' | t}} {{grid.rows.length}}</span>
<span ng-if="grid.renderContainers.body.visibleRowCache.length !== grid.rows.length"
class="ngLabel">({{"search.showingItems" | t}} {{grid.renderContainers.body.visibleRowCache.length}})
</span>
<span>{{'search.totalItems' | t}} {{grid.rows.length}}</span>
<span
ng-if="grid.renderContainers.body.visibleRowCache.length !== grid.rows.length"
class="ngLabel">
({{"search.showingItems" | t}} {{grid.renderContainers.body.visibleRowCache.length}})
</span>
</div>
29 changes: 22 additions & 7 deletions src/templates/ui-grid/ui-grid-header.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
<div role="rowgroup" class="ui-grid-header"> <!-- theader -->
<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" ng-repeat="col in colContainer.renderedColumns track by col.uid" ui-grid-header-cell col="col" render-index="$index"></div>
<div
role="rowgroup"
class="ui-grid-header"> <!-- theader -->
<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"
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
13 changes: 7 additions & 6 deletions src/templates/ui-grid/ui-grid-row.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div
ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid"
ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'"
class="ui-grid-cell"
ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }"
role="{{col.isRowHeader ? 'rowheader' : 'gridcell'}}"
ui-grid-cell></div>
ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.uid"
ui-grid-one-bind-id-grid="rowRenderIndex + '-' + col.uid + '-cell'"
class="ui-grid-cell"
ng-class="{ 'ui-grid-row-header-cell': col.isRowHeader }"
role="{{col.isRowHeader ? 'rowheader' : 'gridcell'}}"
ui-grid-cell>
</div>
Loading

0 comments on commit d48fc96

Please sign in to comment.