Browse Source

Visit UI - auto-scroll to segment after save

Vijayakrishnan 3 năm trước cách đây
mục cha
commit
9e019a4608
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  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;