Improved error handling.

This commit is contained in:
Martin Edenhofer 2016-04-05 01:02:47 +02:00
parent 3d594e11b3
commit 567025bd0a
5 changed files with 6 additions and 4 deletions

View file

@ -846,7 +846,6 @@ class App.CollectionController extends App.Controller
@lastOrder = newOrder @lastOrder = newOrder
collectionSync: (items, type) => collectionSync: (items, type) =>
console.log('collectionSync', items, type)
# remove items # remove items
if type is 'destroy' if type is 'destroy'
@ -1031,7 +1030,6 @@ class App.CollectionController extends App.Controller
position = item.meta_position position = item.meta_position
if itemCount > position if itemCount > position
position += 1 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})") element = @el.find(".js-item:nth-child(#{position})")
if @insertPosition is 'before' if @insertPosition is 'before'
element.before(html) element.before(html)

View file

@ -10,7 +10,7 @@ class Index extends App.ControllerContent
# remove local session # remove local session
@Session.init() @Session.init()
App.Event.trigger( 'ui:rerender' ) App.Event.trigger('ui:rerender')
# redirect to login # redirect to login
redirect = => redirect = =>

View file

@ -67,6 +67,7 @@ class App.Ticket extends App.Model
"task-state-#{ @getState() }-color" "task-state-#{ @getState() }-color"
iconActivity: (user) -> iconActivity: (user) ->
return if !user
if @owner_id == user.id if @owner_id == user.id
return 'important' return 'important'
'' ''
@ -79,6 +80,7 @@ class App.Ticket extends App.Model
iconClass: @getState() iconClass: @getState()
activityMessage: (item) -> activityMessage: (item) ->
return if !item
if item.type is 'create' if item.type is 'create'
return App.i18n.translateContent('%s created Ticket |%s|', item.created_by.displayName(), item.title) return App.i18n.translateContent('%s created Ticket |%s|', item.created_by.displayName(), item.title)
else if item.type is 'update' else if item.type is 'update'

View file

@ -34,12 +34,14 @@ class App.TicketArticle extends App.Model
'???' '???'
iconActivity: (user) -> iconActivity: (user) ->
return if !user
ticket = App.Ticket.find(@ticket_id) ticket = App.Ticket.find(@ticket_id)
if ticket.owner_id == user.id if ticket.owner_id == user.id
return 'important' return 'important'
'' ''
activityMessage: (item) -> activityMessage: (item) ->
return if !item
if item.type is 'create' if item.type is 'create'
return App.i18n.translateContent('%s created Article for |%s|', item.created_by.displayName(), item.title) return App.i18n.translateContent('%s created Article for |%s|', item.created_by.displayName(), item.title)
else if item.type is 'update' else if item.type is 'update'

View file

@ -249,7 +249,7 @@ class AgentTicketActionsLevel2Test < TestCase
ticket_update( ticket_update(
browser: browser1, browser: browser1,
data: { data: {
body: 'some update 4711', body: 'some update 4711/2',
}, },
) )
sleep 4 sleep 4