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

@@ -35,7 +35,7 @@ class BlockDirectLinksViewTable extends AbstractBlockLinksViewTable
'object_id' => $this->oDbObject->GetKey(),
'menu' => MetaModel::GetConfig()->Get('allow_menu_on_linkset'),
'default' => $this->GetDefault(),
'table_id' => $this->sObjectClass.'_'.$this->sAttCode,
'table_id' => $this->GetTableId(),
'row_actions' => $this->GetRowActions(),
);
}
@@ -51,26 +51,28 @@ class BlockDirectLinksViewTable extends AbstractBlockLinksViewTable
case LINKSET_RELATIONTYPE_LINK:
$aRowActions[] = array(
'tooltip' => 'UI:Links:ActionRow:detach',
'label' => 'UI:Links:ActionRow:Detach',
'tooltip' => 'UI:Links:ActionRow:Detach+',
'icon_classes' => 'fas fa-minus',
'js_row_action' => "LinkSetWorker.DetachLinkedObject('{$this->sTargetClass}', aRowData['{$this->sTargetClass}/_key_/raw'], '{$this->oAttDef->GetExtKeyToMe()}');",
'confirmation' => [
'message' => 'UI:Links:ActionRow:detach:confirmation',
'message' => 'UI:Links:ActionRow:Detach:Confirmation',
'message_row_data' => "{$this->sTargetClass}/hyperlink",
'do_not_show_again_pref_key' => 'LinkSetWorker.DetachLinkedObject',
'do_not_show_again_pref_key' => $this->GetDoNotShowAgainPreferenceKey(),
],
);
break;
case LINKSET_RELATIONTYPE_PROPERTY:
$aRowActions[] = array(
'tooltip' => 'UI:Links:ActionRow:delete',
'label' => 'UI:Links:ActionRow:Delete',
'tooltip' => 'UI:Links:ActionRow:Delete+',
'icon_classes' => 'fas fa-trash',
'js_row_action' => "LinkSetWorker.DeleteLinkedObject('{$this->oAttDef->GetLinkedClass()}', aRowData['{$this->oAttDef->GetLinkedClass()}/_key_/raw']);",
'confirmation' => [
'message' => 'UI:Links:ActionRow:delete:confirmation',
'message' => 'UI:Links:ActionRow:Delete:Confirmation',
'message_row_data' => "{$this->sTargetClass}/hyperlink",
'do_not_show_again_pref_key' => 'LinkSetWorker.DeleteLinkedObject',
'do_not_show_again_pref_key' => $this->GetDoNotShowAgainPreferenceKey(),
],
);
break;