File tree Expand file tree Collapse file tree 6 files changed +27
-10
lines changed Expand file tree Collapse file tree 6 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 6767 <div class="board {{if .CanWriteProjects}}sortable{{end}}">
6868 {{range .Columns}}
6969 <div class="ui segment project-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
70- <div class="project-column-header">
70+ <div class="project-column-header{{if $canWriteProject}} tw-cursor-grab{{end}} ">
7171 <div class="ui large label project-column-title tw-py-1">
7272 <div class="ui small circular grey label project-column-issue-count">
7373 {{.NumIssues ctx}}
156156
157157 <div class="divider"></div>
158158
159- <div class="ui cards{{if $canWriteProject}} tw-cursor-grab{{end}} " data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
159+ <div class="ui cards" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
160160 {{range (index $.IssuesMap .ID)}}
161161 <div class="issue-card gt-word-break {{if $canWriteProject}}tw-cursor-grab{{end}}" data-issue="{{.ID}}">
162162 {{template "repo/issue/card" (dict "Issue" . "Page" $)}}
Original file line number Diff line number Diff line change 1919 overflow : visible;
2020 display : flex;
2121 flex-direction : column;
22+ cursor : default;
2223}
2324
2425.project-column-header {
4647.project-column-title {
4748 background : none !important ;
4849 line-height : 1.25 !important ;
50+ cursor : inherit;
4951}
5052
5153.project-column > .cards {
9294}
9395
9496.card-ghost {
97+ border-color : var (--color-secondary-dark-4 ) !important ;
9598 border-style : dashed !important ;
9699 background : none !important ;
97100}
Original file line number Diff line number Diff line change 1919 font-size : 14px ;
2020 margin-left : 4px ;
2121}
22+
23+ .issue-card .sortable-chosen .issue-card-title {
24+ cursor : inherit;
25+ }
Original file line number Diff line number Diff line change @@ -188,8 +188,6 @@ async function initIssuePinSort() {
188188
189189 createSortable ( pinDiv , {
190190 group : 'shared' ,
191- animation : 150 ,
192- ghostClass : 'card-ghost' ,
193191 onEnd : pinMoveEnd ,
194192 } ) ;
195193}
Original file line number Diff line number Diff line change @@ -58,8 +58,7 @@ async function initRepoProjectSortable() {
5858 createSortable ( mainBoard , {
5959 group : 'project-column' ,
6060 draggable : '.project-column' ,
61- animation : 150 ,
62- ghostClass : 'card-ghost' ,
61+ handle : '.project-column-header' ,
6362 delayOnTouchOnly : true ,
6463 delay : 500 ,
6564 onSort : async ( ) => {
@@ -86,8 +85,6 @@ async function initRepoProjectSortable() {
8685 const boardCardList = boardColumn . getElementsByClassName ( 'cards' ) [ 0 ] ;
8786 createSortable ( boardCardList , {
8887 group : 'shared' ,
89- animation : 150 ,
90- ghostClass : 'card-ghost' ,
9188 onAdd : moveIssue ,
9289 onUpdate : moveIssue ,
9390 delayOnTouchOnly : true ,
Original file line number Diff line number Diff line change 1- export async function createSortable ( ... args ) {
1+ export async function createSortable ( el , opts = { } ) {
22 const { Sortable} = await import ( /* webpackChunkName: "sortablejs" */ 'sortablejs' ) ;
3- return new Sortable ( ...args ) ;
3+
4+ return new Sortable ( el , {
5+ animation : 150 ,
6+ ghostClass : 'card-ghost' ,
7+ onChoose : ( e ) => {
8+ const handle = opts . handle ? e . item . querySelector ( opts . handle ) : e . item ;
9+ handle . classList . add ( 'tw-cursor-grabbing' ) ;
10+ opts . onChoose ?. ( e ) ;
11+ } ,
12+ onUnchoose : ( e ) => {
13+ const handle = opts . handle ? e . item . querySelector ( opts . handle ) : e . item ;
14+ handle . classList . remove ( 'tw-cursor-grabbing' ) ;
15+ opts . onUnchoose ?. ( e ) ;
16+ } ,
17+ ...opts ,
18+ } ) ;
419}
You can’t perform that action at this time.
0 commit comments