Welcome to mirror list, hosted at ThFree Co, Russian Federation.

new.mobile.haml « conversations « views « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d8e8feb041fbe161eaf6e2f0cbe31cd834fbcfab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

%script{nonce: content_security_policy_nonce(:script)}
  :plain
    $(document).ready(function () {
      var data = $.parseJSON( "#{escape_javascript(@contacts_json).html_safe}" ),
          autocompleteInput = $("#contacts-search-input");

      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.col-md-offset-3#new_conversation_pane
  .container-fluid.row
    %h3
      = t("conversations.index.new_conversation")

  = render "conversations/new", mobile: true