public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Added comment highlighting when clicking from overview

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1343 
567b1171-46fb-0310-a4c9-b4bef9110e78
Caged (author)
Mon Jul 10 00:22:41 -0700 2006
commit  d9bacab5fb5b1afb53470f02e00557475541848a
tree    3dbe8eccbfbf5a45824c419423044454aee44108
parent  1e9e5fa371ddc82c99a6298ad67ed1c5b58f8def
...
12
13
14
 
15
16
17
...
28
29
30
31
32
 
 
 
 
 
 
 
 
 
 
33
...
12
13
14
15
16
17
18
...
29
30
31
 
32
33
34
35
36
37
38
39
40
41
42
43
0
@@ -12,6 +12,7 @@
0
   <% if @comments.any? %>
0
   <% @comments.each_with_index do |comment, i| -%>
0
   <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
0
+ <a name="comment-<%= comment.id %>"></a>
0
     <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
0
     <span class="meta">
0
       <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
0
@@ -28,4 +29,13 @@
0
   <% else %>
0
     <li class="event-none shade">This article has no <%= params[:filter].to_s.humanize.downcase %> comments.</li>
0
   <% end %>
0
-</ul>
0
\ No newline at end of file
0
+</ul>
0
+
0
+
0
+<script type="text/javascript" language="javascript" charset="utf-8">
0
+// <![CDATA[
0
+ var comment = $(document.location.hash.substring(1));
0
+ if(comment) Element.addClassName(comment, 'focused');
0
+
0
+// ]]>
0
+</script>
0
\ No newline at end of file
...
16
17
18
19
 
20
21
22
...
30
31
32
33
34
 
...
16
17
18
 
19
20
21
22
...
30
31
32
 
33
34
0
@@ -16,7 +16,7 @@
0
 <ul class="pagelist">
0
   <% @comments.each_with_index do |comment, i| -%>
0
   <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
0
- <h3><%= link_to comment.article.title, :controller => 'articles', :action => :edit, :id => comment.article %></h3>
0
+ <h3><a name="comment-<%= comment.id %>"></a> <%= link_to comment.article.title, :controller => 'articles', :action => :edit, :id => comment.article %></h3>
0
     <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
0
     <span class="meta">
0
       <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
0
@@ -30,4 +30,4 @@
0
     </span>
0
   </li>
0
   <% end -%>
0
-</ul>
0
\ No newline at end of file
0
+</ul>
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 <% with_options :controller => 'articles', :id => event.article_id do |article| -%>
0
 <li id="event-<%= event.id %>" class="event-comment<%= " shade" if shaded %>">
0
- <%= link_to_article event.article %> received a comment.
0
+ <%= link_to event.article.title, :controller => 'articles', :action => 'comments', :id => event.article_id, :anchor => "comment-#{event.comment_id}" %> received a comment.
0
   
0
   <span class="event-time"><%= event_time_for event, later %></span>
0
   <blockquote><p>&quot;<%= truncate strip_tags(event.body), 100 %>&quot;</p></blockquote>
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,5 +1,5 @@
0
 <li class="event-revision<%= " shade" if defined?(shaded) && shaded == true %>">
0
   <span class="event-time"><%= event_time_for event, later %></span>
0
- <%= link_to h(event.title), :controller => 'articles', :action => 'show', :id => event.article_id %> was revised.
0
+ <%= link_to h(event.title), :controller => 'articles', :action => 'edit', :id => event.article_id %> was revised.
0
   <span class="meta">by <%= link_to who(event.user.login), :controller => 'users', :action => 'show', :id => event.user.login %></span>
0
 </li>
0
\ No newline at end of file
...
686
687
688
 
 
 
 
 
 
 
 
689
690
691
...
686
687
688
689
690
691
692
693
694
695
696
697
698
699
0
@@ -686,6 +686,14 @@ ul.stabs li a:hover {
0
   color: #000;
0
 }
0
 
0
+.focused {
0
+ padding: 20px 20px 20px 55px !important;
0
+ padding-bottom: 3px;
0
+ border: 1px solid #6aa;
0
+ background-color: #D6F0F0 !important;
0
+ margin: 20px 0;
0
+}
0
+
0
 /*
0
  *=LIVE PREVIEW
0
  */

Comments

    No one has commented yet.