Browse Source

Merge pull request #4149 from mfilser/boards_view_drag_handles_if_configured

Boards view has now drag handles at desktop view if drag handles are enabled
Lauri Ojansivu 3 years ago
parent
commit
d8218091c6

+ 4 - 4
client/components/boards/boardsList.jade

@@ -54,11 +54,11 @@ template(name="boardList")
                     i.fa.js-has-spenttime-cards(
                       class="fa-circle{{#if hasOvertimeCards}} has-overtime-card-active{{else}} no-overtime-card-active{{/if}}"
                       title="{{#if hasOvertimeCards}}{{_ 'has-overtime-cards'}}{{else}}{{_ 'has-spenttime-cards'}}{{/if}}")
-                  if isMiniScreen
+                  if isMiniScreenOrShowDesktopDragHandles
                     i.fa.board-handle(
                         class="fa-arrows"
                         title="{{_ 'Drag board'}}")
-                  unless isMiniScreen
+                  else
                     if isSandstorm
                       i.fa.js-clone-board(
                           class="fa-clone"
@@ -96,11 +96,11 @@ template(name="boardList")
                     i.fa.js-has-spenttime-cards(
                       class="fa-circle{{#if hasOvertimeCards}} has-overtime-card-active{{else}} no-overtime-card-active{{/if}}"
                       title="{{#if hasOvertimeCards}}{{_ 'has-overtime-cards'}}{{else}}{{_ 'has-spenttime-cards'}}{{/if}}")
-                  if isMiniScreen
+                  if isMiniScreenOrShowDesktopDragHandles
                     i.fa.board-handle(
                         class="fa-arrows"
                         title="{{_ 'Drag board'}}")
-                  unless isMiniScreen
+                  else
                     if isSandstorm
                       i.fa.js-clone-board(
                           class="fa-clone"

+ 1 - 1
client/components/boards/boardsList.js

@@ -78,7 +78,7 @@ BlazeComponent.extendComponent({
 
     // Disable drag-dropping if the current user is not a board member or is comment only
     this.autorun(() => {
-      if (Utils.isMiniScreen()) {
+      if (Utils.isMiniScreenOrShowDesktopDragHandles()) {
         $boards.sortable({
           handle: '.board-handle',
         });