Bug Tracker

Opened 13 years ago

Closed 12 years ago

#1485 closed bug (wontfix)

Some bugs and errors in the Sortable functions in the interface plugin

Reported by: torkild Owned by: stefan
Priority: major Milestone: 1.1.4
Component: interface Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:

Description

I have now tryed to figure this out for a couple of hours. I was up to this point sure that the problems was only my own stupiditys fault, but now I'm not that sure anymore.

The first problem I encountered was that when a element is being dragged in a sortable list(all semantic and stuff), it looses it's css styles inherited by parent elements. I figured out I have to style it by a class in the element(or the id). Not that this is a bug, but it would be very nice to see a solution to that. (Altough I understand that might be hard.)

The 2. problem I got was that if an <UL> contains both "accepted" sortable elements, and elements not accepted, it becomes impossible to place a sortable element just above the unaccepted element. This results in haveing to move the element above the element over the unaccepted, for then to move the element just above the unaccepted one step up. A solution shouldn't be too far away i guess(and hope).

The third problem is that if I set "containment: 'parent'", I suddenly cant move the elements down on the list, only up. I don't know if thats because of some "css tecnical mambo jambo mess ups", but it's surtently not user friendly.

Fourth problem is about ghosting. And let me give you this, the function realy "ghosts" the element after it's dropped! In other words: The element being dropped disappers!

Another tips(or something like that): The possiblity to wrap the sortable elements in different elements to make an multidimentional array of some kind. Some thing like this:

<ul>
   <li id='installed'>
      <ul>
         <li class='sortable'>Installed Item #1</li>
         <li class='sortable'>Installed Item #2</li>
         <li class='sortable'>Installed Item #3</li>
      </ul>
   </li>
   <li id='not-installed'>
      <ul>
         <li class='sortable'>Not-Installed Item #1</li>
         <li class='sortable'>Not-Installed Item #2</li>
      </ul>
   </li>
</ul>

Would result in something like this:

data = {
      installed = {
            item-in-installed #1
            item-in-installed #2
            item-in-installed #3
      }
      not-installed = {
            item-in-not-installed #1
            item-in-not-installed #2
      }
}

I guess you catch the point.

I haven't had the time to check deeply into the result of the sortable, so I'm not sure if this allready exists, but surely I could use it!

Other then that I haven't found any more bug/problems I can remember. So then it's just one more thing to say:

I love jQuery, so far I have had the chance to test it, and the interface plugin is adorable! Keep up the good work! This is quality!

(NB: Many of these bug/problems might be my lack of skills in js/jQuery, and shoot me if thats the case. Anyway, I hope I have contributed with something usefull. I also attach the file(with styles) I have used, so you guys can compare with my script.)

(NBNB: I'm a php-programmer if that helps you in any way, alltough I haven't used any php-code in this case.)

Attachments (1)

index.html (2.0 KB) - added by torkild 13 years ago.
The file(including styles) I have used in this case

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by torkild

Attachment: index.html added

The file(including styles) I have used in this case

comment:1 Changed 13 years ago by torkild

Ok.. I have learnt alot these last houres. My learning hasn't fixed the problems, but I have found work-arounds for most of them.

It would still be nice if the dragged element would inherit css style from it's parents.

Problem Nr 2. is still a tricky one, alltough I solved it with some invisible extra "accepted" elements and heck of alot fine-tuning with css.

The third problem(with containment:'parent') is, after what i read, a known bug, and a pretty easy one to fix(hope to see it fixed natively in the next version). But here I got a suggestion. Parent and document are strings you can use for now(together with the oppertunity for an array), but what about strings like: 'margin' - To get inside the margin of the parent(still possible to move it out to the border) 'border' - To get inside the border of the parent(yeah, still possible to move it out to the padding) 'padding' - To get inside to padding of the parent

Ghosting still leads to a magicaly disapperance.

About the tip i gave you, forget about it. It was dumb of me not to research some more.

Still loves it! It's getting better every minut!

comment:2 Changed 13 years ago by torkild

BTW: If anyone want's to know what I did to make it work almost as wanted, please don't hassitate to send me an mail at torkild [some-wierd-'a'] dreamhouse [a-normal-dot] noI just don't give myself the time to post every step here. In case no-one needs it.

comment:3 Changed 12 years ago by scott.gonzal

Resolution: wontfix
Status: newclosed

Interface is no longer supported; consider switching to jQuery UI.

Note: See TracTickets for help on using tickets.