Skip to content

Commit 4695e14

Browse files
fix: show drag-and-drop icon for the reorderable gallery on the list view
1 parent de9dbdc commit 4695e14

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

resources/views/forms/content/gallery-content.blade.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343
<div class="gallery-footer" x-data="{ itemDrag : false }">
4444
<div class="flex">
4545
@if($isReorderable())
46-
<button type="button" class="gallery-icon reorder justify-self-start hidden @xs:block"
46+
<button type="button"
47+
@class([
48+
"gallery-icon reorder justify-self-start hidden",
49+
"@xs:block" => DisplayOnEnum::GRID === $getDisplayOn(),
50+
"sm:block" => DisplayOnEnum::LIST === $getDisplayOn(),
51+
])
4752
:class="{
4853
'grabbing-cursor' : startGrabbing,
4954
'grab-cursor' : !startGrabbing,

resources/views/forms/gallery-file-upload.blade.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,7 @@ class="wm-btn"
136136
])
137137
x-sortable
138138
@dragend="reorderUsing($el.sortable.toArray())"
139-
{{-- @drop.stop.prevent="resetState()"--}}
140139
x-ref="ulGalleryWrapper"
141-
142-
{{-- @keydown.window.tab="usedKeyboard = true"
143-
@dragenter.stop.prevent="dropcheck++"
144-
@dragleave="dropcheck--;dropcheck || rePositionPlaceholder()"
145-
@dragover.stop.prevent
146-
@dragend="revertState()"
147-
@drop.stop.prevent="getSort();resetState()"--}}
148-
149-
{{--:class="{'flex-wrap' : !stopDragging }"--}}
150140
>
151141
@include('gallery-json-media::forms.content.gallery-content')
152142
</ul>

0 commit comments

Comments
 (0)