[damned-lies] Replaced jQuery growfield by autosize



commit bacf76c07076e8113a48b3da3c929e734b3939fc
Author: Claude Paroz <claude 2xlibre net>
Date:   Tue May 10 18:04:04 2016 +0200

    Replaced jQuery growfield by autosize
    
    Refs #766232. growfield was depending on an old jQuery version.
    Thanks Tom Tryfonidis for the suggestion.

 common/static/js/README                 |    2 +-
 common/static/js/jquery.growfield2.js   |    9 ---------
 templates/teams/team_edit.html          |    4 ++--
 templates/vertimus/vertimus_detail.html |    4 ++--
 4 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/common/static/js/README b/common/static/js/README
index 43d5bff..8e70ad3 100644
--- a/common/static/js/README
+++ b/common/static/js/README
@@ -2,4 +2,4 @@ External JavaScript libraries included:
 
 * jQuery: http://jquery.com
 * jQuery tablesorter: http://tablesorter.com
-* jQuery growfield: http://code.google.com/p/jquery-growfield/
+* autosize: https://github.com/jackmoore/autosize
diff --git a/templates/teams/team_edit.html b/templates/teams/team_edit.html
index ee7b4f2..cc690a0 100644
--- a/templates/teams/team_edit.html
+++ b/templates/teams/team_edit.html
@@ -3,10 +3,10 @@
 {% block title %}{{ team.get_description }}{% endblock %}
 
 {% block extrahead %}
-<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.growfield2.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/autosize.min.js"></script>
 <script type="text/javascript">
 $(document).ready(function() {
-    $("#id_presentation").growfield();
+    autosize(document.querySelector('#id_presentation'));
 });
 </script>
 {% endblock %}
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index cefaabd..f036e32 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -9,10 +9,10 @@
 <style type="text/css">
 tr.tr_author, tr.tr_sync_master { display: none; }
 </style>
-<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.growfield2.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}js/autosize.min.js"></script>
 <script type="text/javascript">
 $(document).ready(function() {
-    $("#id_comment").growfield();
+    autosize(document.querySelector('#id_comment'));
     if(typeof send_mail_defaults != 'undefined') {
       $("#id_send_to_ml").attr('checked', send_mail_defaults[$("#id_action").val()]);
       $("#id_action").change(function () {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]