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

ROENROLL-1484 print android

parent 822ab44e
No related branches found
No related tags found
No related merge requests found
......@@ -207,7 +207,21 @@ export class DegreePlannerComponent implements OnInit, OnDestroy {
}
public onPrintPlanClick() {
window.print();
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() {
......
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