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