1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 13:51:33 +02:00

Disable inactive buttons

This commit is contained in:
Jakub Vrana
2013-07-11 16:30:31 -07:00
parent 999215a7e9
commit 166a2f67f8

View File

@@ -80,6 +80,13 @@ function trCheck(el) {
*/
function selectCount(id, count) {
setHtml(id, (count === '' ? '' : '(' + count + ')'));
var inputs = document.getElementById(id).parentNode.parentNode.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
var input = inputs[i];
if (input.type == 'submit') {
input.disabled = (count == '0');
}
}
}
/** Check all elements matching given name