aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-11-04 13:48:33 +0100
committerArthurHoaro <arthur@hoa.ro>2016-11-05 14:29:56 +0100
commitcac0ea87be6326271993c958788afbd244815ef1 (patch)
treee8d415752bceb9711a7faf9029d02046dabcf061 /tpl/default
parent4a451481b6276061d177ab8a737e7830c9e8a198 (diff)
downloadShaarli-cac0ea87be6326271993c958788afbd244815ef1.tar.gz
Shaarli-cac0ea87be6326271993c958788afbd244815ef1.tar.zst
Shaarli-cac0ea87be6326271993c958788afbd244815ef1.zip
Resize editlink textarea while editing an existing shaare
Diffstat (limited to 'tpl/default')
-rw-r--r--tpl/default/editlink.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html
index 369b0a1d..3c9b5cda 100644
--- a/tpl/default/editlink.html
+++ b/tpl/default/editlink.html
@@ -71,17 +71,19 @@
71 {/if} 71 {/if}
72<script> 72<script>
73 awesompleteUniqueTag('#lf_tags'); 73 awesompleteUniqueTag('#lf_tags');
74 if (!'{$link.title}') { 74 if (!document.linkform.lf_title.value) {
75 document.linkform.lf_title.focus(); 75 document.linkform.lf_title.focus();
76 } else if (!'{$link.description}') { 76 } else if (!document.linkform.lf_description.value) {
77 document.linkform.lf_description.focus(); 77 document.linkform.lf_description.focus();
78 } else { 78 } else {
79 document.linkform.lf_tags.focus(); 79 document.linkform.lf_tags.focus();
80 } 80 }
81
82 function textAreaAdjust(el) { 81 function textAreaAdjust(el) {
83 el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight)+"px" : (el.clientHeight-18)+"px"; 82 el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight) + "px" : (el.clientHeight - 18) + "px";
84 } 83 }
84 (function (window, document) {
85 textAreaAdjust(document.linkform.lf_description)
86 })(this, this.document);
85</script> 87</script>
86</body> 88</body>
87</html> 89</html>