New: Add link collapse all - expand all.

Fix: Add missing images.
This commit is contained in:
Laurent Destailleur 2013-02-20 18:34:54 +01:00
parent 2017815e89
commit 6db881c09d
18 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -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>';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB