Merge pull request #19 in ~VLE2FE/definma-ui from development to master

* commit '638868875b1c88965d4d6d92fc70cbfd70794d32':
  to the top button
  added condition checkbox in JSON download link dialog
This commit is contained in:
Veit Lukas (PEA4-Fe) 2020-08-11 17:09:16 +02:00
commit a56cc99b2e
7 changed files with 45 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<rb-full-header> <rb-full-header id="top">
<nav *rbMainNavItems> <nav *rbMainNavItems>
<a routerLink="/home" routerLinkActive="active" rbLoadingLink>Home</a> <a routerLink="/home" routerLinkActive="active" rbLoadingLink>Home</a>
<a routerLink="/samples" routerLinkActive="active" rbLoadingLink *ngIf="login.isLoggedIn">Samples</a> <a routerLink="/samples" routerLinkActive="active" rbLoadingLink *ngIf="login.isLoggedIn">Samples</a>
@ -45,6 +45,12 @@
</div> </div>
</rb-full-header> </rb-full-header>
<div class="container"> <div class="to-the-top-container">
<div class="container">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div>
<div class="to-the-top">
<rb-icon-button icon="up" mode="primary" iconOnly (click)="toTheTop()"></rb-icon-button>
</div>
</div> </div>

View File

@ -13,3 +13,21 @@
.bug-textarea { .bug-textarea {
width: 800px; width: 800px;
} }
.to-the-top-container {
position: relative;
}
.to-the-top {
position: absolute;
top: 100vh;
bottom: 10px;
right: 1rem;
pointer-events: none;
rb-icon-button {
position: sticky;
pointer-events: all;
top: calc(100vh - 3rem);
}
}

View File

@ -59,6 +59,10 @@ URL: ${window.location}%0D%0A%0D%0AWhat did you do?%0D%0A${encodeURIComponent(th
closeBugReport(close) { closeBugReport(close) {
setTimeout(() => close(), 1); setTimeout(() => close(), 1);
} }
toTheTop() {
window.scroll(0, 0);
}
} }

View File

@ -111,7 +111,10 @@
<rb-form-checkbox class="space-right" name="download-spectra" [(ngModel)]="downloadSpectra"> <rb-form-checkbox class="space-right" name="download-spectra" [(ngModel)]="downloadSpectra">
add spectra add spectra
</rb-form-checkbox> </rb-form-checkbox>
<rb-form-checkbox name="download-flatten" [(ngModel)]="downloadFlatten"> <rb-form-checkbox class="space-right" name="download-conditions" [(ngModel)]="downloadCondition">
add conditions
</rb-form-checkbox>
<rb-form-checkbox class="space-right" name="download-flatten" [(ngModel)]="downloadFlatten">
flatten object flatten object
</rb-form-checkbox> </rb-form-checkbox>
<rb-icon-button icon="clipboard" mode="secondary" (click)="clipboard()">Copy to clipboard</rb-icon-button> <rb-icon-button icon="clipboard" mode="secondary" (click)="clipboard()">Copy to clipboard</rb-icon-button>

View File

@ -52,6 +52,7 @@ rb-table {
} }
.paging { .paging {
height: 50px;
rb-form-input { rb-form-input {
max-width: 50px; max-width: 50px;
} }

View File

@ -34,7 +34,8 @@ export class SamplesComponent implements OnInit {
@ViewChild('pageSizeSelection') pageSizeSelection: ElementRef<HTMLElement>; @ViewChild('pageSizeSelection') pageSizeSelection: ElementRef<HTMLElement>;
@ViewChild('linkarea') linkarea: ElementRef<HTMLTextAreaElement>; @ViewChild('linkarea') linkarea: ElementRef<HTMLTextAreaElement>;
downloadSpectra = false; downloadSpectra = false; // TODO: streamline these options after csv option handling is clear
downloadCondition = false;
downloadFlatten = true; downloadFlatten = true;
samples: SampleModel[] = []; samples: SampleModel[] = [];
totalSamples = 0; // total number of samples totalSamples = 0; // total number of samples
@ -236,6 +237,9 @@ export class SamplesComponent implements OnInit {
if (this.downloadSpectra) { if (this.downloadSpectra) {
query.push('fields[]=measurements.spectrum.dpt'); query.push('fields[]=measurements.spectrum.dpt');
} }
if (this.downloadCondition) {
query.push('fields[]=condition');
}
} }
return (options.host && isDevMode() ? window.location.host : '') + return (options.host && isDevMode() ? window.location.host : '') +
(options.export ? this.api.hostName : '') + (options.export ? this.api.hostName : '') +

View File

@ -13,6 +13,10 @@ $rb-extended-breakpoints: false; // whether to use extended breakpoints xxl and
box-sizing: border-box; box-sizing: border-box;
} }
body {
scroll-behavior: smooth;
}
a, a:active, a:focus { a, a:active, a:focus {
outline: 0 !important; outline: 0 !important;
} }