git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@549 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-01-22 17:29:11 +00:00
parent a4dfae74d4
commit 71430ee4b4
2 changed files with 17 additions and 5 deletions

View File

@@ -225,8 +225,15 @@ function remove_row(button) {
}
function type_change(type) {
var name = type.name.substr(0, type.name.length - 6);
type.form[name + '[collation]'].style.display = (/char|text|enum|set/.test(type.options[type.selectedIndex].text) ? '' : 'none');
type.form[name + '[unsigned]'].style.display = (/int|float|double|decimal/.test(type.options[type.selectedIndex].text) ? '' : 'none');
for (var i=0; i < type.form.elements.length; i++) {
var el = type.form.elements[i];
if (el.name == name + '[collation]') {
el.style.display = (/char|text|enum|set/.test(type.options[type.selectedIndex].text) ? '' : 'none');
}
if (el.name == name + '[unsigned]') {
el.style.display = (/int|float|double|decimal/.test(type.options[type.selectedIndex].text) ? '' : 'none');
}
}
}
for (var i=1; <?php echo $count; ?> >= i; i++) {
document.getElementById('form')['fields[' + i + '][type]'].onchange();