From a1078e6b0ac424896ceddaf225c5717d347de8f3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 10 Jul 2012 23:13:05 +0000 Subject: [PATCH] Get description menuaction style popups working --- etemplate/js/et2_widget_description.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/etemplate/js/et2_widget_description.js b/etemplate/js/et2_widget_description.js index 4aa815c2dd..e7028ea5ea 100644 --- a/etemplate/js/et2_widget_description.js +++ b/etemplate/js/et2_widget_description.js @@ -160,13 +160,25 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], { this.options.href = _values["href"]; } - if (typeof _values["value"] != "undefined" || updateLink) + if (typeof _values["value"] != "undefined" || (updateLink && (_values["value"] || this.options.value))) { et2_insertLinkText(this._parseText( - _values["value"] ? _values["value"] : this.options.value), - _nodes[0], - this.options.extra_link_target + _values["value"] ? _values["value"] : this.options.value), + _nodes[0], + this.options.extra_link_target ); + if(this.options.extra_link_popup) + { + var href = this.options.href; + var title = this.options.extra_link_title; + var popup = this.options.extra_link_popup; + jQuery('a',_nodes[0]) + .click(function(e) { + egw.open_link(href, title,popup); + e.preventDefault(); + return false; + }); + } } if (typeof _values["class"] != "undefined")