|
@@ -2579,7 +2579,7 @@ use App\Models\Handout;
|
|
@endif
|
|
@endif
|
|
|
|
|
|
</div>
|
|
</div>
|
|
- @if(!$hasRightSegments)
|
|
|
|
|
|
+ @if(1 || !$hasRightSegments)
|
|
@include('app.patient.note.rhs-sidebar')
|
|
@include('app.patient.note.rhs-sidebar')
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@@ -2621,7 +2621,7 @@ use App\Models\Handout;
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
function init() {
|
|
function init() {
|
|
- @if(!$hasRightSegments)
|
|
|
|
|
|
+ @if(1 || !$hasRightSegments)
|
|
fixTreeTopAndHeight();
|
|
fixTreeTopAndHeight();
|
|
$(window).on('resize', fixTreeTopAndHeight);
|
|
$(window).on('resize', fixTreeTopAndHeight);
|
|
$(window).on('scroll', fixTreeTopAndHeight);
|
|
$(window).on('scroll', fixTreeTopAndHeight);
|
|
@@ -2680,13 +2680,12 @@ use App\Models\Handout;
|
|
@endif
|
|
@endif
|
|
}
|
|
}
|
|
function fixTreeTopAndHeight() {
|
|
function fixTreeTopAndHeight() {
|
|
- let tree = $('#note-lhs-tree'), rhsSidebar = $('#note-rhs-sidebar'), 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) {
|
|
if(resultTop <= 55) {
|
|
@if(!$note->is_signed_by_hcp)
|
|
@if(!$note->is_signed_by_hcp)
|
|
tree.addClass('fixed');
|
|
tree.addClass('fixed');
|
|
- rhsSidebar.addClass('fixed');
|
|
|
|
@else
|
|
@else
|
|
tree.addClass('fixed-left');
|
|
tree.addClass('fixed-left');
|
|
@endif
|
|
@endif
|
|
@@ -2699,14 +2698,39 @@ use App\Models\Handout;
|
|
@endif
|
|
@endif
|
|
tree.css('height', 'calc(100vh - ' + resultTop + 'px)');
|
|
tree.css('height', 'calc(100vh - ' + resultTop + 'px)');
|
|
tree.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
|
|
tree.css('max-height', 'calc(100vh - ' + resultTop + 'px)');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ addMCInitializer('note-tree', init, '#note-lhs-tree');
|
|
|
|
+ })();
|
|
|
|
+ </script>
|
|
|
|
+ <script>
|
|
|
|
+ (function() {
|
|
|
|
+ function init() {
|
|
|
|
+ fixRhsSidebarTopAndHeight();
|
|
|
|
+ $(window).on('resize', fixRhsSidebarTopAndHeight);
|
|
|
|
+ $(window).on('scroll', fixRhsSidebarTopAndHeight);
|
|
|
|
+ }
|
|
|
|
+ function fixRhsSidebarTopAndHeight() {
|
|
|
|
+ let rhsSidebar = $('#note-rhs-sidebar'), noteCardHeader = $('#note-card-header');
|
|
|
|
+ if(!noteCardHeader.length) return;
|
|
|
|
+ let resultTop = (noteCardHeader.offset().top + noteCardHeader.outerHeight(true)) - $(window).scrollTop();
|
|
|
|
+ if(resultTop <= 55) {
|
|
|
|
+ @if(!$note->is_signed_by_hcp)
|
|
|
|
+ rhsSidebar.addClass('fixed');
|
|
|
|
+ rhsSidebar.closest('.note-container').addClass('rhs-sidebar-fixed');
|
|
|
|
+ @endif
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
rhsSidebar.removeClass('fixed');
|
|
rhsSidebar.removeClass('fixed');
|
|
|
|
+ rhsSidebar.closest('.note-container').removeClass('rhs-sidebar-fixed');
|
|
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)');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- addMCInitializer('note-tree', init, '#note-lhs-tree');
|
|
|
|
|
|
+ addMCInitializer('rhs-sidebar', init, '#note-rhs-sidebar');
|
|
})();
|
|
})();
|
|
</script>
|
|
</script>
|
|
|
|
+
|
|
@if($isVisitTemplateBased)
|
|
@if($isVisitTemplateBased)
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|