فهرست منبع

Client dashboard ESC to close popups fix

Vijayakrishnan 3 سال پیش
والد
کامیت
a7d73a638b

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

@@ -388,9 +388,11 @@
                     .on('keydown.collapse-active-segment', function(e) {
                         if(e.which === 27) {
                             if(!isEventConsumed(e)) {
-                                $('.visit-segment.edit').first().find('.edit-trigger').first().click();
-                                markEventAsConsumed(e);
-                                return false;
+                                if($('.visit-segment.edit').length) {
+                                    $('.visit-segment.edit').first().find('.edit-trigger').first().click();
+                                    markEventAsConsumed(e);
+                                    return false;
+                                }
                             }
                             else {
                                 // event already consumed!

+ 2 - 2
resources/views/app/patient/point-based-partials/fhx.blade.php

@@ -20,7 +20,7 @@
 </div>
 <script>
     if(!window.segmentInitializers) window.segmentInitializers = {};
-    addMCInitializer('history_family_{{$patient->id}}', function() {
+    /*addMCInitializer('history_family_{{$patient->id}}', function() {
         window.segmentInitializers['history_family'].call(window);
-    }, '.fhx-trigger');
+    }, '.fhx-trigger');*/
 </script>

+ 2 - 2
resources/views/app/patient/point-based-partials/pmhx.blade.php

@@ -20,7 +20,7 @@
 </div>
 <script>
     if(!window.segmentInitializers) window.segmentInitializers = {};
-    addMCInitializer('past_medical_history_{{$patient->id}}', function() {
+    /*addMCInitializer('past_medical_history_{{$patient->id}}', function() {
         window.segmentInitializers['past_medical_history'].call(window);
-    }, '.pmhx-trigger');
+    }, '.pmhx-trigger');*/
 </script>

+ 2 - 2
resources/views/app/patient/point-based-partials/shx.blade.php

@@ -20,7 +20,7 @@
 </div>
 <script>
     if(!window.segmentInitializers) window.segmentInitializers = {};
-    addMCInitializer('history_surgical_{{$patient->id}}', function() {
+    /*addMCInitializer('history_surgical_{{$patient->id}}', function() {
         window.segmentInitializers['history_surgical'].call(window);
-    }, '.shx-trigger');
+    }, '.shx-trigger');*/
 </script>

+ 2 - 2
resources/views/app/patient/point-based-partials/sochx.blade.php

@@ -20,7 +20,7 @@
 </div>
 <script>
     if(!window.segmentInitializers) window.segmentInitializers = {};
-    addMCInitializer('history_social_{{$patient->id}}', function() {
+    /*addMCInitializer('history_social_{{$patient->id}}', function() {
         window.segmentInitializers['history_social'].call(window);
-    }, '.sochx-trigger');
+    }, '.sochx-trigger');*/
 </script>

+ 2 - 2
resources/views/layouts/patient.blade.php

@@ -906,8 +906,6 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 					}
 				});
 
-				$('[data-toggle="tooltip"]').tooltip('hover');
-
 				$('.note-method-select').each(function() {
 					let form = $(this).closest('form');
 					if(this.value === 'IN_CLINIC') {
@@ -917,6 +915,8 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 						form.find('.if-in-clinic').hide();
 					}
 				});
+
+				$('[data-toggle="tooltip"]').tooltip('hover');
 			}
 			addMCInitializer('patient-add-note-popup', init, '#patient-header')
 		}).call(window);