ソースを参照

Tickets - show full description when opening a ticket

Vijayakrishnan 3 年 前
コミット
d577b706df
1 ファイル変更13 行追加7 行削除
  1. 13 7
      resources/views/app/patient/tickets.blade.php

+ 13 - 7
resources/views/app/patient/tickets.blade.php

@@ -302,6 +302,12 @@
                             if (_item) {
                                 this.currentCategory = _type;
                                 this.currentItemUid = _item.uid;
+
+                                // autogrow textarea
+                                let self = this;
+                                $('[stag-popup-key="other-popup"] textarea').each(function() {
+                                    self.autoGrow(this);
+                                });
                             }
                         },
 
@@ -1001,6 +1007,11 @@
                                 window.localStorage.autoOpen = '';
                             }
                         },
+                        autoGrow: function(_ta) {
+                            _ta.style.minHeight = "46px";
+                            _ta.style.height = "46px";
+                            _ta.style.height = (_ta.scrollHeight + 10)+"px";
+                        },
                         @include('app.patient.tickets.pharmacy-suggest', ['category' => 'erx'])
                         @include('app.patient.tickets.pharmacy-suggest', ['category' => 'lab'])
                         @include('app.patient.tickets.pharmacy-suggest', ['category' => 'imaging'])
@@ -1038,20 +1049,15 @@
                             @endif
                         @endif
 
-                        function autoGrow(_ta) {
-                            _ta.style.minHeight = "46px";
-                            _ta.style.height = "46px";
-                            _ta.style.height = (_ta.scrollHeight + 10)+"px";
-                        }
                         $(document)
                             .off('input.auto-grow', '#ticketsApp textarea.auto-grow')
                             .on('input.auto-grow', '#ticketsApp textarea.auto-grow', function() {
-                                autoGrow(this);
+                                this.autoGrow(this);
                             });
                         $(document)
                             .off('focus.auto-grow', '#ticketsApp textarea.auto-grow')
                             .on('focus.auto-grow', '#ticketsApp textarea.auto-grow', function() {
-                                autoGrow(this);
+                                this.autoGrow(this);
                             });
                     }
                 })