Skip to content
Extraits de code Groupes Projets
Valider 60dd2f8e rédigé par maxwell's avatar maxwell
Parcourir les fichiers

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

parents ce1768d0 55952d00
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -77,9 +77,16 @@ class PhotosController < ApplicationController ...@@ -77,9 +77,16 @@ class PhotosController < ApplicationController
if photo if photo
photo.destroy photo.destroy
flash[:notice] = I18n.t 'photos.destroy.notice' flash[:notice] = I18n.t 'photos.destroy.notice'
if photo.status_message_id
respond_with :location => photo.status_message
else
respond_with :location => photos_path
end
else
respond_with :location => photos_path
end end
respond_with :location => photo.status_message
end end
def show def show
...@@ -108,7 +115,6 @@ class PhotosController < ApplicationController ...@@ -108,7 +115,6 @@ class PhotosController < ApplicationController
if current_user.update_post( photo, params[:photo] ) if current_user.update_post( photo, params[:photo] )
flash.now[:notice] = I18n.t 'photos.update.notice' flash.now[:notice] = I18n.t 'photos.update.notice'
respond_to do |format| respond_to do |format|
format.html
format.js{ render :json => photo, :status => 200 } format.js{ render :json => photo, :status => 200 }
end end
else else
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
onProgress: function(id, fileName, loaded, total){ onProgress: function(id, fileName, loaded, total){
alert(;
}, },
onSubmit: function(id, fileName){ onSubmit: function(id, fileName){
......
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