From 2111c50f9ac78b2fc18c42cbbe723de803ba6c90 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 17 Dec 2021 11:38:49 +0100 Subject: Find - Quick action n1 treatment: add redirect in table quick action - fix resulting_pk initialization (refs #5231) --- ishtar_common/templates/blocks/DataTables.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html index 2719a9b46..a4b34cd04 100644 --- a/ishtar_common/templates/blocks/DataTables.html +++ b/ishtar_common/templates/blocks/DataTables.html @@ -223,7 +223,7 @@ jQuery(document).ready(function(){ "style": {% if multiple_select or quick_actions %}'multi'{% else %}'single'{% endif %} }, {% if multiple_select or quick_actions %}"buttons": [ - {% for url, title, icon, target in quick_actions %} + {% for url, title, icon, target, is_popup in quick_actions %} { {% if target == 'one' %}extend: 'selectedSingle', {% elif target == 'many' %}extend: 'selected', @@ -233,7 +233,11 @@ jQuery(document).ready(function(){ titleAttr: "{{title}}", action: function (e, dt, node, config) { var url = dt_generate_qa_url(dt, "{{url}}"); + {% if is_popup %} dt_qa_open(url); + {% else %} + window.location.href = url; + {% endif %} return false; } }, -- cgit v1.2.3