[Seaside] JQueryUI sortable and get smalltalk callback upon change

Bob Arning arning315 at comcast.net
Mon Nov 24 16:45:39 UTC 2014


renderContentTableOn: html

     html table: [
         html tableBody
             script: (html jQuery new sortable
                 onStop: (html jQuery ajax
                     callback: [ :values | self halt. items := values.]
                     passengers: (html jQuery this find: 'tr')));
             with: [
                 items do: [ :each |
                     html tableRow
                             class: 'ui-corner-all';
                             passenger: each;
                         with: [html tableData
                             with: each
                         ]
                 ]
         ]
     ]

seems to work.

On 11/24/14 10:01 AM, Mariano Martinez Peck wrote:
> Hi guys,
>
> I am trying to use JQueryUI sortable for making the rows of a table 
> sortable. I could make it to work at the client side but I don't now 
> how to be able to get the values at the server side in order to update 
> my internal OrderedCollection.
>
> I found #callbackSortable:  but it seems I am doing something wrong... 
> This is what I am doing:
>
> html script: ((html jQuery: 'tbody') sortable
> onUpdate:  (html jQuery ajax
> callbackSortable: [ :event |
>     event inspect.
> ]))
>
>
> But the event inspected has nothing.. Everything from "passanger" is 
> nil. I guess I may be missing passing passengers..but I don't know 
> what nor where.
>
> Any idea?
>
> Thanks,
>
>
> -- 
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20141124/6f53a775/attachment-0001.htm


More information about the seaside mailing list