-# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. :javascript $(document).ready(function () { var data = $.parseJSON( "#{@contacts_json}" ), autocompleteInput = $("#contact_autocomplete"); autocompleteInput.autoSuggest(data, { selectedItemProp: "name", searchObjProps: "name", asHtmlID: "contact_ids", retrieveLimit: 10, minChars: 3, keyDelay: 0, startText: '', emptyText: '#{t('no_results')}', preFill: [{ 'name' : "#{params[:name]}", 'value' : "#{params[:contact_id]}"}] }); autocompleteInput.focus(); }); #new_message_pane .span-12.last #facebox_header %h4 = t('conversations.index.new_message') = form_for Conversation.new do |conversation| %br .span-2 %h4 = t('.to') .span-10.last = text_field_tag "contact_autocomplete" .clearfix .span-2 %h4 = t('.subject') .span-10.last = conversation.text_field :subject .span-10.prepend-2.last = text_area_tag "conversation[text]", '', :rows => 5 .text-right = conversation.submit t('.send'), :disable_with => t('shared.publisher.posting'), :class => 'button' = link_to t('cancel'), conversations_path