N°2847 First iteration for newsroom menu:

* Kept old js widget but refactored/tweak'd it with some of our new conventions
* Added a newsroom menu component extending popupmenu
* Working as in 2.7
Still todo :
* Add variables for scss file
* Use wiget variables for most of js widget
* Correctly place the popup (absolute with <> containers ? poppers.js ? )
* Intialize toggler red bubble when new messages are in
* Replace hardcoded text in usermenu with correct dict entry updated with the nb of new message
* Only allow to open the popup when ajax calls are done
This commit is contained in:
Stephen Abello
2020-08-06 14:35:02 +02:00
parent c9dab08324
commit a5216de232
19 changed files with 427 additions and 82 deletions

View File

@@ -21,7 +21,9 @@ namespace Combodo\iTop\Application\UI\Layout\NavigationMenu;
use ApplicationContext;
use Combodo\iTop\Application\UI\Component\PopoverMenu\NewsroomMenu\NewsroomMenuFactory;
use Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenuFactory;
use MetaModel;
/**
* Class NavigationMenuFactory
@@ -44,10 +46,18 @@ class NavigationMenuFactory
*/
public static function MakeStandard()
{
$oNewsroomMenu = null;
if (MetaModel::GetConfig()->Get('newsroom_enabled'))
{
$oNewsroomMenu = NewsroomMenuFactory::MakeNewsroomMenuForNavigationMenu();
}
return new NavigationMenu(
NavigationMenu::BLOCK_CODE,
new ApplicationContext(),
PopoverMenuFactory::MakeUserMenuForNavigationMenu()
PopoverMenuFactory::MakeUserMenuForNavigationMenu(),
$oNewsroomMenu
);
}
}