publisher always shows textarea. outline publisher textarea in blue
This commit is contained in:
parent
46dcd07f39
commit
77042f9d47
8 changed files with 34 additions and 36 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2010, Diaspora Inc. This file is
|
||||
#/ Copyright (c) 2010, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
|
|
@ -46,17 +46,13 @@ module AspectsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def publisher_description(aspect_count, aspect=nil)
|
||||
if aspect && aspect == :all
|
||||
str = t('.share_with_all')
|
||||
def publisher_description(aspect_count)
|
||||
str = "#{t('.share_with')} #{aspect_count} "
|
||||
if aspect_count == 1
|
||||
str += t('_aspect').downcase
|
||||
else
|
||||
str = "#{t('.post_a_message_to', :aspect => aspect_count)} "
|
||||
if aspect_count == 1
|
||||
str += t('_aspect').downcase
|
||||
else
|
||||
str += t('_aspects').downcase
|
||||
end
|
||||
str += t('_aspects').downcase
|
||||
end
|
||||
(link_to str, '#', :id => 'expand_publisher').html_safe
|
||||
("<span>#{str}</span>").html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
= current_user.name
|
||||
.description
|
||||
= link_to current_user.diaspora_handle, person_path(current_user.person)
|
||||
/= info_text(t('.handle_explanation'))
|
||||
|
||||
- if @notification_count > 0 || @request_count > 0
|
||||
#new_requests
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#click_to_share
|
||||
= image_tag 'icons/doc_edit.png'
|
||||
= publisher_description(@aspect_ids.count, aspect)
|
||||
= publisher_description(@aspect_ids.count)
|
||||
|
||||
.content_creation
|
||||
= form_for(StatusMessage.new, :remote => true) do |status|
|
||||
|
|
@ -31,10 +31,7 @@
|
|||
.right
|
||||
#fileInfo
|
||||
= image_tag 'ajax-loader.gif', :class => 'hidden', :id => "publisher_spinner"
|
||||
- if aspect == :all
|
||||
= status.submit t('.share'), :title => t('.share_with_all'), :disable_with => t('.posting'), :class => 'button'
|
||||
- else
|
||||
= status.submit t('.share'), :disable_with => t('.posting'), :class => 'button'
|
||||
= status.submit t('.share'), :disable_with => t('.posting'), :class => 'button'
|
||||
|
||||
- if aspect == :all
|
||||
.public_toggle
|
||||
|
|
|
|||
|
|
@ -100,12 +100,10 @@ en:
|
|||
share: "Share"
|
||||
post_a_message_to: "Post a message to %{aspect}"
|
||||
make_public: "make public"
|
||||
share_with_all: "Share with all aspects"
|
||||
share_with: "Share with %{aspect}"
|
||||
all: "all"
|
||||
add_photos: "add photos"
|
||||
all_contacts: "all contacts"
|
||||
share_with_all: "share across all of your aspects"
|
||||
share_with: "share with"
|
||||
add_contact:
|
||||
enter_a_diaspora_username: "Enter a Diaspora username:"
|
||||
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ $(document).ready(function(){
|
|||
var textarea = $("#publisher textarea");
|
||||
var photozone = $('#photodropzone')
|
||||
|
||||
if( textarea.val() == "" ) {
|
||||
if( post != "" ) {
|
||||
textarea.val(post);
|
||||
textarea.focus();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ $(document).ready(function(){
|
|||
$("#publisher .options_and_submit").show();
|
||||
}
|
||||
|
||||
$("#publisher textarea, #publisher input").live("focus", function(evt){
|
||||
$("#publisher textarea").live("focus", function(evt){
|
||||
$("#publisher .options_and_submit").show();
|
||||
});
|
||||
|
||||
$("#click_to_share").find("a").live("click", function(evt){
|
||||
$("#publisher textarea").live("click", function(evt){
|
||||
$("#publisher").removeClass("closed");
|
||||
$("#publisher").find("textarea").focus();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,8 +14,11 @@ var Stream = {
|
|||
/* In field labels */
|
||||
$("label").inFieldLabels();
|
||||
// publisher textarea reset
|
||||
$publisher.find("textarea").bind("blur", function() {
|
||||
$(this).css('height','42px');
|
||||
$publisher.find("textarea").bind("focus", function() {
|
||||
$(this).css('min-height','42px');
|
||||
});
|
||||
$publisher.find("form").bind("blur", function() {
|
||||
$("#publisher textarea").css('min-height','2px');
|
||||
});
|
||||
|
||||
// comment link form focus
|
||||
|
|
|
|||
|
|
@ -762,16 +762,17 @@ label
|
|||
:top 1px
|
||||
:top 0
|
||||
|
||||
:background
|
||||
:color rgb(248,248,248)
|
||||
|
||||
:border
|
||||
:bottom 2px #777 solid
|
||||
:top 1px #777 solid
|
||||
|
||||
&.closed
|
||||
.content_creation
|
||||
.options_and_submit
|
||||
:display none !important
|
||||
#file-upload
|
||||
:display none
|
||||
form
|
||||
textarea
|
||||
:height 18px !important
|
||||
|
||||
form
|
||||
:position relative
|
||||
|
|
@ -791,8 +792,11 @@ label
|
|||
textarea
|
||||
:width 435px
|
||||
:margin 0
|
||||
|
||||
textarea
|
||||
:border 1px solid $blue
|
||||
:height 42px
|
||||
|
||||
label
|
||||
:font
|
||||
:size 14px
|
||||
|
|
@ -801,7 +805,7 @@ label
|
|||
:min-height 21px
|
||||
:position relative
|
||||
:padding
|
||||
:top 8px
|
||||
:top 6px
|
||||
:margin
|
||||
:bottom -2px
|
||||
input[type='submit']
|
||||
|
|
@ -826,20 +830,21 @@ label
|
|||
#click_to_share
|
||||
:position relative
|
||||
:padding 1em
|
||||
:top 0
|
||||
:margin
|
||||
:bottom -1em
|
||||
:bottom -16px
|
||||
|
||||
a
|
||||
span
|
||||
:margin
|
||||
:left 1em
|
||||
:left 12px
|
||||
:font
|
||||
:weight bold
|
||||
:text-shadow 0 1px 0 #fff
|
||||
:color #444
|
||||
|
||||
img
|
||||
:display inline
|
||||
:position absolute
|
||||
:top 1em
|
||||
:top 0
|
||||
:left 0px
|
||||
|
||||
#file-upload
|
||||
|
|
|
|||
Loading…
Reference in a new issue