kopia lustrzana https://github.com/rtts/django-simplecms
Fix non-cms forms
rodzic
3d66484afe
commit
a7a640a721
|
@ -251,7 +251,7 @@ section.contactsection {
|
||||||
div#message {
|
div#message {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
textarea {
|
textarea, input {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ form.cms {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
height: 1px;
|
height: 15em;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
|
|
|
@ -178,7 +178,7 @@ section {
|
||||||
section.contactsection div#message {
|
section.contactsection div#message {
|
||||||
display: none; }
|
display: none; }
|
||||||
|
|
||||||
section.contactsection textarea {
|
section.contactsection textarea, section.contactsection input {
|
||||||
font-family: inherit; }
|
font-family: inherit; }
|
||||||
|
|
||||||
/* Form elements */
|
/* Form elements */
|
||||||
|
@ -254,7 +254,7 @@ form.cms input, form.cms select, form.cms textarea {
|
||||||
padding: 5px; }
|
padding: 5px; }
|
||||||
|
|
||||||
form.cms textarea {
|
form.cms textarea {
|
||||||
height: 1px; }
|
height: 15em; }
|
||||||
|
|
||||||
form.cms input[type=checkbox] {
|
form.cms input[type=checkbox] {
|
||||||
width: auto; }
|
width: auto; }
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -68,7 +68,8 @@
|
||||||
// https://stackoverflow.com/a/25621277
|
// https://stackoverflow.com/a/25621277
|
||||||
var tx = document.getElementsByTagName('textarea');
|
var tx = document.getElementsByTagName('textarea');
|
||||||
for (var i = 0; i < tx.length; i++) {
|
for (var i = 0; i < tx.length; i++) {
|
||||||
tx[i].setAttribute('style', 'height:' + (tx[i].scrollHeight) + 'px;overflow-y:hidden;');
|
tx[i].setAttribute('style', 'height:0;overflow-y:hidden;');
|
||||||
|
tx[i].style.height = (tx[i].scrollHeight) + 'px';
|
||||||
tx[i].addEventListener("input", OnInput, false);
|
tx[i].addEventListener("input", OnInput, false);
|
||||||
}
|
}
|
||||||
function OnInput() {
|
function OnInput() {
|
||||||
|
|
Ładowanie…
Reference in New Issue