Skip to content

Commit

Permalink
Mobile Bug Fix
Browse files Browse the repository at this point in the history
There was a bug when trying to print an exercise program from iOS/Safari mobile browser. Safari would stop the PDF from opening in a new tab when called from an ASYNC signal.
  • Loading branch information
mfrank4101 committed Feb 28, 2022
1 parent 8d5bb44 commit be89055
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions jquery-ptlinked_plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* PTLINKED Plugin - Exercise Program Library
* Customer: MDVIP
* Version: 1.0.7
* Version: 1.0.8
* Author: Mike Frank (PTLINKED, LLC.) - [email protected]
*
* Table of Contents
Expand Down Expand Up @@ -1964,6 +1964,7 @@

function print_program( ) {
var url = options["api_root_url"] + "/exerciseprogram/print_program" ;
var windowReference = window.open( "about:blank", "_PDF_VIEWER" ) ;
var parameters = fetch_parameters( ) ;
$.ajax({
type: "POST",
Expand All @@ -1986,7 +1987,7 @@
},
success: function( data, textStatus, jqXHR ) {
var status = jqXHR["status"] ;
window.open( data, "_blank" ) ;
windowReference.location = data ;
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion jquery-ptlinked_plugin.min.js

Large diffs are not rendered by default.

0 comments on commit be89055

Please sign in to comment.