improved and fixed js stuff used with the new "null" checkbox
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2001-01-06 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* tbl_change.php3, lines 290-300: improved and fixed js stuff used with the
|
||||
new "null" checkbox.
|
||||
|
||||
2002-01-06 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/display_tbl.lib.php3: typo thanks to
|
||||
yrtimd at users.sourceforge.net
|
||||
|
@@ -287,7 +287,17 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
||||
if ($data == 'NULL') {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
if (strstr($row_table_def['True_Type'], 'enum')) {
|
||||
if (strlen($row_table_def['Type']) > 20) {
|
||||
echo ' onclick="if (this.checked) {document.forms[\'insertForm\'].elements[\'field_' . md5($field) . '[]\'].selectedIndex = -1}; return true" />' . "\n";
|
||||
} else {
|
||||
echo ' onclick="if (this.checked) {var elts = document.forms[\'insertForm\'].elements[\'field_' . md5($field) . '[]\']; var elts_cnt = elts.length; for (var i = 0; i < elts_cnt; i++ ) {elts[i].checked = false}}; return true" />' . "\n";
|
||||
}
|
||||
} else if (strstr($row_table_def['True_Type'], 'set')) {
|
||||
echo ' onclick="if (this.checked) {document.forms[\'insertForm\'].elements[\'field_' . md5($field) . '[]\'].selectedIndex = -1}; return true" />' . "\n";
|
||||
} else {
|
||||
echo ' onclick="if (this.checked) {document.forms[\'insertForm\'].elements[\'fields[' . urlencode($field) . ']\'].value = \'\'}; return true" />' . "\n";
|
||||
}
|
||||
} else {
|
||||
echo ' ' . "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user