aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2015-04-07 19:35:42 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2015-04-07 19:35:42 -0400
commit308caedc198ea45aaf4cffb11c90f05b8211c82d (patch)
tree0603378c4f7a4372c4a32a65006b6e3649c7403b
parentc910d66505ef5262ec3650f36b263be2ee683e87 (diff)
parent02db72ed0a6fc1d514e6323284df5e25bd8c6c6f (diff)
downloadfamille-flask-308caedc198ea45aaf4cffb11c90f05b8211c82d.tar.gz
Merge branch 'production'
-rw-r--r--static/js/famille.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/static/js/famille.js b/static/js/famille.js
index 3bb9e51..9606d13 100644
--- a/static/js/famille.js
+++ b/static/js/famille.js
@@ -28,8 +28,12 @@ $(document).ready(function(){
$(".edit").click(function(e){
e.preventDefault();
- $(this).parents(".media-heading").siblings(".comment-content").hide();
- $(this).parents(".media-heading").siblings(".comment-source").show();
+ var heading = $(this).parents(".media-heading");
+ heading.siblings(".comment-content").hide();
+ var textarea = heading.siblings(".comment-source").find("textarea");
+ var row_count = textarea.val().split("\n").length;
+ textarea.attr("rows", row_count);
+ heading.siblings(".comment-source").show();
});
$(".comment-source").submit(function(e){