r108375 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108374‎ | r108375 | r108376 >
Date:23:46, 8 January 2012
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for new 'values dependent on' field parameter - this involved making some other changes to the code, including replacing the 'relation' and 'attribute' parameters for the autocomplete API with just 'property', adding the 'origname' HTML attribute for inputs in multiple-instance templates, and creating the $sfgFieldProperties and $sfgDependentFields global variables.
Modified paths:
  • /trunk/extensions/SemanticForms/SemanticForms.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_AutocompleteAPI.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormField.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_ComboBoxInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextWithAutocompleteInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/SemanticForms.php
@@ -348,3 +348,5 @@
349349 # ##
350350 $sfgShowOnSelect = array();
351351 $sfgAutocompleteValues = array();
 352+$sfgFieldProperties = array();
 353+$sfgDependentFields = array();
Index: trunk/extensions/SemanticForms/includes/SF_FormField.php
@@ -48,11 +48,11 @@
4949 }
5050
5151 static function createFromDefinition( $fieldName, $inputName, $isMandatory, $isHidden, $isUploadable, $possibleValues, $isDisabled, $isList, $inputType, $fieldArgs, $allFields, $strictParsing ) {
52 - // see if this field matches one of the fields defined for this
 52+ // See if this field matches one of the fields defined for this
5353 // template - if it is, use all available information about
5454 // that field; if it's not, either include it in the form or
5555 // not, depending on whether the template has a 'strict'
56 - // setting in the form definition
 56+ // setting in the form definition.
5757 $the_field = null;
5858 foreach ( $allFields as $cur_field ) {
5959 if ( $fieldName == $cur_field->getFieldName() ) {
@@ -333,10 +333,10 @@
334334 if ( ! array_key_exists( 'autocompletion source', $other_args ) ) {
335335 if ( $this->template_field->getPropertyType() == '_wpg' ) {
336336 $other_args['autocompletion source'] = $this->template_field->getSemanticProperty();
337 - $other_args['autocomplete field type'] = 'relation';
 337+ $other_args['autocomplete field type'] = 'property';
338338 } elseif ( array_key_exists( 'autocomplete', $other_args ) || array_key_exists( 'remote autocompletion', $other_args ) ) {
339339 $other_args['autocompletion source'] = $this->template_field->getSemanticProperty();
340 - $other_args['autocomplete field type'] = 'attribute';
 340+ $other_args['autocomplete field type'] = 'property';
341341 }
342342 }
343343 // Now merge in the default values set by SFFormPrinter, if
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -734,6 +734,7 @@
735735 // =====================================================
736736 } elseif ( $tag_title == 'field' ) {
737737 $field_name = trim( $tag_components[1] );
 738+ $fullFieldName = $template_name . '[' . $field_name . ']';
738739 // cycle through the other components
739740 $is_mandatory = false;
740741 $is_hidden = false;
@@ -853,6 +854,9 @@
854855 $possible_values = SFUtils::getAllPagesForConcept( $sub_components[1] );
855856 } elseif ( $sub_components[0] == 'values from namespace' ) {
856857 $possible_values = SFUtils::getAllPagesForNamespace( $sub_components[1] );
 858+ } elseif ( $sub_components[0] == 'values dependent on' ) {
 859+ global $sfgDependentFields;
 860+ $sfgDependentFields[$sub_components[1]] = $fullFieldName;
857861 } elseif ( $sub_components[0] == 'property' ) {
858862 $semantic_property = $sub_components[1];
859863 } elseif ( $sub_components[0] == 'default filename' ) {
@@ -862,7 +866,7 @@
863867 $field_args['default filename'] = $default_filename;
864868 } elseif ( $sub_components[0] == 'restricted' ) {
865869 $is_restricted = !array_intersect(
866 - $wgUser->getEffectiveGroups(), array_map( 'trim', explode( ',', $sub_components[1] ) )
 870+ $wgUser->getEffectiveGroups(), array_map( 'trim', explode( ',', $sub_components[1] ) )
867871 );
868872 }
869873 }
@@ -1070,6 +1074,7 @@
10711075 // 'num' will get replaced by an actual index, either in PHP
10721076 // or in Javascript, later on
10731077 $input_name = $template_name . '[num][' . $field_name . ']';
 1078+ $field_args['origName'] = $template_name . '[' . $field_name . ']';
10741079 } else {
10751080 $input_name = $template_name . '[' . $field_name . ']';
10761081 }
@@ -1120,7 +1125,13 @@
11211126 if ( $semantic_property != null ) {
11221127 $form_field->template_field->setSemanticProperty( $semantic_property );
11231128 }
 1129+ $semantic_property = $form_field->template_field->getSemanticProperty();
 1130+ if ( !is_null( $semantic_property ) ) {
 1131+ global $sfgFieldProperties;
 1132+ $sfgFieldProperties[$fullFieldName] = $semantic_property;
 1133+ }
11241134
 1135+
11251136 // call hooks - unfortunately this has to be split into two
11261137 // separate calls, because of the different variable names in
11271138 // each case
Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -13,6 +13,7 @@
1414 class SFFormUtils {
1515 static function setGlobalJSVariables( &$vars ) {
1616 global $sfgAutocompleteValues, $sfgAutocompleteOnAllChars;
 17+ global $sfgFieldProperties, $sfgDependentFields;
1718 global $sfgScriptPath;
1819 // global $sfgInitJSFunctions, $sfgValidationJSFunctions;
1920 global $sfgShowOnSelect;
@@ -21,6 +22,8 @@
2223 $vars['sfgScriptPath'] = $sfgScriptPath;
2324 $vars['sfgAutocompleteValues'] = $sfgAutocompleteValues;
2425 $vars['sfgShowOnSelect'] = $sfgShowOnSelect;
 26+ $vars['sfgFieldProperties'] = $sfgFieldProperties;
 27+ $vars['sfgDependentFields'] = $sfgDependentFields;
2528 // $vars['sfgInitJSFunctions'] = $sfgInitJSFunctions;
2629 // $vars['sfgValidationJSFunctions'] = $sfgValidationJSFunctions;
2730 $vars['sfgFormErrorsHeader'] = wfMsg( 'sf_formerrors_header' );
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php
@@ -113,6 +113,9 @@
114114 $textarea_attrs['style'] = 'width: 100%';
115115 }
116116
 117+ if ( array_key_exists( 'origName', $other_args ) ) {
 118+ $inputAttrs['origName'] = $other_args['origName'];
 119+ }
117120 if ( !is_null( $remoteDataType ) ) {
118121 $textarea_attrs['autocompletedatatype'] = $remoteDataType;
119122 }
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextWithAutocompleteInput.php
@@ -39,12 +39,7 @@
4040 public static function getAutocompletionTypeAndSource( &$field_args ) {
4141 if ( array_key_exists( 'values from property', $field_args ) ) {
4242 $autocompletionSource = $field_args['values from property'];
43 - $propValue = SMWPropertyValue::makeUserProperty( $autocompletionSource );
44 - if ( $propValue->getPropertyTypeID() == '_wpg' ) {
45 - $autocompleteFieldType = 'relation';
46 - } else {
47 - $autocompleteFieldType = 'attribute';
48 - }
 43+ $autocompleteFieldType = 'property';
4944 } elseif ( array_key_exists( 'values from category', $field_args ) ) {
5045 $autocompleteFieldType = 'category';
5146 $autocompletionSource = $field_args['values from category'];
@@ -68,12 +63,7 @@
6964 $autocompletionSource = $field_args['autocompletion source'];
7065 } elseif ( array_key_exists( 'semantic_property', $field_args ) ) {
7166 $autocompletionSource = $field_args['semantic_property'];
72 - $propValue = SMWPropertyValue::makeUserProperty( $autocompletionSource );
73 - if ( $propValue->getPropertyTypeID() == '_wpg' ) {
74 - $autocompleteFieldType = 'relation';
75 - } else {
76 - $autocompleteFieldType = 'attribute';
77 - }
 67+ $autocompleteFieldType = 'property';
7868 } else {
7969 $autocompleteFieldType = null;
8070 $autocompletionSource = null;
@@ -164,6 +154,9 @@
165155 'tabindex' => $sfgTabIndex,
166156 'autocompletesettings' => $autocompleteSettings,
167157 );
 158+ if ( array_key_exists( 'origName', $other_args ) ) {
 159+ $inputAttrs['origName'] = $other_args['origName'];
 160+ }
168161 if ( !is_null( $remoteDataType ) ) {
169162 $inputAttrs['autocompletedatatype'] = $remoteDataType;
170163 }
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_ComboBoxInput.php
@@ -76,6 +76,9 @@
7777 'autocompletesettings' => $autocompletionSource,
7878 'comboboxwidth' => $pixel_width,
7979 );
 80+ if ( array_key_exists( 'origName', $other_args ) ) {
 81+ $selectAttrs['origname'] = $other_args['origName'];
 82+ }
8083 if ( array_key_exists( 'existing values only', $other_args ) ) {
8184 $selectAttrs['existingvaluesonly'] = 'true';
8285 }
Index: trunk/extensions/SemanticForms/includes/SF_AutocompleteAPI.php
@@ -22,20 +22,24 @@
2323 $params = $this->extractRequestParams();
2424 $substr = $params['substr'];
2525 $namespace = $params['namespace'];
26 - $attribute = $params['attribute'];
27 - $relation = $params['relation'];
 26+ $property = $params['property'];
2827 $category = $params['category'];
2928 $concept = $params['concept'];
3029 $external_url = $params['external_url'];
 30+ $baseprop = $params['baseprop'];
 31+ $basevalue = $params['basevalue'];
 32+ //$limit = $params['limit'];
3133
32 - if ( strlen( $substr ) == 0 ) {
 34+ if ( is_null( $baseprop ) && strlen( $substr ) == 0 ) {
3335 $this->dieUsage( 'The substring must be specified', 'param_substr' );
3436 }
3537
36 - if ( !is_null( $attribute ) ) {
37 - $data = self::getAllValuesForProperty( false, $attribute, $substr );
38 - } elseif ( !is_null( $relation ) ) {
39 - $data = self::getAllValuesForProperty( true, $relation, $substr );
 38+ if ( !is_null( $baseprop ) ) {
 39+ if ( !is_null( $property ) ) {
 40+ $data = self::getAllValuesForProperty( $property, null, $baseprop, $basevalue );
 41+ }
 42+ } elseif ( !is_null( $property ) ) {
 43+ $data = self::getAllValuesForProperty( $property, $substr );
4044 } elseif ( !is_null( $category ) ) {
4145 $data = SFUtils::getAllPagesForCategory( $category, 3, $substr );
4246 } elseif ( !is_null( $concept ) ) {
@@ -78,25 +82,27 @@
7983 ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
8084 ),
8185 'substr' => null, // Once 1.17 becomes acceptable as dependency, use ApiBase::PARAM_REQUIRED
82 - 'attribute' => null,
83 - 'relation' => null,
 86+ 'property' => null,
8487 'category' => null,
8588 'concept' => null,
8689 'namespace' => null,
8790 'external_url' => null,
 91+ 'baseprop' => null,
 92+ 'basevalue' => null,
8893 );
8994 }
9095
9196 protected function getParamDescription() {
9297 return array (
9398 'substr' => 'Search substring',
94 - 'attribute' => 'Attribute (non-page property) for which to search values',
95 - 'relation' => 'Relation (page property) for which to search values',
 99+ 'property' => 'Semantic property for which to search values',
96100 'category' => 'Category for which to search values',
97101 'concept' => 'Concept for which to search values',
98102 'namespace' => 'Namespace for which to search values',
99103 'external_url' => 'Alias for external URL from which to get values',
100 - 'limit' => 'Limit how many entries to return',
 104+ 'baseprop' => 'A previous property in the form to check against',
 105+ 'basevalue' => 'The value to check for the previous property',
 106+ //'limit' => 'Limit how many entries to return',
101107 );
102108 }
103109
@@ -107,7 +113,7 @@
108114 protected function getExamples() {
109115 return array (
110116 'api.php?action=sfautocomplete&substr=te',
111 - 'api.php?action=sfautocomplete&substr=te&relation=Has_author',
 117+ 'api.php?action=sfautocomplete&substr=te&property=Has_author',
112118 'api.php?action=sfautocomplete&substr=te&category=Authors',
113119 );
114120 }
@@ -116,7 +122,7 @@
117123 return __CLASS__ . ': $Id$';
118124 }
119125
120 - public static function getAllValuesForProperty( $is_relation, $property_name, $substring = null ) {
 126+ private static function getAllValuesForProperty( $property_name, $substring, $base_property_name = null, $base_value = null ) {
121127 global $sfgMaxAutocompleteValues;
122128
123129 $values = array();
@@ -124,6 +130,11 @@
125131 $sql_options = array();
126132 $sql_options['LIMIT'] = $sfgMaxAutocompleteValues;
127133
 134+ $property = SMWPropertyValue::makeUserProperty( $property_name );
 135+ $is_relation = ( $property->getPropertyTypeID() == '_wpg' );
 136+ $property_name = str_replace( ' ', '_', $property_name );
 137+ $conditions = array( 'p_ids.smw_title' => $property_name );
 138+
128139 if ( $is_relation ) {
129140 $value_field = 'o_ids.smw_title';
130141 $from_clause = $db->tableName( 'smw_rels2' ) . " r JOIN " . $db->tableName( 'smw_ids' ) . " p_ids ON r.p_id = p_ids.smw_id JOIN " . $db->tableName( 'smw_ids' ) . " o_ids ON r.o_id = o_ids.smw_id";
@@ -132,14 +143,30 @@
133144 $from_clause = $db->tableName( 'smw_atts2' ) . " a JOIN " . $db->tableName( 'smw_ids' ) . " p_ids ON a.p_id = p_ids.smw_id";
134145 }
135146
136 - $property_name = str_replace( ' ', '_', $property_name );
137 - $conditions = "p_ids.smw_title = '$property_name'";
 147+ if ( !is_null( $base_property_name ) ) {
 148+ $base_property = SMWPropertyValue::makeUserProperty( $base_property_name );
 149+ $base_is_relation = ( $base_property->getPropertyTypeID() == '_wpg' );
138150
139 - if ( $substring != null ) {
 151+ $base_property_name = str_replace( ' ', '_', $base_property_name );
 152+ $conditions['base_p_ids.smw_title'] = $base_property_name;
 153+ $main_prop_alias = ( $is_relation ) ? 'r' : 'a';
 154+ if ( $base_is_relation ) {
 155+ $from_clause .= " JOIN " . $db->tableName( 'smw_rels2' ) . " r_base ON $main_prop_alias.s_id = r_base.s_id";
 156+ $from_clause .= " JOIN " . $db->tableName( 'smw_ids' ) . " base_p_ids ON r_base.p_id = base_p_ids.smw_id JOIN " . $db->tableName( 'smw_ids' ) . " base_o_ids ON r_base.o_id = base_o_ids.smw_id";
 157+ $base_value = str_replace( ' ', '_', $base_value );
 158+ $conditions['base_o_ids.smw_title'] = $base_value;
 159+ } else {
 160+ $from_clause .= " JOIN " . $db->tableName( 'smw_atts2' ) . " a_base ON $main_prop_alias.s_id = a_base.s_id";
 161+ $from_clause .= " JOIN " . $db->tableName( 'smw_ids' ) . " base_p_ids ON a_base.p_id = base_p_ids.smw_id";
 162+ $conditions['a_base.value_xsd'] = $base_value;
 163+ }
 164+ }
 165+
 166+ if ( !is_null( $substring ) ) {
140167 $substring = str_replace( "'", "\'", strtolower( $substring ) );
141 - // utf8 conversion is needed in case MediaWiki is using
142 - // binary data storage
143 - $conditions .= " AND (REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '" . $substring . "%' OR REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '% " . $substring . "%')";
 168+ // UTF-8 conversion is needed in case MediaWiki is using
 169+ // binary data storage.
 170+ $conditions[] = "REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '" . $substring . "%' OR REPLACE(LOWER(CONVERT($value_field USING utf8)),'_',' ') LIKE '% " . $substring . "%'";
144171 }
145172
146173 $sql_options['ORDER BY'] = $value_field;
@@ -147,12 +174,7 @@
148175 $conditions, __METHOD__, $sql_options );
149176
150177 while ( $row = $db->fetchRow( $res ) ) {
151 - if ( $substring != null ) {
152 - $values[] = str_replace( '_', ' ', $row[0] );
153 - } else {
154 - $cur_value = str_replace( "'", "\'", $row[0] );
155 - $values[] = str_replace( '_', ' ', $cur_value );
156 - }
 178+ $values[] = str_replace( '_', ' ', $row[0] );
157179 }
158180 $db->freeResult( $res );
159181
Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -82,7 +82,10 @@
8383 }
8484 });
8585
86 - values = sfgAutocompleteValues[field_string];
 86+ values = jQuery(this).data('autocompletevalues');
 87+ if ( !values ) {
 88+ values = sfgAutocompleteValues[field_string];
 89+ }
8790 if (values != null) {
8891 // Local autocompletion
8992
@@ -96,12 +99,17 @@
97100 return split(term).pop();
98101 }
99102
 103+ var thisInput = jQuery(this);
 104+
100105 jQuery(this).autocomplete({
101106 minLength: 0,
102107 source: function(request, response) {
103108 // We need to re-get the set of values, since
104109 // the "values" variable gets overwritten.
105 - values = sfgAutocompleteValues[field_string];
 110+ values = thisInput.data( 'autocompletevalues' );
 111+ if ( !values ) {
 112+ values = sfgAutocompleteValues[field_string];
 113+ }
106114 response(jQuery.ui.autocomplete.filter(values, extractLast(request.term)));
107115 },
108116 focus: function() {
@@ -681,8 +689,11 @@
682690 function() {
683691 // Add in a 'b' at the end of the name to reduce the
684692 // chance of name collision with another field
685 - if (this.name)
 693+ if (this.name) {
 694+ var old_name = this.name.replace(/\[num\]/g, '');
 695+ jQuery(this).attr('origName', old_name);
686696 this.name = this.name.replace(/\[num\]/g, '[' + num_elements + 'b]');
 697+ }
687698
688699 if (this.id) {
689700
@@ -767,7 +778,7 @@
768779 // that doesn't involve removing and then recreating divs.
769780 new_div.find('.sfComboBoxActual').remove();
770781
771 - new_div.initializeJSElements();
 782+ new_div.initializeJSElements(true);
772783
773784 // Initialize new inputs
774785 new_div.find("input, select, textarea").each(
@@ -792,12 +803,76 @@
793804
794805 }
795806
 807+// The first argument is needed, even though it's an attribute of the element
 808+// on which this function is called, because it's the 'name' attribute for
 809+// regular inputs, and the 'origName' attribute for inputs in multiple-instance
 810+// templates.
 811+jQuery.fn.setDependentAutocompletion = function( dependentField, baseField, baseValue ) {
 812+ propName = sfgFieldProperties[dependentField];
 813+ baseProp = sfgFieldProperties[baseField];
 814+ var myServer = wgScriptPath + "/api.php";
 815+ myServer += "?action=sfautocomplete&format=json&property=" + propName + "&baseprop=" + baseProp + "&basevalue=" + baseValue;
 816+ var dependentValues = [];
 817+ var thisInput = jQuery(this);
 818+ // We use jQuery.ajax() here instead of jQuery.getJSON() so that the
 819+ // 'async' parameter can be set. That, in turn, is set because
 820+ // if the 2nd, "dependent" field is a combo box, it can have weird
 821+ // behavior: clicking on the down arrow for the combo box leads to a
 822+ // "blur" event for the base field, which causes the possible
 823+ // values to get recalculated, but not in time for the dropdown to
 824+ // change values - it still shows the old values. By setting
 825+ // "async: false", we guarantee that old values won't be shown - if
 826+ // the values haven't been recalculated yet, the dropdown won't
 827+ // appear at all.
 828+ // @TODO - handle this the right way, by having special behavior for
 829+ // the dropdown - it should get delayed until the values are
 830+ // calculated, then appear.
 831+ jQuery.ajax({
 832+ url: myServer,
 833+ dataType: 'json',
 834+ async: false,
 835+ success: function(data) {
 836+ realData = data.sfautocomplete;
 837+ jQuery.each(realData, function(key, val) {
 838+ dependentValues.push(val.title);
 839+ });
 840+ thisInput.data('autocompletevalues', dependentValues);
 841+ thisInput.attachAutocomplete();
 842+ }
 843+ });
 844+}
 845+
796846 /**
 847+ * Called on a 'base' field (e.g., for a country) - sets the autocompletion
 848+ * for its 'dependent' field (e.g., for a city).
 849+ */
 850+jQuery.fn.setAutocompleteForDependentField = function( partOfMultiple ) {
 851+ curValue = jQuery(this).val();
 852+ if ( curValue == null ) { return this; }
 853+
 854+ nameAttr = partOfMultiple ? 'origName' : 'name';
 855+ name = jQuery(this).attr(nameAttr);
 856+ dependentField = sfgDependentFields[name];
 857+ if ( dependentField != null ) {
 858+ if ( partOfMultiple ) {
 859+ jQuery(this).closest(".multipleTemplateInstance")
 860+ .find('[origName="' + dependentField + '"]')
 861+ .setDependentAutocompletion(dependentField, name, curValue);
 862+ } else {
 863+ jQuery('[name="' + dependentField + '"]')
 864+ .setDependentAutocompletion(dependentField, name, curValue);
 865+ }
 866+ }
 867+
 868+ return this;
 869+}
 870+
 871+/**
797872 * Initialize all the JS-using elements contained within this block - can be
798873 * called for either the entire HTML body, or for a div representing an
799874 * instance of a multiple-instance template.
800875 */
801 -jQuery.fn.initializeJSElements = function() {
 876+jQuery.fn.initializeJSElements = function( partOfMultiple ) {
802877 this.find(".sfShowIfSelected").each( function() {
803878 jQuery(this)
804879 .showIfSelected(true)
@@ -845,6 +920,20 @@
846921 'overlayColor' : '#222',
847922 'overlayOpacity' : '0.8'
848923 });
 924+
 925+ this.find('input, select')
 926+ .setAutocompleteForDependentField( partOfMultiple )
 927+ .blur( function() {
 928+ jQuery(this).setAutocompleteForDependentField( partOfMultiple );
 929+ });
 930+ // The 'blur' event doesn't get triggered for radio buttons for
 931+ // Chrome and Safari (the WebKit-based browsers) so use the 'change'
 932+ // event in addition.
 933+ // @TODO - blur() shuldn't be called at all for radio buttons.
 934+ this.find('input:radio')
 935+ .change( function() {
 936+ jQuery(this).setAutocompleteForDependentField( partOfMultiple );
 937+ });
849938 }
850939
851940 var num_elements = 0;
@@ -876,7 +965,7 @@
877966 var id = select[0].id;
878967 var curval = select[0].options[0].value;
879968 curval = curval.replace('"', '"' );
880 - var input = jQuery("<input id=\"" + id + "\" type=\"text\" name=\" " + name + " \" value=\"" + curval + "\">")
 969+ var input = jQuery("<input id=\"" + id + "\" type=\"text\" name=\"" + name + "\" value=\"" + curval + "\">")
881970 .insertAfter(select)
882971 .attr("tabIndex", select.attr("tabIndex"))
883972 .attr("autocompletesettings", select.attr("autocompletesettings"))
@@ -917,6 +1006,7 @@
9181007 minLength: 0
9191008 })
9201009 .addClass("ui-widget ui-widget-content ui-corner-left sfComboBoxActual");
 1010+ input.attr("origname", select.attr("origname"));
9211011 jQuery('<button type="button">&nbsp;</button>')
9221012 .attr("tabIndex", -1)
9231013 .attr("title", "Show All Items")

Follow-up revisions

RevisionCommit summaryAuthorDate
r108501Follow-up to r108375 - fixes for Javascript for dependent autocompletionyaron14:03, 10 January 2012