From a204c7fb4b05448fb2b0fb2f598214901d717d74 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 5 Feb 2013 12:50:20 +0000 Subject: [PATCH] do NOT generate links for phone-numbers, if no phone integration configured --- etemplate/js/et2_widget_url.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_widget_url.js b/etemplate/js/et2_widget_url.js index 8f246e42bf..5ee676a141 100644 --- a/etemplate/js/et2_widget_url.js +++ b/etemplate/js/et2_widget_url.js @@ -214,14 +214,14 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],{ var link = et2_url.prototype.get_link(this._type, _value); - if(link == false && this.getDOMNode().nodeName == "A") + if(!link && this.getDOMNode().nodeName == "A") { this.span = $j(document.createElement("span")); this.span.text(_value); this.setDOMNode(this.span[0]); return; } - else if (this.getDOMNode().nodeName != "A") + else if (this.getDOMNode().nodeName != "A" && link) { this.span = $j(document.createElement("a")); this.setDOMNode(this.span[0]); @@ -237,7 +237,7 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],{ this.span.click(this, link); this.span.attr("href", "javascript:void(0)"); } - else if (link !== false) + else if (link) { this.span.attr("href", link); }