浏览代码

Erx - remove popup based impl - on "manage erx" - close rx popup and scroll to erx section

Vijayakrishnan 3 年之前
父节点
当前提交
9df73ba642

+ 2 - 6
resources/views/app/patient/medications-center.blade.php

@@ -307,12 +307,8 @@ list($medications, $counts) = Point::getPointsOfCategoryExtended($patient, 'MEDI
         // add button for "eRx"
         $('.btn-manage-erx').remove();
         $('<a ' +
-            'href="/patients/view/{{$patient->uid}}/prescriptions-popup?noteUid={{$note->uid}}&erx_category=DRUG" ' +
-            'title="Manage eRx" ' +
-            'update-parent ' +
-            'open-in-stag-popup ' +
-            'mc-initer="prescriptions-popup-{{$patient->id}}" ' +
-            'popup-style="medium" ' +
+            'href="#" ' +
+            'data-non-segment-target="Prescriptions" ' +
             'class="btn-manage-erx btn btn-sm mr-2 btn-info text-white font-weight-bold">Manage eRx</a>')
             .appendTo(buttonContainer);
 

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

@@ -2507,9 +2507,10 @@
                          $(this).parent().find('>.note-tree-children>.note-tree-node>a[data-segment-uid]').first().trigger('click');
                          return false;
                     });
-                $('[data-non-segment-target]')
-                    .off('click.scroll-to-non-segment')
-                    .on('click.scroll-to-non-segment', function() {
+                $(document)
+                    .off('click.scroll-to-non-segment', '[data-non-segment-target]')
+                    .on('click.scroll-to-non-segment', '[data-non-segment-target]', function() {
+                        closeStagPopup(true);
                         let section = $('div[data-non-segment-section="' + $(this).attr('data-non-segment-target') + '"]').first();
                         if(section.length) {
                             section[0].scrollIntoView({