瀏覽代碼

Note section - on open put focus on title

Vijayakrishnan 4 年之前
父節點
當前提交
f5e1568d47

+ 1 - 1
resources/views/app/patient/canvas-sections/allergies/form.blade.php

@@ -45,7 +45,7 @@ $formID = rand(0, 100000);
             <td>
                 <input type="text" :data-index="index"
                        class="form-control form-control-sm canvas-allergy-title"
-                       data-field="title" v-model="item.title">
+                       data-field="title" v-model="item.title" autofocus required>
             </td>
             <td>
                 <textarea type="text" class="form-control form-control-sm"

+ 1 - 1
resources/views/app/patient/canvas-sections/dx/form.blade.php

@@ -67,7 +67,7 @@ $formID = rand(0, 100000);
             <td>
                 <input type="text" :data-index="index"
                        class="form-control form-control-sm font-weight-bold font-size-14"
-                       data-field="title" placeholder="Title" v-model="item.title">
+                       data-field="title" placeholder="Title" v-model="item.title" autofocus required>
             </td>
             <td>
                 <input type="text" :data-index="index"

+ 1 - 1
resources/views/app/patient/canvas-sections/rx/form.blade.php

@@ -51,7 +51,7 @@ $formID = rand(0, 100000);
             <td>
                 <input type="text" :data-index="index"
                        class="form-control form-control-sm canvas-rx-title"
-                       data-field="title" v-model="item.title">
+                       data-field="title" v-model="item.title" autofocus required>
             </td>
             <td>
                 <input type="text" :data-index="index"

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

@@ -54,6 +54,9 @@
                         editParent.toggleClass('edit');
                         if(editParent.is('.edit')) {
                             editParent.siblings('.edit').removeClass('edit');
+                            if(editParent.find('[autofocus]').length) {
+                                editParent.find('[autofocus]').first().focus();
+                            }
                         }
                         return false;
                     });