mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
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:
@@ -37,6 +37,7 @@ class Set extends AbstractInput
|
||||
public const DEFAULT_JS_ON_READY_TEMPLATE_REL_PATH = 'base/components/input/set/layout';
|
||||
|
||||
public const DEFAULT_JS_FILES_REL_PATH = [
|
||||
'js/links/links_set_worker.js',
|
||||
'js/selectize/plugin_combodo_add_button.js',
|
||||
'js/selectize/plugin_combodo_auto_position.js',
|
||||
'js/selectize/plugin_combodo_update_operations.js',
|
||||
@@ -55,6 +56,9 @@ class Set extends AbstractInput
|
||||
/** @var bool $bHasAddOptionButton Enable add option button */
|
||||
private bool $bHasAddOptionButton;
|
||||
|
||||
/** @var string|null $sAddOptionButtonJsOnClick JS code to execute on button click */
|
||||
private ?string $sAddOptionButtonJsOnClick;
|
||||
|
||||
/** @var string $sAddButtonTitle Add button title */
|
||||
private string $sAddButtonTitle;
|
||||
|
||||
@@ -103,6 +107,7 @@ class Set extends AbstractInput
|
||||
$this->iMaxOptions = null;
|
||||
$this->bHasRemoveItemButton = true;
|
||||
$this->bHasAddOptionButton = false;
|
||||
$this->sAddOptionButtonJsOnClick = null;
|
||||
$this->sAddButtonTitle = Dict::S('UI:Button:Create');
|
||||
$this->bIsPreloadEnabled = false;
|
||||
$this->sTemplateOptions = null;
|
||||
@@ -183,6 +188,30 @@ class Set extends AbstractInput
|
||||
return $this->bHasRemoveItemButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* SetAddOptionButtonJsOnClick.
|
||||
*
|
||||
* @param string $sJsOnClick
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetAddOptionButtonJsOnClick(string $sJsOnClick): Set
|
||||
{
|
||||
$this->sAddOptionButtonJsOnClick = $sJsOnClick;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetAddOptionButtonJsOnClick.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetAddOptionButtonJsOnClick(): string
|
||||
{
|
||||
return $this->sAddOptionButtonJsOnClick;
|
||||
}
|
||||
|
||||
/**
|
||||
* SetHasAddOptionButton.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user