|
@@ -1718,7 +1718,8 @@ use App\Models\Handout;
|
|
let tree = $('#note-lhs-tree'), noteCardHeader = $('#note-card-header');
|
|
let tree = $('#note-lhs-tree'), noteCardHeader = $('#note-card-header');
|
|
if(!noteCardHeader.length) return;
|
|
if(!noteCardHeader.length) return;
|
|
let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
- if(resultTop <= 55) {
|
|
|
|
|
|
+ let topMin = $('#patient-top-most-header').length ? 91 : 55;
|
|
|
|
+ if(resultTop <= topMin) {
|
|
@if(!$note->is_signed_by_hcp)
|
|
@if(!$note->is_signed_by_hcp)
|
|
tree.addClass('fixed');
|
|
tree.addClass('fixed');
|
|
@else
|
|
@else
|
|
@@ -1749,7 +1750,8 @@ use App\Models\Handout;
|
|
let rhsSidebar = $('#note-rhs-sidebar'), noteCardHeader = $('#note-card-header');
|
|
let rhsSidebar = $('#note-rhs-sidebar'), noteCardHeader = $('#note-card-header');
|
|
if(!noteCardHeader.length) return;
|
|
if(!noteCardHeader.length) return;
|
|
let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
- if(resultTop <= 55) {
|
|
|
|
|
|
+ let topMin = $('#patient-top-most-header').length ? 91 : 55;
|
|
|
|
+ if(resultTop <= topMin) {
|
|
rhsSidebar.addClass('fixed');
|
|
rhsSidebar.addClass('fixed');
|
|
rhsSidebar.closest('.note-container').addClass('rhs-sidebar-fixed');
|
|
rhsSidebar.closest('.note-container').addClass('rhs-sidebar-fixed');
|
|
}
|
|
}
|
|
@@ -1759,6 +1761,13 @@ use App\Models\Handout;
|
|
rhsSidebar.css('height', 'calc(100vh - ' + resultTop + 'px)');
|
|
rhsSidebar.css('height', 'calc(100vh - ' + resultTop + 'px)');
|
|
rhsSidebar.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
|
|
rhsSidebar.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if($(window).scrollTop() > 0) {
|
|
|
|
+ $('.sticky-note-header').addClass('sticky');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ $('.sticky-note-header').removeClass('sticky');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
addMCInitializer('rhs-sidebar', init, '#note-rhs-sidebar');
|
|
addMCInitializer('rhs-sidebar', init, '#note-rhs-sidebar');
|
|
})();
|
|
})();
|