#CACHE{0}#HTTP_HEADER{'Content-Type: text/javascript'} // 7 * 24 * 3600 // la fonction qui affiche / masque la barre d'outils de Gallery 2 function aff_masq_sidebar(onoff){ if (onoff == "off") { jQuery("#gsSidebar").hide(); jQuery("#showsidebar").show(); largeur_ini = jQuery("#gsSidebarCol").css("width"); jQuery("#gsSidebarCol").css({width : "1%"}); jQuery.cookie("g2_outils","off", { expires: 90 }); } else if (onoff == "on") { jQuery("#gsSidebar").show(); jQuery("#showsidebar").hide(); try { jQuery("#gsSidebarCol").css({width : largeur_ini}); } catch(e){} jQuery.cookie("g2_outils", "on", { expires: 90 }); } } jQuery(document).ready( function(){ // le nécessaire pour déclencher le afficher/masquer de la barre d'outils // ...si le theme utilise par Gallery ne comporte pas deja un truc identique! if (jQuery("#gallery:has(table#hybridMain)").length == 0){ // ajouter les icones cliquables jQuery("#gsSidebarCol").prepend('<:gallery:afficher_barre_laterale:>'); jQuery("#gsSidebar").prepend('<:gallery:masquer_barre_laterale:>'); // attribuer la fonction afficher/masquer aux icones cliquables jQuery("#hidesidebar").click( function(){ aff_masq_sidebar("off"); }); jQuery("#showsidebar").click( function(){ aff_masq_sidebar("on"); }); // restaurer l'état affiché/masqué sauvé dans le cookie if (jQuery.cookie("g2_outils")) aff_masq_sidebar(jQuery.cookie("g2_outils")); } });