소스 검색

Visit UI - auto-scroll to segment after save

Vijayakrishnan 3 년 전
부모
커밋
9e019a4608
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      resources/views/app/patient/note/segment_script.blade.php

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

@@ -85,6 +85,13 @@
                 updateAllSegmentsInResponse(_data);
                 if(!_silent && closeOnSave) {
                     noteSection.removeClass('edit');
+                    let segmentUid = form.find('[name="segmentUid"]').first();
+                    segmentUid = segmentUid.length ? segmentUid.val() : false;
+                    if(segmentUid) {
+                        window.setTimeout(() => {
+                            $('.note-tree-node>a[data-segment-uid="' + segmentUid + '"]').trigger('click');
+                        }, 250);
+                    }
                 }
             }, 'json');
             return false;