From fcc69994254775d547ef284beb9a6da57862d0f3 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 15:22:32 +0200 Subject: [PATCH 1/3] rewrite dropdown-selected --- .../controllers/ticket_zoom/higlighter.coffee | 4 +- .../layout_ref/merge_customer_view.jst.eco | 44 ------------------- .../app/views/layout_ref/ticket_zoom.jst.eco | 4 +- .../app/views/ticket_zoom/highlighter.jst.eco | 4 +- app/assets/stylesheets/zammad.scss | 13 +++++- 5 files changed, 17 insertions(+), 52 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/higlighter.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/higlighter.coffee index 5800eddb5..3edacb434 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/higlighter.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/higlighter.coffee @@ -165,8 +165,8 @@ class App.TicketZoomHighlighter extends App.Controller #@articles.attr('data-highlightcolor', @colors[@activeColorIndex].name) pickColor: (e) => - @$('.js-highlightColor .visibility-change.is-active').removeClass('is-active') - $(e.currentTarget).find('.visibility-change').addClass('is-active') + @$('.js-highlightColor .is-selected').removeClass('is-selected') + $(e.currentTarget).find('.js-selectedIcon').addClass('is-selected') @activeColorIndex = $(e.currentTarget).attr('data-key') @setColor() diff --git a/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco b/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco index 9731720d1..a7ffc32ee 100644 --- a/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/merge_customer_view.jst.eco @@ -13,28 +13,6 @@ @@ -49,28 +27,6 @@ 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 786d6a9b7..cf89ca0a4 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 @@ -18,8 +18,8 @@ <%- @Ti(entry.name) %> - - + + <%- @Icon('checkmark') %> <% end %> diff --git a/app/assets/javascripts/app/views/ticket_zoom/highlighter.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/highlighter.jst.eco index 801846408..26e8283f3 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/highlighter.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/highlighter.jst.eco @@ -13,8 +13,8 @@ <%- @Ti(entry.name) %> - - + + <%- @Icon('checkmark') %> <% end %> diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 0d8775586..341b33638 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -5032,7 +5032,7 @@ footer { } .dropdown-iconSpacer, - .dropdown-activeSpacer { + .dropdown-selectedSpacer { display: flex; align-items: center; } @@ -5041,10 +5041,19 @@ footer { width: 25px; } - .dropdown-activeSpacer { + .dropdown-selectedSpacer { width: 34px; margin-left: auto; justify-content: flex-end; + opacity: 0; + + .icon { + fill: white; + } + + &.is-selected { + opacity: 1; + } } a { From a1b9633f47d8840c7deaeb7f4fa7814e08578f75 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Mon, 19 Oct 2015 15:22:54 +0200 Subject: [PATCH 2/3] 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.
-