Small improvment to show if ticket is modified.

This commit is contained in:
Martin Edenhofer 2013-03-08 07:49:14 +01:00
parent 16812c16af
commit 5bcab031c0
2 changed files with 14 additions and 13 deletions

View file

@ -46,9 +46,9 @@ class Index extends App.Controller
view: @view
processData: true
success: (data, status, xhr) =>
if _.isEqual( @dataLastCall, data)
return
if @dataLastCall && $('[name="body"]').val()
if @dataLastCall
return if _.isEqual( @dataLastCall.ticket, data.ticket)
if $('[name="body"]').val()
App.Event.trigger 'notify', {
type: 'success'
msg: App.i18n.translateContent('Ticket has changed!')
@ -135,6 +135,7 @@ class Index extends App.Controller
ticket: @ticket
articles: @articles
nav: @nav
isCustomer: @isRole('Customer')
)
new App.ControllerForm(

View file

@ -22,7 +22,7 @@
<%- @T( @ticket.ticket_state.name ) %> -
<%- @T( @ticket.ticket_priority.name ) %> -
<span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span>
<% if @ticket.escalation_time: %>
<% if @isCustomer && @ticket.escalation_time: %>
- <%- @T('Escalation in') %>
<span class="humanTimeFromNow escalation" data-time="<%- @ticket.escalation_time %>">?</span>
<% end %>