Merged revisions 48178 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.1asfonz

........
  r48178 | aoneil | 2008-01-18 09:04:53 +1300 (Fri, 18 Jan 2008) | 2 lines
  
  Fix incorrect text boxes being set on an ajax request
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48540 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-01-24 00:13:05 +00:00
parent d34672a260
commit 68f7be24ed
2 changed files with 6 additions and 5 deletions

View File

@ -65,7 +65,7 @@ class ManyManyComplexTableField extends HasManyComplexTableField {
$query->select[] = $k;
}
$parent = $this->controller->ClassName;
$query->select[] = "IF(`{$this->manyManyParentClass}ID` IS NULL, '0', '1') AS $this->joinField";
$query->select[] = "IF(`{$this->manyManyParentClass}ID` IS NULL, '0', '1') AS Checked";
}
return clone $query;
}

View File

@ -24,13 +24,14 @@ RelationComplexTableField.prototype = {
// 2) Initialize The Array Or Update The Hidden Input Field And The HTML Table
var checkedListName = checkedList.getAttribute( 'name' );
if( checkedListNameArray == null ) {
//if( checkedListNameArray == null ) {
checkedListNameArray = [];
checkedListNameArray.push( checkedListName );
checkedArray = [];
if( checkedList.getAttribute( 'value' ) )
checkedArray.push( checkedList.getAttribute( 'value' ).split( ',' ) );
}
//}
/*
else if( checkedListNameArray.indexOf( checkedListName ) < 0 ) {
checkedListNameArray.push( checkedListName );
if( checkedList.getAttribute( 'value' ) )
@ -55,7 +56,7 @@ RelationComplexTableField.prototype = {
else
markingInput.removeAttribute( 'checked' );
}
}
} */
// 3) Create The Rules