Skip to content
Extraits de code Groupes Projets
Valider 7b3f6f66 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

removed second #stream declaration on status_message#show. fixed bug where...

removed second #stream declaration on status_message#show.  fixed bug where show pages would get posts as well as comments.
parent 661ad20a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See -# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file. -# the COPYRIGHT file.
%li.comment{:id => post.id} %li.comment
= person_image_link(post.person) = person_image_link(post.person)
.content .content
.from .from
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
function processComment(post_id, html){ function processComment(post_id, html){
post = $("*[data-guid='"+post_id+"']'"); post = $("*[data-guid='"+post_id+"']'");
$(' .comments li:last', post ).before( $('.comments li:last', post ).before(
$(html).fadeIn("fast", function(){}) $(html).fadeIn("fast", function(){})
); );
toggler = $('.show_post_comments', post) toggler = $('.show_post_comments', post)
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
function processPost(className, html, aspectIds){ function processPost(className, html, aspectIds){
if(onPageForAspects(aspectIds)){ if(onPageForAspects(aspectIds)){
var addPostToStream = function (html){ var addPostToStream = function (html){
$("#stream").prepend( $("#stream:not('.show')").prepend(
$(html).fadeIn("fast", function(){ $(html).fadeIn("fast", function(){
$("#stream label:first").inFieldLabels(); $("#stream").find("label").first().inFieldLabels();
}) })
) )
}; };
......
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
= render 'shared/author_info', :post => @status_message = render 'shared/author_info', :post => @status_message
.span-14.append-1.last .span-14.append-1.last
#stream %h1.show_text
%h1.show_text = make_links(@status_message.message)
= make_links(@status_message.message)
= "Posted #{how_long_ago(@status_message)} to" = how_long_ago(@status_message)
- for aspect in current_user.aspects_with_post( @status_message.id )
= link_to aspect.name, aspect
- if current_user.owns? @status_message - if current_user.owns? @status_message
%p %p
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
$(document).ready(function(){ $(document).ready(function(){
// expand all comments on page load // expand all comments on page load
$("#stream").find('.comments').each(function(index) { $("#stream:not('.show')").find('.comments').each(function(index) {
var comments = $(this); var comments = $(this);
if(comments.children("li").length > 1) { if(comments.children("li").length > 1) {
var show_comments_toggle = comments.closest("li").find(".show_post_comments"); var show_comments_toggle = comments.closest("li").find(".show_post_comments");
...@@ -16,7 +16,7 @@ $(document).ready(function(){ ...@@ -16,7 +16,7 @@ $(document).ready(function(){
}); });
// comment toggle action // comment toggle action
$("#stream").delegate("a.show_post_comments", "click", function(evt) { $("#stream:not('.show')").delegate("a.show_post_comments", "click", function(evt) {
evt.preventDefault(); evt.preventDefault();
expandComments($(this)); expandComments($(this));
}); });
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter