Subversion Repositories eFlore/Archives.herbiers

Compare Revisions

Ignore whitespace Rev 18 → Rev 22

/trunk/presentations/scripts/hb_ouvrir_fermer.js
20,7 → 20,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_ouvrir_fermer.js,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
// CVS : $Id: hb_ouvrir_fermer.js,v 1.2 2007-08-27 15:56:50 jp_milcent Exp $
/**
* Script ouvrir-fermer
*
53,7 → 53,7
*@author Alexandre Granier
*@author Jean-Pascal Milcent
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
*@version $Revision: 1.2 $ $Date: 2007-08-27 15:56:50 $
// +------------------------------------------------------------------------------------------------------+
*/
 
83,8 → 83,71
var imgClosed = new Image(9,9);
imgClosed.src = 'client/herbier/presentations/images/ouvrir.png';
 
/**
* Pliage des donn?es au d?marrage.
* (Collapses databases at startup)
*
* @access public
*/
function toutPlier()
{
if (!capable || !isServer) {
return;
}
if (isDOM) {
var tempColl = document.getElementsByTagName('div');
var tempCollCnt = tempColl.length;
for (var i = 0; i < tempCollCnt; i++) {
if (tempColl[i].id == expandedDb)
tempColl[i].style.display = 'inline';
else if (tempColl[i].className == 'child')
tempColl[i].style.display = 'none';
}
}
}
 
/**
* D?pliage de toutes les donn?es.
*
* @access public
*/
function toutDeplier()
{
if (!capable || !isServer) {
return;
}
if (isDOM) {
var tempColl = document.getElementsByTagName('div');
var tempCollCnt = tempColl.length;
for (var i = 0; i < tempCollCnt; i++) {
if (tempColl[i].id == expandedDb)
tempColl[i].style.display = 'inline';
else if (tempColl[i].className == 'child')
tempColl[i].style.display = 'inline';
}
// Fin du cas DOM (end of the DOM case)
}
}
 
/**
* Affiche une aide sur le Plier/D?plier
*
* @access public
*/
function afficherAide()
{
with (document) {
if (isDOM) {
var aide = '<p>Cliquer sur le symbole <img src="'+imgClosed.src+'"/> pour afficher les <strong>informations complémentaires</strong>.<p />'+
'<p>Vous pouvez aussi utiliser les liens ci-dessous pour controler l\'affichage de l\'ensemble des informations :<p />'+
'<p><a href="#" onclick="toutPlier(); return false;">Tout plier</a> | <a href="#" onclick="toutDeplier(); return false;">Tout d&eacute;plier</a>'+
'</p>';
write(aide);
}
}
}
 
/**
*Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+.
*(Do reloads the frame if the window has been resized under Netscape4+)
*
232,48 → 295,26
*/
function expandBase(el, unexpand)
{
if (!capable)
return;
if (isDOM) {
var whichEl = document.getElementById(el + 'Child');
var whichIm = document.getElementById(el + 'Img');
if (whichEl.style.display == 'none' && whichIm) {
whichEl.style.display = 'block';
whichIm.src = imgOpened.src;
}
else if (unexpand) {
whichEl.style.display = 'none';
whichIm.src = imgClosed.src;
}
} // Fin du cas DOM (end of the DOM case)
else if (isIE4) {
var whichEl = document.all(el + 'Child');
var whichIm = document.images.item(el + 'Img');
if (whichEl.style.display == 'none') {
whichEl.style.display = 'block';
whichIm.src = imgOpened.src;
}
else if (unexpand) {
whichEl.style.display = 'none';
whichIm.src = imgClosed.src;
}
} // Fin du cas IE4 (end of the IE4 case)
else if (isNS4) {
var whichEl = document.layers[el + 'Child'];
var whichIm = document.layers[el + 'Parent'].document.images['imEx'];
if (whichEl.visibility == 'hide') {
whichEl.visibility = 'show';
whichIm.src = imgOpened.src;
}
else if (unexpand) {
whichEl.visibility = 'hide';
whichIm.src = imgClosed.src;
}
nsArrangeList();
} // Fin du cas NS4 (end of the NS4 case)
} // fin de la fonction 'expandBase()' (end of the 'expandBase()' function)
if (!capable)
return;
if (isDOM) {
var whichEl = document.getElementById(el + 'Child');
var whichIm = document.getElementById(el + 'Img');
if (whichEl.style.display == 'none' && whichIm) {
whichEl.style.display = 'inline';
whichIm.src = imgOpened.src;
whichIm.alt = imgOpened.alt;
whichIm.title = imgOpened.title;
} else if (unexpand) {
whichEl.style.display = 'none';
whichIm.src = imgClosed.src;
whichIm.alt = imgClosed.alt;
whichIm.title = imgClosed.title;
 
}
}
}
 
/**
* Ajout des styles permettant le positionnement des calques.
350,6 → 391,10
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005-11-23 10:32:32 jp_milcent
* Ajout au dépot de l'application Herbiers.
* Elle doit à terme migrer dans eFlore.
*
* Revision 1.1 2005/03/08 14:14:47 jpm
* Ajout du fichier javascript permettant d'ouvrir et fermer du html.
*