mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 19:18:44 +02:00
N°5074 - Linkset datatable actions row improvements
Linkset updates, feedbacks 09/12: - Distinguish action label and tool tip message - Change default action button label Ok => Confirm - Use action label in place of default confirm button label - Attach do not show again preference key to table instance - Obsolescence flag for link selection (select all) issue correction
This commit is contained in:
@@ -10,21 +10,23 @@
|
||||
// variables accessible from action row js
|
||||
let oDatatable = $('#{{ oUIBlock.GetId() }}').DataTable();
|
||||
let oTrElement = $(this).closest('tr');
|
||||
let sLabel = $(this).data('label');
|
||||
let iActionId = $(this).data('action-id');
|
||||
let aRowData = oDatatable.row(oTrElement).data();
|
||||
|
||||
{% if aAction.confirmation is defined %}
|
||||
|
||||
// Prepare confirmation message
|
||||
let sMessage = '{{ 'UI:Datatables:RowActions:ConfirmationMessage'|dict_s }}';
|
||||
let sMessage = `{{ 'UI:Datatables:RowActions:ConfirmationMessage'|dict_s|raw }}`;
|
||||
{% if aAction.confirmation.message is defined %}
|
||||
sMessage = '{{ aAction.confirmation.message|dict_s|raw }}';
|
||||
sMessage = `{{ aAction.confirmation.message|dict_s|raw }}`;
|
||||
{% endif %}
|
||||
|
||||
// Handle action row with confirmation modal
|
||||
CombodoModal.OpenConfirmationModal({
|
||||
title: '{{ 'UI:Datatables:RowActions:ConfirmationDialog'|dict_s }}',
|
||||
content: sMessage.replaceAll('{item}', aRowData['{{ aAction.confirmation.message_row_data }}']),
|
||||
confirm_button_label: sLabel,
|
||||
callback_on_confirm: ActionRowFunction{{ oUIBlock.GetId() }}{{ loop.index0 }},
|
||||
{% if aAction.confirmation.do_not_show_again_pref_key is defined %}
|
||||
do_not_show_again_pref_key: '{{ aAction.confirmation.do_not_show_again_pref_key }}',
|
||||
|
||||
Reference in New Issue
Block a user