mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-24 13:12:49 +00:00
added little hack so post is sent on institution list when there are two brackets in name which hold domain
This commit is contained in:
parent
3350b99ccf
commit
d2df4d6523
1 changed files with 7 additions and 1 deletions
|
@ -44,7 +44,13 @@ define ["libs/algolia", "libs/angular", "libs/angular-autocomplete/angular-autoc
|
|||
results = _.filter $scope.userInfoForm, (value)-> value? and value?.length != 0
|
||||
results.length * 20
|
||||
|
||||
$scope.updateInstitutionsList = (a)->
|
||||
$scope.updateInstitutionsList = (inputVal)->
|
||||
|
||||
# this is a little hack to use until we change auto compelete lib with redesign and can
|
||||
# listen for blur events on institution field to send the post
|
||||
if inputVal?.indexOf("(") != -1 and inputVal?.indexOf(")") != -1
|
||||
$scope.sendUpdate()
|
||||
|
||||
Institutions.search $scope.userInfoForm.institution, (err, response)->
|
||||
$scope.institutions = _.map response.hits, (institution)->
|
||||
"#{institution.name} (<span class='muted'>#{institution.domain}</span>)"
|
||||
|
|
Loading…
Reference in a new issue