diff --git a/sources/Application/WebPage/WebPage.php b/sources/Application/WebPage/WebPage.php index ae1e42ee5..d6c884c35 100644 --- a/sources/Application/WebPage/WebPage.php +++ b/sources/Application/WebPage/WebPage.php @@ -2009,102 +2009,6 @@ JS; } - /** - * @deprecated 3.0.0 use {@link \Combodo\iTop\Application\UI\Base\Component\CollapsibleSection\CollapsibleSection} - * - * Adds init scripts for the collapsible sections - */ - protected function outputCollapsibleSectionInit() - { - if (!$this->bHasCollapsibleSection) { - return; - } - - $this->add_script(<<<'EOD' -function initCollapsibleSection(iSectionId, bOpenedByDefault, sSectionStateStorageKey) -{ -var bStoredSectionState = JSON.parse(localStorage.getItem(sSectionStateStorageKey)); -var bIsSectionOpenedInitially = (bStoredSectionState == null) ? bOpenedByDefault : bStoredSectionState; - -if (bIsSectionOpenedInitially) { - $("#LnkCollapse_"+iSectionId).toggleClass("open"); - $("#Collapse_"+iSectionId).toggle(); -} - -$("#LnkCollapse_"+iSectionId).on('click', function(e) { - localStorage.setItem(sSectionStateStorageKey, !($("#Collapse_"+iSectionId).is(":visible"))); - $("#LnkCollapse_"+iSectionId).toggleClass("open"); - $("#Collapse_"+iSectionId).slideToggle("normal"); - e.preventDefault(); // we don't want to do anything more (see #1030 : a non wanted tab switching was triggered) -}); -} -EOD - ); - } - - /** - * @deprecated 3.0.0 use {@link \Combodo\iTop\Application\UI\Base\Component\CollapsibleSection\CollapsibleSection} - * - * @param bool $bOpenedByDefault - * @param string $sSectionStateStorageBusinessKey - * - * @param string $sSectionLabel - * - * @throws \Exception - */ - public function StartCollapsibleSection($sSectionLabel, $bOpenedByDefault = false, $sSectionStateStorageBusinessKey = '') - { - DeprecatedCallsLog::NotifyDeprecatedPhpMethod('use \\Combodo\\iTop\\Application\\UI\\Base\\Component\\CollapsibleSection\\CollapsibleSection'); - $this->add($this->GetStartCollapsibleSection($sSectionLabel, $bOpenedByDefault, $sSectionStateStorageBusinessKey)); - } - - /** - * @deprecated 3.0.0 use {@link \Combodo\iTop\Application\UI\Base\Component\CollapsibleSection\CollapsibleSection} - * - * @param string $sSectionLabel - * @param bool $bOpenedByDefault - * @param string $sSectionStateStorageBusinessKey - * - * @return string - * - * @throws \Exception - */ - public function GetStartCollapsibleSection($sSectionLabel, $bOpenedByDefault = false, $sSectionStateStorageBusinessKey = '') - { - $this->bHasCollapsibleSection = true; - $sHtml = ''; - static $iSectionId = 0; - $sHtml .= ''.$sSectionLabel.'
'."\n"; - $sHtml .= '"; - } /** * Return the language for the page metadata based on the current user