/[drupal]/contributions/sandbox/goba/admin/scripts/toggle.js
ViewVC logotype

Contents of /contributions/sandbox/goba/admin/scripts/toggle.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Aug 16 14:30:02 2006 UTC (3 years, 3 months ago) by goba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/javascript
an admin theme extracted from the civicspace theme, which 'kinda' works with Drupal HEAD (there are some CSS problems)
1 /* $Id: toggle.js,v 1.2 2005/08/29 21:52:13 robinmonks Exp $ */
2
3 function toggle( targetId ) {
4 if ( document.getElementById ) {
5 target = document.getElementById( targetId );
6 if ( target.style.display == "none" ) {
7 target.style.display = "";
8 } else {
9 target.style.display = "none";
10 }
11 }
12 }
13
14 function toggleShow( targetId ) {
15 if ( document.getElementById ) {
16 target = document.getElementById( targetId );
17 if (target.style.display == "none") {
18 target.style.display = "";
19 }
20 }
21 }
22
23 function toggleHide( targetId ) {
24 if ( document.getElementById ) {
25 target = document.getElementById( targetId );
26 if (target.style.display == "") {
27 target.style.display = "none";
28 }
29 }
30 }
31
32 function toggleAll( targetTag, showHide ) {
33 if ( document.getElementById ) {
34 target = document.getElementsByTagName( targetTag );
35 var i;
36 var max = target.length;
37 if ( showHide == "show" ) {
38 for ( i = 0; i < max; i++ ) {
39 if ( target[ i ].style.display == "none" ) {
40 target[ i ].style.display = "";
41 }
42 }
43 }
44 else if ( showHide == "hide" ) {
45 for ( i = 0; i < max; i++ ) {
46 if ( target[ i ].style.display == "" ) {
47 target[ i ].style.display = "none";
48 }
49 }
50 }
51 }
52 }

  ViewVC Help
Powered by ViewVC 1.1.2