Ignore keywords in foreign keys
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1274 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
3c5c0f0141
commit
d0d1cc2b13
|
@ -25,7 +25,7 @@ function bodyLoad(version) {
|
||||||
|
|
||||||
|
|
||||||
function selectValue(select) {
|
function selectValue(select) {
|
||||||
return select.options[select.selectedIndex].text;
|
return select.value || select.options[select.selectedIndex].text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formField(form, name) {
|
function formField(form, name) {
|
||||||
|
@ -169,7 +169,7 @@ function editingTypeChange(type) {
|
||||||
|
|
||||||
function editingLengthFocus(field) {
|
function editingLengthFocus(field) {
|
||||||
var td = field.parentNode;
|
var td = field.parentNode;
|
||||||
if (/enum|set/.test(selectValue(td.previousSibling.firstChild))) {
|
if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) {
|
||||||
var edit = document.getElementById('enum-edit');
|
var edit = document.getElementById('enum-edit');
|
||||||
var val = field.value;
|
var val = field.value;
|
||||||
edit.value = (/^'.+','.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val);
|
edit.value = (/^'.+','.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val);
|
||||||
|
|
Loading…
Reference in a new issue