]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tpl/default/editlink.html
Apply v0.8.2 changes, add opensearch tpl, add favicon
[github/shaarli/Shaarli.git] / tpl / default / editlink.html
index 95e60cc189e56cac857a6abfd82467312c4297f3..1708bee1ed876c9a4a47e3cb7ff949700bb9246a 100644 (file)
@@ -4,14 +4,19 @@
   {include="includes"}
 </head>
 <body>
-  {if="$source !== 'firefoxsocialapi'"}
+  {if="$source !== 'firefoxsocialapi' && $source !== 'bookmarklet'"}
     {include="page.header"}
+  {else}
+    <div class="center">Shaare to: {$shaarlititle}</div>
   {/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 page-form page-form-light">
-      <h2>{'Shaare'|t}</h2>
+      <h2 class="window-title">{'Shaare'|t}</h2>
       <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
+      {if="isset($link.id)"}
+        <input type="hidden" name="lf_id" value="{$link.id}">
+      {/if}
       <div>
         <label for="lf_url">{'URL'|t}</label>
       </div>
   {/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-8)+"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>