19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: menu.php,v 1.12 2004-12-02 10:42:15 jpm Exp $ |
// CVS : $Id: menu.php,v 1.13 2005-02-08 19:03:03 alex Exp $ |
/** |
* Applette : menu |
* |
38,7 → 38,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.12 $ $Date: 2004-12-02 10:42:15 $ |
*@version $Revision: 1.13 $ $Date: 2005-02-08 19:03:03 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
49,7 → 49,7 |
require_once 'papyrus/bibliotheque/fonctions/pap_menu.fonct.php'; |
$GLOBALS['_MENU_']['nom_fonction'] = 'afficherMenuNiveauMultiple'; |
$_GEN_commun['info_applette_nom_fonction'] = $GLOBALS['_MENU_']['nom_fonction']; |
$_GEN_commun['info_applette_balise'] = 'MENU_?(?:(|CLASSIQUE|COMMUN)_([0-9]+)_([0-9]+)(|_ID_([0-9]+))|(UNIQUE)_([0-9]+))'; |
$_GEN_commun['info_applette_balise'] = 'MENU_?(?:(|CLASSIQUE|COMMUN|DEROULANT)_([0-9]+)_([0-9]+)(|_ID_([0-9]+))|(UNIQUE)_([0-9]+))'; |
|
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
104,7 → 104,7 |
if (isset($tab_applette_arguments[8])) { |
$menu_depart = $tab_applette_arguments[8]; |
} |
|
|
// Gestion du type de menu |
switch ($menu_type) { |
case '' : |
119,15 → 119,33 |
case 'UNIQUE' : |
$menu_type = 'unique'; |
break; |
case 'DEROULANT' : |
$menu_type = 'deroulant'; |
break; |
default: |
$menu_type = 'classique'; |
} |
|
|
//Construction du menu |
$xhtml_menu = afficherListeNiveauMultiple( $objet_pear_db, $id_site, $id_langue, $i18n_url ,$niveau_depart, |
$profondeur, $menu_depart, 1, $menu_type, $indent_origine, |
$indent_pas, $_GEN_commun, $num_menu); |
|
|
// Si le menu est déroulant il faut stocker un peu de javascript pour IE |
if ($menu_type == 'deroulant') { |
GEN_stockerCodeScript ('sfHover = function() { |
var sfEls = document.getElementById("groupe_menu_1_0").getElementsByTagName("LI"); |
for (var i=0; i<sfEls.length; i++) { |
sfEls[i].onmouseover=function() { |
this.className+=" sfhover"; |
} |
sfEls[i].onmouseout=function() { |
this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); |
} |
} |
} |
if (window.attachEvent) window.attachEvent("onload", sfHover);') ; |
} |
//Si nous avons un |
if (! empty($xhtml_menu)) { |
$retour = $xhtml_menu; |
204,7 → 222,7 |
'AND GMR02.gmr_id_menu_01 = GMR02.gmr_id_menu_02 '; |
$requete .= 'AND GMR01.gmr_id_menu_02 = '.$id_pere_menu_a_deployer.' '; |
|
if ($menu_type == 'classique') { |
if ($menu_type == 'classique' || $menu_type == 'deroulant') { |
$requete .= 'AND gm_ce_site = '.$id_site.' '. |
'AND GMR02.gmr_id_valeur = 100 '.// 100 = type "menu classique" |
'ORDER BY GMR01.gmr_ordre ASC'; |
273,7 → 291,7 |
: ''; |
|
if ($resultat_fils->numRows() != 0 && $ligne->gm_id_menu == $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu |
|| GEN_etreAncetre($ligne->gm_id_menu, $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu)) { |
|| GEN_etreAncetre($ligne->gm_id_menu, $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu) || $menu_type == 'deroulant') { |
$niveau_actuel++; |
$corps .= afficherListeNiveauMultiple( $objet_pear_db, $id_site, $id_langue, $i18n_url, $niveau_depart, |
$profondeur, $ligne->gm_id_menu, ($position + 3), $menu_type, |
282,6 → 300,7 |
$niveau_actuel--; |
} |
|
|
if ($niveau_actuel >= $niveau_depart && $niveau_actuel <= $profondeur) { |
$corps .= str_repeat(' ', $indent_origine + ($indent_pas * ($position + 2))).'</li>'."\n"; |
} |
382,6 → 401,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.12 2004/12/02 10:42:15 jpm |
* Correction bogue liste ul vide si pas de menu. |
* |
* Revision 1.11 2004/11/26 19:02:22 jpm |
* Correction bogue li surnuméraires. |
* |