Files
iTop/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig
bdalsass bdb29fd99a Issue/5074 - Routage, Block UI relations, Links row actions (#369)
* datatable row actions

Below is a sample of extra param to enable feature:

		$aExtraParams['row_actions'] = [
			[
				'tooltip'        => 'remove an element',
				'icon_css_class' => 'fa-minus',
				'js_row_action'   => 'console.log("You clicked the remove button");',
				'confirmation'  => [
					'message'                  => 'UI:ConfirmationMessage',
					'message_row_data'         => "name",
					'remember_choice_pref_key' => 'remove_do_not_show_again',
				],
			],
			[
				'tooltip'        => 'open in new tab',
				'icon_css_class' => 'fa-external-link-square-alt',
				'on_action_js'   => 'window.open("http://localhost/itop-branchs/dev/pages/UI.php?operation=details&class=UserRequest&id=" + aData.id + "&c[menu]=UserRequest%3AOpenRequests");',
			],
			[
				'tooltip'        => 'other actions',
				'icon_css_class' => 'fa-ellipsis-v',
				'on_action_js'   => 'console.log(event);',
			],
		];

* Contrôleur pour la suppression et le détachement de liens
* Block UI pour l'édition des relations
* Block UI pour la visualisation des relations
* Boutons d'actions pour la suppression et le détachement de liens
* Gestion dialogue de confirmation pour les row actions
2022-11-23 16:10:34 +01:00

35 lines
1.4 KiB
Twig

{# @copyright Copyright (C) 2010-2021 Combodo SARL #}
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% apply spaceless %}
$('#dlg_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').dialog({
width: $(window).width()*0.8,
height: $(window).height()*0.8,
title:"{{ 'UI:AddObjectsOf_Class_LinkedWith_Class'|dict_format(oUIBlock.oUILinksWidget.GetLinkedClass(), oUIBlock.oUILinksWidget.GetClass()) }}" ,
autoOpen: false,
modal: true,
resizeStop: oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.UpdateSizes,
buttons: [
{
text: "{{ 'UI:Button:Cancel'| dict_s }}",
class: "ibo-is-alternative ibo-is-neutral",
click: function() {
$(this).dialog('close');
}
},
{
text: "{{ 'UI:Button:Add'| dict_s }}",
class: "ibo-is-regular ibo-is-primary",
id: "btn_ok_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}",
click: function() {
return oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.DoAddObjects();
}
},
],
});
$('#SearchFormToAdd_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }} form').bind('submit.uilinksWizard', oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.SearchObjectsToAdd);
$('#SearchFormToAdd_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').resize(oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.UpdateSizes);
{% endapply %}