Selaa lähdekoodia

Sigma - RHS sidebar

Vijayakrishnan 3 vuotta sitten
vanhempi
commit
0a7aa739f4
2 muutettua tiedostoa jossa 38 lisäystä ja 5 poistoa
  1. 9 0
      public/css/style.css
  2. 29 5
      resources/views/app/patient/note/dashboard.blade.php

+ 9 - 0
public/css/style.css

@@ -2284,6 +2284,12 @@ body.in-iframe .main-row > .sidebar {
 .note-container .note-lhs-tree.fixed-left ~ .note-rhs-content {
     margin-left: 220px;
 }
+.note-container .note-rhs-sidebar.fixed ~ .note-rhs-content {
+    margin-right: 220px;
+}
+.note-container.rhs-sidebar-fixed .note-rhs-content {
+    margin-right: 220px;
+}
 .note-container .note-lhs-tree .note-tree-node.note-tree-heading>a {
 
 }
@@ -3178,6 +3184,9 @@ body.forced-masking #mask {
 .note-container.note_template_sigma_soap_visit .refresh-segment:hover {
     opacity: 1;
 }
+.note-container.note_template_sigma_soap_visit>.note-rhs-content {
+    max-width: calc(100% - 220px);
+}
 .note-section.visit-segment.refreshing {
     opacity: 0.6;
     position: relative;

+ 29 - 5
resources/views/app/patient/note/dashboard.blade.php

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