Fix not able to un-select linked entry / select none

This commit is contained in:
Nathan Gray 2014-01-31 16:30:59 +00:00
parent 0d357ee448
commit 8290224b7b

View File

@ -898,8 +898,11 @@ var et2_link_entry = et2_inputWidget.extend(
* User selected a value * User selected a value
*/ */
select: function(event, selected) { select: function(event, selected) {
// Correct changed value from server if(selected.item.value !== null)
selected.item.value = selected.item.value.trim(); {
// Correct changed value from server
selected.item.value = selected.item.value.trim();
}
if(this.options.select && typeof this.options.select == 'function') if(this.options.select && typeof this.options.select == 'function')
{ {
if(!this.options.select(event, selected)) return false; if(!this.options.select(event, selected)) return false;
@ -991,7 +994,7 @@ et2_register_widget(et2_link_entry, ["link-entry"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], var et2_link = et2_valueWidget.extend([et2_IDetachedDOM],
{ {
attributes: { attributes: {
"only_app": { "only_app": {