diff options
Diffstat (limited to 'app/views/conversations/new.mobile.haml')
-rw-r--r-- | app/views/conversations/new.mobile.haml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/app/views/conversations/new.mobile.haml b/app/views/conversations/new.mobile.haml new file mode 100644 index 000000000..59ea5328a --- /dev/null +++ b/app/views/conversations/new.mobile.haml @@ -0,0 +1,52 @@ +-# Copyright (c) 2010-2011, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3 or later. See +-# the COPYRIGHT file. + += javascript_include_tag :jquery += javascript_include_tag :mobile + +:javascript + $(document).ready(function () { + var data = $.parseJSON( "#{escape_javascript(@contacts_json)}" ), + autocompleteInput = $("#contact_autocomplete"); + + autocompleteInput.autoSuggest(data, { + selectedItemProp: "name", + searchObjProps: "name", + asHtmlID: "contact_ids", + retrieveLimit: 10, + minChars: 1, + keyDelay: 0, + startText: '', + emptyText: "#{t('no_results')}", + preFill: [{name : "#{h params[:name]}", + value : "#{@contact_ids}"}] + }); + autocompleteInput.focus(); + }); + +.span6#new_conversation_pane + .span5#facebox_header + %h3 + = t('conversations.index.new_conversation') + + = form_for Conversation.new, html: {class: "new_conversation form_do_not_clear"}, remote: true do |conversation| + + .span1 + %h4 + = t('.to') + .span4 + = text_field_tag "contact_autocomplete" + .clearfix + %br + .span1 + %h4 + = t('.subject') + .span4 + = conversation.text_field :subject + %br + .span4.offset1 + = text_area_tag "conversation[text]", '', :rows => 5 + .clearfix + .bottom_submit_section + = conversation.submit t('.send'), 'data-disable-with' => t('.sending'), :class => 'button creation' |