Просмотр исходного кода

Fixes #3449 - Cannot select multiple tickets in ticket overview with shift+click in Firefox

Romit Choudhary 3 лет назад
Родитель
Сommit
8a42ec4f7b

+ 1 - 1
app/assets/javascripts/app/controllers/_ui_element/user_permission.coffee

@@ -82,7 +82,7 @@ class App.UiElement.user_permission
 
 
     throttled = _.throttle( (e) ->
     throttled = _.throttle( (e) ->
       input = $(@).find('input')
       input = $(@).find('input')
-      upcoming_state = !input.prop('checked')
+      upcoming_state = if $(e.target).is(':checkbox') then input.prop('checked') else !input.prop('checked')
       value = input.val()
       value = input.val()
 
 
       if value is 'full' and upcoming_state is true
       if value is 'full' and upcoming_state is true

+ 1 - 1
app/assets/stylesheets/zammad.scss

@@ -1444,9 +1444,9 @@ td .icon-trash {
 
 
   input[type="checkbox"],
   input[type="checkbox"],
   input[type="radio"] {
   input[type="radio"] {
-    pointer-events: none;
     position: absolute;
     position: absolute;
     opacity: 0;
     opacity: 0;
+    cursor: pointer;
 
 
     &:disabled ~ .icon {
     &:disabled ~ .icon {
       opacity: 0.33;
       opacity: 0.33;

+ 10 - 10
test/browser/agent_ticket_overview_level0_test.rb

@@ -46,17 +46,17 @@ class AgentTicketOverviewLevel0Test < TestCase
 
 
     # select both via bulk action
     # select both via bulk action
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
     # scroll to reply - needed for chrome
     # scroll to reply - needed for chrome
     scroll_to(
     scroll_to(
       position: 'top',
       position: 'top',
-      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"]),
     )
     )
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
@@ -263,17 +263,17 @@ class AgentTicketOverviewLevel0Test < TestCase
 
 
     # select both via bulk action
     # select both via bulk action
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
     # scroll to reply - needed for chrome
     # scroll to reply - needed for chrome
     scroll_to(
     scroll_to(
       position: 'top',
       position: 'top',
-      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"]),
     )
     )
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
@@ -411,17 +411,17 @@ class AgentTicketOverviewLevel0Test < TestCase
 
 
     # select both via bulk action
     # select both via bulk action
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket1[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
     # scroll to reply - needed for chrome
     # scroll to reply - needed for chrome
     scroll_to(
     scroll_to(
       position: 'top',
       position: 'top',
-      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:      %(.content.active table tr td input[value="#{ticket2[:id]}"]),
     )
     )
     click(
     click(
-      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:  %(.content.active table tr td input[value="#{ticket2[:id]}"]),
       fast: true,
       fast: true,
     )
     )
 
 
@@ -574,7 +574,7 @@ class AgentTicketOverviewLevel0Test < TestCase
     # then select the ticket that we do not have change rights to
     # then select the ticket that we do not have change rights to
     scroll_to(
     scroll_to(
       position: 'top',
       position: 'top',
-      css:      %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"] + .icon-checkbox.icon-unchecked),
+      css:      %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"]),
     )
     )
     check(
     check(
       css: %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"]),
       css: %(.content.active table tr td input[value="#{cannot_change_ticket[:id]}"]),

+ 1 - 1
test/browser/maintenance_session_message_test.rb

@@ -147,7 +147,7 @@ class MaintenanceSessionMessageTest < TestCase
     )
     )
     click(
     click(
       browser: browser1,
       browser: browser1,
-      css:     '.content.active .js-Message input[name="reload"] + .icon-checkbox.icon-unchecked',
+      css:     '.content.active .js-Message input[name="reload"]',
     )
     )
     click(
     click(
       browser: browser1,
       browser: browser1,