diff options
author | wei <> | 2007-01-15 00:25:41 +0000 |
---|---|---|
committer | wei <> | 2007-01-15 00:25:41 +0000 |
commit | 5e91a7bb68913944b38f2167a5d41cc661116a95 (patch) | |
tree | 7a0534464a3a975f4ecb55b3418fa4b34909180f /demos | |
parent | cb7049911b4762807720b01fc4c328d67bbc8004 (diff) |
fix js errors
Diffstat (limited to 'demos')
-rw-r--r-- | demos/quickstart/protected/controls/Comments/comments.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/demos/quickstart/protected/controls/Comments/comments.js b/demos/quickstart/protected/controls/Comments/comments.js index 4e0cdf67..6364903a 100644 --- a/demos/quickstart/protected/controls/Comments/comments.js +++ b/demos/quickstart/protected/controls/Comments/comments.js @@ -118,9 +118,9 @@ function add_comment_tag(el) var tag = "<div id='"+id+"' class='"+cssClass+"' style='"+style+"'><div style='"+innerStyle+"' title='"+title+"'>"+comments+"</div> </div>";
new Insertion.Before(el, tag);
var tag_div = $(id);
- Event.observe(tag_div, "mouseover", function(e){ show_block(el); });
- Event.observe(tag_div, "mouseout", function(e){ hide_block(el); });
- Event.observe(tag_div, "click", function(e) { show_comments(el); Event.stop(e); });
+ Event.observe(tag_div, "mouseover", function(e){ if(show_block) show_block(el); });
+ Event.observe(tag_div, "mouseout", function(e){ if(hide_block) hide_block(el); });
+ Event.observe(tag_div, "click", function(e) { if(show_comments) show_comments(el); Event.stop(e); });
}
function increment_count_tag(id)
@@ -167,8 +167,8 @@ function get_comment_count(id) $$('#content .block-content').each(function(el)
{
- Event.observe(el, 'mouseover', function(e){ show_block(Event.element(e)); });
- Event.observe(el, 'mouseout', function(e){ hide_block(Event.element(e)); });
+ Event.observe(el, 'mouseover', function(e){ if(show_block) show_block(Event.element(e)); });
+ Event.observe(el, 'mouseout', function(e){ if(hide_block) hide_block(Event.element(e)); });
add_comment_tag(el);
});
|