Isolate code of treeview in a lib

This commit is contained in:
Laurent Destailleur 2008-09-01 22:26:00 +00:00
parent 1d54c654fa
commit 7c4cf3847d
11 changed files with 26 additions and 18 deletions

View File

@ -1 +0,0 @@
*.db

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

View File

@ -104,7 +104,7 @@ function processULEL(ul) {
subul = ""; subul = "";
for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) { for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
// Uniquement pour moz-firefox // Uniquement pour moz-firefox
if (MOZ) {item.style.background = "url(./images/arbre-trait.png) repeat-y 0 0";} if (MOZ) {item.style.background = "";}
// Enfants des li : balise ou sous-ul // Enfants des li : balise ou sous-ul
var sitem = item.childNodes[sitemi]; var sitem = item.childNodes[sitemi];
switch (sitem.nodeName) { switch (sitem.nodeName) {

View File

@ -236,6 +236,7 @@ if (empty($action) || $action == 'refresh')
print '&nbsp;'; print '&nbsp;';
} }
print '</td>'; print '</td>';
print '<td class="liste_titre" width="16px">&nbsp;</td>';
print '</tr>'; print '</tr>';
$sectionauto=dol_sort_array($sectionauto,'label',$sortorder,true,false); $sectionauto=dol_sort_array($sectionauto,'label',$sortorder,true,false);
@ -267,6 +268,10 @@ if (empty($action) || $action == 'refresh')
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['desc']; $htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['desc'];
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
print '</td>'; print '</td>';
// Edit link
print '<td align="right">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -323,7 +328,12 @@ if (empty($action) || $action == 'refresh')
$htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dolibarr_print_date($val['date_c'],"dayhour").'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dolibarr_print_date($val['date_c'],"dayhour").'<br>';
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description']; $htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description'];
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
print "</td></tr>\n"; print "</td>";
// Edit link
print '<td align="right"><a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$val['id'].'">'.img_edit().'</a></td>';
print "</tr>\n";
$nbofentries++; $nbofentries++;
} }

View File

@ -139,7 +139,7 @@ class modECM extends DolibarrModules
// Left menu linked to top menu // Left menu linked to top menu
$this->menu[$r]=array('fk_menu'=>'r=0', $this->menu[$r]=array('fk_menu'=>'r=0',
'type'=>'left', 'type'=>'left',
'titre'=>'ECMFileManager', 'titre'=>'ECMArea',
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
'url'=>'/ecm/index.php', 'url'=>'/ecm/index.php',
'langs'=>'ecm', 'langs'=>'ecm',
@ -151,7 +151,7 @@ class modECM extends DolibarrModules
$this->menu[$r]=array('fk_menu'=>'r=1', $this->menu[$r]=array('fk_menu'=>'r=1',
'type'=>'left', 'type'=>'left',
'titre'=>'List', 'titre'=>'ECMFileManager',
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
'url'=>'/ecm/index.php', 'url'=>'/ecm/index.php',
'langs'=>'ecm', 'langs'=>'ecm',

View File

@ -966,16 +966,16 @@ ul.arbre strong {
font-weight: normal; font-weight: normal;
padding: 0 0 0 20px; padding: 0 0 0 20px;
margin: 0 0 0 -7px; margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/img/arbre-puce.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 1px 50%; background-position: 1px 50%;
} }
ul.arbre strong.arbre-plier { ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-plier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre strong.arbre-deplier { ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-deplier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre ul { ul.arbre ul {
@ -993,7 +993,7 @@ ul.arbre li li {
/* Uniquement pour les navigateurs a moteur gecko */ /* Uniquement pour les navigateurs a moteur gecko */
ul.arbre li:last-child { ul.arbre li:last-child {
border-left: 0; border-left: 0;
background: url(<?php echo $dolibarr_main_url_root.'/admin/mens/images/arbre-trait.png' ?>) no-repeat 0 0; background: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/line.gif' ?>) no-repeat 0 0;
} }
/* Classe pour masquer */ /* Classe pour masquer */
.hide { .hide {

View File

@ -1240,7 +1240,6 @@ form.inplaceeditor-form a { /* The cancel link */
/* Admin Menu */ /* Admin Menu */
/* ============================================================================== */ /* ============================================================================== */
/* CSS a appliquer a l'arbre hierarchique */ /* CSS a appliquer a l'arbre hierarchique */
/* Lien plier /deplier tout */ /* Lien plier /deplier tout */
@ -1259,16 +1258,16 @@ ul.arbre strong {
font-weight: normal; font-weight: normal;
padding: 0 0 0 20px; padding: 0 0 0 20px;
margin: 0 0 0 -7px; margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/img/arbre-puce.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 1px 50%; background-position: 1px 50%;
} }
ul.arbre strong.arbre-plier { ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-plier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre strong.arbre-deplier { ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-deplier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre ul { ul.arbre ul {
@ -1286,7 +1285,7 @@ ul.arbre li li {
/* Uniquement pour les navigateurs a moteur gecko */ /* Uniquement pour les navigateurs a moteur gecko */
ul.arbre li:last-child { ul.arbre li:last-child {
border-left: 0; border-left: 0;
background: url(<?php echo $dolibarr_main_url_root.'/admin/mens/images/arbre-trait.png' ?>) no-repeat 0 0; background: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/line.gif' ?>) no-repeat 0 0;
} }
/* Classe pour masquer */ /* Classe pour masquer */
.hide { .hide {

View File

@ -1005,16 +1005,16 @@ ul.arbre strong {
font-weight: normal; font-weight: normal;
padding: 0 0 0 20px; padding: 0 0 0 20px;
margin: 0 0 0 -7px; margin: 0 0 0 -7px;
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/img/arbre-puce.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/branch.gif' ?>);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 1px 50%; background-position: 1px 50%;
} }
ul.arbre strong.arbre-plier { ul.arbre strong.arbre-plier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-plier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/plus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre strong.arbre-deplier { ul.arbre strong.arbre-deplier {
background-image: url(<?php echo $dolibarr_main_url_root.'/admin/menus/images/arbre-deplier.png' ?>); background-image: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/minus.gif' ?>);
cursor: pointer; cursor: pointer;
} }
ul.arbre ul { ul.arbre ul {
@ -1032,7 +1032,7 @@ ul.arbre li li {
/* Uniquement pour les navigateurs a moteur gecko */ /* Uniquement pour les navigateurs a moteur gecko */
ul.arbre li:last-child { ul.arbre li:last-child {
border-left: 0; border-left: 0;
background: url(<?php echo $dolibarr_main_url_root.'/admin/mens/images/arbre-trait.png' ?>) no-repeat 0 0; background: url(<?php echo $dolibarr_main_url_root.'/theme/common/treemenu/line.gif' ?>) no-repeat 0 0;
} }
/* Classe pour masquer */ /* Classe pour masquer */
.hide { .hide {