From f9511aba17a87793bd180037b4d24b53695215db Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 5 Mar 2018 15:50:38 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01030=20Collapsible=20Sections=20:=20*=20?= =?UTF-8?q?stop=20event=20propagation=20(was=20causing=20tab=20switching?= =?UTF-8?q?=20in=20notifications)=20*=20save=20section=20state=20in=20loca?= =?UTF-8?q?lStorage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[5382] --- application/itopwebpage.class.inc.php | 70 ++++++++++++++++++++++----- core/config.class.inc.php | 12 +++++ pages/notifications.php | 2 +- pages/run_query.php | 2 +- 4 files changed, 71 insertions(+), 15 deletions(-) diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 1d1cd04bd..666236257 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -45,6 +45,8 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage protected $sBreadCrumbEntryIcon; protected $oCtx; + protected $bHasCollapsibleSection = false; + public function __construct($sTitle, $bPrintable = false) { parent::__construct($sTitle, $bPrintable); @@ -623,6 +625,7 @@ EOF ); } + /** * @param string $sId Identifies the item, to search after it in the current breadcrumb * @param string $sLabel Label of the breadcrumb item @@ -796,7 +799,7 @@ EOF if ($iBreadCrumbMaxCount > 1) { $oConfig = MetaModel::GetConfig(); - $siTopInstanceId = json_encode(utils::GetAbsoluteUrlAppRoot().'==='.$oConfig->Get('db_host').'/'.$oConfig->Get('db_name').'/'.$oConfig->Get('db_subname')); + $siTopInstanceId = json_encode($oConfig->GetItopInstanceid()); if ($this->bBreadCrumbEnabled) { if (is_null($this->sBreadCrumbEntryId)) @@ -821,6 +824,8 @@ EOF ); } + $this->outputCollapsibleSectionInit(); + if ($this->GetOutputFormat() == 'html') { foreach($this->a_headers as $s_header) @@ -927,7 +932,7 @@ EOF $sHtml .= "\n"; } } - + if (count($this->a_styles)>0) { $sHtml .= "