New: Add link collapse all - expand all.
Fix: Add missing images.
@ -271,10 +271,12 @@ print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("TreeMenuPersonalized").'</td>';
|
||||
print '<td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
|
||||
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<td colspan="2">';
|
||||
|
||||
// ARBORESCENCE
|
||||
|
||||
|
||||
@ -180,19 +180,20 @@ function tree_showline($tab,$rang)
|
||||
*/
|
||||
function tree_recur($tab,$pere,$rang)
|
||||
{
|
||||
if (empty($pere['rowid']))
|
||||
if (empty($pere['rowid']))
|
||||
{
|
||||
// Test also done with jstree and dynatree (not able to have <a> inside label)
|
||||
// Test also done with jstree and dynatree (not able to have <a> inside label)
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function(){
|
||||
$("#iddivjstree").treeview({
|
||||
collapsed: true,
|
||||
animated: "fast",
|
||||
persist: "location"
|
||||
persist: "location",
|
||||
control: "#iddivjstreecontrol"
|
||||
});
|
||||
})
|
||||
</script>';
|
||||
|
||||
|
||||
print '<ul id="iddivjstree" style="min-height:300px;">';
|
||||
}
|
||||
|
||||
@ -207,7 +208,7 @@ function tree_recur($tab,$pere,$rang)
|
||||
// If an element has $pere for parent
|
||||
if ($tab[$x]['fk_menu'] != -1 && $tab[$x]['fk_menu'] == $pere['rowid'])
|
||||
{
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
print "\n".'<li>';
|
||||
// We shot it with an offset
|
||||
tree_showline($tab[$x],$rang);
|
||||
@ -218,7 +219,7 @@ function tree_recur($tab,$pere,$rang)
|
||||
}
|
||||
elseif (! empty($tab[$x]['rowid']) && $tab[$x]['fk_menu'] == -1 && $tab[$x]['fk_mainmenu'] == $pere['mainmenu'] && $tab[$x]['fk_leftmenu'] == $pere['leftmenu'])
|
||||
{
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
print "\n".'<li>';
|
||||
// We shot it with an offset
|
||||
tree_showline($tab[$x],$rang);
|
||||
@ -229,7 +230,7 @@ function tree_recur($tab,$pere,$rang)
|
||||
}
|
||||
}
|
||||
if (! empty($ulprinted) && ! empty($pere['rowid'])) { print '</ul>'."\n"; }
|
||||
|
||||
|
||||
if (empty($pere['rowid'])) print '</ul>';
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 847 B |
BIN
htdocs/includes/jquery/plugins/jquerytreeview/images/file.gif
Normal file
|
After Width: | Height: | Size: 110 B |
|
After Width: | Height: | Size: 105 B |
BIN
htdocs/includes/jquery/plugins/jquerytreeview/images/folder.gif
Normal file
|
After Width: | Height: | Size: 106 B |
BIN
htdocs/includes/jquery/plugins/jquerytreeview/images/minus.gif
Normal file
|
After Width: | Height: | Size: 837 B |
BIN
htdocs/includes/jquery/plugins/jquerytreeview/images/plus.gif
Normal file
|
After Width: | Height: | Size: 841 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |