Skip to content
Extraits de code Groupes Projets
Valider d2b471a5 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

Merge branch 'master' of github.com:diaspora/diaspora

parents 39551a01 eaeea663
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*~ *~
.bundle .bundle
db/*.sqlite3 db/*.sqlite3
log/*.log log/*
tmp/**/* tmp/**/*
Gemfile.lock Gemfile.lock
gpg/diaspora-development/*.gpg gpg/diaspora-development/*.gpg
......
...@@ -57,6 +57,11 @@ class Comment ...@@ -57,6 +57,11 @@ class Comment
verify_signature(post_creator_signature, post.person) verify_signature(post_creator_signature, post.person)
end end
def signature_valid?
Rails.logger.warn "Received comment has person #{person.inspect}"
Rails.logger.warn "Received comment has person key #{person.serialized_key}" if person
verify_signature(creator_signature, person) && verify_signature(post_creator_signator, post.person)
end
protected protected
def sign_if_my_post def sign_if_my_post
......
- content_for :head do
:javascript
$(document).ready(function(){
$("#add_album_button").fancybox();
});
.back= link_to "⇧ home", root_path .back= link_to "⇧ home", root_path
%h1.big_text %h1.big_text
Albums Albums
......
- content_for :head do - content_for :head do
:javascript = javascript_include_tag 'photos', 'jquery.html5_upload'
$(document).ready(function(){
reset_photo_fancybox();
});
.album_id{:id => @album.id, :style => "display:hidden;"} .album_id{:id => @album.id, :style => "display:hidden;"}
.back= link_to '⇧ albums', albums_path .back= link_to '⇧ albums', albums_path
......
...@@ -8,18 +8,17 @@ ...@@ -8,18 +8,17 @@
= link_to "⇧ #{@group.name}", @group = link_to "⇧ #{@group.name}", @group
= "Editing Groups" = "Editing Groups"
%ul
- for group in @groups - for group in @groups
%li.group %li.group
= group.name = group.name
%ul %ul
stuff
-for person in group.people -for person in group.people
%li.person %li.person
= person.real_name = person.real_name
#content_bottom #content_bottom
.back .back
= link_to "⇧ #{@group.name}", @group = link_to "⇧ #{@group.name}", @group
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
= csrf_meta_tag = csrf_meta_tag
= yield(:head) = yield(:head)
= javascript_include_tag 'jquery.html5_upload'
%body %body
- flash.each do |name, msg| - flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}" = content_tag :div, msg, :id => "flash_#{name}"
......
$(function() { $(function() {
$("li .person").draggable({ $("li .person").draggable({
helper: 'clone', revert: true
cursor: 'move' });
}); $(".group ul").droppable({
$("li .group").droppable({
drop: function(event, ui) { drop: function(event, ui) {
//alert('dropped!'); $(this).closest("ul").append(ui.draggable)
$("<li class='person'></li>").text(ui.draggable.text()).appendTo(this); //$("<li class='person ui-draggable'></li>").text(ui.draggable.text()).appendTo(this).draggable();
} }
}); });
......
Ce diff est replié.
$(document).ready(function(){
reset_photo_fancybox();
$("#add_photo_button").fancybox({
'onClosed' : function(){
if($("#add_photo_button").hasClass("uploading_complete")){
$("#add_photo_button").removeClass("uploading_complete");
reset_photo_fancybox();
}
}
});
$(".image_thumb img").load( function() {
$(this).fadeIn("slow");
});
});//end document ready
function reset_photo_fancybox(){
album_id = $(".album_id")[0].id;
ajax = $.get("/photos/new?album_id=" + album_id, function(){
$("#new_photo_pane").html(ajax.responseText)
});
}
...@@ -20,25 +20,16 @@ $(document).ready(function(){ ...@@ -20,25 +20,16 @@ $(document).ready(function(){
//buttons////// //buttons//////
$("#add_album_button").fancybox();
$("#add_group_button").fancybox(); $("#add_group_button").fancybox();
$("#add_request_button").fancybox({ 'titleShow': false }); $("#add_request_button").fancybox({ 'titleShow': false });
$("#add_photo_button").fancybox({
'onClosed' : function(){
if($("#add_photo_button").hasClass("uploading_complete")){
$("#add_photo_button").removeClass("uploading_complete");
reset_photo_fancybox();
}
}
});
//pane_toggler_button("photo"); //pane_toggler_button("photo");
$("input[type='submit']").addClass("button"); $("input[type='submit']").addClass("button");
$(".image_thumb img").load( function() {
$(this).fadeIn("slow");
});
$(".image_cycle img").load( function() { $(".image_cycle img").load( function() {
$(this).fadeIn("slow"); $(this).fadeIn("slow");
...@@ -48,12 +39,7 @@ $(document).ready(function(){ ...@@ -48,12 +39,7 @@ $(document).ready(function(){
});//end document ready });//end document ready
function reset_photo_fancybox(){
album_id = $(".album_id")[0].id;
ajax = $.get("/photos/new?album_id=" + album_id, function(){
$("#new_photo_pane").html(ajax.responseText)
});
}
function pane_toggler_button( name ) { function pane_toggler_button( name ) {
......
...@@ -8,6 +8,10 @@ describe User do ...@@ -8,6 +8,10 @@ describe User do
@user2 = Factory.create(:user) @user2 = Factory.create(:user)
@group2 = @user2.group(:name => 'losers') @group2 = @user2.group(:name => 'losers')
@user3 = Factory.create(:user)
@group3 = @user3.group(:name => 'heroes')
friend_users(@user, @group, @user2, @group2) friend_users(@user, @group, @user2, @group2)
end end
...@@ -36,11 +40,17 @@ describe User do ...@@ -36,11 +40,17 @@ describe User do
@user.groups.size.should == num_groups @user.groups.size.should == num_groups
end end
describe 'comments' do
it 'should receive comments from unknown users' do
friend_users(@user, @group, @user2, @group2)
status_message = @user.post, :status_message, :message => 'message', :to => @group.id
end
end
describe 'post refs' do describe 'post refs' do
before do before do
@user3 = Factory.create(:user)
@group3 = @user3.group(:name => 'heroes')
end end
it "should add the post to that user's posts when a user posts it" do it "should add the post to that user's posts when a user posts it" do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter