<!-- buttons -->
<div class="btn-grp" *ngIf="gridContext.toolbarButtons.length">
- <button *ngFor="let btn of gridContext.toolbarButtons"
+ <button *ngFor="let btn of gridContext.toolbarButtons"
[disabled]="btn.disabled"
class="btn btn-outline-dark mr-1" (click)="performButtonAction(btn)">
{{btn.label}}
</div>
<!-- checkboxes -->
- <div class="form-check form-check-inline"
+ <div class="form-check form-check-inline"
*ngIf="gridContext.toolbarCheckboxes.length">
<ng-container *ngFor="let cb of gridContext.toolbarCheckboxes">
<label class="form-check-label">
- <input class="form-check-input" type="checkbox"
- (click)="cb.onChange($event.target.checked)"/>
+ <input class="form-check-input" type="checkbox"
+ (click)="cb.onChange.emit($event.target.checked)"/>
{{cb.label}}
</label>
</ng-container>
<div ngbDropdown class="mr-1" placement="bottom-right">
<button ngbDropdownToggle [disabled]="!gridContext.toolbarActions.length"
class="btn btn-outline-dark no-dropdown-caret">
- <span title="Actions For Selected Rows" i18n-title
+ <span title="Actions For Selected Rows" i18n-title
class="material-icons mat-icon-in-button">playlist_add_check</span>
</button>
<div class="dropdown-menu" ngbDropdownMenu>
</div>
</div>
- <button [disabled]="gridContext.pager.isFirstPage()" type="button"
+ <button [disabled]="gridContext.pager.isFirstPage()" type="button"
class="btn btn-outline-dark mr-1" (click)="gridContext.pager.toFirst()">
- <span title="First Page" i18n-title
+ <span title="First Page" i18n-title
class="material-icons mat-icon-in-button">first_page</span>
</button>
- <button [disabled]="gridContext.pager.isFirstPage()" type="button"
+ <button [disabled]="gridContext.pager.isFirstPage()" type="button"
class="btn btn-outline-dark mr-1" (click)="gridContext.pager.decrement()">
- <span title="Previous Page" i18n-title
+ <span title="Previous Page" i18n-title
class="material-icons mat-icon-in-button">keyboard_arrow_left</span>
</button>
- <button [disabled]="gridContext.pager.isLastPage()" type="button"
+ <button [disabled]="gridContext.pager.isLastPage()" type="button"
class="btn btn-outline-dark mr-1" (click)="gridContext.pager.increment()">
- <span title="Next Page" i18n-title
+ <span title="Next Page" i18n-title
class="material-icons mat-icon-in-button">keyboard_arrow_right</span>
</button>
<!--
Hiding jump-to-last since there's no analog in the angularjs grid and
it has limited value since the size of the data set is often unknown.
- <button [disabled]="!gridContext.pager.resultCount || gridContext.pager.isLastPage()"
+ <button [disabled]="!gridContext.pager.resultCount || gridContext.pager.isLastPage()"
type="button" class="btn btn-outline-dark mr-1" (click)="gridContext.pager.toLast()">
- <span title="First Page" i18n-title
+ <span title="First Page" i18n-title
class="material-icons mat-icon-in-button">last_page</span>
</button>
-->
</span>
</button>
<div class="dropdown-menu" ngbDropdownMenu>
- <a class="dropdown-item"
+ <a class="dropdown-item"
*ngFor="let count of [5, 10, 25, 50, 100]"
(click)="gridContext.pager.setLimit(count)">
<span class="ml-2">{{count}}</span>
</div>
</div>
- <button type="button"
- class="btn btn-outline-dark mr-1"
+ <button type="button"
+ class="btn btn-outline-dark mr-1"
(click)="gridContext.overflowCells=!gridContext.overflowCells">
<span *ngIf="!gridContext.overflowCells"
- title="Expand Cells Vertically" i18n-title
+ title="Expand Cells Vertically" i18n-title
class="material-icons mat-icon-in-button">expand_more</span>
<span *ngIf="gridContext.overflowCells"
- title="Collaps Cells Vertically" i18n-title
+ title="Collaps Cells Vertically" i18n-title
class="material-icons mat-icon-in-button">expand_less</span>
</button>
</eg-grid-column-config>
<div ngbDropdown placement="bottom-right">
<button ngbDropdownToggle class="btn btn-outline-dark no-dropdown-caret">
- <span title="Show Grid Options" i18n-title
+ <span title="Show Grid Options" i18n-title
class="material-icons mat-icon-in-button">settings</span>
</button>
<div class="dropdown-menu" ngbDropdownMenu>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="columnConfDialog.open({size:'lg'})">
<span class="material-icons">build</span>
<span class="ml-2" i18n>Manage Columns</span>
</a>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="colWidthConfig.isVisible = !colWidthConfig.isVisible">
<span class="material-icons">compare_arrows</span>
<span class="ml-2" i18n>Manage Column Widths</span>
</a>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="saveGridConfig()">
<span class="material-icons">save</span>
<span class="ml-2" i18n>Save Grid Settings</span>
</a>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="gridContext.columnSet.reset()">
<span class="material-icons">restore</span>
<span class="ml-2" i18n>Reset Columns</span>
</a>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="generateCsvExportUrl($event)"
[download]="csvExportFileName"
[href]="csvExportUrl">
<div class="dropdown-divider"></div>
- <a class="dropdown-item label-with-material-icon"
+ <a class="dropdown-item label-with-material-icon"
(click)="col.visible=!col.visible" *ngFor="let col of gridContext.columnSet.columns">
<span *ngIf="col.visible" class="badge badge-success">✓</span>
<span *ngIf="!col.visible" class="badge badge-warning">✗</span>
<ng-container *ngIf="queueSummary && queueSummary.queue">
- <eg-confirm-dialog
+ <eg-confirm-dialog
#confirmDelDlg
i18n-dialogTitle i18n-dialogBody
dialogTitle="Confirm Delete"
<li class="list-group-item">
<div class="d-flex">
<div class="flex-1">
- <a [routerLink]="" (click)="importSelected()"
+ <a [routerLink]="" (click)="importSelected()"
i18n>Import Selected Records</a>
</div>
<div class="flex-1">
</a>
</div>
<div class="flex-1">
- <a [routerLink]="" (click)="exportNonImported()"
+ <a [routerLink]="" (click)="exportNonImported()"
i18n>Export Non-Imported Records</a>
</div>
</div>
<a *ngIf="queueType=='auth'" href="/eg/staff/cat/catalog/authority/{{row.imported_as}}/marc_edit">
{{row.imported_as}}
</a>
-
+
</ng-template>
-<!--
+<!--
Most columns are generated programmatically from queued record attribute
definitions. Hide a number of stock record attributes by default
because there are a lot of them.
hideFields="language,pagination,price,rec_identifier,eg_tcn_source,eg_identifier,item_barcode,zsource">
<eg-grid-toolbar-checkbox i18n-label label="Records With Matches"
- [onChange]="limitToMatches"></eg-grid-toolbar-checkbox>
+ (onChange)="limitToMatches($event)"></eg-grid-toolbar-checkbox>
<eg-grid-toolbar-checkbox i18n-label label="Non-Imported Records"
- [onChange]="limitToNonImported"></eg-grid-toolbar-checkbox>
+ (onChange)="limitToNonImported($event)"></eg-grid-toolbar-checkbox>
<eg-grid-toolbar-checkbox i18n-label label="Records with Import Errors"
- [onChange]="limitToImportErrors"></eg-grid-toolbar-checkbox>
+ (onChange)="limitToImportErrors($event)"></eg-grid-toolbar-checkbox>
- <eg-grid-column name="id" [index]="true"
- [hidden]="true"></eg-grid-column>
- <eg-grid-column i18n-label label="Matches"
+ <eg-grid-column name="id" [index]="true" [hidden]="true"></eg-grid-column>
+ <eg-grid-column i18n-label label="Matches"
name="+matches" [cellTemplate]="matchesTmpl"></eg-grid-column>
- <eg-grid-column name="import_error" i18n-label
+ <eg-grid-column name="import_error" i18n-label
label="Import Errors" [cellTemplate]="errorsTmpl"></eg-grid-column>
- <eg-grid-column name="import_time" i18n-label
+ <eg-grid-column name="import_time" i18n-label
label="Import Date" datatype="timestamp"></eg-grid-column>
- <eg-grid-column name="imported_as" i18n-label
+ <eg-grid-column name="imported_as" i18n-label
label="Imported As" [cellTemplate]="importedAsTmpl"></eg-grid-column>
</eg-grid>
withErrors: false
};
- limitToMatches: (checked: boolean) => void;
- limitToNonImported: (checked: boolean) => void;
- limitToImportErrors: (checked: boolean) => void;
-
// keep a local copy for convenience
attrDefs: IdlObject[];
return this.loadQueueRecords(pager);
};
- this.limitToMatches = (checked: boolean) => {
- this.filters.matches = checked;
- this.queueGrid.reload();
- };
+ }
- this.limitToNonImported = (checked: boolean) => {
- this.filters.nonImported = checked;
- this.queueGrid.reload();
- };
+ ngOnInit() {
+ }
- this.limitToImportErrors = (checked: boolean) => {
- this.filters.withErrors = checked;
- this.queueGrid.reload();
- };
+ limitToMatches(checked: boolean) {
+ this.filters.matches = checked;
+ this.queueGrid.reload();
}
- ngOnInit() {
+ limitToNonImported(checked: boolean) {
+ this.filters.nonImported = checked;
+ this.queueGrid.reload();
+ }
+
+ limitToImportErrors(checked: boolean) {
+ this.filters.withErrors = checked;
+ this.queueGrid.reload();
}
queuePageOffset(): number {