Set selectedIndex of new selects to 0 for Opera (spotted by Ladislav Prskavec)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@346 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
4b7bc379a7
commit
1e20ebefee
|
@ -64,6 +64,7 @@ function add_row(field) {
|
||||||
var selects = row.getElementsByTagName('select');
|
var selects = row.getElementsByTagName('select');
|
||||||
for (var i=0; i < selects.length; i++) {
|
for (var i=0; i < selects.length; i++) {
|
||||||
selects[i].name = selects[i].name.replace(/\]/, '1$&');
|
selects[i].name = selects[i].name.replace(/\]/, '1$&');
|
||||||
|
selects[i].selectedIndex = 0;
|
||||||
}
|
}
|
||||||
field.parentNode.parentNode.parentNode.appendChild(row);
|
field.parentNode.parentNode.parentNode.appendChild(row);
|
||||||
field.onchange = function () { };
|
field.onchange = function () { };
|
||||||
|
|
|
@ -73,6 +73,7 @@ function add_row(field) {
|
||||||
var selects = row.getElementsByTagName('select');
|
var selects = row.getElementsByTagName('select');
|
||||||
for (var i=0; i < selects.length; i++) {
|
for (var i=0; i < selects.length; i++) {
|
||||||
selects[i].name = selects[i].name.replace(/indexes\[[0-9]+/, '$&1');
|
selects[i].name = selects[i].name.replace(/indexes\[[0-9]+/, '$&1');
|
||||||
|
selects[i].selectedIndex = 0;
|
||||||
}
|
}
|
||||||
var input = row.getElementsByTagName('input')[0];
|
var input = row.getElementsByTagName('input')[0];
|
||||||
input.name = input.name.replace(/indexes\[[0-9]+/, '$&1');
|
input.name = input.name.replace(/indexes\[[0-9]+/, '$&1');
|
||||||
|
@ -85,6 +86,7 @@ function add_column(field) {
|
||||||
var column = field.parentNode.cloneNode(true);
|
var column = field.parentNode.cloneNode(true);
|
||||||
var select = column.getElementsByTagName('select')[0];
|
var select = column.getElementsByTagName('select')[0];
|
||||||
select.name = select.name.replace(/\]\[[0-9]+/, '$&1');
|
select.name = select.name.replace(/\]\[[0-9]+/, '$&1');
|
||||||
|
select.selectedIndex = 0;
|
||||||
var input = column.getElementsByTagName('input')[0];
|
var input = column.getElementsByTagName('input')[0];
|
||||||
input.name = input.name.replace(/\]\[[0-9]+/, '$&1');
|
input.name = input.name.replace(/\]\[[0-9]+/, '$&1');
|
||||||
input.value = '';
|
input.value = '';
|
||||||
|
|
|
@ -72,6 +72,7 @@ function add_row(field) {
|
||||||
var selects = row.getElementsByTagName('select');
|
var selects = row.getElementsByTagName('select');
|
||||||
for (var i=0; i < selects.length; i++) {
|
for (var i=0; i < selects.length; i++) {
|
||||||
selects[i].name = selects[i].name.replace(/[a-z]\[[0-9]+/, '$&1');
|
selects[i].name = selects[i].name.replace(/[a-z]\[[0-9]+/, '$&1');
|
||||||
|
selects[i].selectedIndex = 0;
|
||||||
}
|
}
|
||||||
var input = row.getElementsByTagName('input')[0];
|
var input = row.getElementsByTagName('input')[0];
|
||||||
input.name = input.name.replace(/[a-z]\[[0-9]+/, '$&1');
|
input.name = input.name.replace(/[a-z]\[[0-9]+/, '$&1');
|
||||||
|
|
Loading…
Reference in a new issue