summaryrefslogtreecommitdiff
path: root/src/client/view/node_info.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-02-11 19:43:03 +0200
committerAlon Levy <alon@pobox.com>2015-02-11 19:43:36 +0200
commit1c1c589b43c2e3baa63281ab4a49eec70c9f9180 (patch)
tree5e08c5e3ce0b7282ae683ba751aab998833bd940 /src/client/view/node_info.js
parent1154d9f2237e5d7f65a25ee241fbded5cde0d082 (diff)
client/node_info: show title completely on init; doesn't automatically resize; fixes #309
Diffstat (limited to 'src/client/view/node_info.js')
-rw-r--r--src/client/view/node_info.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/view/node_info.js b/src/client/view/node_info.js
index 500c2aa2..343e578b 100644
--- a/src/client/view/node_info.js
+++ b/src/client/view/node_info.js
@@ -18,6 +18,12 @@ function _get_form_data() {
};
}
+function textarea_resize(text)
+{
+ text.style.height = 'auto';
+ text.style.height = text.scrollHeight + 'px';
+}
+
$('#edit-node-dialog__delete').click(function(e) {
e.preventDefault();
return delete_callback(e, _get_form_data());
@@ -56,7 +62,10 @@ function show(d) {
$('.info').attr('class', 'info');
$('.info').addClass('type-' + d.type); // Add a class to distinguish types for css
- $('.info').find('#editformname').val(d.name);
+ var name_textarea = $('.info').find('#editformname');
+ name_textarea.val(d.name);
+ textarea_resize(name_textarea[0]);
+
$("#editenddate").datepicker({
inline: true,
showOtherMonths: true,