N°3563 - Migrate backoffice pages to new UIBlock system : Preferences (partial fix for favorite organizations and shortcuts)

This commit is contained in:
Eric
2021-02-10 14:31:19 +01:00
parent 91fd69e0bd
commit 19270a9dde

View File

@@ -164,16 +164,17 @@ JS
$oFavoriteOrganizationsSubmitButton = ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('UI:Button:Apply'), 'operation', 'apply', true);
$oFavoriteOrganizationsToolBar->AddSubBlock($oFavoriteOrganizationsSubmitButton);
if ($aFavoriteOrgs == null) {
// All checked
$oP->add_ready_script(
<<<JS
$('#$sIdFavoriteOrganizations .checkAll').prop('checked', true);
checkAllDataTable('datatable_$sIdFavoriteOrganizations',true,'$sIdFavoriteOrganizations');
JS
);
}
// TODO 3.0 have this code work again, currently it prevents the display of favorite organizations and shortcuts.
// if ($aFavoriteOrgs == null) {
// // All checked
// $oP->add_ready_script(
// <<<JS
// $('#$sIdFavoriteOrganizations.checkAll').prop('checked', true);
// checkAllDataTable('datatable_$sIdFavoriteOrganizations',true,'$sIdFavoriteOrganizations');
//JS
// );
//
// }
$oContentLayout->AddMainBlock($oFavoriteOrganizationsBlock);