autocomplete sets field passed in attr target

when a folder is selected by autocompletion, its id will be copied
to the input field with the element id passed in attribute target
This commit is contained in:
Uwe Steinmann 2014-03-26 17:34:33 +01:00
parent e1a49b1cf2
commit 4fccb5fc2b

View File

@ -104,7 +104,9 @@ $(document).ready( function() {
updater: function (item) { updater: function (item) {
strarr = item.split("#"); strarr = item.split("#");
//console.log(this.options.formname); //console.log(this.options.formname);
$('#targetid' + this.options.formname).attr('value', strarr[0]); // console.log(this.$element.attr('target'));
/* Attribute target has the field name storing the selected id */
$('#'+this.$element.attr('target')).attr('value', strarr[0]);
return strarr[1]; return strarr[1];
}, },
/* Set a matcher that allows any returned value */ /* Set a matcher that allows any returned value */