Skip to content
Snippets Groups Projects
Commit 12c938fe authored by jvanboxtel@wisc.edu's avatar jvanboxtel@wisc.edu
Browse files

ROENROLL-1698 remove print button

parent 9e40c78b
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,6 @@ ...@@ -110,7 +110,6 @@
</myuw-app-bar> </myuw-app-bar>
<mat-menu #mobileActionMenu="matMenu"> <mat-menu #mobileActionMenu="matMenu">
<button mat-menu-item (click)="printPlan()">Print degree plan</button>
<a mat-menu-item target="_blank" href="/api/degreeplanpdf?roadmapId={{ activeRoadmapId$ | async }}">Download PDF</a> <a mat-menu-item target="_blank" href="/api/degreeplanpdf?roadmapId={{ activeRoadmapId$ | async }}">Download PDF</a>
<button mat-menu-item (click)="addPlan()">Add degree plan</button> <button mat-menu-item (click)="addPlan()">Add degree plan</button>
<button mat-menu-item (click)="addYear()">Add academic year</button> <button mat-menu-item (click)="addYear()">Add academic year</button>
......
...@@ -63,10 +63,6 @@ export class HeaderComponent implements OnInit { ...@@ -63,10 +63,6 @@ export class HeaderComponent implements OnInit {
this.store.dispatch(new CloseSidenav()); this.store.dispatch(new CloseSidenav());
} }
public printPlan() {
window.print();
}
public addPlan() { public addPlan() {
this.dialog this.dialog
.open(PromptDialogComponent, { .open(PromptDialogComponent, {
......
...@@ -77,10 +77,7 @@ ...@@ -77,10 +77,7 @@
[disabled]="degreePlan.primary"> [disabled]="degreePlan.primary">
Make primary Make primary
</button> </button>
<button mat-menu-item (click)="onPrintPlanClick()"> <a mat-menu-item target="_blank" href="/api/degreeplanpdf?roadmapId={{ degreePlan.roadmapId }}">Create PDF</a>
Print plan
</button>
<a mat-menu-item target="_blank" href="/api/degreeplanpdf?roadmapId={{ degreePlan.roadmapId }}">Download PDF</a>
<button <button
mat-menu-item mat-menu-item
(click)="onDeletePlanClick(degreePlan)" (click)="onDeletePlanClick(degreePlan)"
......
...@@ -224,24 +224,6 @@ export class DegreePlannerComponent implements OnInit { ...@@ -224,24 +224,6 @@ export class DegreePlannerComponent implements OnInit {
}); });
} }
public onPrintPlanClick() {
const ua = navigator.userAgent.toLowerCase();
const isAndroid = ua.indexOf('android') > -1;
// window.print() is not supported on android.
if (isAndroid) {
this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Print Dialog',
confirmText: 'Ok',
text:
'Please try to print using your browsers print function or setup Google Cloud Print.',
},
});
} else {
window.print();
}
}
public onSharePlanClick() { public onSharePlanClick() {
// TODO // TODO
console.log('onSharePlanClick'); console.log('onSharePlanClick');
......
...@@ -66,29 +66,9 @@ ...@@ -66,29 +66,9 @@
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div> <div>
<button mat-button aria-label="Print degree plan" class="sidenav-link-btn" (click)="print()">
<i
aria-hidden="true"
class="material-icons"
alt="Print plan"
matTooltip="Print plan"
matTooltipPosition="left">print</i>
Print
</button>
<a mat-button class="sidenav-link-btn" target="_blank" href="/api/degreeplanpdf?roadmapId={{ planId }}"> <a mat-button class="sidenav-link-btn" target="_blank" href="/api/degreeplanpdf?roadmapId={{ planId }}">
<svg <i aria-hidden="true" class="material-icons" alt="create pdf" matTooltip="Create a PDF" matTooltipPosition="left">picture_as_pdf</i>
aria-labelledby="downloadPDFtitle downloadPDFdesc" Create PDF
role="img"
alt="Download PDF version of your degree plan"
matTooltip="Download PDF"
matTooltipPosition="left"
style="width:24px;height:24px;"
viewBox="0 0 24 24">
<title id="downloadPDFtitle">Download PDF</title>
<desc id="downloadPDFdesc">Download PDF version of your degree plan</desc>
<path fill="#0479a8" d="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z" />
</svg>
Download PDF
</a> </a>
<button mat-button aria-label="Add degree plan" class="sidenav-link-btn" (click)="onCreatePlanClick()"> <button mat-button aria-label="Add degree plan" class="sidenav-link-btn" (click)="onCreatePlanClick()">
<i <i
...@@ -115,7 +95,7 @@ ...@@ -115,7 +95,7 @@
fill="#0479a8" fill="#0479a8"
d="M19,19V7H5V19H19M16,1H18V3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1M11,9H13V12H16V14H13V17H11V14H8V12H11V9Z"/> d="M19,19V7H5V19H19M16,1H18V3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1M11,9H13V12H16V14H13V17H11V14H8V12H11V9Z"/>
</svg> </svg>
Add Academic Year &nbsp;&nbsp;Add Academic Year
</button> </button>
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
......
...@@ -49,10 +49,6 @@ export class SidenavMenuItemComponent implements OnDestroy { ...@@ -49,10 +49,6 @@ export class SidenavMenuItemComponent implements OnDestroy {
this.snackBar.open('New academic year has been created'); this.snackBar.open('New academic year has been created');
} }
public print() {
window.print();
}
public onCreatePlanClick() { public onCreatePlanClick() {
this.dialog this.dialog
.open(PromptDialogComponent, { .open(PromptDialogComponent, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment