mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Don't break jQuery-UI autocomplete with algolia's
This commit is contained in:
parent
3edb4612b4
commit
9fec6f6613
5 changed files with 11 additions and 5 deletions
|
@ -61,7 +61,7 @@ module.exports = class ConvertToTeacherAccountView extends RootView
|
|||
@$('#other-education-level-checkbox').attr('checked', !!otherLevel)
|
||||
@$('#other-education-level-input').val(otherLevel)
|
||||
|
||||
$("#organization-control").autocomplete({hint: false}, [
|
||||
$("#organization-control").algolia_autocomplete({hint: false}, [
|
||||
source: (query, callback) ->
|
||||
algolia.schoolsIndex.search(query, { hitsPerPage: 5, aroundLatLngViaIP: false }).then (answer) ->
|
||||
callback answer.hits
|
||||
|
|
|
@ -60,7 +60,7 @@ module.exports = class CreateTeacherAccountView extends RootView
|
|||
@$('#other-education-level-checkbox').attr('checked', !!otherLevel)
|
||||
@$('#other-education-level-input').val(otherLevel)
|
||||
|
||||
$("#organization-control").autocomplete({hint: false}, [
|
||||
$("#organization-control").algolia_autocomplete({hint: false}, [
|
||||
source: (query, callback) ->
|
||||
algolia.schoolsIndex.search(query, { hitsPerPage: 5, aroundLatLngViaIP: false }).then (answer) ->
|
||||
callback answer.hits
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports = class RequestQuoteView extends RootView
|
|||
@$('#other-education-level-checkbox').attr('checked', !!otherLevel)
|
||||
@$('#other-education-level-input').val(otherLevel)
|
||||
|
||||
$("#organization-control").autocomplete({hint: false}, [
|
||||
$("#organization-control").algolia_autocomplete({hint: false}, [
|
||||
source: (query, callback) ->
|
||||
algolia.schoolsIndex.search(query, { hitsPerPage: 5, aroundLatLngViaIP: false }).then (answer) ->
|
||||
callback answer.hits
|
||||
|
|
|
@ -51,12 +51,16 @@
|
|||
"lscache": "~1.0.5",
|
||||
"esper.js": "http://files.codecombat.com/esper.tar.gz",
|
||||
"algoliasearch": "^3.13.1",
|
||||
"algolia-autocomplete.js": "^1.17.0"
|
||||
"algolia-autocomplete.js": "^1.17.0",
|
||||
"algolia-autocomplete-no-conflict": "1.0.0"
|
||||
},
|
||||
"overrides": {
|
||||
"algolia-autocomplete.js": {
|
||||
"main": "dist/autocomplete.jquery.js"
|
||||
},
|
||||
"algolia-autocomplete-no-conflict": {
|
||||
"main": "no-conflict.js"
|
||||
},
|
||||
"backbone": {
|
||||
"main": "backbone.js"
|
||||
},
|
||||
|
|
|
@ -165,7 +165,9 @@ exports.config =
|
|||
'vendor/scripts/async.js'
|
||||
'vendor/scripts/jquery-ui-1.11.1.js.custom.js'
|
||||
]
|
||||
|
||||
after: [
|
||||
'bower_components/algolia-autocomplete-no-conflict/no-conflict.js'
|
||||
]
|
||||
stylesheets:
|
||||
defaultExtension: 'sass'
|
||||
joinTo:
|
||||
|
|
Loading…
Reference in a new issue