1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 19:44:00 +02:00

Disable maxlength with edit functions

This commit is contained in:
Jakub Vrana
2011-03-18 09:06:05 +01:00
parent cdeecc3e19
commit 622845b096
2 changed files with 16 additions and 1 deletions

View File

@@ -220,6 +220,21 @@ function editingKeydown(event) {
return true;
}
/** Disable maxlength for functions
* @param HTMLSelectElement
*/
function functionChange(select) {
var input = select.form[select.name.replace(/^function/, 'fields')];
if (selectValue(select)) {
if (input.origMaxLength === undefined) {
input.origMaxLength = input.maxLength;
}
input.removeAttribute('maxlength');
} else if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength;
}
}
/** Create AJAX request