src/install/install2 -text
src/install/install3 -text
src/install/install4 -text
+src/lib/vendor/jquery-simpletreemenu/css/jquery-simpleTreeMenu-1.1.0.css -text
+src/lib/vendor/jquery-simpletreemenu/css/simpleTreeMenu/menu-arrow-down.png -text svneol=unset#image/png
+src/lib/vendor/jquery-simpletreemenu/css/simpleTreeMenu/menu-arrow-right.png -text svneol=unset#image/png
+src/lib/vendor/jquery-simpletreemenu/css/simpleTreeMenu/menu-dot.png -text svneol=unset#image/png
+src/lib/vendor/jquery-simpletreemenu/js/jquery-simpleTreeMenu-1.1.0.js -text
src/lib/vendor/jquery-storage/jquery.Storage.js -text
src/lib/vendor/jquery-tipsy/LICENSE -text
src/lib/vendor/jquery-tipsy/README -text
}
$subGroupIdArr = $dg->getSubgroup($docGroupId, $stateId);
if (sizeof($subGroupIdArr)) {
- echo '<ul>';
foreach ($subGroupIdArr as $subGroupIdValue) {
$localDg = new DocumentGroup($this->Group, $subGroupIdValue);
$liclass = 'docman_li_treecontent';
$nbDocsLabel = '<span class="tabtitle" title="'._('Number of documents in this folder').'" >('.$nbDocs.')</span>';
}
if (isset($nbDocsPending) && isset($nbDocsHidden) && isset($nbDocsPrivate)) {
- $nbDocsLabel = '<span class="tabtitle" title="'._('Number of documents in this folder per status. active/pending/hidden/private').'" >('.$nbDocs.'/'.$nbDocsPending.'/'.$nbDocsHidden.'/'.$nbDocsPrivate.')';
+ $nbDocsLabel = '<span class="tabtitle" title="'._('Number of documents in this folder per status. active/pending/hidden/private').'" >('.$nbDocs.'/'.$nbDocsPending.'/'.$nbDocsHidden.'/'.$nbDocsPrivate.')</span>';
}
- echo '<li class="'.$liclass.'">'.util_make_link($link, $localDg->getName()).$nbDocsLabel.'</li>';
- $this->getTree($selecteddir, $linkmenu, $subGroupIdValue);
+ echo '<li id="leaf-'.$subGroupIdValue.'" class="'.$liclass.'">'.util_make_link($link, $localDg->getName()).$nbDocsLabel;
+ if ($dg->getSubgroup($subGroupIdValue, $stateId)) {
+ echo '<ul>';
+ $this->getTree($selecteddir, $linkmenu, $subGroupIdValue);
+ echo '</ul>';
+ }
+ echo '</li>';
}
- echo '</ul>';
}
}
}
echo '<div id="documenttree" style="height:100%">';
$dm = new DocumentManager($g);
+echo '<ul id="'.$g->getUnixname().'-tree">';
$dm->getTree($dirid, $linkmenu);
+echo '</ul>';
+echo '
+<script type="text/javascript">
+ $(document).ready(function() {
+ jQuery(\'#'.$g->getUnixname().'-tree\').simpleTreeMenu();
+ });
+</script>
+';
if ($g->usesPlugin('projects-hierarchy')) {
$projectsHierarchy = plugin_get_object('projects-hierarchy');
$projectIDsArray = $projectsHierarchy->getFamily($group_id, 'child', true, 'validated');
echo '<hr>';
echo '<h5>'._('Child project: ').util_make_link('/docman/?group_id='.$groupObject->getID(),$groupObject->getPublicName(), array('class'=>'tabtitle', 'title'=>_('Browse document manager in this project'))).'</h5>';
$dm = new DocumentManager($groupObject);
+ echo '<ul id="'.$groupObject->getUnixname().'-tree">';
$dm->getTree($dirid, $linkmenu);
+ echo '</ul>';
+ echo '
+ <script type="text/javascript">
+ $(document).ready(function() {
+ jQuery(\'#'.$groupObject->getUnixname().'-tree\').simpleTreeMenu();
+ });
+ </script>
+ ';
}
}
}
+if (isset($childgroup_id) && $childgroup_id) {
+ $groupObject = group_get_object($childgroup_id);
+ echo '
+ <script type="text/javascript">
+ $(document).ready(function() {
+ jQuery(\'#'.$groupObject->getUnixname().'-tree\').simpleTreeMenu(\'expandToNode\', jQuery(\'#leaf-'.$dirid.'\'));
+ });
+ </script>
+ ';
+} else {
+ echo '
+ <script type="text/javascript">
+ $(document).ready(function() {
+ jQuery(\'#'.$g->getUnixname().'-tree\').simpleTreeMenu(\'expandToNode\', jQuery(\'#leaf-'.$dirid.'\'));
+ });
+ </script>
+ ';
+}
echo '</div>';
?>
--- /dev/null
+/* simpleTreeMenu */
+
+ul.simpleTreeMenu {
+ line-height: 1.75em;
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+ul.simpleTreeMenu, ul.simpleTreeMenu ul {
+ margin-left: 0px;
+ padding-left: 15px;
+}
+
+ul.simpleTreeMenu li.Node {
+ list-style-image: url("simpleTreeMenu/menu-arrow-right.png");
+ margin-left: 5px;
+ padding: 0px;
+}
+
+ul.simpleTreeMenu li.Node span {
+ cursor: pointer;
+ display: block;
+}
+
+ul.simpleTreeMenu li.Node span:hover {
+ background-color: #e0e0e0;
+}
+
+ul.simpleTreeMenu li.expanded {
+ list-style-image: url("simpleTreeMenu/menu-arrow-down.png");
+}
+
+ul.simpleTreeMenu li.Leaf {
+ list-style-image: url("simpleTreeMenu/menu-dot.png");
+ margin-left: 5px;
+ padding: 0px;
+}
+
+ul.simpleTreeMenu a, ul.simpleTreeMenu a:visited {
+ display: block;
+ text-decoration: none;
+ color: #3333AA;
+}
+
+ul.simpleTreeMenu a:hover {
+ background-color: #e0e0e0;
+}
--- /dev/null
+/* SimpleTreeMenu */
+
+(function($) {
+
+ var methods = {
+
+ init: function() {
+ return this.each(function() {
+ var $this = $(this);
+ if ($this.hasClass("simpleTreeMenu") === false) {
+ $this.hide();
+ $(this).addClass("simpleTreeMenu");
+ $this.children("li").each(function() {
+ methods.buildNode($(this));
+ });
+ $(this).show();
+ }
+ });
+ },
+
+ buildNode: function($li) {
+ if ($li.children("ul").length > 0) {
+ $li.children("ul").hide();
+ $li.addClass("Node").click(function(event) {
+ var $t = $(this);
+ if ($t.hasClass("expanded")) {
+ $t.removeClass("expanded");
+ $t.children("ul").hide();
+ } else {
+ $t.addClass("expanded");
+ $t.children("ul").show();
+ }
+ event.stopPropagation();
+ });
+ $li.children("ul").children("li").each(function() {
+ methods.buildNode($(this));
+ });
+ } else {
+ $li.addClass("Leaf").click(function(event) {
+ event.stopPropagation();
+ });
+ return;
+ }
+ },
+
+ expandToNode: function($li) {
+ if ($li.parent().hasClass("simpleTreeMenu")) {
+ if (!$li.hasClass("expanded")) {
+ $li.addClass("expanded");
+ $li.children("ul").show();
+ }
+ }
+ $li.parents("li", "ul.simpleTreeMenu").each(function() {
+ var $t = jQuery(this);
+ if (!$t.hasClass("expanded")) {
+ $t.addClass("expanded");
+ $t.children("ul").show();
+ }
+ });
+ },
+
+ expandAll: function() {
+ jQuery(this).find("li.Node").each(function() {
+ $t = jQuery(this);
+ if (!$t.hasClass("expanded")) {
+ $t.addClass("expanded");
+ $t.children("ul").show();
+ }
+ });
+ },
+
+ closeAll: function() {
+ jQuery("ul", jQuery(this)).hide();
+ var $li = jQuery("li.Node");
+ if ($li.hasClass("expanded")) {
+ $li.removeClass("expanded");
+ }
+ }
+
+ };
+
+ $.fn.simpleTreeMenu = function(method) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || !method) {
+ return methods.init.apply(this, arguments);
+ } else {
+ $.error('Method ' + method + ' does not exist on jQuery.simpleTreeMenu');
+ }
+ };
+
+})(jQuery);
+
+
+
+
+
\ No newline at end of file
echo '<script type="text/javascript" src="/scripts/jquery/jquery-1.4.2.min.js"></script>';
echo '<script type="text/javascript" src="/scripts/jquery-tipsy/src/javascripts/jquery.tipsy.js"></script>';
echo '<script type="text/javascript" src="/scripts/jquery-storage/jquery.Storage.js"></script>';
+ echo '<script type="text/javascript" src="/scripts/jquery-simpletreemenu/js/jquery-simpleTreeMenu-1.1.0.js"></script>';
echo '<script type="text/javascript" src="/js/tooltips.js"></script>';
echo '<link rel="stylesheet" href="/scripts/jquery-tipsy/src/stylesheets/tipsy.css" type="text/css">';
+ echo '<link rel="stylesheet" href="/scripts/jquery-simpletreemenu/css/jquery-simpleTreeMenu-1.1.0.css" type="text/css">';
?>
<script language="JavaScript" type="text/javascript">/* <![CDATA[ */
jQuery.noConflict();