Improved error handling.
This commit is contained in:
parent
3d594e11b3
commit
567025bd0a
5 changed files with 6 additions and 4 deletions
|
@ -846,7 +846,6 @@ class App.CollectionController extends App.Controller
|
|||
@lastOrder = newOrder
|
||||
|
||||
collectionSync: (items, type) =>
|
||||
console.log('collectionSync', items, type)
|
||||
|
||||
# remove items
|
||||
if type is 'destroy'
|
||||
|
@ -1031,7 +1030,6 @@ class App.CollectionController extends App.Controller
|
|||
position = item.meta_position
|
||||
if itemCount > position
|
||||
position += 1
|
||||
console.log('!el', item, position, item.meta_position, @el.find(".js-item:nth-child(#{position})"))
|
||||
element = @el.find(".js-item:nth-child(#{position})")
|
||||
if @insertPosition is 'before'
|
||||
element.before(html)
|
||||
|
|
|
@ -10,7 +10,7 @@ class Index extends App.ControllerContent
|
|||
|
||||
# remove local session
|
||||
@Session.init()
|
||||
App.Event.trigger( 'ui:rerender' )
|
||||
App.Event.trigger('ui:rerender')
|
||||
|
||||
# redirect to login
|
||||
redirect = =>
|
||||
|
|
|
@ -67,6 +67,7 @@ class App.Ticket extends App.Model
|
|||
"task-state-#{ @getState() }-color"
|
||||
|
||||
iconActivity: (user) ->
|
||||
return if !user
|
||||
if @owner_id == user.id
|
||||
return 'important'
|
||||
''
|
||||
|
@ -79,6 +80,7 @@ class App.Ticket extends App.Model
|
|||
iconClass: @getState()
|
||||
|
||||
activityMessage: (item) ->
|
||||
return if !item
|
||||
if item.type is 'create'
|
||||
return App.i18n.translateContent('%s created Ticket |%s|', item.created_by.displayName(), item.title)
|
||||
else if item.type is 'update'
|
||||
|
|
|
@ -34,12 +34,14 @@ class App.TicketArticle extends App.Model
|
|||
'???'
|
||||
|
||||
iconActivity: (user) ->
|
||||
return if !user
|
||||
ticket = App.Ticket.find(@ticket_id)
|
||||
if ticket.owner_id == user.id
|
||||
return 'important'
|
||||
''
|
||||
|
||||
activityMessage: (item) ->
|
||||
return if !item
|
||||
if item.type is 'create'
|
||||
return App.i18n.translateContent('%s created Article for |%s|', item.created_by.displayName(), item.title)
|
||||
else if item.type is 'update'
|
||||
|
|
|
@ -249,7 +249,7 @@ class AgentTicketActionsLevel2Test < TestCase
|
|||
ticket_update(
|
||||
browser: browser1,
|
||||
data: {
|
||||
body: 'some update 4711',
|
||||
body: 'some update 4711/2',
|
||||
},
|
||||
)
|
||||
sleep 4
|
||||
|
|
Loading…
Reference in a new issue