1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-28 08:39:53 +02:00

Driver for SimpleDB

This commit is contained in:
Jakub Vrana
2013-07-06 10:31:21 -07:00
parent b7739dc0bd
commit d17b17e515
19 changed files with 610 additions and 78 deletions

View File

@@ -30,10 +30,13 @@ function verifyVersion() {
}
/** Get value of select
* @param HTMLSelectElement
* @param HTMLElement <select> or <input>
* @return string
*/
function selectValue(select) {
if (!select.selectedIndex) {
return select.value;
}
var selected = select.options[select.selectedIndex];
return ((selected.attributes.value || {}).specified ? selected.value : selected.text);
}
@@ -257,10 +260,10 @@ function selectAddRow(field) {
selects[i].selectedIndex = 0;
}
var inputs = row.getElementsByTagName('input');
if (inputs.length) {
inputs[0].name = inputs[0].name.replace(/[a-z]\[\d+/, '$&1');
inputs[0].value = '';
inputs[0].className = '';
for (var i=0; i < inputs.length; i++) {
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
inputs[i].value = '';
inputs[i].className = '';
}
field.parentNode.parentNode.appendChild(row);
}