]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/default/editlink.html
Resize editlink textarea while editing an existing shaare
[github/shaarli/Shaarli.git] / tpl / default / editlink.html
index 369b0a1d218162649bede36ff644d1ca377b3b0b..3c9b5cda7cdceeb7e6ce5e977508d4b4b1b12037 100644 (file)
   {/if}
 <script>
   awesompleteUniqueTag('#lf_tags');
-  if (!'{$link.title}') {
+  if (!document.linkform.lf_title.value) {
     document.linkform.lf_title.focus();
-  } else if (!'{$link.description}') {
+  } else if (!document.linkform.lf_description.value) {
     document.linkform.lf_description.focus();
   } else {
     document.linkform.lf_tags.focus();
   }
-
   function textAreaAdjust(el) {
-      el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight)+"px" :  (el.clientHeight-18)+"px";
+    el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight) + "px" : (el.clientHeight - 18) + "px";
   }
+  (function (window, document) {
+    textAreaAdjust(document.linkform.lf_description)
+  })(this, this.document);
 </script>
 </body>
 </html>