1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 | {% extends "admin/base.html" %}
{% block footer %}
<script type="text/javascript">
/* <![CDATA[ */
function textarea_resize() {
//
// Resize all textareas
//
textareas = document.getElementsByTagName("textarea");
for (var i = 0; i <= textareas.length-1; i++) {
try {
textarea = textareas[i];
try {
rows = textarea.firstChild.data.split("\n").length;
if (rows > 30) {
rows = 30;
}
} catch(e) {
rows = 5;
}
textarea.rows = rows;
} catch (e) {
alert("textarea_resize() error:" + e);
}
}
}
textarea_resize()
/* ]]> */
</script>
<style type="text/css">
textarea {
font-family: monospace;
}
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
width:80%;
}
</style>
{% endblock %}
|
Comments
At line 16 maybe you mean "if (rows < 30) {"
#