瀏覽代碼

Fix segment save not refreshing summary and collapsing

Vijayakrishnan 3 年之前
父節點
當前提交
7f3a008b4d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      resources/views/app/patient/note/segment_script.blade.php

+ 3 - 3
resources/views/app/patient/note/segment_script.blade.php

@@ -1,7 +1,7 @@
 <script>
 <script>
     (function() {
     (function() {
 
 
-        function updateAllSegmentsInResponse(_response, _updateListeners = true) {
+        window.updateAllSegmentsInResponse = function(_response, _updateListeners = true) {
             if(!hasResponseError(_response)) {
             if(!hasResponseError(_response)) {
 
 
                 // refresh primary segment (where uid is _response.data.uid)
                 // refresh primary segment (where uid is _response.data.uid)
@@ -37,7 +37,7 @@
             }
             }
         }
         }
 
 
-        function updateSegmentByUid(_uid, _summaryHtml, _editHtml) {
+        window.updateSegmentByUid = function(_uid, _summaryHtml, _editHtml) {
             let segment = $('.note-section[data-segment-uid="' + _uid + '"]');
             let segment = $('.note-section[data-segment-uid="' + _uid + '"]');
             if(segment && segment.length) {
             if(segment && segment.length) {
                 segment.find('.summary-container').html(_summaryHtml);
                 segment.find('.summary-container').html(_summaryHtml);
@@ -63,7 +63,7 @@
             }
             }
         }
         }
 
 
-        function updateSegmentFromObject(_object) {
+        window.updateSegmentFromObject = function(_object) {
             let segment = $('.note-section[data-segment-uid="' + _object.segmentUid + '"]');
             let segment = $('.note-section[data-segment-uid="' + _object.segmentUid + '"]');
             if(segment && segment.length) {
             if(segment && segment.length) {
                 segment.find('.summary-container').html(_object.summaryHtml);
                 segment.find('.summary-container').html(_object.summaryHtml);