Revert "upgrade typeahead to allow new syntax"

This reverts commit 347d77df82.
This commit is contained in:
Devin Howard 2015-10-01 11:34:19 +08:00
parent 347d77df82
commit b3b065e623
2 changed files with 1044 additions and 1417 deletions

File diff suppressed because it is too large Load diff

View file

@ -669,7 +669,7 @@ Metamaps.Create = {
{ {
minLength: 2, minLength: 2,
}, },
{ [{
name: 'topic_autocomplete', name: 'topic_autocomplete',
limit: 8, limit: 8,
template: $('#topicAutocompleteTemplate').html(), template: $('#topicAutocompleteTemplate').html(),
@ -677,7 +677,7 @@ Metamaps.Create = {
url: '/topics/autocomplete_topic?term=%QUERY' url: '/topics/autocomplete_topic?term=%QUERY'
}, },
engine: Hogan engine: Hogan
} }]
); );
// tell the autocomplete to submit the form with the topic you clicked on if you pick from the autocomplete // tell the autocomplete to submit the form with the topic you clicked on if you pick from the autocomplete
@ -731,7 +731,7 @@ Metamaps.Create = {
{ {
minLength: 2, minLength: 2,
}, },
{ [{
name: 'synapse_autocomplete', name: 'synapse_autocomplete',
template: "<div class='genericSynapseDesc'>{{label}}</div>", template: "<div class='genericSynapseDesc'>{{label}}</div>",
remote: { remote: {
@ -751,7 +751,7 @@ Metamaps.Create = {
}, },
engine: Hogan, engine: Hogan,
header: "<h3>Existing synapses</h3>" header: "<h3>Existing synapses</h3>"
} }]
); );
$('#synapse_desc').bind('typeahead:selected', function (event, datum, dataset) { $('#synapse_desc').bind('typeahead:selected', function (event, datum, dataset) {