diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index d6f2873e654eda11ae9e84523fa0ae2b4bfa8f1f..2da537dfb079b808f9688c3569951be9bc918297 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -22,6 +22,7 @@ #publisher_textarea_wrapper %ul#photodropzone = status.text_area :message, :rows => 2, :value => h(params[:prefill]) + = javascript_tag "if ($('textarea#status_message_message').val() != ''){ $('textarea#status_message_message').focus();}" - for aspect_id in @aspect_ids = hidden_field_tag 'aspect_ids[]', aspect_id.to_s diff --git a/app/views/shared/_publisher.mobile.haml b/app/views/shared/_publisher.mobile.haml index 2752cf0a75c5f400f4f44f7ee1a461c50821962a..a6536377d7a6d5d75a091dbe027bf70fd7936e42 100644 --- a/app/views/shared/_publisher.mobile.haml +++ b/app/views/shared/_publisher.mobile.haml @@ -7,7 +7,8 @@ = form_for StatusMessage.new, :remote => true do |status| %p = status.label :message, t('.post_a_message_to', :aspect => (aspect == :all ? t('.all') : aspect)) - = status.text_area :message, :rows => 2, :value => params[:prefill] + = status.text_area :message, :rows => 2, :value => h(params[:prefill]) + = javascript_tag "if ($('textarea#status_message_message').val() != ''){ $('textarea#status_message_message').focus();}" = status.hidden_field :to, :value => (aspect == :all ? aspect : aspect.id)