Maintenance: Fix CI race condition in test and improve performance by dropping obsolete code which will be updated by ticket full as well.
This commit is contained in:
parent
88c5e0e10b
commit
c7ea22abf2
2 changed files with 0 additions and 34 deletions
|
@ -8,27 +8,8 @@ class App.WidgetMention extends App.Controller
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
@mentions = []
|
|
||||||
App.Event.bind('Mention:create Mention:destroy',
|
|
||||||
(data) =>
|
|
||||||
return if !data
|
|
||||||
return if data.mentionable_type isnt 'Ticket'
|
|
||||||
return if data.mentionable_id isnt @object.id
|
|
||||||
@fetch()
|
|
||||||
)
|
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
fetch: =>
|
|
||||||
App.Mention.fetchMentionable(
|
|
||||||
'Ticket',
|
|
||||||
@object.id,
|
|
||||||
(data) =>
|
|
||||||
@mentions = data.record_ids
|
|
||||||
App.Collection.loadAssets(data.assets)
|
|
||||||
@render()
|
|
||||||
)
|
|
||||||
|
|
||||||
reload: (mentions) =>
|
reload: (mentions) =>
|
||||||
@mentions = mentions
|
@mentions = mentions
|
||||||
@render()
|
@render()
|
||||||
|
|
|
@ -6,21 +6,6 @@ class App.Mention extends App.Model
|
||||||
{ name: 'user_id', display: 'User', tag: 'select', multiple: false, limit: 100, null: true, relation: 'User', width: '12%', edit: true },
|
{ name: 'user_id', display: 'User', tag: 'select', multiple: false, limit: 100, null: true, relation: 'User', width: '12%', edit: true },
|
||||||
]
|
]
|
||||||
|
|
||||||
@fetchMentionable: (mentionable_type, mentionable_id, callback) ->
|
|
||||||
App.Ajax.request(
|
|
||||||
type: 'GET'
|
|
||||||
url: "#{@apiPath}/mentions"
|
|
||||||
data:
|
|
||||||
mentionable_type: mentionable_type
|
|
||||||
mentionable_id: mentionable_id
|
|
||||||
full: true
|
|
||||||
processData: true
|
|
||||||
success: (data, status, xhr) ->
|
|
||||||
if data.assets
|
|
||||||
App.Collection.loadAssets(data.assets, targetModel: @className)
|
|
||||||
callback(data)
|
|
||||||
)
|
|
||||||
|
|
||||||
@searchUser: (query, group_id, callback) ->
|
@searchUser: (query, group_id, callback) ->
|
||||||
roles = App.Role.withPermissions('ticket.agent')
|
roles = App.Role.withPermissions('ticket.agent')
|
||||||
role_ids = roles.map (role) -> role.id
|
role_ids = roles.map (role) -> role.id
|
||||||
|
|
Loading…
Reference in a new issue