r82811 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82810‎ | r82811 | r82812 >
Date:20:01, 25 February 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for "existing values only" parameter for comboboxes
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -828,8 +828,10 @@
829829 delay: 0,
830830 change: function(event, ui) {
831831 if (!ui.item) {
832 - // remove invalid value, as it didn't match anything
833 - //jQuery(this).val("");
 832+ if (select.attr("existingvaluesonly") == 'true') {
 833+ // remove invalid value, as it didn't match anything
 834+ jQuery(this).val("");
 835+ }
834836 return false;
835837 }
836838 select.val(ui.item.id);