Skip to content

Commit

Permalink
more convenient turbocallback names
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Brichau committed Aug 23, 2023
1 parent e39829f commit 064b4dc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ renderContentOn: html
html textInput
callback: [ :value | theValue := value ].
html submitButton
turboFrameTarget: 'id-total';
turboTarget: 'id-total';
turboCallback: [ self setCountersTo: theValue ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ renderContentOn: html

| id |
html listItem
onDoubleClick: (html javascript turboCallback: [ self turboCall: (WATurboTodoItemEditor on: self) ] frameId: self turboframeDecoration id);
onDoubleClick: (html javascript turboCallback: [ self turboCall: (WATurboTodoItemEditor on: self) ]);
id: (id := html nextId);
with: [
html div
Expand All @@ -21,4 +21,4 @@ renderContentOn: html
html form: [
html button
class: 'destroy';
turboStreamCallback: [ :ts | ts remove: self remove ] ] ] ]
turboStreamCallback: [ :ts | ts remove: self remove ] ] ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Seaside-HotwireTurbo
turboCallback: aNiladicValuable

self turboCallback: aNiladicValuable target: (JSStream on: 'this.closest(''turbo-frame'').id')
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*Seaside-HotwireTurbo
turboCallback: aNiladicValuable frameId: frameId
turboCallback: aNiladicValuable target: frameId

self add:
(self turbo call: 'visit' withArguments: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*Seaside-HotwireTurbo
turboFrameTarget: aString
turboTarget: aString

self dataAttributeAt: 'turbo-frame' put: aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*Seaside-HotwireTurbo
turboFrameTarget: aString
turboTarget: aString

self dataAttributeAt: 'turbo-frame' put: aString

0 comments on commit 064b4dc

Please sign in to comment.