made it flash the sm on the profile page

This commit is contained in:
zhitomirskiyi 2011-03-17 11:54:13 -07:00
parent 3718a72f46
commit 574a3b45b1
3 changed files with 7 additions and 1 deletions

View file

@ -58,6 +58,10 @@ class StatusMessagesController < ApplicationController
photos.update_all(:pending => false, :public => public_flag) photos.update_all(:pending => false, :public => public_flag)
end end
if request.env['HTTP_REFERER'].include?("people")
flash[:notice] = t('.success', :names => @status_message.mentions.includes(:person => :profile).map{ |mention| mention.person.name }.join(', '))
end
respond_to do |format| respond_to do |format|
format.js { render :create, :status => 201} format.js { render :create, :status => 201}
format.html { redirect_to :back} format.html { redirect_to :back}

View file

@ -11,7 +11,7 @@
var person = {name: '#{@person.name}', handle: '#{@person.diaspora_handle}' }; var person = {name: '#{@person.name}', handle: '#{@person.diaspora_handle}' };
Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}'); Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}');
$("#publisher #status_message_fake_text").val(function(index, value){ return value + " " }); $("#publisher #status_message_fake_text").val(function(index, value){ return value + " " });
$("#publisher #status_message_submit.button").click(function(){$.facebox.close();}); $("#publisher").bind('ajax:success', function(){location.reload();});
}); });
#new_status_message_pane #new_status_message_pane

View file

@ -545,6 +545,8 @@ en:
status_messages: status_messages:
new: new:
mentioning: "Mentioning: %{person}" mentioning: "Mentioning: %{person}"
create:
success: "Successfully mentioned: %{names}"
show: show:
destroy: "Delete" destroy: "Delete"
permalink: "permalink" permalink: "permalink"