plugins/gallery/gallery-bits.js
author Dan
Sat, 16 Feb 2008 23:15:49 -0500 (2008-02-17)
changeset 19 08bf8aa2f0ab
parent 10 b38afb86dcad
child 42 7c6e2e97aa08
permissions -rw-r--r--
Fixed a little issue with IE compatibility in the tagging bits
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     1
/*
10
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
     2
 * Misc functions for Snapr.
0
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     3
 */
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     4
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     5
function gal_toggle(elem, img, img_open, img_close)
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     6
{
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     7
  if ( !img_close || !img_open )
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     8
  {
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
     9
    img_close = scriptPath + '/plugins/gallery/toggle-closed.png';
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    10
    img_open  = scriptPath + '/plugins/gallery/toggle-open.png';
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    11
  }
10
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    12
  if ( elem.style.display == 'none' || !elem.style.display )
0
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    13
  {
10
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    14
    elem.style.display = 'block';
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    15
    try {
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    16
      img.src = img_open;
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    17
    } catch(e) {};
0
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    18
  }
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    19
  else
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    20
  {
10
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    21
    elem.style.display = 'none';
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    22
    try {
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    23
      img.src = img_close;
b38afb86dcad Merging with bugfixes on Scribus
Dan
parents: 0
diff changeset
    24
    } catch(e) {};
0
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    25
  }
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    26
}
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    27
7caf561c50ee Initial population; browser, viewer, uploader, and security are working
Dan
parents:
diff changeset
    28