git://git.onelab.eu
/
plewww.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a38b792
)
Corrected a small bug in the behavior of the optional info link (?) at the
author
Panos
<antoniad@panos.cs.princeton.edu>
Thu, 9 Dec 2010 18:35:26 +0000
(13:35 -0500)
committer
Panos
<antoniad@panos.cs.princeton.edu>
Thu, 9 Dec 2010 18:35:26 +0000
(13:35 -0500)
toggles
plekit/toggle/toggle.js
patch
|
blob
|
history
diff --git
a/plekit/toggle/toggle.js
b/plekit/toggle/toggle.js
index
aa19d8e
..
7d302e1
100644
(file)
--- a/
plekit/toggle/toggle.js
+++ b/
plekit/toggle/toggle.js
@@
-1,17
+1,29
@@
-function plc_toggle(id){var area=$('toggle-area-'+id);area.toggle();var visible=$('toggle-image-visible-'+id);var hidden=$('toggle-image-hidden-'+id);if(area.visible()){visible.show();hidden.hide();}else{visible.hide();hidden.show();}}
+function plc_toggle(id){
+
+ var area=$('toggle-area-'+id);
+ area.toggle();
+ var visible=$('toggle-image-visible-'+id);
+ var hidden=$('toggle-image-hidden-'+id);
+ if(area.visible()){
+ visible.show();
+ hidden.hide();
+ }
+ else{
+ visible.hide();
+ hidden.show();
+ }
+}
function plc_show_toggle_info(div, id) {
//debugfilter("showing "+div);
function plc_show_toggle_info(div, id) {
//debugfilter("showing "+div);
-var area=$('toggle-area-'+id);
-var visible=$('toggle-image-visible-'+id);
-var hidden=$('toggle-image-hidden-'+id);
+
var area=$('toggle-area-'+id);
+
var visible=$('toggle-image-visible-'+id);
+
var hidden=$('toggle-image-hidden-'+id);
-if (document.getElementById(div).style.display == "none") {
- document.getElementById(div).style.display = "";
- if (! area.visible())
- area.toggle();
-}
+ if (document.getElementById(div).style.display == "none")
+ document.getElementById(div).style.display = "";
+ plc_toggle(id);
}
}