From: Antoine Musso Date: Mon, 19 Nov 2012 14:34:34 +0000 (+0100) Subject: profileinfo links now have anchors X-Git-Tag: 1.31.0-rc.0~21578^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=78978d410b8be39e8a7c990a6dc944708a21bbf5;p=lhc%2Fweb%2Fwiklou.git profileinfo links now have anchors Whenever expanding a section in profileinfo, the browser would sent us to the top again which would force us to browse down to where we were. Adding basic anchors send the user directly where he was browsing. Note that HTML5 let you specify anything as an id as long as there is at least one character. Change-Id: I5b55297ce25d5c07b29610798fb39eae16d27f6a --- diff --git a/profileinfo.php b/profileinfo.php index ad02ad59b9..4787594116 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -192,10 +192,12 @@ class profile_point { $ex = isset( $expand[$this->name()] ); + $anchor = str_replace( '"', '', $this->name() ); + if ( !$ex ) { if ( count( $this->children ) ) { $url = getEscapedProfileUrl( false, false, $expand + array( $this->name() => true ) ); - $extet = ' [+]'; + $extet = " [+]"; } else { $extet = ''; } @@ -206,8 +208,8 @@ class profile_point { $e += array( $name => $ep ); } } - - $extet = ' [–]'; + $url = getEscapedProfileUrl( false, false, $e ); + $extet = " [–]"; } ?>