From 403d18bac4abae40796eb7d178b8b6f82e58c067 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Sun, 3 Jul 2011 22:06:58 -0700 Subject: [PATCH] fixed content expander in comments; comments have a smaller limit than posts --- app/views/shared/_stream_element.html.haml | 2 +- public/javascripts/stream.js | 11 +++++++++-- public/stylesheets/sass/application.sass | 5 +++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 244bb2750..82e708778 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -16,7 +16,7 @@ = person_image_link(post.author, :size => :thumb_small) .content - %div + %div.post_initial_info %span.from = person_link(post.author, :class => 'author') %time.time.timeago{:datetime => post.created_at, :integer => time_for_sort(post).to_i} diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 3543d980a..d4b6718e8 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -18,13 +18,21 @@ var Stream = { Stream.setUpAudioLinks(); //Stream.setUpImageLinks(); - // collapse long comments + // collapse long posts $(".content p", this.selector).expander({ slicePoint: 400, widow: 12, expandText: Diaspora.widgets.i18n.t("show_more"), userCollapse: false }); + + // collapse long comments + $(".comment .content span", this.selector).expander({ + slicePoint: 200, + widow: 12, + expandText: Diaspora.widgets.i18n.t("show_more"), + userCollapse: false + }); }, initializeLives: function(){ @@ -41,7 +49,6 @@ var Stream = { }); this.setUpComments(); - }, setUpComments: function(){ diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 0e5be741f..aec2a7f69 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -477,8 +477,9 @@ ul.dropdown :bottom 5px -.details - :color #aaa +.post_initial_info + .details + :color #aaa .time, .timeago,