diff --git a/app/views/comments/_new_comment.mobile.haml b/app/views/comments/_new_comment.mobile.haml index 42b31a387..54f487d3b 100644 --- a/app/views/comments/_new_comment.mobile.haml +++ b/app/views/comments/_new_comment.mobile.haml @@ -4,7 +4,7 @@ = form_tag( post_comments_path(post_id), :id => "new_comment_on_#{post_id}", :class => 'new_comment', :autocomplete => "off") do = hidden_field_tag :post_id, post_id, :id => "post_id_on_#{post_id}" - = text_area_tag :text, nil, :rows => 2, :class => "comment_box",:id => "comment_text_on_#{post_id}", :placeholder => t('.comment'), :autofocus => true + = text_area_tag :text, nil, :class => "comment_box",:id => "comment_text_on_#{post_id}", :placeholder => t('.comment'), :autofocus => true .actions = link_to "Cancel", post_path(post_id), :class => "cancel_new_comment btn" diff --git a/app/views/reshares/_reshare.mobile.haml b/app/views/reshares/_reshare.mobile.haml index 6b137fcb4..f6d4c4f07 100644 --- a/app/views/reshares/_reshare.mobile.haml +++ b/app/views/reshares/_reshare.mobile.haml @@ -2,34 +2,43 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- if post - .photo_area - - if post.is_a?(StatusMessage) - -if post.photos.size > 0 - .photo_attachments - - if post.photos.size > 1 - .additional_photo_count - = "+ #{post.photos.size-1}" - = image_tag post.photos.first.url(:thumb_large), :class => "stream-photo big-stream-photo" - - elsif post.activity_streams? - = image_tag post.image_url +.reshare + - if post + .photo_area + - if post.is_a?(StatusMessage) + -if post.photos.size > 0 + .photo_attachments + - if post.photos.size > 1 + .additional_photo_count + = "+ #{post.photos.size-1}" + = image_tag post.photos.first.url(:thumb_large), :class => "stream-photo big-stream-photo" + - elsif post.activity_streams? + = image_tag post.image_url - .content - .from - = person_image_link(post.author, :size => :thumb_small) - = person_link(post.author) - .info - %span.time{:integer => post.created_at.to_i} - = t('ago', :time => time_ago_in_words(post.created_at)) - %span.via - - if post.activity_streams? - = t('.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe + .content + .from + = person_image_link(post.author, :size => :thumb_small) + = person_link(post.author) + .info + %span.time{:integer => post.created_at.to_i} + = t('ago', :time => time_ago_in_words(post.created_at)) + %span.via + - if post.activity_streams? + = t('shared.stream_element.via', :link => link_to("#{post.provider_display_name}", post.actor_url)).html_safe + – + %span.scope_scope + - if post.public? + = t('public') + - else + = t('limited') - - if post.activity_streams? - = link_to image_tag(post.image_url, 'data-small-photo' => post.image_url, 'data-full-photo' => post.image_url, :class => 'stream-photo'), post.object_url, :class => "stream-photo-link" - - else - = render 'status_messages/status_message', :post => post, :photos => post.photos -- else - = t('.deleted') + - if post.activity_streams? + = link_to image_tag(post.image_url, 'data-small-photo' => post.image_url, 'data-full-photo' => post.image_url, :class => 'stream-photo'), post.object_url, :class => "stream-photo-link" + - else + = render 'status_messages/status_message', :post => post, :photos => post.photos + - else + = t('.deleted') -%hr + .reshare_via + %span + = t('.reshared_via') diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 29afa4b23..b04b2a44c 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -661,6 +661,7 @@ en: other: "%{count} new requests!" reshares: reshare: + reshared_via: "reshared via" reshare_original: "Reshare original" reshare: zero: "Reshare" diff --git a/public/javascripts/mobile.js b/public/javascripts/mobile.js index ca16b9018..f6b563c25 100644 --- a/public/javascripts/mobile.js +++ b/public/javascripts/mobile.js @@ -123,10 +123,9 @@ $(document).ready(function(){ beforeSend: function(){ link.addClass('loading'); }, + context: link, success: function(data){ - var textarea = parent.find('textarea').first(); - lineHeight = 14; - + var textarea = function(target) { return target.closest(".stream_element").find('textarea.comment_box').first()[0] }; link.removeClass('loading') if(!link.hasClass("add_comment_bottom_link")){ @@ -135,7 +134,10 @@ $(document).ready(function(){ container.hide(); parent.append(data); - new MBP.autogrow(textarea); + + console.log($(this).closest(".stream_element").find('textarea')); + + MBP.autogrow(textarea($(this))); } }); } @@ -164,7 +166,7 @@ $(document).ready(function(){ var bottomBar = form.closest('.bottom_bar').first(), container = bottomBar.find('.add_comment_bottom_link_container'), commentActionLink = bottomBar.find("a.comment_action").first(); - reactionLink = bottomBar.find("a.show_comments").first(), + reactionLink = bottomBar.find(".show_comments").first(), commentCount = bottomBar.find(".comment_count"); if(container.length > 0) { diff --git a/public/stylesheets/sass/mobile.scss b/public/stylesheets/sass/mobile.scss index e87db74b8..4b0235ec5 100644 --- a/public/stylesheets/sass/mobile.scss +++ b/public/stylesheets/sass/mobile.scss @@ -55,7 +55,9 @@ body { weight: bold !important; }; } margin-bottom: 2px; height: 45px; } - > .content { + + > .content, + .reshare > .content { padding: 10px { bottom: 0; }; } padding: 10px 0; @@ -107,6 +109,7 @@ body { @include border-radius(3px); @include box-shadow(0, 1px, 5px, rgba(0, 0, 0, 1)); padding: 0; + padding-bottom: 10px; background: { color: #fff; } @@ -553,3 +556,26 @@ header { .new_status_message { min-height: 300px; } + +.reshare { + border-bottom: 1px solid #ccc; + padding: { + bottom: 10px; + } + position: relative; + + .reshare_via { + width: 100%; + position: absolute; + bottom: -7px; + text-align: center; + span { + padding: 2px 10px; + font-weight: bold; + color: #999; + background: { + color: #fff; + } + } + } +}