From a1b9633f47d8840c7deaeb7f4fa7814e08578f75 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 15:22:54 +0200 Subject: [PATCH] add secondaryAction layoutRef in ticketZoom --- .../app/controllers/layout_ref.coffee | 9 ++++++- .../app/views/layout_ref/ticket_zoom.jst.eco | 27 +++++++++++++++++-- app/assets/stylesheets/zammad.scss | 18 ++++++++++++- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 72e4d6724..ef913af53 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -795,7 +795,7 @@ class TicketZoomRef extends App.ControllerContent '.article-text': 'articles' '.js-highlight-icon': 'highlightIcon' - '.buttonDropdown': 'buttonDropdown' + '.js-submitDropdown': 'buttonDropdown' events: 'click .js-highlight': 'toggleHighlight' @@ -806,6 +806,7 @@ class TicketZoomRef extends App.ControllerContent 'mouseup .js-dropdownAction': 'performTicketMacro' 'mouseenter .js-dropdownAction': 'onActionMouseEnter' 'mouseleave .js-dropdownAction': 'onActionMouseLeave' + 'click .js-secondaryAction': 'chooseSecondaryAction' stopPropagation: (event) -> event.stopPropagation() @@ -988,6 +989,12 @@ class TicketZoomRef extends App.ControllerContent onActionMouseLeave: (event) => @$(event.currentTarget).removeClass('is-active') + chooseSecondaryAction: (event) => + target = $(event.currentTarget) + target.siblings().find('.is-selected').removeClass('is-selected') + @$('.js-secondaryActionButtonLabel').text target.find('.js-secondaryActionLabel').text() + target.find('.js-selectedIcon').addClass('is-selected') + App.Config.set( 'layout_ref/ticket_zoom', TicketZoomRef, 'Routes' ) diff --git a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco index cf89ca0a4..234d351e5 100644 --- a/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/ticket_zoom.jst.eco @@ -634,8 +634,31 @@
-
Discard your unsaved changes.
-