Skip to content

Commit

Permalink
Merge FeatureCardContextMenu into master
Browse files Browse the repository at this point in the history
  • Loading branch information
LenaMel-99 committed Jun 23, 2024
2 parents b473c46 + 405f8eb commit 30d22d6
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
hasModelYellowButtonMenuItems
^ false
1 change: 1 addition & 0 deletions Squello-Core.package/SPBBoard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"errorCannotAddColumn:" : "jh 7/31/2022 14:28",
"errorInvalidUrl" : "mcr 8/2/2022 22:17",
"errorNoProjects" : "mcr 8/2/2022 22:15",
"hasModelYellowButtonMenuItems" : "L.L. 6/7/2024 22:59",
"indexOfColumn:" : "lo 8/3/2022 12:57",
"initialize" : "FP 6/10/2024 14:43",
"isLocal" : "FP 6/10/2024 15:01",
Expand Down
9 changes: 9 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/moveToTop.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
context menu
moveToTop

|index|
index := column cards indexOf: self.
column addCardToTop: self.
column cards removeAt: index+1.
column resizeToFitCards.
column alignCards.
11 changes: 11 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/openContextMenu.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
context menu
openContextMenu

| menu |

menu := MenuMorph new defaultTarget: self.
menu add: 'remove all Labels' action: #removeAllLabels.
menu add: 'remove all Assignees' action: #removeAllAssignees.
menu add: 'move to top' action: #moveToTop.
menu add: 'toggle closed' action: #toggleClosed.
menu popUpInWorld.
10 changes: 10 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/removeAllAssignees.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
context menu
removeAllAssignees

|size|
size := assignees size.
1 to: size do:[:a|self removeAssignee: assignees first].
"labels do:[:label | self removeLabel: label]."
self column board sidebar
changed: #potentialAssigneesList;
changed: #activeCardAssigneeList.
10 changes: 10 additions & 0 deletions Squello-Core.package/SPBCard.class/instance/removeAllLabels.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
context menu
removeAllLabels

|size|
size := labels size.
1 to: size do:[:a|self removeLabel: labels first].
"labels do:[:label | self removeLabel: label]."
self column board sidebar
changed: #potentialLabelsList;
changed: #activeCardLabelList.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
accessing
setupMouseEvents

self on: #click send: #becomeActiveCard to: self.
self on: #startDrag send: #startDragging to: self.
self on: #startDrag send: #startDragging to: self.
self on: #mouseDown send: #value: to:[:evt|
evt redButtonPressed ifTrue:[self becomeActiveCard].
evt yellowButtonPressed ifTrue:[self openContextMenu] ].
6 changes: 5 additions & 1 deletion Squello-Core.package/SPBCard.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
"lowerHalfIndicator" : "tk 8/2/2022 23:22",
"lowerHalfIndicator:" : "tk 8/2/2022 23:22",
"moveCardWith:" : "lo 8/3/2022 13:14",
"moveToTop" : "L.L. 6/23/2024 20:59",
"openContextMenu" : "L.L. 6/23/2024 20:53",
"padding" : "AH 6/14/2024 12:14",
"removeAllAssignees" : "L.L. 6/23/2024 20:40",
"removeAllLabels" : "L.L. 6/23/2024 20:38",
"removeAssignee:" : "lo 7/31/2022 16:38",
"removeAssigneeLocal:" : "lo 7/31/2022 16:39",
"removeLabel:" : "lo 7/31/2022 16:41",
Expand All @@ -83,7 +87,7 @@
"setCardColumn:" : "jh 8/3/2022 00:34",
"setCardColumnAtTop:" : "jh 8/3/2022 00:33",
"setCardHeight" : "AH 6/20/2024 23:54",
"setupMouseEvents" : "jh 8/3/2022 00:20",
"setupMouseEvents" : "L.L. 6/7/2024 17:09",
"startDragging" : "mcr 8/3/2022 12:29",
"statusModel" : "AH 5/25/2024 16:59",
"statusModel:" : "AH 5/25/2024 16:59",
Expand Down

0 comments on commit 30d22d6

Please sign in to comment.