Subversion Repositories eFlore/Archives.herbiers

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 22
Line 18... Line 18...
18
// |                                                                                                      |
18
// |                                                                                                      |
19
// | You should have received a copy of the GNU General Public License                                    |
19
// | You should have received a copy of the GNU General Public License                                    |
20
// | along with Foobar; if not, write to the Free Software                                                |
20
// | along with Foobar; if not, write to the Free Software                                                |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// +------------------------------------------------------------------------------------------------------+
22
// +------------------------------------------------------------------------------------------------------+
23
// CVS : $Id: hb_ouvrir_fermer.js,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
23
// CVS : $Id: hb_ouvrir_fermer.js,v 1.2 2007-08-27 15:56:50 jp_milcent Exp $
24
/**
24
/**
25
* Script ouvrir-fermer
25
* Script ouvrir-fermer
26
*
26
*
27
* These scripts were originally found on cooltype.com.
27
* These scripts were originally found on cooltype.com.
28
* Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com
28
* Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com
Line 51... Line 51...
51
*@author        Brian Birtles
51
*@author        Brian Birtles
52
*@author        Loïc Chapeaux
52
*@author        Loïc Chapeaux
53
*@author        Alexandre Granier
53
*@author        Alexandre Granier
54
*@author        Jean-Pascal Milcent
54
*@author        Jean-Pascal Milcent
55
*@copyright     Tela-Botanica 2000-2005
55
*@copyright     Tela-Botanica 2000-2005
56
*@version       $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
56
*@version       $Revision: 1.2 $ $Date: 2007-08-27 15:56:50 $
57
// +------------------------------------------------------------------------------------------------------+
57
// +------------------------------------------------------------------------------------------------------+
58
*/
58
*/
Line 59... Line 59...
59
 
59
 
60
// inclusion intempestive
60
// inclusion intempestive
Line 81... Line 81...
81
var imgOpened    = new Image(9,9);
81
var imgOpened    = new Image(9,9);
82
imgOpened.src    = 'client/herbier/presentations/images/fermer.png';
82
imgOpened.src    = 'client/herbier/presentations/images/fermer.png';
83
var imgClosed    = new Image(9,9);
83
var imgClosed    = new Image(9,9);
84
imgClosed.src    = 'client/herbier/presentations/images/ouvrir.png';
84
imgClosed.src    = 'client/herbier/presentations/images/ouvrir.png';
Line -... Line 85...
-
 
85
 
-
 
86
/**
-
 
87
 * Pliage des donn?es au d?marrage.
-
 
88
 * (Collapses databases at startup)
-
 
89
 * 
-
 
90
 * @access  public
-
 
91
 */
-
 
92
function toutPlier()
-
 
93
{
-
 
94
  if (!capable || !isServer) {
-
 
95
    return;
-
 
96
  }
-
 
97
  if (isDOM) {
-
 
98
    var tempColl    = document.getElementsByTagName('div');
-
 
99
    var tempCollCnt = tempColl.length;
-
 
100
    for (var i = 0; i < tempCollCnt; i++) {
-
 
101
      if (tempColl[i].id == expandedDb)
-
 
102
        tempColl[i].style.display = 'inline';
-
 
103
      else if (tempColl[i].className == 'child')
-
 
104
        tempColl[i].style.display = 'none';
-
 
105
    }
-
 
106
  }
-
 
107
}
-
 
108
 
-
 
109
/**
-
 
110
 * D?pliage de toutes les donn?es.
-
 
111
 * 
-
 
112
 * @access  public
-
 
113
 */
-
 
114
function toutDeplier()
-
 
115
{
-
 
116
  if (!capable || !isServer) {
-
 
117
    return;
-
 
118
  }
-
 
119
  if (isDOM) {
-
 
120
    var tempColl    = document.getElementsByTagName('div');
-
 
121
    var tempCollCnt = tempColl.length;
-
 
122
    for (var i = 0; i < tempCollCnt; i++) {
-
 
123
      if (tempColl[i].id == expandedDb)
-
 
124
        tempColl[i].style.display = 'inline';
-
 
125
      else if (tempColl[i].className == 'child')
-
 
126
        tempColl[i].style.display = 'inline';
-
 
127
    }
-
 
128
    // Fin du cas DOM (end of the DOM case)
-
 
129
  }
-
 
130
}
-
 
131
 
-
 
132
/**
-
 
133
 * Affiche une aide sur le Plier/D?plier
-
 
134
 *
-
 
135
 * @access  public
-
 
136
 */
-
 
137
function afficherAide()
-
 
138
{
-
 
139
  with (document) {
-
 
140
    if (isDOM) {
-
 
141
      var aide = 	'<p>Cliquer sur le symbole <img src="'+imgClosed.src+'"/> pour afficher les <strong>informations complémentaires</strong>.<p />'+
-
 
142
					'<p>Vous pouvez aussi utiliser les liens ci-dessous pour controler l\'affichage de l\'ensemble des informations :<p />'+
-
 
143
					'<p><a href="#" onclick="toutPlier(); return false;">Tout plier</a> | <a href="#" onclick="toutDeplier(); return false;">Tout d&eacute;plier</a>'+
-
 
144
					'</p>';
-
 
145
      write(aide);
-
 
146
    }
-
 
147
  }
Line 85... Line 148...
85
 
148
}
86
 
149
 
87
/**
150
/**
88
 *Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+.
151
 *Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+.
Line 230... Line 293...
230
 *
293
 *
231
 * @access  public
294
 * @access  public
232
 */
295
 */
233
function expandBase(el, unexpand)
296
function expandBase(el, unexpand)
234
{
297
{
235
    if (!capable)
298
  if (!capable)
236
        return;
299
    return;
237
    
300
  
238
    if (isDOM) {
301
  if (isDOM) {
239
        var whichEl = document.getElementById(el + 'Child');
302
    var whichEl = document.getElementById(el + 'Child');
240
        var whichIm = document.getElementById(el + 'Img');
303
    var whichIm = document.getElementById(el + 'Img');
241
        if (whichEl.style.display == 'none' && whichIm) {
304
    if (whichEl.style.display == 'none' && whichIm) {
242
            whichEl.style.display  = 'block';
305
      whichEl.style.display  = 'inline';
243
            whichIm.src            = imgOpened.src;
306
      whichIm.src            = imgOpened.src;
244
        }
-
 
245
        else if (unexpand) {
-
 
246
            whichEl.style.display  = 'none';
-
 
247
            whichIm.src            = imgClosed.src;
307
      whichIm.alt            = imgOpened.alt;
248
        }
-
 
249
    } // Fin du cas DOM (end of the DOM case)
-
 
250
    else if (isIE4) {
-
 
251
        var whichEl = document.all(el + 'Child');
-
 
252
        var whichIm = document.images.item(el + 'Img');
-
 
253
        if (whichEl.style.display == 'none') {
-
 
254
            whichEl.style.display  = 'block';
-
 
255
            whichIm.src            = imgOpened.src;
308
      whichIm.title          = imgOpened.title;
256
        }
-
 
257
        else if (unexpand) {
309
    } else if (unexpand) {
258
            whichEl.style.display  = 'none';
310
      whichEl.style.display  = 'none';
259
            whichIm.src            = imgClosed.src;
311
      whichIm.src            = imgClosed.src;
260
        }
-
 
261
    } // Fin du cas IE4 (end of the IE4 case)
-
 
262
    else if (isNS4) {
-
 
263
        var whichEl = document.layers[el + 'Child'];
-
 
264
        var whichIm = document.layers[el + 'Parent'].document.images['imEx'];
-
 
265
        if (whichEl.visibility == 'hide') {
-
 
266
            whichEl.visibility  = 'show';
-
 
267
            whichIm.src         = imgOpened.src;
312
      whichIm.alt            = imgClosed.alt;
268
        }
-
 
269
        else if (unexpand) {
-
 
270
            whichEl.visibility  = 'hide';
-
 
271
            whichIm.src         = imgClosed.src;
313
      whichIm.title          = imgClosed.title;
272
        }
-
 
273
        nsArrangeList();
-
 
274
    } // Fin du cas NS4 (end of the NS4 case)
-
 
275
} // fin de la fonction 'expandBase()' (end of the 'expandBase()' function)
-
 
Line -... Line 314...
-
 
314
 
-
 
315
    }
-
 
316
  }
Line 276... Line 317...
276
 
317
}
277
 
318
 
278
/**
319
/**
279
 * Ajout des styles permettant le positionnement des calques.
320
 * Ajout des styles permettant le positionnement des calques.
Line 348... Line 389...
348
expandedDb = '';
389
expandedDb = '';
Line 349... Line 390...
349
 
390
 
350
/* +--Fin du code ----------------------------------------------------------------------------------------+
391
/* +--Fin du code ----------------------------------------------------------------------------------------+
351
*
392
*
-
 
393
* $Log: not supported by cvs2svn $
-
 
394
* Revision 1.1  2005-11-23 10:32:32  jp_milcent
-
 
395
* Ajout au dépot de l'application Herbiers.
-
 
396
* Elle doit à terme migrer dans eFlore.
352
* $Log: not supported by cvs2svn $
397
*
353
* Revision 1.1  2005/03/08 14:14:47  jpm
398
* Revision 1.1  2005/03/08 14:14:47  jpm
354
* Ajout du fichier javascript permettant d'ouvrir et fermer du html.
399
* Ajout du fichier javascript permettant d'ouvrir et fermer du html.
355
*
400
*
356
*
401
*