mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°2847 Finish UX/UI for new caselog entry
This commit is contained in:
@@ -243,4 +243,29 @@ class PopoverMenuFactory
|
||||
|
||||
return $oMenu;
|
||||
}
|
||||
|
||||
public static function MakeMenuForActivityNewEntryFormSubmit(array $aCaseLogs): PopoverMenu
|
||||
{
|
||||
$oMenu = new PopoverMenu();
|
||||
$sMenuId = $oMenu->GetId();
|
||||
|
||||
$aItems = [];
|
||||
foreach ($aCaseLogs as $sCaseLogAttCode => $sCaseLogLabel) {
|
||||
// JS
|
||||
$aItems[] = PopoverMenuItemFactory::MakeFromApplicationPopupMenuItem(
|
||||
new JSPopupMenuItem(
|
||||
$sCaseLogAttCode,
|
||||
$sCaseLogLabel,
|
||||
<<<JS
|
||||
$('#$sMenuId').hide();
|
||||
$(this).parents('[data-role="ibo-activity-new-entry-form--action-buttons--right-actions"]').trigger('submit', ['caselog', '$sCaseLogAttCode']);
|
||||
JS
|
||||
));
|
||||
}
|
||||
|
||||
$oMenu->AddSection('ibo-activity-new-entry-new-entry--submit--caselogs')
|
||||
->SetItems('ibo-activity-new-entry-new-entry--submit--caselogs', $aItems);
|
||||
|
||||
return $oMenu;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user