diff --git a/forms/ManyManyComplexTableField.php b/forms/ManyManyComplexTableField.php index fad3ac758..00d34fd41 100644 --- a/forms/ManyManyComplexTableField.php +++ b/forms/ManyManyComplexTableField.php @@ -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; } diff --git a/javascript/RelationComplexTableField.js b/javascript/RelationComplexTableField.js index b80bd362b..2e98a29e5 100644 --- a/javascript/RelationComplexTableField.js +++ b/javascript/RelationComplexTableField.js @@ -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'); \ No newline at end of file +RelationComplexTableField.applyTo('#Form_EditForm div.ManyManyComplexTableField');