mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Updated form editor's javascript to work with SSViewer-generated comments
This commit is contained in:
parent
7dbc05ba50
commit
197df65f2b
@ -24,13 +24,15 @@ FieldEditor.prototype = {
|
||||
var i, j, div, field, editables = fieldEditor.childNodes;
|
||||
|
||||
for( i = 0; div = editables[i]; i++ ) {
|
||||
var fields = div.getElementsByTagName('input');
|
||||
/*fields[fields.length - 1].value = i;*/
|
||||
for( j = 0; field = fields.item(j); j++ ) {
|
||||
if( field.name == div.id + '[Sort]' ) {
|
||||
field.value = i;
|
||||
}
|
||||
}
|
||||
if(div.getElementsByTagName) {
|
||||
var fields = div.getElementsByTagName('input');
|
||||
/*fields[fields.length - 1].value = i;*/
|
||||
for( j = 0; field = fields.item(j); j++ ) {
|
||||
if( field.name == div.id + '[Sort]' ) {
|
||||
field.value = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user