3 * FusionForge Documentation Manager
5 * Copyright 2000, Quentin Cregan/Sourceforge
6 * Copyright 2002-2003, Tim Perdue/GForge, LLC
7 * Copyright 2010, Franck Villaume - Capgemini
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 /* please do not add require here : use www/docman/index.php to add require */
27 /* global variables used */
28 global $d_arr; // documents array
29 global $group_id; // id of the group
31 echo '<h3>Document Tree</h3>';
32 $nested_docs = array();
33 $idExposeTreeIndex = 0;
35 if ($d_arr != NULL ) {
36 if (!$d_arr || count($d_arr) > 0) {
37 // Get the document groups info
38 //put the doc objects into an array keyed off the docgroup
39 foreach ($d_arr as $doc) {
40 $nested_docs[$doc->getDocGroupID()][] = $doc;
44 echo '<div id="documenttree" style="height:100%">';
47 <script type="text/javascript">
48 var myThemeXPBase = "<?php echo util_make_uri ('/jscook/ThemeXP/'); ?>";
50 <script type="text/javascript" src="<?php echo util_make_uri ('/jscook/JSCookTree.js'); ?>"></script>
51 <link rel="stylesheet" href="<?php echo util_make_uri ('/jscook/ThemeXP/theme.css'); ?>" type="text/css" />
52 <script src="<?php echo util_make_uri ('/jscook/ThemeXP/theme.js'); ?>" type="text/javascript"></script>
54 <div id="myMenuID" style="overflow:auto;"></div>
56 <script type="text/javascript">
59 ['<span class="JSCookTreeFolderClosed"><i><img alt="" src="' + myThemeXPBase + 'folder1.gif" /></i></span><span id="ctItemID0" class="JSCookTreeFolderOpen"><i><img alt="" src="' + myThemeXPBase + 'folderopen1.gif" /></i></span>', '/', '#', '', '', <?php docman_recursive_display(0); ?>
63 var treeIndex = ctDraw ('myMenuID', myMenu, ctThemeXP1, 'ThemeXP', 0, 1);
64 ctExposeTreeIndex (treeIndex, <?php echo $idExposeTreeIndex ?>);
65 var openItem = ctGetSelectedItem (treeIndex)
66 ctOpenFolder (openItem)