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:
bdalsass
2022-12-20 10:10:25 +01:00
committed by GitHub
parent 64146b6e1b
commit eda11e97e3
16 changed files with 109 additions and 27 deletions

View File

@@ -237,11 +237,27 @@ class BlockDirectLinksEditTable extends UIContentBlock
$aRowActions = array();
if (!$this->oAttributeLinkedSet->GetReadOnly()) {
$aRowActions[] = array(
'tooltip' => 'remove link',
'icon_classes' => 'fas fa-minus',
'js_row_action' => "$('#{$this->oUILinksDirectWidget->GetInputId()}').directlinks('instance')._deleteRow($(':checkbox', oTrElement));",
);
switch ($this->oAttributeLinkedSet->GetRelationType()) {
case LINKSET_RELATIONTYPE_LINK:
$aRowActions[] = array(
'label' => 'UI:Links:ActionRow:Detach',
'tooltip' => 'UI:Links:ActionRow:Detach+',
'icon_classes' => 'fas fa-minus',
'js_row_action' => "$('#{$this->oUILinksDirectWidget->GetInputId()}').directlinks('Remove', $(':checkbox', oTrElement));",
);
break;
case LINKSET_RELATIONTYPE_PROPERTY:
$aRowActions[] = array(
'label' => 'UI:Links:ActionRow:Delete',
'tooltip' => 'UI:Links:ActionRow:Delete+',
'icon_classes' => 'fas fa-trash',
'js_row_action' => "$('#{$this->oUILinksDirectWidget->GetInputId()}').directlinks('Remove', $(':checkbox', oTrElement));",
);
break;
}
}
return $aRowActions;