Thanks for the responses Mark, and that's exactly what I've done, and I 
still have the same problem.

Could someone explain to me exactly how Sortables/Draggables/Droppables 
works, and how classes get assigned during the drag process?  I 
understand that once a drag is activated, a copy of the active container 
is created - but even if I assign it a root class, it's still not 
applied.  This behavior occurs in both Firefox and IE, so I'm assuming 
it's something I'm doing, but I can't figure it out.  Note that the 
original classes/styles do snap back after drop - it's just during the drag.

A simplified example:

<div class='reorderlist'>
    <div class='reorderrow' id='row1'>
       <div class='handle'>X</div>
       <div class='title'>Title 1</div>
       <div class='description'>Description 1</div>
    </div>
    <div class='reorderrow' id='row2'>
       <div class='handle'>X</div>
       <div class='title'>Title 2</div>
       <div class='description'>Description 2</div>
    </div>
</div>

Styles are generally set as:
.reorderrow {style}
.reorderrow div.handle {style}
.reorderrow div.title {style}
.reorderrow div.description {style}

Now I initialize the list as Sortable:

    $('div.reorderlist').Sortable(
            {
                accept: 'reorderrow',
                activeclass: 'reorderrow',
                hoverclass: 'reorderrow',
                helperclass: 'reorderrow',
                handle: 'div.handle',
                axis: 'vertically',
                tolerance: 'pointer'
            }
        );

The result is that the list is Sortable, and styles behave normally.  
But on drag, both the draggable and the hovered row revert to Times New 
Roman, large fonts, and I can't trace it back.  All styles go back to 
what's expected after drop.

Does anyone know the mechanics behind how the containers are copied, so 
I can troubleshoot this?  As much as I love what the Interfaces plugin 
can do, the documentation is terrible.  Yes, all parameters are listed 
there, with some broken English, but there is no explanation of how it 
works, what containers it works on, or pitfalls.  No offense meant - 
it's just frustrating.

-- mike


Mark wrote:
> i think it`s best to just rewrite it to use divs and no tables. other 
> than that i have no idea how to resolve it.
>
> 2007/2/27, Michael Crowl <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:
>
>
>     Thanks for the response, Mark, that's what I suspected - I had done a
>     search, but my local email archives didn't go back that far.
>
>     So here's a separate problem: Now I'm using one DIV as the sortable
>     container, than each sortable item is a DIV wrapped around a
>     single-row
>     TABLE, so I could keep the current design.  Unfortunately, on drag the
>     entire table and all of its TDs (even elements inside the TDs) lose
>     their classes entirely.  Makes for a very ugly drag.  Setting
>     activeclass doesn't help, because all that does is assert a class
>     on the
>     DIV wrapping the table - nothing helps the table cells and contents
>     maintain their original classes.  In other words, I want to move each
>     DIV (wrapped around table) WITHOUT Sortables destroying the existing
>     CSS.  Note that once the drag is done, the original styles reassert
>     themselves - it's only on drag.
>
>     Anyone have any tips?
>
>     -- mike
>
>
>     Mark wrote:
>     > i believe there was a whole discussion about this somewhere in just
>     > june or july archives of this list in 2006.. the result of that is
>     > that you can`t do it with tr`s because you will need to create a
>     > complete table just for that one TR and that should be done be
>     > javascript.. or that`s how i understood it.
>     >
>     > best thing to do is using divs or li`s like in the example.
>     >
>     >
>     > 2007/2/27, Michael Crowl <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>>>:
>     >
>     >
>     >     Is it possible to use Sortables to sort table rows?  I
>     haven't had
>     >     much
>     >     luck with it - the rows become malformed and break on drag,
>     and they
>     >     don't stay fixed within the width of the table.
>     >
>     >     I've moved on to working with DIVs instead, but using table
>     rows
>     >     would
>     >     have been cleaner.
>     >
>     >     -- mike
>     >
>     >
>     >     _______________________________________________
>     >     jQuery mailing list
>     >     discuss@jquery.com <mailto:discuss@jquery.com>
>     <mailto:discuss@jquery.com <mailto:discuss@jquery.com>>
>     >     http://jquery.com/discuss/
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>
>     >
>     > _______________________________________________
>     > jQuery mailing list
>     > discuss@jquery.com <mailto:discuss@jquery.com>
>     > http://jquery.com/discuss/ <http://jquery.com/discuss/>
>     >
>
>     --
>
>
>     | Michael Crowl
>     | Web Developer
>     | [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>
>
>     _______________________________________________
>     jQuery mailing list
>     discuss@jquery.com <mailto:discuss@jquery.com>
>     http://jquery.com/discuss/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>   

-- 


| Michael Crowl
| Web Developer
| [EMAIL PROTECTED]



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to