mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
d34672a260
commit
68f7be24ed
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
@ -111,4 +112,4 @@ RelationComplexTableField.prototype = {
|
||||
|
||||
RelationComplexTableField.applyTo('#Form_EditForm div.HasOneComplexTableField');
|
||||
RelationComplexTableField.applyTo('#Form_EditForm div.HasManyComplexTableField');
|
||||
RelationComplexTableField.applyTo('#Form_EditForm div.ManyManyComplexTableField');
|
||||
RelationComplexTableField.applyTo('#Form_EditForm div.ManyManyComplexTableField');
|
||||
|
Loading…
Reference in New Issue
Block a user