From: <var...@us...> - 2015-02-19 10:56:57
|
Revision: 9549 http://sourceforge.net/p/phpwiki/code/9549 Author: vargenau Date: 2015-02-19 10:56:50 +0000 (Thu, 19 Feb 2015) Log Message: ----------- Copy function folderArrow from themes/Sidebar/themeinfo.php Modified Paths: -------------- trunk/themes/blog/themeinfo.php Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2015-02-18 15:58:28 UTC (rev 9548) +++ trunk/themes/blog/themeinfo.php 2015-02-19 10:56:50 UTC (rev 9549) @@ -61,6 +61,26 @@ return parent::_findFile($file, $missing_okay); } + /* Display up/down button with persistent state */ + /* persistent state per block in cookie for 30 days */ + function folderArrow($id, $init = 'Open') + { + global $request; + if ($cookie = $request->cookies->get("folder_" . $id)) { + $init = $cookie; + } + if ($init == 'Open' or $init == 'Closed') + $png = $this->_findData('images/folderArrow' . $init . '.png'); + else + $png = $this->_findData('images/folderArrowOpen.png'); + return HTML::img(array('id' => $id . '-img', + 'src' => $png, + //'align' => 'right', + 'onclick' => "showHideFolder('$id')", + 'alt' => _("Click to hide/show"), + 'title' => _("Click to hide/show"))); + } + function _labelForAction($action) { switch ($action) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |