diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index e658c033c..c449af276 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -397,13 +397,11 @@ class App.TicketZoom extends App.Controller @main.scrollTop( @main.prop('scrollHeight') ) autosaveStop: => - console.log('autosaveStop') @clearDelay('ticket-zoom-form-update') @autosaveLast = {} @el.off('change.local blur.local keyup.local paste.local input.local') autosaveStart: => - console.log('autosaveStart') @el.on('change.local blur.local keyup.local paste.local input.local', 'form, .js-textarea', (e) => @delay(@markForm, 250, 'ticket-zoom-form-update') ) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee index 343308813..4c5d914e0 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee @@ -122,14 +122,14 @@ class App.TicketZoomArticleNew extends App.Controller # set article type and expand text area @bind('ui::ticket::setArticleType', (data) => - return if data.ticket.id isnt @ticket_id + return if data.ticket.id.toString() isnt @ticket_id.toString() @openTextarea(null, true) for key, value of data.article if key is 'body' @$('[data-name="' + key + '"]').html(value) else - @$('[name="' + key + '"]').val(value) + @$('[name="' + key + '"]').val(value).trigger('change') # preselect article type @setArticleType(data.type.name) @@ -140,7 +140,7 @@ class App.TicketZoomArticleNew extends App.Controller # reset new article screen @bind('ui::ticket::taskReset', (data) => - return if data.ticket_id isnt @ticket_id + return if data.ticket_id.toString() isnt @ticket_id.toString() @type = 'note' @defaults = {} @render() @@ -410,7 +410,7 @@ class App.TicketZoomArticleNew extends App.Controller setArticleType: (type) => wasScrolledToBottom = @isScrolledToBottom() @type = type - @$('[name=type]').val(type) + @$('[name=type]').val(type).trigger('change') @articleNewEdit.attr('data-type', type) @$('.js-selectableTypes').addClass('hide').filter("[data-type='#{ type }']").removeClass('hide') diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/sidebar.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/sidebar.coffee index a07c37781..807f28397 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/sidebar.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/sidebar.coffee @@ -29,7 +29,7 @@ class Edit extends App.ObserverController return if @resetBind @resetBind = true @bind('ui::ticket::taskReset', (data) => - return if data.ticket_id isnt ticket.id + return if data.ticket_id.toString() isnt ticket.id.toString() @render(ticket) )