diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee index a4d3a33c4..6a5104bff 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -217,7 +217,7 @@ class App.TicketCreate extends App.Controller # show text module UI new App.TextModuleUI( - el: @el.find('[data-id="text_module"]'), + el: @el, ) @formDefault = @formParam( @el.find('.ticket-create') ) diff --git a/app/assets/javascripts/app/controllers/text_module_widget.js.coffee b/app/assets/javascripts/app/controllers/text_module_widget.js.coffee index d59bd6635..fb94c8dbb 100644 --- a/app/assets/javascripts/app/controllers/text_module_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/text_module_widget.js.coffee @@ -26,8 +26,7 @@ class App.TextModuleUI extends App.Controller .find('small') .text("(" + e.keywords + ")").end() element.append(template) - $('textarea').sew({values: values, token: '::', elementFactory: elementFactory }) - + @el.find('textarea').sew({values: values, token: '::', elementFactory: elementFactory }) class App.TextModuleUIOld extends App.Controller events: diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 42d6a32fa..701dac00b 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -147,8 +147,7 @@ class App.TicketZoom extends App.Controller render: (force) => # get data - if !@ticket - @ticket = App.Collection.find( 'Ticket', @ticket_id ) + @ticket = App.Collection.find( 'Ticket', @ticket_id ) # update taskbar with new meta data App.Event.trigger 'task:render' @@ -173,6 +172,14 @@ class App.TicketZoom extends App.Controller @editDone = true @Edit() + # show text module UI + if !@isRole('Customer') + new App.TextModuleUI( + el: @el + data: + ticket: @ticket + ) + # scroll to article if given if @article_id && document.getElementById( 'article-' + @article_id ) offset = document.getElementById( 'article-' + @article_id ).offsetTop @@ -309,13 +316,6 @@ class TicketAction extends App.Controller object: @ticket ) - # show text module UI - if !@isRole('Customer') - new App.TextModuleUI( - el: @el.find('.text_module') - data: - ticket: @ticket - ) class Edit extends App.Controller diff --git a/app/assets/javascripts/app/views/ticket_zoom/ticket_action.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/ticket_action.jst.eco index d40a3a3ec..7b156d69b 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/ticket_action.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/ticket_action.jst.eco @@ -2,4 +2,3 @@
-