mirror of https://github.com/scrapy/scrapy.git
Force all textareas to be 30 rows height
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40111
This commit is contained in:
parent
80a99dde83
commit
fd4aab5f33
|
|
@ -13,30 +13,19 @@
|
|||
<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 = 30;
|
||||
}
|
||||
textarea.rows = rows;
|
||||
textarea = textareas[i].rows = 30;
|
||||
} catch (e) {
|
||||
alert("textarea_resize() error:" + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
textarea_resize()
|
||||
textarea_resize();
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
textarea {
|
||||
font-family: monospace;
|
||||
|
|
|
|||
Loading…
Reference in New Issue