r108501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108500‎ | r108501 | r108502 >
Date:14:03, 10 January 2012
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r108375 - fixes for Javascript for dependent autocompletion
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -17,7 +17,7 @@
1818 /* extending jQuery functions for custom highlighting */
1919 jQuery.ui.autocomplete.prototype._renderItem = function( ul, item) {
2020
21 - var delim = this.element.context.delimiter;
 21+ var delim = this.element.context.delimiter;
2222 if ( delim == null ) {
2323 term = this.term;
2424 } else {
@@ -921,11 +921,17 @@
922922 'overlayOpacity' : '0.8'
923923 });
924924
925 - this.find('input, select')
 925+ // @TODO - this should ideally be called only for inputs that have
 926+ // a dependent field - which might involve changing the storage of
 927+ // "dependent fields" information from a global variable to a
 928+ // per-input HTML attribute.
 929+ this.find('input, select[class!="sfComboBox"]').each( function() {
 930+ jQuery(this)
926931 .setAutocompleteForDependentField( partOfMultiple )
927932 .blur( function() {
928933 jQuery(this).setAutocompleteForDependentField( partOfMultiple );
929934 });
 935+ });
930936 // The 'blur' event doesn't get triggered for radio buttons for
931937 // Chrome and Safari (the WebKit-based browsers) so use the 'change'
932938 // event in addition.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108375Added handling for new 'values dependent on' field parameter - this involved ...yaron23:46, 8 January 2012