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

@@ -32,10 +32,12 @@ use WebPage;
abstract class AbstractBlockLinksViewTable extends UIContentBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-abstract-block-links-view-table';
public const DEFAULT_JS_TEMPLATE_REL_PATH = 'application/links/layout';
public const DEFAULT_JS_FILES_REL_PATH = [
'js/links/link_set_worker.js',
public const BLOCK_CODE = 'ibo-abstract-block-links-view-table';
public const DEFAULT_JS_ON_READY_TEMPLATE_REL_PATH = 'application/links/layout';
public const DEFAULT_JS_FILES_REL_PATH = [
'js/links/links_view_table_widget.js',
'js/links/links_set_worker.js',
'js/objects/objects_worker.js',
'js/wizardhelper.js',
];
@@ -70,7 +72,7 @@ abstract class AbstractBlockLinksViewTable extends UIContentBlock
*/
public function __construct(WebPage $oPage, DBObject $oDbObject, string $sObjectClass, string $sAttCode, AttributeLinkedSet $oAttDef)
{
parent::__construct('', ["ibo-block-links-table"]);
parent::__construct("links_view_table_$sAttCode", ["ibo-block-links-table"]);
// retrieve parameters
$this->oAttDef = $oAttDef;
@@ -204,6 +206,8 @@ abstract class AbstractBlockLinksViewTable extends UIContentBlock
/**
* GetAttCode.
*
* @return string
*/
public function GetAttCode(): string
@@ -211,4 +215,33 @@ abstract class AbstractBlockLinksViewTable extends UIContentBlock
return $this->sAttCode;
}
/**
* GetLinkedClass.
*
* @return mixed
*/
public function GetLinkedClass()
{
return $this->oAttDef->GetLinkedClass();
}
/**
* GetExternalKeyToMe.
*
* @return mixed
*/
public function GetExternalKeyToMe()
{
return $this->oAttDef->GetExtKeyToMe();
}
/**
* GetWidgetName.
*
* @return string
*/
public function GetWidgetName(): string
{
return "oWidget{$this->GetId()}";
}
}