blob: 181f4cfabb3e0afd9fb3aebc94b3655d6957089c [file] [log] [blame]
<!--********************************************************************************
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************-->
<style>
:host /deep/ .dropdown {
width: 200px;
}
:host /deep/ .dropdown-toggle {
overflow: hidden;
padding-right: 24px/* Optional for caret */
;
text-align: left;
text-overflow: ellipsis;
width: 100%;
}
/* Optional for caret */
:host /deep/ .dropdown-toggle .caret {
position: absolute;
right: 12px;
top: calc(50% - 2px);
}
</style>
<div class="btn-group" dropdown>
<button id="view" title="{{TtlSelectView}}" type="button" class="btn btn-default dropdown-toggle" dropdownToggle aria-haspopup="true" aria-expanded="false">
{{selectedView?.name}} <span class="caret"></span>
</button>
<ul class="dropdown-menu scrollable-menu" style="height: auto; max-height: 200px; overflow-x: hidden;" *dropdownMenu>
<div *ngFor="let groupedView of groupedViews" class="container-fluid">
<li class="dropdown-header" style="padding-left: 0pt;"> {{groupedView.label}} </li>
<li *ngFor="let view of groupedView.view">
<a class="dropdown-item" style="color:black; cursor: pointer;" (click)="selectView(view)">{{view.name}}</a>
</li>
</div>
</ul>
</div>
<button type="button" class="btn btn-default" (click)="newView($event)" title="{{TtlNewView}}"><span class="glyphicon glyphicon-plus"></span></button>
<button type="button" class="btn btn-default" (click)="editSelectedView($event)" title="{{TtlEditView}}"><span class="glyphicon glyphicon-edit"></span></button>
<button type="button" class="btn btn-default" (click)="showSaveModal($event)" title="{{TtlSaveView}}"><span class="fa fa-floppy-o"></span></button>
<button type="button" class="btn btn-default" (click)="deleteView($event)" title="{{TtlDeleteView}}"><span class="glyphicon glyphicon-remove"></span></button>
<edit-view></edit-view>
<overwrite-dialog></overwrite-dialog>
<div bsModal #lgSaveModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="SelectSearchComponents" aria-hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" (click)="childSaveModal.hide()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">{{LblSaveViewAs}}:</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row" *ngIf="userViewNames?.length > 0">
<p-dataTable
[value]="userViewNames"
resizableColumns="false"
[reorderableColumns]="false"
[rows]="10"
[paginator]="true"
[pageLinks]="3"
[rowsPerPageOptions]="[10,20,50]"
[(selection)]="selectedRow"
(onRowClick)="onRowSelect($event)"
(onRowSelect)="onRowSelect($event)">
<p-column [style]="{'width':'30px'}" selectionMode="single"></p-column>
<p-column header="{{LblExistingUserNames}}">
<template pTemplate="body" let-col let-row="rowData" >
{{row}}
</template>
</p-column>
</p-dataTable>
</div>
<div class="row" style="margin-top: 15px;">
<div class="col-md-10" style="padding-left: 0;">
<input type="text" class="form-control" placeholder="Ansicht-Name" [value]="viewName" (input)="viewName = $event.target.value" (keyup.enter)="saveView($event)" required>
</div>
<div class="col-md-2" style="padding: 0;">
<button type="button" class="btn btn-default pull-right" (click)="saveView($event)" [disabled]="!viewName" title="{{getSaveBtnTitle()}}">
<span class="fa fa-floppy-o"></span> {{LblSave}}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>