saying sent on requests via js

This commit is contained in:
maxwell 2010-11-20 11:57:55 -08:00 committed by danielvincent
parent 769c0e1055
commit 39f596462e
2 changed files with 14 additions and 4 deletions

View file

@ -2,7 +2,10 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= form_for(Request.new, :remote => true ) do |request|
= request.select(:into, options_from_collection_for_select(aspects, "id", "name"))
= request.hidden_field :to, :value => destination_handle
= request.submit t('people.person.add_contact'), :disable_with => t('requests.create.sending')
%div{:id => destination_handle}
= form_for(Request.new, :remote => true ) do |request|
= request.select(:into, options_from_collection_for_select(aspects, "id", "name"))
= request.hidden_field :to, :value => destination_handle
= request.submit t('people.person.add_contact'), :disable_with => t('requests.create.sending')
.message.hidden
%i sent!

View file

@ -37,6 +37,13 @@ $(document).ready(function(){
}
);
$('.new_request').submit(function(){
var foo = $(this).parent();
$(this).hide();
foo.find('.message').removeClass('hidden');
});
$("#q").blur(
function() {
$(this).removeClass('active');