Skip to content

Commit

Permalink
Merge sec. updates, datacart label tweak from 'integration' into rel/…
Browse files Browse the repository at this point in the history
…1.3.X
  • Loading branch information
RayPlante committed Jun 12, 2020
2 parents 33b0efa + 5c6e05f commit 4225fe4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 19 deletions.
35 changes: 22 additions & 13 deletions angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion angular/src/app/datacart/datacart.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export class DatacartComponent implements OnInit, OnDestroy {
this.bundlePlanMessage = null;
// this.downloadStatus = 'downloading';
this.downloadService.setDownloadProcessStatus(false, "datacart");
this.currentTask = "Zipping files...";
this.currentTask = "Preparing downloads...";
this.downloadService.setDownloadingNumber(0, "datacart");

this.downloadStartTime = new Date();
Expand Down
3 changes: 2 additions & 1 deletion angular/src/app/landing/citation/citation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class CitationDescriptionComponent {
selector: 'citation-popup',
template: `
<p-dialog #citepopup class="citationDialog" [closable]="false" [(visible)]="visible"
[modal]="false" width="550">
[modal]="false" [width]="width" [responsive]="true">
<p-header> Citation
<button style="position:relative; float:right; background-color:#1E6BA1; " type="button"
pButton icon="faa faa-close" (click)="hide()"></button>
Expand Down Expand Up @@ -64,6 +64,7 @@ export class CitationDescriptionComponent {
export class CitationPopupComponent {
@Input() citetext : string;
@Input() visible : boolean;
@Input() width: number;
@Output() visibleChange = new EventEmitter<boolean>();

_setVisible(yesno : boolean) : void {
Expand Down
7 changes: 4 additions & 3 deletions angular/src/app/landing/landingpage.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<button style="position: absolute; top: 1.0rem; left: 1.5rem" type="button"
pButton icon="faa faa-list" class="ui-button ui-button-icon-only"
(click)="menu3.togglePopup($event)"></button>
<tools-menu #menu3 [record]="md" [isPopup]="true" (toggle_citation)="toggleCitation()"
<tools-menu #menu3 [record]="md" [isPopup]="true" (toggle_citation)="toggleCitation('small')"
(scroll)="goToSection($event)"></tools-menu>
</div>

Expand All @@ -36,7 +36,8 @@
<!-- citation pop-up -->
<div *ngIf="inBrowser">
<citation-popup [citetext]="getCitation()"
[(visible)]="citationVisible"></citation-popup>
[(visible)]="citationVisible"
[width]="citationDialogWith"></citation-popup>
</div>

<!-- side tool menu (for tablets and desktop displays -->
Expand All @@ -46,7 +47,7 @@
<div *ngIf="inBrowser" class="d-none d-md-block d-lg-block d-xl-block ">

<tools-menu #menu2 [record]="md" [isPopup]="false"
(toggle_citation)="toggleCitation()"
(toggle_citation)="toggleCitation('large')"
(scroll)="goToSection($event)"></tools-menu>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion angular/src/app/landing/landingpage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class LandingPageComponent implements OnInit, AfterViewInit {
citetext: string = null;
citationVisible: boolean = false;
editEnabled: boolean = false;
citationDialogWith: number = 550; // Default width

// this will be removed in next restructure
showMetadata = false;
Expand Down Expand Up @@ -207,7 +208,14 @@ export class LandingPageComponent implements OnInit, AfterViewInit {
/**
* toggle the visibility of the citation pop-up window
*/
toggleCitation() : void { this.citationVisible = !this.citationVisible; }
toggleCitation(size: string) : void {
if(size == 'small')
this.citationDialogWith = 400;
else
this.citationDialogWith = 550;

this.citationVisible = !this.citationVisible;
}

/**
* return text representing the recommended citation for this resource
Expand Down

0 comments on commit 4225fe4

Please sign in to comment.