fix a bunch of cukes. the disabled functionilty in rails helpers changed and we had to update out JS accordingly

This commit is contained in:
danielgrippi 2012-03-21 12:09:03 -07:00
parent 03409495f9
commit 0883ce1dbb
2 changed files with 7 additions and 4 deletions

View file

@ -44,8 +44,9 @@ class AspectMembershipsController < ApplicationController
def create
@person = Person.find(params[:person_id])
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
@contact = current_user.share_with(@person, @aspect)
if @contact = current_user.share_with(@person, @aspect)
if @contact
flash.now[:notice] = I18n.t('aspects.add_to_aspect.success')
respond_with AspectMembership.where(:contact_id => @contact.id, :aspect_id => @aspect.id).first
else

View file

@ -24,7 +24,7 @@ var Publisher = {
},
submit: function(){
return Publisher.cachedSubmit = Publisher.cachedSubmit || Publisher.form().find('#status_message_submit');
return Publisher.cachedSubmit = Publisher.cachedSubmit || Publisher.form().find("input[type='submit']");
},
determineSubmitAvailability: function(){
@ -33,7 +33,7 @@ var Publisher = {
isPhotoAttached = ($("#photodropzone").children().length > 0);
if ((onlyWhitespaces && !isPhotoAttached) && !isSubmitDisabled) {
Publisher.submit().attr('disabled', true);
Publisher.submit().attr('disabled', 'disabled');
} else if ((!onlyWhitespaces || isPhotoAttached) && isSubmitDisabled) {
Publisher.submit().removeAttr('disabled');
}
@ -43,6 +43,8 @@ var Publisher = {
$("#photodropzone").find('li').remove();
Publisher.input().mentionsInput("reset");
Publisher.wrapper().removeClass("with_attachments");
Publisher.hiddenInput().val('');
Publisher.determineSubmitAvailability()
},
bindServiceIcons: function(){