core
core copied to clipboard
Drag'n'drop in the back end
Make trees sortable and update all JavaScript wizards.
Download the attachments Related issues: #2058, #3375
--- Originally created on July 12th, 2009, at 12:49pm (ID 874)
Unfortunately, it seems impossible to accomplish sortable page and file trees. Although there is a script that supports sortable nested lists (=trees), there are a lot of additional things like pagemounts, access permissions and circular references that it does not cover (of course, because they are TYPOlight specific). After two days of trial and error (mainly error), I am finally giving up.
I am going to leave the ticket open in case someone else wants to take care of it.
--- Originally created on October 18th, 2009, at 09:28pm
A MooTools tree script is availble here: http://cpojer.net/page/Scripts
--- Originally created on October 20th, 2009, at 06:45pm
here too : http://mifjs.net/tree/
--- Originally created by cyril on February 6th, 2010, at 10:44pm
@andreas.schempp: How do I get your patch to work? It looks promising, but it does not do anything :)
--- Originally created on August 26th, 2011, at 03:55pm
I see, currently only working in Safari/Chrome :)
--- Originally created on August 26th, 2011, at 04:15pm
Andreas, which (version of the) JavaScript have you used? I have compared your changes to http://cpojer.net/MooTools/tree/Demos/, however there are differences. Also, where are Class.Binds
and Class.Singleton
from?
--- Originally created on October 26th, 2011, at 04:24pm
Class.Binds is from mootools more.
--- Originally created by backbone on October 26th, 2011, at 04:57pm
Class.Singleton is from PowerTools, as the tree class is. As far as I can remember, I had to adjust the script to work as required, like preventing first level items to be reordered as subitems.
--- Originally created on October 27th, 2011, at 08:23pm
Any chance that you can create a patch using the latest version of the tree script? And please provide the copyright notices of any script that you use, otherwise I cannot add it.
--- Originally created on November 8th, 2011, at 07:52pm
I will look into it, but probably not before the Camp...
--- Originally created on November 8th, 2011, at 08:57pm
Maybe you can assign the ticket to me?
--- Originally created on November 8th, 2011, at 08:57pm
I just merged the latest tree script, but it is 99% the same. The major changes are from me, I had to adjust it to work with Contao. In Contao backend, the tree is not like the frontend navigation (subitems inside li element), but there is a second li element for subitems. The original script did not support that.
Anyway, are you aware the script is not tested / does not work with Mode 6 (article) trees?
PS: I've also merged Contao 2.11 into the ticket branch, because afaik the feature should become available then.
--- Originally created on November 18th, 2011, at 12:32am
How about this issue? Any progress or pull requests?
You know there is a branch in the old SVN? It's all in there you should need...?
I'll look into the whole pull request fun ;-)
See pull request #3685
I have added your changes, however it does not work :(
Also, you have messed up the code indentation in the JavaScript file. I had to correct it manually.
Does your code work on your installation?
I'm afraid I have to move this ticket to a later release. It does not work at all in Firefox and only with a single item in Safari. If you want to move a second item, you have to reload the page first.
I agree... I told you it's not done ;-)
Once it is, it will be cool though ;)
Have you found another idea to realise it?
I am working on a own drag and drop solution for listing tree`s. There are a lot of pitfalls when you working on this features. The feature is part of my "Backend Tools for contao" project and would release anyway as modul. Maybe i could create a pre release only for the drag and drop tree feature?
You can take a look on how it works in this video: http://may17.de/dandd.mp4
That looks very good. Do you have a version for tests?
that looks really nice. Have you done it for the page-tree, too?
@psren At the moment the solution works only with tl_article but the page tree would be supported too. It`s a own mootools drag and drop class, specially written for contao so everything could be optimized individual.
@AgentCT I work on a beta solution and hope to release it soon on github.
Do you want to assign this to me, or @contao/workgroup-core ?
hi andreas, for sure. I will contact you via skype in the next days to explain the trouble spots.
may17, May I suggest that the moveable cross icon be removed and the blue arrow be the item that moves the row? After drag cancel the onclick.
Would be cool to have for pages. I had not thought it was this hard to implement into Contao x-browser though!
@may17 Do I remember correctly, that we talked about this issue recently? You told me it would be a lot easier to accomplish if we made some markup changes, but I don't remember if you also told me what changes would have to be made :)
I guess the child list elements should be inside the parent list elements...