mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
19 lines
537 B
CoffeeScript
19 lines
537 B
CoffeeScript
$(".js-registrars-typeahead").typeahead
|
|
source: (query, process) ->
|
|
$.get "/admin/registrars/search", {query: query}, (data) ->
|
|
map = {}
|
|
registrars = []
|
|
|
|
$.each data, (i, registrar) ->
|
|
map[registrar.id] = registrar
|
|
registrars.push registrar.display
|
|
|
|
process registrars
|
|
updater: (item) ->
|
|
$('input[name="domain[registrar_id]"]').val()
|
|
|
|
$(".js-contacts-typeahead").typeahead
|
|
source: (query, process) ->
|
|
$.get "/admin/contacts/search", {query: query}, (data) ->
|
|
process data
|
|
|