Project

General

Profile

Bug #51269 ยป jsfunc.tceforms_suggest.js.patch

Stefan Jelner, 2013-10-29 15:15

View differences:

jsfunc.tceforms_suggest.js 2013-10-29 15:01:53.612569600 +0100
var rec_field = arr[4];
var formEl = 'data[' + rec_table + '][' + rec_uid + '][' + rec_field + ']';
var suggestLabelNode = Element.select(this.escapeObjectId(item.id), '.suggest-label')[0];
var label = (suggestLabelNode.textContent ? suggestLabelNode.textContent : suggestLabelNode.innerText)
setFormValueFromBrowseWin(formEl, ins_table + '_' + ins_uid, label);
TBE_EDITOR.fieldChanged(rec_table, rec_uid, rec_field, formEl);
$(this.suggestField).value = this.defaultValue;
var suggestLabelNode = false;
item.childElements().each(function(el) {
if(el.hasClassName('suggest-label')) {
suggestLabelNode = el;
}
});
if(suggestLabelNode !== false) {
var label = (suggestLabelNode.textContent ? suggestLabelNode.textContent : suggestLabelNode.innerText)
setFormValueFromBrowseWin(formEl, ins_table + '_' + ins_uid, label);
TBE_EDITOR.fieldChanged(rec_table, rec_uid, rec_field, formEl);
$(this.suggestField).value = this.defaultValue;
}
}
},
    (1-1/1)