85 lines
2.9 KiB
Text
85 lines
2.9 KiB
Text
-# Copyright (c) 2010, Diaspora Inc. This file is
|
|
-# licensed under the Affero General Public License version 3 or later. See
|
|
-# the COPYRIGHT file.
|
|
|
|
|
|
- content_for :head do
|
|
:javascript
|
|
$(document).ready(function(){
|
|
$("div.public_toggle input").bind("click", function(evt){
|
|
$("#publisher_service_icons").toggleClass("dim");
|
|
if($(this).attr('checked') == true){
|
|
$(".question_mark").click();
|
|
};
|
|
});
|
|
|
|
if($("textarea#status_message_message").val() != ""){
|
|
$("#publisher").removeClass("closed");
|
|
$("#publisher .options_and_submit").show();
|
|
}
|
|
|
|
$("#publisher textarea, #publisher input").bind("focus", function(evt){
|
|
$("#publisher .options_and_submit").show();
|
|
});
|
|
|
|
$("#click_to_share").find("a").bind("click", function(evt){
|
|
$("#publisher").removeClass("closed");
|
|
$("#publisher").find("textarea").focus();
|
|
});
|
|
});
|
|
|
|
#publisher{:class=>"closed"}
|
|
|
|
#click_to_share
|
|
= image_tag 'icons/doc_edit.png'
|
|
- if aspect == :all
|
|
= link_to t('.share_with_all'), '#', :id => 'expand_publisher'
|
|
- else
|
|
= link_to t('.post_a_message_to', :aspect => aspect), '#', :id => 'expand_publisher'
|
|
|
|
.content_creation
|
|
= form_for(StatusMessage.new, :remote => true) do |status|
|
|
= status.error_messages
|
|
#file-upload
|
|
= image_tag 'icons/photos.png'
|
|
%br
|
|
= t('.add_photos')
|
|
|
|
%p
|
|
%params
|
|
#publisher_textarea_wrapper
|
|
%ul#photodropzone
|
|
= status.text_area :message, :rows => 2, :value => params[:prefill]
|
|
|
|
= status.hidden_field :aspect_ids, :value => (aspect == :all ? aspect : aspect.id)
|
|
|
|
.options_and_submit
|
|
|
|
.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')
|
|
- else
|
|
= status.submit t('.share'), :title => t('.share_with', :aspect => aspect), :disable_with => t('.posting')
|
|
|
|
- if aspect == :all
|
|
.public_toggle
|
|
%p.checkbox_select
|
|
= status.check_box( :public, {:title => t('.make_public')}, true, false)
|
|
|
|
%span#publisher_service_icons.dim
|
|
= link_to (image_tag "social_media_logos/feed-16x16.png", :title => "RSS"), current_user.public_url
|
|
- if current_user.services
|
|
- for service in current_user.services
|
|
= image_tag "social_media_logos/#{service.provider}-16x16.png", :title => service.provider
|
|
|
|
= link_to '(?)', "#question_mark_pane", :class => 'question_mark', :style=>"display:none;"
|
|
|
|
.fancybox_content
|
|
#question_mark_pane
|
|
= render 'shared/public_explain'
|
|
|
|
#publisher_photo_upload
|
|
= render 'photos/new_photo', :aspect_id => (aspect == :all ? aspect : aspect.id)
|
|
|