Permalink
Browse files

Merge branch 'master' of git://github.com/saturnflyer/radiant-comments

  • Loading branch information...
jomz committed Mar 19, 2010
2 parents d6e8214 + 0625439 commit 2132d13587a46569d12092d5f2e9d3caff02e304
Showing with 10 additions and 8 deletions.
  1. +10 −8 app/views/admin/comments/index.rhtml
@@ -1,17 +1,19 @@
<% content_for :page_scripts do -%>
document.observe('dom:loaded', function(){
- when($$('tr.comment blockquote.expanded'), function(bqs){
- bqs.each(function(bq){
- var td = bq.up();
- td.observe('click', function(e){
- e.stop();
- td.select('blockquote').invoke('toggle');
+ Event.addBehavior({
+ 'tr.comment td': function(event){
+ $(this).observe('click', function(event){
+ if($(this).down('blockquote.expanded')){
+ $(this).down('blockquote.expanded').toggle();
+ $(this).down('blockquote.short').toggle();
+ }
+ event.stop();
});
- });
+ }
});
});
<% end %>
-<% include_stylesheet 'admin/comments' %>
+<%- include_stylesheet 'admin/comments' %>
<h1>
<% if @page -%>
<%= @page.comments.count %> <%= "#{params[:status].titleize} " if params[:status] %><%= pluralize(@page.comments.count, 'Comment') %> on <%= link_to @page.title, edit_admin_page_path(@page) %>

0 comments on commit 2132d13

Please sign in to comment.