views:

16

answers:

1

I am looking for this since last friday, couldnt find any solution. One thing i thought about and tried several times, was to first build the function, where ALL items in the list, containing that one, which actually should be excluded from being droppable into other lists get the right to be moved within that list, and later building another function, where ALL items get prepared to being also moved into other lists, but the one certain item gets excluded from that.

but it seems, that you cant write two functions for one list with jquery or ís it possible?

anyway, my request actually is described best in the title, while i couldnt get any solution to it till now. Does anybody has an idea how to solve this?

Regards, Maschek

A: 

Here is some code:

 $("#tx-sortable2").sortable({    
                               items: \'li:not(.tx-header)\',
                                connectWith: \'#tx-sortable2,#tx-sortable3\',            
                                helper: \'clone\',
                                 opacity: 0.6,

                                 forceHelperSize: true,
                                placeholder: \'tx-highlight\',
                                revert: \'invalid\',
                                update: function() {
                                    var order = $(this).sortable("serialize") + \'&action=bla=blubb\';                                    
                                    $.ajax({
                                         url: \'index.php?bla=blubb\',
                                         type: \'POST\',
                                         data: order,
                                         timeout: 50000,
                                         beforeSend: function() {
                                         $("#tx-response").show();
                                         $("#tx-response").fadeOut(2000);
                                    }
                               });                    
                          }             

In this example all li-items within #tx-sortable2 can be moved to the lists #tx-sortable3 and within the list #tx-sortable2 itself, thats what connectWith means. again, my question is, how do i make a single li-item sortable within its own list (here #tx-sortable2), but prevent it from being dragged into the other list?

maschek
*@macheck* When clarifying your question, please **edit** your original question ... don't create an answer. You got me excited because I saw the "1 Answer" mark on your question and thought someone had figured it out!
EAMann