publisher rework
This commit is contained in:
parent
60077bd70a
commit
cd9be3904b
4 changed files with 56 additions and 30 deletions
|
|
@ -9,7 +9,7 @@
|
|||
$(".public_icon").tipsy({trigger: 'hover', gravity: 'n'});
|
||||
});
|
||||
|
||||
#publisher{:class => ((aspect == :profile)? 'mention_popup' : nil )}
|
||||
#publisher.closed{:class => ((aspect == :profile)? 'mention_popup' : nil )}
|
||||
.content_creation
|
||||
= form_for(StatusMessage.new, :remote => true, :html => {"data-type" => "json"}) do |status|
|
||||
- if @selected_contacts
|
||||
|
|
@ -18,18 +18,19 @@
|
|||
%p
|
||||
%params
|
||||
#publisher_textarea_wrapper
|
||||
= link_to( image_tag('deletelabel.png'), "#", :id => "hide_publisher", :title => t('.discard_post'))
|
||||
%ul#photodropzone
|
||||
= status.text_area :fake_text, :rows => 2, :value => h(params[:prefill]), :tabindex => 1, :placeholder => t('.whats_on_your_mind')
|
||||
= status.hidden_field :text, :value => '', :class => 'clear_on_submit'
|
||||
|
||||
#file-upload{:title => t('.upload_photos')}
|
||||
= image_tag 'icons/camera.svg', :height => 14
|
||||
|
||||
|
||||
- for aspect_id in aspect_ids
|
||||
= hidden_field_tag 'aspect_ids[]', aspect_id.to_s
|
||||
|
||||
.options_and_submit
|
||||
#file-upload
|
||||
= image_tag 'icons/camera.svg', :height => 14
|
||||
= t('.add_photos')
|
||||
|
||||
- if aspect == :profile
|
||||
.mention_helper
|
||||
.badges
|
||||
|
|
|
|||
|
|
@ -600,13 +600,14 @@ en:
|
|||
post_a_message_to: "Post a message to %{aspect}"
|
||||
make_public: "make public"
|
||||
all: "all"
|
||||
add_photos: "add photos"
|
||||
upload_photos: "Upload photos"
|
||||
all_contacts: "all contacts"
|
||||
share_with: "share with"
|
||||
whats_on_your_mind: "What's on your mind?"
|
||||
publishing_to: "publishing to: "
|
||||
public: "Public"
|
||||
click_to_share_with: "Click to share with: "
|
||||
discard_post: "Discard post"
|
||||
add_contact:
|
||||
enter_a_diaspora_username: "Enter a Diaspora username:"
|
||||
your_diaspora_username_is: "Your Diaspora username is: %{diaspora_handle}"
|
||||
|
|
|
|||
|
|
@ -371,9 +371,13 @@ var Publisher = {
|
|||
Publisher.bindPublicIcon();
|
||||
Publisher.bindAspectToggles();
|
||||
|
||||
if ($("#status_message_fake_text").val() === "") {
|
||||
/* close text area */
|
||||
Publisher.form().delegate("#hide_publisher", "click", function(){
|
||||
$.each(Publisher.form().find("textarea"), function(idx, element){
|
||||
$(element).val("");
|
||||
});
|
||||
Publisher.close();
|
||||
}
|
||||
});
|
||||
|
||||
Publisher.autocompletion.initialize();
|
||||
Publisher.hiddenInput().val(Publisher.input().val());
|
||||
|
|
|
|||
|
|
@ -892,8 +892,8 @@ label
|
|||
|
||||
form
|
||||
textarea
|
||||
:height 18px !important
|
||||
:width 474px
|
||||
:width 455px
|
||||
:margin 0
|
||||
|
||||
&.mention_popup
|
||||
:padding 1px 12px
|
||||
|
|
@ -905,23 +905,22 @@ label
|
|||
&.closed
|
||||
.options_and_submit
|
||||
:display none !important
|
||||
#file-upload
|
||||
:display none
|
||||
|
||||
textarea
|
||||
:height 18px !important
|
||||
|
||||
.counter
|
||||
:display none
|
||||
|
||||
&:not(.closed)
|
||||
textarea
|
||||
:margin
|
||||
:bottom 30px
|
||||
|
||||
form
|
||||
:position relative
|
||||
:top 0
|
||||
|
||||
input[type='text'],
|
||||
textarea
|
||||
:margin 0
|
||||
:width 395px
|
||||
|
||||
textarea
|
||||
:height 42px
|
||||
|
||||
label
|
||||
:font
|
||||
:size 14px
|
||||
|
|
@ -961,24 +960,17 @@ label
|
|||
:top 1em
|
||||
|
||||
#file-upload
|
||||
:float left
|
||||
:position absolute !important
|
||||
:bottom 1px !important
|
||||
:right 6px
|
||||
:z-index 10
|
||||
:margin 0
|
||||
:top 2px
|
||||
|
||||
:display inline-block
|
||||
|
||||
:padding 0.3em
|
||||
:cursor pointer
|
||||
|
||||
:font
|
||||
:weight bold
|
||||
:size smaller
|
||||
|
||||
:text
|
||||
:align center
|
||||
:shadow none
|
||||
|
||||
img
|
||||
@include opacity(0.4)
|
||||
|
||||
|
|
@ -1007,9 +999,32 @@ label
|
|||
@include opacity(0.5)
|
||||
|
||||
#publisher_textarea_wrapper
|
||||
#hide_publisher
|
||||
@include opacity(0.3)
|
||||
:padding 3px
|
||||
:position absolute
|
||||
:right 6px
|
||||
:top 0
|
||||
|
||||
&:hover
|
||||
@include opacity(1)
|
||||
|
||||
@include border-radius(2px)
|
||||
|
||||
:border 1px solid #ccc
|
||||
:background #fff
|
||||
|
||||
:position relative
|
||||
:padding
|
||||
:right 10px
|
||||
|
||||
textarea
|
||||
:z-index 2
|
||||
:border none
|
||||
|
||||
&:focus
|
||||
:outline 0
|
||||
:background transparent
|
||||
|
||||
&.with_attachments
|
||||
:padding
|
||||
|
|
@ -1074,6 +1089,11 @@ label
|
|||
:width 82%
|
||||
:display inline
|
||||
|
||||
#publisher.closed
|
||||
#publisher_textarea_wrapper
|
||||
#hide_publisher
|
||||
:display none
|
||||
|
||||
.dim
|
||||
@include opacity(0.3)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue