Changeset 1649
- Timestamp:
- 2010-08-06 14:05:22 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/kauri-forms/kauri-forms-extra/src/main/kauri/static/autocomplete/js/autocomplete.js
r1480 r1649 18 18 } 19 19 20 AutocompleteControl.prototype.elements = {}; 21 $.extend(AutocompleteControl.prototype.elements, kf.Control.prototype.elements); 22 $.extend(AutocompleteControl.prototype.elements, { 23 input : { 24 /* Kauri Forms needs an input-role element, but we don't (want to use the 'input' role), therefore 25 simply create a hidden div. */ 26 create : "<div style='display:none'/>" 27 }, 28 acinput : { 29 create : "<input type='text'/>" 30 } 20 AutocompleteControl.prototype.templates = {}; 21 $.extend(AutocompleteControl.prototype.templates, kf.Control.prototype.templates); 22 $.extend(AutocompleteControl.prototype.templates, { 23 control : 24 "<input type='text' kauri-role='acinput'/>" 31 25 }); 32 26 … … 91 85 } 92 86 93 AutocompleteControl.prototype.setValue = function(value ) {94 this["<super.call>"]("setValue", [value]);87 AutocompleteControl.prototype.setValue = function(value, noValidation) { 88 kf.Control.setValue(this, value, noValidation); 95 89 } 96 90 … … 99 93 } 100 94 101 AutocompleteControl.prototype.setWireValue = function(wireValue ) {95 AutocompleteControl.prototype.setWireValue = function(wireValue, noValidation) { 102 96 if (wireValue === undefined) { 103 this.setValue(undefined );97 this.setValue(undefined, noValidation); 104 98 this.$acinput.val(''); 105 99 } else { 106 this.setValue(wireValue )100 this.setValue(wireValue, noValidation); 107 101 this.$acinput.val(this.inputTemplate.expand(this.getValue(), true)); 108 102 }
Note: See TracChangeset
for help on using the changeset viewer.