Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
7e0825e492
4 changed files with 31 additions and 11 deletions
|
|
@ -11,6 +11,9 @@ class AspectsController < ApplicationController
|
|||
def index
|
||||
@posts = current_user.visible_posts(:by_members_of => :all).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC'
|
||||
@aspect = :all
|
||||
|
||||
@fb_access_url = MiniFB.oauth_url(FB_APP_ID, APP_CONFIG[:pod_url] + "services/create",
|
||||
:scope=>MiniFB.scopes.join(","))
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
|||
|
|
@ -2,6 +2,18 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
:javascript
|
||||
|
||||
$("div.public_toggle input").live("click", function(evt){
|
||||
if("#{@logged_in}" == "false" && $(this).attr('checked') == true){
|
||||
if(confirm("You are currently not connected to facebook. Sign in to facebook?")){
|
||||
window.location = "#{@fb_access_url}";
|
||||
} else {
|
||||
$(this).attr('checked', false);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
#publisher
|
||||
= owner_image_tag
|
||||
|
||||
|
|
@ -18,13 +30,15 @@
|
|||
= check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) )
|
||||
= aspect.name
|
||||
|
||||
= f.hidden_field( :public, :value => false )
|
||||
|
||||
- if @aspect == :all
|
||||
.public_toggle
|
||||
= f.check_box( :public, :value => false )
|
||||
share on facebook
|
||||
|
||||
.buttons
|
||||
- if @aspect == :all
|
||||
= f.submit t('.share'), :title => "Share with all aspects"
|
||||
- else
|
||||
= f.submit t('.share'), :title => "Share with #{@aspect.name}"
|
||||
- if defined? broadcast
|
||||
= f.submit "Broadcast", :class => "broadcast", :name => "broadcast", :title => "Publish to Diaspora and Facebook"
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $(document).ready(function(){
|
|||
);
|
||||
|
||||
$("#publisher textarea").keydown( function(e) {
|
||||
if (e.shiftKey && e.keyCode == 13) {
|
||||
if (e.keyCode == 13) {
|
||||
$("#publisher form").submit();
|
||||
}
|
||||
});
|
||||
|
|
@ -71,10 +71,3 @@ $.fn.clearForm = function() {
|
|||
});
|
||||
};
|
||||
|
||||
$("#publisher .broadcast").live("click", function(evt){
|
||||
evt.preventDefault();
|
||||
if( confirm("Publish to Diaspora and Facebook?") ) {
|
||||
$("#status_message_public").val("true");
|
||||
$(this).submit();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -612,6 +612,16 @@ label
|
|||
.buttons
|
||||
:float right
|
||||
|
||||
.public_toggle
|
||||
:position absolute
|
||||
:top 53px
|
||||
:left 460px
|
||||
:width 300px
|
||||
:font
|
||||
:size smaller
|
||||
:style italic
|
||||
|
||||
|
||||
#image_picker
|
||||
.small_photo
|
||||
:height 100px
|
||||
|
|
|
|||
Loading…
Reference in a new issue