Fixed syntax error.
This commit is contained in:
parent
0d377d40ab
commit
5934207f82
2 changed files with 8 additions and 8 deletions
|
@ -149,10 +149,10 @@ class _ajaxSingleton
|
||||||
abortedIds
|
abortedIds
|
||||||
|
|
||||||
runNextInQueue: =>
|
runNextInQueue: =>
|
||||||
if @queueList && @queueList[0]
|
return if !@queueList || !@queueList[0]
|
||||||
@queueRunning = true
|
@queueRunning = true
|
||||||
data = @queueList.shift()
|
data = @queueList.shift()
|
||||||
@addCurrentRequest(params['id'], data, true)
|
@addCurrentRequest(data['id'], data, true)
|
||||||
|
|
||||||
_show_spinner: =>
|
_show_spinner: =>
|
||||||
@count++
|
@count++
|
||||||
|
|
|
@ -5,7 +5,7 @@ class App.SearchableAjaxSelect extends App.SearchableSelect
|
||||||
|
|
||||||
# convert requested object
|
# convert requested object
|
||||||
# e.g. Ticket to ticket or AnotherObject to another_object
|
# e.g. Ticket to ticket or AnotherObject to another_object
|
||||||
objectString = underscored( @options.attribute.object )
|
objectString = underscored(@options.attribute.object)
|
||||||
|
|
||||||
# create common accessors
|
# create common accessors
|
||||||
@apiPath = App.Config.get('api_path')
|
@apiPath = App.Config.get('api_path')
|
||||||
|
@ -45,13 +45,13 @@ class App.SearchableAjaxSelect extends App.SearchableSelect
|
||||||
@searchResultCache[@cacheKey] = data
|
@searchResultCache[@cacheKey] = data
|
||||||
|
|
||||||
# load assets
|
# load assets
|
||||||
App.Collection.loadAssets( data.assets )
|
App.Collection.loadAssets(data.assets)
|
||||||
|
|
||||||
# get options from search result
|
# get options from search result
|
||||||
options = []
|
options = []
|
||||||
for object in data.result
|
for object in data.result
|
||||||
if object.type is 'Ticket'
|
if object.type is 'Ticket'
|
||||||
ticket = App.Ticket.find( object.id )
|
ticket = App.Ticket.find(object.id)
|
||||||
data =
|
data =
|
||||||
name: "##{ticket.number} - #{ticket.title}"
|
name: "##{ticket.number} - #{ticket.title}"
|
||||||
value: ticket.id
|
value: ticket.id
|
||||||
|
@ -63,7 +63,7 @@ class App.SearchableAjaxSelect extends App.SearchableSelect
|
||||||
value: user.id
|
value: user.id
|
||||||
options.push data
|
options.push data
|
||||||
else if object.type is 'Organization'
|
else if object.type is 'Organization'
|
||||||
organization = App.Organization.find( object.id )
|
organization = App.Organization.find(object.id)
|
||||||
data =
|
data =
|
||||||
name: "#{organization.displayName()}"
|
name: "#{organization.displayName()}"
|
||||||
value: organization.id
|
value: organization.id
|
||||||
|
|
Loading…
Reference in a new issue