[Seaside] Scriptaculous - Sortable
Mart-Mari Breedt
breedt_m at aircom.co.za
Wed May 24 08:06:35 UTC 2006
Hi all,
I have just started playing with Scriptaculous a bit, and so far it is
going ok. I used the SUSortableTest as a basis to work from and created
my own example (inheriting from SUComponent) with a single list. I can
drag and drop items in the list, but I can just not figure out why my
triggerSortable:callback: doesn't seem to be called. I put a halt in the
callback block, and it definetly never gets there. Is there maybe some
trick or something I need to use that I might have missed.
My selector for rendering my list (menu) looks like this:
renderMenuOn: html
html unorderedList
id: 'mainMenu';
style: 'width: 200px; min-height: 50px;';
script: (html sortable
constraint: false;
dropOnEmpty: true;
containment: #( mainMenu );
onUpdate: (html ajax
id: 'mainMenu';
triggerSortable: 'mainMenu'
callback: [ :values | self menuItems: values ];
callback: [ :renderer | ]
)
);
with: [
(self menuItems) do: [ :each |
html listItem: [ self renderMenuItem: each on: html ]
]
]
Can the sortable example work on a table with table rows as well?
Kind regards,
Mart-Mari
More information about the Seaside
mailing list