N°3617 collapsible components state saving : use user pref instead of localStorage

No migration from existing localStorage keys (introduced in 2.5.0 with N°1030) as the console UI has dramatically change in 3.0.0 : will be useful to show all the collapsible sections content once again !

Note that an iTop instance identifier was used in the localStorage key, it is no longer needed as we're getting the user pref directly from the current instance.

Thanks @Molkobain for the help !
This commit is contained in:
Pierre Goiffon
2021-01-12 18:14:25 +01:00
parent 09da54ee56
commit 790a675d90
7 changed files with 49 additions and 41 deletions

View File

@@ -29,11 +29,14 @@ use Combodo\iTop\Application\UI\Base\Component\Html\Html;
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelFactory;
use Combodo\iTop\Application\UI\Base\Layout\PageContent\PageContentFactory;
use iTopWebPage;
use LoginWebPage;
use utils;
require_once '../../../approot.inc.php';
require_once APPROOT.'application/startup.inc.php';
LoginWebPage::DoLogin(); // Dependency for collapsible element with state saved, to get user pref
$oPage = new iTopWebPage('Render all UI blocks');
$oPageContentLayout = PageContentFactory::MakeStandardEmpty();
$oPage->SetContentLayout($oPageContentLayout);