From 8290224b7bec6d74fff6e14efa9bed663b3a498e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 31 Jan 2014 16:30:59 +0000 Subject: [PATCH] Fix not able to un-select linked entry / select none --- etemplate/js/et2_widget_link.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index de0a2ca4e5..b9d76fe5b0 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -898,8 +898,11 @@ var et2_link_entry = et2_inputWidget.extend( * User selected a value */ select: function(event, selected) { - // Correct changed value from server - selected.item.value = selected.item.value.trim(); + if(selected.item.value !== null) + { + // 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(event, selected)) return false; @@ -991,7 +994,7 @@ et2_register_widget(et2_link_entry, ["link-entry"]); * * @augments et2_valueWidget */ -var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], +var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], { attributes: { "only_app": {