N°5904 - Use attribute linked set edit mode to enable actions (#440)

* Add corresponding buttons depending on old edit mode (need to check with piR pour récuperer l'ancienne valeur.

* N°5904 - Handle attribute linked set edit_mode

* N°5904 Move calls to private jquery widget methods to public

* N°5904 - Worker improvements add button on link tagset

* Change itop set widget to new set block UI (5)

* Change itop set widget to new set block UI (5)

* Renommage variables JS avec le prefix combodo

* Search dialog block id conflict with form id

* add moved js files in iTopWebPage compatibility list

---------

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
This commit is contained in:
bdalsass
2023-02-06 16:07:55 +01:00
committed by GitHub
parent 3fbc5e1ce0
commit 1fe9520b7e
28 changed files with 801 additions and 356 deletions

View File

@@ -58,11 +58,12 @@ class BlockIndirectLinksViewTable extends AbstractBlockLinksViewTable
if ($this->oAttDef->HasDescription()) {
$aExtraParams['panel_title_tooltip'] = $this->oAttDef->GetDescription();
}
// Add creation in modal if the linkset is not readonly
if (!$this->oAttDef->GetReadOnly()) {
$sHostClass = get_class($this->oDbObject);
$aExtraParams['creation_in_modal_is_allowed'] = true;
$aExtraParams['creation_in_modal_js_handler'] = 'LinkSetWorker.CreateLinkedObject("'.$this->GetTableId().'");';
$aExtraParams['creation_in_modal_js_handler'] = "{$this->GetWidgetName()}.links_view_table('CreateLinkedObject');";
}
return $aExtraParams;
@@ -79,7 +80,7 @@ class BlockIndirectLinksViewTable extends AbstractBlockLinksViewTable
'label' => 'UI:Links:ActionRow:Detach',
'tooltip' => 'UI:Links:ActionRow:Detach+',
'icon_classes' => 'fas fa-minus',
'js_row_action' => "LinkSetWorker.DeleteLinkedObject('{$this->oAttDef->GetLinkedClass()}', aRowData['Link/_key_/raw'], '{$this->GetTableId()}');",
'js_row_action' => "{$this->GetWidgetName()}.links_view_table('DeleteLinkedObject', aRowData['Link/_key_/raw'], oTrElement);",
'confirmation' => [
'message' => 'UI:Links:ActionRow:Detach:Confirmation',
'message_row_data' => "Remote/hyperlink",
@@ -91,7 +92,7 @@ class BlockIndirectLinksViewTable extends AbstractBlockLinksViewTable
'label' => 'UI:Links:ActionRow:Modify',
'tooltip' => 'UI:Links:ActionRow:Modify+',
'icon_classes' => 'fas fa-pen',
'js_row_action' => "LinkSetWorker.ModifyLinkedObject('{$this->oAttDef->GetLinkedClass()}', aRowData['Link/_key_/raw'], '{$this->GetTableId()}');",
'js_row_action' => "{$this->GetWidgetName()}.links_view_table('ModifyLinkedObject', aRowData['Link/_key_/raw']);",
);
}