diff --git a/app/assets/javascripts/app/controllers/search.coffee b/app/assets/javascripts/app/controllers/search.coffee index 68056952a..1ec5781c4 100644 --- a/app/assets/javascripts/app/controllers/search.coffee +++ b/app/assets/javascripts/app/controllers/search.coffee @@ -150,7 +150,7 @@ class App.Search extends App.Controller tabModel = $(e.currentTarget).data('tab-content') tabs.find('.js-tab').removeClass('active') $(e.currentTarget).addClass('active') - @renderTab(tabModel, @result[tabModel] || []) + @renderTab(tabModel, @result?[tabModel] || []) renderTab: (model, localList) => @@ -231,15 +231,16 @@ class App.Search extends App.Controller @search(true) @delay(callback, 100) + @bulkForm.releaseController() if @bulkForm @bulkForm = new App.TicketBulkForm( - holder: localeEl - view: @view - callback: updateSearch + el: @el.find('.bulkAction') + holder: localeEl + view: @view + callback: updateSearch noSidebar: true ) # start bulk action observ - @el.append(@bulkForm.el) localElement = @$('.js-content') if localElement.find('input[name="bulk"]:checked').length isnt 0 @bulkForm.show() diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 92098fe62..25ae2a04b 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -1212,13 +1212,14 @@ class Table extends App.Controller @renderPopovers() + @bulkForm.releaseController() if @bulkForm @bulkForm = new App.TicketBulkForm( + el: @el.find('.bulkAction') holder: @el - view: @view + view: @view ) # start bulk action observ - @el.append(@bulkForm.el) localElement = @$('.table-overview') if localElement.find('input[name="bulk"]:checked').length isnt 0 @bulkForm.show() diff --git a/app/assets/javascripts/app/controllers/widget/ticket_bulk_form.coffee b/app/assets/javascripts/app/controllers/widget/ticket_bulk_form.coffee index 04eba61f0..dd2c92734 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_bulk_form.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_bulk_form.coffee @@ -14,6 +14,8 @@ class App.TicketBulkForm extends App.Controller constructor: -> super + return if !@permissionCheck('ticket.agent') + @configure_attributes_ticket = [] used_attributes = ['state_id', 'pending_time', 'priority_id', 'group_id', 'owner_id'] diff --git a/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco b/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco index 6fe1c1c7e..963809b6f 100644 --- a/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco @@ -20,4 +20,6 @@