From c71c76ba3ce1c6b162e71f3bf46896783bb67e1d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 16 Sep 2014 08:14:28 +0200 Subject: [PATCH] Fixed tabsSidebar in create screen. --- .../_application_controller_generic.js.coffee | 1 - .../app/controllers/agent_ticket_create.js.coffee | 9 ++++++--- app/assets/javascripts/app/views/ticket_zoom.jst.eco | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index da56c7ee0..706c4a722 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -439,7 +439,6 @@ class App.Sidebar extends App.Controller item.callback( @el.find( '.sidebar-content[data-content=' + item.name + ']' ) ) toggleSidebar: -> - console.log('toggleSidebar', @el.parent() ) @el.parent().find('.tabsSidebarSpace').toggleClass('is-closed') @el.parent().find('.tabsSidebar').toggleClass('is-closed') 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 102a1b283..76becf54d 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -1,4 +1,7 @@ class App.TicketCreate extends App.Controller + elements: + '.tabsSidebar' : 'sidebar' + events: 'click .type-tabs .tab': 'changeFormType' 'click .customer_new': 'userNew' @@ -280,7 +283,7 @@ class App.TicketCreate extends App.Controller ) new Sidebar( - el: @el + el: @sidebar params: @formDefault ) @@ -294,7 +297,7 @@ class App.TicketCreate extends App.Controller params = App.ControllerForm.params( $(e.target).closest('form') ) new Sidebar( - el: @el + el: @sidebar params: params ) @@ -469,7 +472,7 @@ class Sidebar extends App.Controller } new App.Sidebar( - el: @el.find('.tabsSidebar') + el: @el items: items ) diff --git a/app/assets/javascripts/app/views/ticket_zoom.jst.eco b/app/assets/javascripts/app/views/ticket_zoom.jst.eco index c01e67917..865ab9b51 100644 --- a/app/assets/javascripts/app/views/ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom.jst.eco @@ -28,9 +28,7 @@ -
- -
+