From: Patrice G. <pat...@us...> - 2006-07-28 03:51:31
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Components/Nonlocalized.lproj/ERXJSPopUpRelationPicker.wo In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26084/Components/Nonlocalized.lproj/ERXJSPopUpRelationPicker.wo Modified Files: ERXJSPopUpRelationPicker.html Log Message: Fixing behavior when editing existing objects or cycling on the same page due to errors Index: ERXJSPopUpRelationPicker.html =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Components/Nonlocalized.lproj/ERXJSPopUpRelationPicker.wo/ERXJSPopUpRelationPicker.html,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ERXJSPopUpRelationPicker.html 26 Jun 2006 12:38:06 -0000 1.13 --- ERXJSPopUpRelationPicker.html 28 Jul 2006 03:51:26 -0000 1.14 *************** *** 41,46 **** } } ! if(selectControl.options.length > 0) { ! selectControl.options[0].selected = !hasSelection; } } --- 41,46 ---- } } ! if(selectControl.options.length > 0 && !hasSelection) { ! selectControl.options[0].selected = true; } } *************** *** 99,103 **** ERXJSPopupRelationshipPicker_updateSelectControl(this.childControl,children,this.childStringForAll); } ! ERXJSPopupRelationshipPicker.prototype.parentChanged = function() { var children = new Array(); var hasSelection = false; --- 99,103 ---- ERXJSPopupRelationshipPicker_updateSelectControl(this.childControl,children,this.childStringForAll); } ! ERXJSPopupRelationshipPicker.prototype.parentChanged = function(selectedChild) { var children = new Array(); var hasSelection = false; *************** *** 113,118 **** parent.isSelected = false; } for(var j = 0; j < parent.children.length; j++) { ! if(j == parent.defaultSubItem) { parent.children[j].isSelected = option.selected; } else { --- 113,122 ---- parent.isSelected = false; } + childToSelect = parent.defaultSubItem; + if (selectedChild!=null) { + childToSelect=selectedChild; + } for(var j = 0; j < parent.children.length; j++) { ! if(j == childToSelect) { parent.children[j].isSelected = option.selected; } else { |