Some pages need jquery in the head and instead of loading it twice on these pages, it is better and easier to load it in the head on all pages. It should be in the cache after the first load anyway. closes #7086
30 lines
878 B
Text
30 lines
878 B
Text
-# 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
|
|
$(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();
|
|
});
|
|
|
|
.col-md-6#new_conversation_pane
|
|
.container-fluid.row
|
|
%h3
|
|
= t('conversations.index.new_conversation')
|
|
|
|
= render 'conversations/new'
|