4 This sits above the grid and contains the column picker, etc.
7 <div class="eg-grid-row eg-grid-action-row">
9 <div class="eg-grid-primary-label">{{mainLabel}}</div>
11 <div class="btn-group" style="margin-top: 4px"
12 is-open="gridMenuIsOpen" ng-if="menuLabel && showMenu" uib-dropdown>
13 <button type="button" class="btn btn-default eg-grid-menu-item" uib-dropdown-toggle>
14 {{menuLabel}}<span class="caret"></span>
16 <ul class="scrollable-menu" uib-dropdown-menu>
17 <li ng-repeat="item in menuItems | filter : { standalone : 'false' }" ng-if="!item.checkbox && !item.hidden()" ng-class="{divider: item.divider}">
18 <a ng-if="!item.divider" href a-disabled="item.disabled()"
19 ng-click="item.handler()">{{item.label}}</a>
22 <button ng-if="!item.checkbox && !item.hidden()"
23 class="btn btn-default eg-grid-menu-item"
24 ng-disabled="item.disabled()"
25 ng-repeat="item in menuItems | filter : { standalone : 'true' }"
26 ng-click="item.handler()">{{item.label}}</button>
29 <!-- if no menu label is present, present menu-items as a
30 horizontal row of buttons -->
31 <div class="btn-group" ng-if="!menuLabel && showMenu">
32 <button ng-if="!item.checkbox && !item.hidden()"
33 class="btn btn-default eg-grid-menu-item"
34 ng-repeat="item in menuItems"
35 ng-disabled="item.disabled()"
36 ng-click="item.handler(item, item.handlerData)">
41 <!-- Always show checkbox items as a
42 horizontal row of buttons -->
43 <div class="btn-group" ng-if="showMenu">
44 <div ng-if="item.checkbox"
45 class="btn btn-default eg-grid-menu-item"
46 ng-repeat="item in menuItems">
47 <label for="{{item.checkbox}}">{{item.label}}</label>
48 <input style="padding-left: 5px"
50 id="{{item.checkbox}}"
51 ng-disabled="item.disabled()"
52 ng-model="item.checked"
53 ng-checked="item.checked"
54 ng-change="item.handler(item)"/>
58 <!-- putting a flex div here forces the remaining content to float right -->
59 <div class="flex-cell"></div>
61 <!-- column picker, pager, etc. -->
62 <div class="btn-group column-picker" ng-show="showPagination || showActions || showPicker">
65 <button type="button" class="btn btn-default"
66 ng-show="showPagination"
67 ng-class="{disabled : onFirstPage()}"
68 ng-click="offset(0);collect()"
69 title="[% l('Start') %]">
70 <span class="glyphicon glyphicon-fast-backward"></span>
73 <!-- previous page -->
74 <button type="button" class="btn btn-default"
75 ng-show="showPagination"
76 ng-class="{disabled : onFirstPage()}"
77 ng-click="decrementPage()"
78 title="[% l('Previous Page') %]">
79 <span class="glyphicon glyphicon-backward"></span>
83 <!-- todo: paging needs a total count value to be fully functional -->
84 <button type="button" class="btn btn-default"
85 ng-show="showPagination"
86 ng-class="{disabled : !hasNextPage()}"
87 ng-disabled="!hasNextPage()"
88 ng-click="incrementPage()"
89 title="[% l('Next Page') %]">
90 <span class="glyphicon glyphicon-forward"></span>
93 <!-- actions drop-down menu -->
94 <div class="btn-group" ng-show="showActions" ng-if="actionGroups.length > 1 || actionGroups[0].actions.length" uib-dropdown>
95 <button type="button" class="btn btn-default" uib-dropdown-toggle
96 ng-disabled="!hasSelected()">
97 [% l('Actions') %] <span class="caret"></span>
99 <ul class="pull-right grid-action-dropdown scrollable-menu" uib-dropdown-menu>
100 <li ng-repeat-start="group in actionGroups">
101 <span style="padding-left: 1em;" ng-if="group.label"><strong><u>{{group.label}}</u></strong></span>
103 <li ng-repeat="action in group.actions" ng-class="{divider: action.divider, disabled: actionDisable(action)}" ng-hide="actionHide(action)">
104 <a ng-if="!action.divider" href
105 ng-click="!actionDisable(action) && actionLauncher(action)">{{action.label}}</a>
107 <span ng-repeat-end/>
111 <div class="btn-group" uib-dropdown is-open="gridRowCountIsOpen" ng-show="showPagination">
112 <button type="button" title="[% l('Select Row Count') %]"
113 class="btn btn-default" uib-dropdown-toggle>
114 [% l('Rows [_1]', '{{limit()}}') %]
115 <span class="caret"></span>
117 <ul uib-dropdown-menu>
118 <li ng-repeat="t in [5,10,25,50,100]">
119 <a href ng-click='offset(0);limit(t);collect()'>
123 <li ng-if="allowAll" >
124 <a href ng-click='offset(0);limit(10000);collect()'>[% l('All') %]</a>
129 <div class="btn-group" uib-dropdown is-open="gridPageSelectIsOpen" ng-show="showPagination">
130 <button type="button" title="[% l('Select Page') %]"
131 class="btn btn-default" uib-dropdown-toggle>
132 [% l('Page [_1]', '{{page()}}') %]
133 <span class="caret"></span>
135 <ul uib-dropdown-menu>
137 <div class="input-group">
138 <input type="text" class="form-control"
139 ng-model="pageFromUI"
140 ng-click="$event.stopPropagation()"/>
141 <span class="input-group-btn">
142 <button class="btn btn-default" type="button"
143 ng-click="goToPage(pageFromUI);pageFromUI='';">
149 <li role="presentation" class="divider"></li>
150 <li ng-repeat="t in [1,2,3,4,5,10,25,50,100]">
151 <a href ng-click='goToPage(t);gridPageSelectIsOpen=false;'>{{t}}</a>
156 <div class="btn-group" uib-dropdown is-open="gridColumnPickerIsOpen" ng-show="showPicker">
157 <button type="button"
158 class="btn btn-default" uib-dropdown-toggle>
159 <span class="caret"></span>
161 <ul class="pull-right eg-grid-column-picker" uib-dropdown-menu>
162 <li><a href ng-click="toggleConfDisplay()">
163 <span class="glyphicon glyphicon-wrench"></span>
164 [% l('Configure Columns') %]
166 <li><a href ng-click="saveConfig()">
167 <span class="glyphicon glyphicon-floppy-save"></span>
168 [% l('Save Columns') %]
171 <li><a href ng-click="showAllColumns()">
172 <span class="glyphicon glyphicon-resize-full"></span>
173 [% l('Show All Columns') %]
175 <li><a href ng-click="hideAllColumns()">
176 <span class="glyphicon glyphicon-resize-small"></span>
177 [% l('Hide All Columns') %]
180 <li><a href ng-click="resetColumns()">
181 <span class="glyphicon glyphicon-refresh"></span>
182 [% l('Reset Columns') %]
184 <li><a ng-click="generateCSVExportURL($event)"
185 download="{{csvExportFileName}}.csv" ng-href="{{csvExportURL}}">
186 <span class="glyphicon glyphicon-download"></span>
187 [% l('Download Full CSV') %]
189 <li><a href ng-click="printHTML()">
190 <span class="glyphicon glyphicon-print"></span>
191 [% l('Print Full Grid') %]
193 <li role="presentation" class="divider"></li>
194 <li ng-repeat="col in columns">
195 <a href title="{{col.idlclass}}" ng-click="toggleColumnVisibility(col)">
196 <span ng-if="col.visible"
197 class="label label-success">✓</span>
198 <span ng-if="!col.visible"
199 class="label label-warning">✗</span>
200 <span>{{col.label}}</span>
209 <div class="eg-grid" ng-class="{'eg-grid-as-conf' : showGridConf}">
211 <!-- import our eg-grid-field defs -->
212 <div ng-transclude></div>
214 <div class="eg-grid-row eg-grid-header-row">
215 <div class="eg-grid-cell eg-grid-cell-stock" ng-show="showIndex">
216 <div title="[% l('Row Number Column') %]">[% l('#') %]</div>
218 <div class="eg-grid-cell eg-grid-cell-stock" ng-show="canMultiSelect">
220 <input title="[% l('Row Selector Column') %]"
221 focus-me="gridControls.focusRowSelector"
222 type='checkbox' ng-model="selectAll"/>
225 <div class="eg-grid-cell"
226 eg-grid-column-drag-dest
227 ng-class="{'eg-grid-column-last-mod' : isLastModifiedColumn(col)}"
228 column="{{col.name}}"
229 eg-right-click="onContextMenu($event)"
230 ng-repeat="col in columns"
231 style="flex:{{col.flex}}"
232 ng-show="col.visible">
234 <div style="display:flex">
235 <div style="flex:1" class="eg-grid-column-move-handle">
236 <div ng-if="col.sortable">
237 <a column="{{col.name}}" href
238 eg-grid-column-drag-source
239 ng-click="quickSort(col.name)">{{col.label}}</a>
241 <div ng-if="!col.sortable">
242 <div column="{{col.name}}" eg-grid-column-drag-source>{{col.label}}</div>
245 <div eg-grid-column-drag-source
246 drag-type="resize" column="{{col.name}}"
247 class="eg-grid-column-resize-handle"> </div>
252 <!-- Inline grid configuration row -->
253 <div class="eg-grid-row eg-grid-conf-row" ng-show="showGridConf">
254 <div class="eg-grid-cell eg-grid-cell-conf-header">
255 <div class="eg-grid-conf-cell-entry">[% l('Expand') %]</div>
256 <div class="eg-grid-conf-cell-entry">[% l('Shrink') %]</div>
257 <div class="eg-grid-conf-cell-entry">[% l('Left') %]</div>
258 <div class="eg-grid-conf-cell-entry">[% l('Right') %]</div>
259 <div class="eg-grid-conf-cell-entry">[% l('Far Left') %]</div>
260 <div class="eg-grid-conf-cell-entry">[% l('Far Right') %]</div>
261 <div class="eg-grid-conf-cell-entry" ng-if="!disableMultiSort">[% l('Sort') %]</div>
263 <div class="eg-grid-cell"
264 ng-repeat="col in columns"
265 style="flex:{{col.flex}}"
266 ng-show="col.visible">
267 <div class="eg-grid-conf-cell-entry">
268 <a href="" title="[% l('Make column wider') %]"
269 ng-click="modifyColumnFlex(col,1)">
270 <span class="glyphicon glyphicon-resize-full"></span>
273 <div class="eg-grid-conf-cell-entry">
274 <a href="" title="[% l('Make column narrower') %]"
275 ng-click="modifyColumnFlex(col,-1)">
276 <span class="glyphicon glyphicon-resize-small"></span>
279 <div class="eg-grid-conf-cell-entry">
280 <a href="" title="[% l('Move column left') %]"
281 ng-click="modifyColumnPos(col, -1)">
282 <span class="glyphicon glyphicon-backward"></span>
285 <div class="eg-grid-conf-cell-entry">
286 <a href="" title="[% l('Move column right') %]"
287 ng-click="modifyColumnPos(col, 1)">
288 <span class="glyphicon glyphicon-forward"></span>
291 <div class="eg-grid-conf-cell-entry">
292 <a href="" title="[% l('Move column far left') %]"
293 ng-click="modifyColumnPos(col, -10000)">
294 <span class="glyphicon glyphicon-fast-backward"></span>
297 <div class="eg-grid-conf-cell-entry">
298 <a href="" title="[% l('Move column far right') %]"
299 ng-click="modifyColumnPos(col, 10000)">
300 <span class="glyphicon glyphicon-fast-forward"></span>
303 <div class="eg-grid-conf-cell-entry" ng-if="!disableMultiSort">
304 <div ng-if="col.multisortable">
305 <input type='number' ng-model="col.sort"
306 title="[% l('Sort Priority / Direction') %]" style='width:2.3em'/>
312 <div class="eg-grid-content-body">
313 <div ng-show="items.length == 0"
314 class="alert alert-info">[% l('No Items To Display') %]</div>
316 <div class="eg-grid-row"
317 id="eg-grid-row-{{$index + 1}}"
318 ng-repeat="item in items"
319 ng-show="items.length > 0"
320 ng-class="{'eg-grid-row-selected' : selected[indexValue(item)]}">
321 <div class="eg-grid-cell eg-grid-cell-stock" ng-show="showIndex"
322 ng-click="handleRowClick($event, item)" title="[% l('Row Index') %]">
323 <a href ng-show="gridControls.activateItem"
324 ng-click="gridControls.activateItem(item)" style="font-weight:bold">
325 {{$index + offset() + 1}}
327 <div ng-hide="gridControls.activateItem">{{$index + offset() + 1}}</div>
329 <div class="eg-grid-cell eg-grid-cell-stock" ng-show="canMultiSelect">
330 <!-- ng-click=handleRowClick here has unintended
331 consequences and is unnecessary, avoid it -->
333 <input type='checkbox' title="[% l('Select Row') %]"
334 ng-change="updateSelected()"
335 ng-model="selected[indexValue(item)]"/>
338 <div class="eg-grid-cell eg-grid-cell-content"
339 ng-click="handleRowClick($event, item)"
340 ng-dblclick="gridControls.activateItem(item)"
341 ng-repeat="col in columns"
342 style="text-align:{{col.align}}; flex:{{col.flex}}"
343 ng-show="col.visible">
345 <!-- if the cell comes with its own template,
346 translate that content into HTML and insert it here -->
347 <span ng-if="col.template" style="padding-left:5px; padding-right:10px;"
348 id="{{cellId(col, item)}}"
349 ng-init="html_value=translateCellTemplate(col, item)">
350 <span tooltip-class="eg-grid-tooltip"
351 uib-tooltip-html="cellOverflowed(cellId(col, item), 1) ? html_value : ''">
352 <span ng-bind-html="html_value"></span>
356 <!-- otherwise, simply display the item value, which may
357 pass through datatype-specific filtering. -->
358 <span ng-if="!col.template"
359 id="{{cellId(col, item)}}"
360 ng-init="text_value = (itemFieldValue(item, col) | egGridValueFilter:col:item)"
361 uib-tooltip="{{cellOverflowed(cellId(col, item), 1) ? text_value : ''}}"
362 tooltip-class="eg-grid-tooltip"
363 style="padding-left:5px; padding-right:10px;">