Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -852,7 +852,7 @@ |
853 | 853 | $possible_values = SFUtils::getAllPagesForNamespace( $sub_components[1] ); |
854 | 854 | } elseif ( $sub_components[0] == 'values dependent on' ) { |
855 | 855 | global $sfgDependentFields; |
856 | | - $sfgDependentFields[$sub_components[1]] = $fullFieldName; |
| 856 | + $sfgDependentFields[] = array( $sub_components[1], $fullFieldName ); |
857 | 857 | } elseif ( $sub_components[0] == 'property' ) { |
858 | 858 | $semantic_property = $sub_components[1]; |
859 | 859 | } elseif ( $sub_components[0] == 'default filename' ) { |
Index: trunk/extensions/SemanticForms/libs/SemanticForms.js |
— | — | @@ -945,15 +945,18 @@ |
946 | 946 | |
947 | 947 | nameAttr = partOfMultiple ? 'origName' : 'name'; |
948 | 948 | name = jQuery(this).attr(nameAttr); |
949 | | - dependentField = sfgDependentFields[name]; |
950 | | - if ( dependentField != null ) { |
951 | | - if ( partOfMultiple ) { |
952 | | - jQuery(this).closest(".multipleTemplateInstance") |
953 | | - .find('[origName="' + dependentField + '"]') |
954 | | - .setDependentAutocompletion(dependentField, name, curValue); |
955 | | - } else { |
956 | | - jQuery('[name="' + dependentField + '"]') |
957 | | - .setDependentAutocompletion(dependentField, name, curValue); |
| 949 | + for ( var i in sfgDependentFields ) { |
| 950 | + dependentFieldPair = sfgDependentFields[i]; |
| 951 | + if ( dependentFieldPair[0] == name ) { |
| 952 | + dependentField = dependentFieldPair[1]; |
| 953 | + if ( partOfMultiple ) { |
| 954 | + jQuery(this).closest(".multipleTemplateInstance") |
| 955 | + .find('[origName="' + dependentField + '"]') |
| 956 | + .setDependentAutocompletion(dependentField, name, curValue); |
| 957 | + } else { |
| 958 | + jQuery('[name="' + dependentField + '"]') |
| 959 | + .setDependentAutocompletion(dependentField, name, curValue); |
| 960 | + } |
958 | 961 | } |
959 | 962 | } |
960 | 963 | |