Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
Issue with the exercise program viewer on screen sizes smaller than 955px in height. You were unable to scroll down to the last exercise.

Also fixed the horizontal scroll arrows on the exercise program viewer.
  • Loading branch information
mfrank4101 committed Feb 4, 2022
1 parent 637a38c commit d4a8499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions jquery-ptlinked_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@
if( !options["training_mode"] && options["save_favorites"] ) {
results_container_html += '<span class="metadata-block text-right margin-left-20 is-clickable btn-save_program"><i class="fa fa-save"></i>Save</span>' ;
}
if( !options["training_mode"] && options["secure_messaging"] && ( options["user_type"] == "physician" || options["user_type"] == "staff" ) ) {
if( !options["training_mode"] && options["secure_messaging"] && ( options["user_type"] == "physician" || options["user_type"] == "staff" ) ) {
results_container_html += '<span class="metadata-block text-right margin-left-20 is-clickable btn-share_program"><i class="fa fa-share-square"></i>Send</span>' ;
}
results_container_html += '</div>' +
Expand All @@ -2219,9 +2219,9 @@
'<div id="viewer--header" class="viewer--header_bar">' +
'<div id="viewer--filmstrip" class="viewer--filmstrip_container">' +
'<div class="workout-preview__filmstrip">' +
'<div class="left-arrow"><i class="far fa-chevron-left"></i></div>' +
'<div class="left-arrow"><i class="fa fa-chevron-left"></i></div>' +
'<ul class="workout-preview__thumbs" id="workout-preview__thumbslider"></ul>' +
'<div class="right-arrow"><i class="far fa-chevron-right"></i></div>' +
'<div class="right-arrow"><i class="fa fa-chevron-right"></i></div>' +
'</div>' +
'</div>' +
'</div>' +
Expand Down Expand Up @@ -2553,11 +2553,12 @@
if( !el_viewer_header.length ) {
// Header element does not exist - do something
}
//var h_full_page = Math.round( $("body").outerHeight( ) ) ;
var h_full_page = 955; //Math.round( $(".ptlinked--exercise_program_viewer.mdvip-modal").outerHeight() ) ;
//var h_full_page = Math.round( $(".ptlinked--exercise_program_viewer.mdvip-modal").outerHeight( ) ) ;
var h_full_page = Math.round( $(window).height() ) ;
//var h_full_page = 955; //Math.round( $(".ptlinked--exercise_program_viewer.mdvip-modal").outerHeight() ) ;
var h_viewer_header = Math.round( $(el_viewer_header).outerHeight( ) ) ;
var el_viewer_thumb_bar = $("."+options["viewer_thumb_scroller_class"]) ;
var h_viewer_thumb_bar = Math.round( $(el_viewer_thumb_bar).outerHeight( ) ) ;
var h_viewer_thumb_bar = Math.round( $(el_viewer_thumb_bar).outerHeight( ) ) ;
if( options["debug_mode"] ) { console.log( "----- Calculated Viewer Container Height: " + h_full_page + " - ( " + h_viewer_header + " + " + h_viewer_thumb_bar + " )" ) ; }
$(".viewer--exercise_container").css( "height", Math.round( h_full_page - ( h_viewer_header + h_viewer_thumb_bar ) ) ) ;
$(".viewer--exercise_container").on( "scroll", function(){
Expand Down
2 changes: 1 addition & 1 deletion jquery-ptlinked_plugin.min.js

Large diffs are not rendered by default.

0 comments on commit d4a8499

Please sign in to comment.