N°2847 - ActivityPanel: Rework for new UX

- Add MetaModel::GetCaseLogs($sClass) function
- Rename ActivityNewEntryForm to CaseLogEntryForm
- Rework ActivityPanel and CaseLogEntryForm markup / CSS
- Change for 1 CaseLogEntryForm per tab (caselogs and activity) with specific "Add entry..." choices
This commit is contained in:
Molkobain
2020-11-20 16:11:43 +01:00
parent 1e7d4e5c31
commit 7d0f1f46d3
25 changed files with 1027 additions and 537 deletions

View File

@@ -244,27 +244,4 @@ 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
$(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;
}
}