]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Editlink improvement
authorArthurHoaro <arthur@hoa.ro>
Sun, 7 Aug 2016 15:17:41 +0000 (17:17 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sun, 7 Aug 2016 15:17:41 +0000 (17:17 +0200)
tpl/default/css/shaarli.css
tpl/default/editlink.html

index 339ba30096424ad3973bf533b482b7d80c40fd2e..0c70d6309408ce747ef061a473d8f5aec53e64f8 100644 (file)
@@ -605,6 +605,7 @@ pre {
     background: url(../img/noise.png) #1fa67a;
     border-radius: 5px;
     box-shadow: 1px 1px 2px #797979;
+    color: #b0ddce;
 }
 
 .page-form h2 {
@@ -618,7 +619,9 @@ pre {
     border-bottom: 1px solid #797979;
 }
 
-.page-form input[type="text"], .page-form input[type="password"] {
+.page-form input[type="text"],
+.page-form input[type="password"],
+.page-form textarea {
     margin: 10px 0;
     padding: 5px 5px 3px 15px;
     height: 30px;
@@ -630,6 +633,13 @@ pre {
     color: #b0ddce;
 }
 
+.page-form textarea {
+    height: 240px;
+    resize: vertical;
+    overflow-y: auto;
+    word-wrap:break-word
+}
+
 /* because chrome */
 .page-form input[type="text"]::-webkit-input-placeholder,
 .page-form input[type="password"]::-webkit-input-placeholder {
@@ -659,10 +669,6 @@ pre {
     text-align: center;
 }
 
-.page-form-light p {
-    color: #b0ddce;
-}
-
 /**
  * PAGE FORM - COMPLETE
  */
@@ -791,7 +797,6 @@ pre {
     color: #fff;
 }
 
-
 .linklist-item-title .label-private {
     border: solid 1px #d0fff0;
     font-family: Arial, sans-serif;
index a0ea91b20bfbaf5e01dcb28e523c33f0e7e0ab08..95e60cc189e56cac857a6abfd82467312c4297f3 100644 (file)
@@ -9,7 +9,7 @@
   {/if}
   <div id="editlinkform" class="pure-g">
     <div class="pure-u-lg-1-5 pure-u-1-8"></div>
-    <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-3-4>
+    <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-3-4 page-form page-form-light">
       <h2>{'Shaare'|t}</h2>
       <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
       <div>
@@ -28,7 +28,8 @@
         <label for="lf_description">{'Description'|t}</label>
       </div>
       <div>
-        <textarea name="lf_description" id="lf_description">{$link.description}</textarea>
+        <textarea name="lf_description" id="lf_description" onkeyup="textAreaAdjust(this)"
+        >{$link.description}</textarea>
       </div>
       <div>
         <label for="lf_tags">{'Tags'|t}</label>
   } else {
     document.linkform.lf_tags.focus();
   }
+
+  function textAreaAdjust(el) {
+      el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight)+"px" :  (el.clientHeight-8)+"px";
+  }
 </script>
 </body>
 </html>