diff --git a/api/js/etemplate/et2_widget_url.js b/api/js/etemplate/et2_widget_url.js index 1f5af07b52..ffac6d3b8a 100644 --- a/api/js/etemplate/et2_widget_url.js +++ b/api/js/etemplate/et2_widget_url.js @@ -155,7 +155,22 @@ var et2_url = /** @class */ (function (_super_1) { .replace("%u", this.egw().user('account_lid')) .replace("%t", this.egw().user('account_phone')); var popup = this.egw().config("call_popup"); - value = function () { egw.open_link(link, '_phonecall', popup); }; + value = function (ev) { + if (popup && popup !== '_self') { + egw.open_link(link, '_phonecall', popup); + } + else { + // No popup, use AJAX. We don't care about the response. + (egw.window ? egw.window.jQuery : jQuery).ajax({ + url: link, + async: true, + dataType: 'json', + type: "GET" + }); + ev.preventDefault(); + return false; + } + }; } else { // Can't make a good handler diff --git a/api/js/etemplate/et2_widget_url.ts b/api/js/etemplate/et2_widget_url.ts index 544e942866..b001541ff1 100644 --- a/api/js/etemplate/et2_widget_url.ts +++ b/api/js/etemplate/et2_widget_url.ts @@ -198,7 +198,24 @@ class et2_url extends et2_textbox .replace("%u",this.egw().user('account_lid')) .replace("%t",this.egw().user('account_phone')); var popup = this.egw().config("call_popup"); - value = function() { egw.open_link(link, '_phonecall', popup); }; + value = function(ev : Event) { + if (popup && popup !== '_self') + { + egw.open_link(link, '_phonecall', popup); + } + else + { + // No popup, use AJAX. We don't care about the response. + (egw.window?egw.window.jQuery:jQuery).ajax({ + url: link, + async: true, + dataType: 'json', + type: "GET" + }); + ev.preventDefault(); + return false; + } + }; } else { // Can't make a good handler