Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Reintroduce Drag 'n Drop #99

Merged
merged 2 commits into from
Jan 30, 2017
Merged

Reintroduce Drag 'n Drop #99

merged 2 commits into from
Jan 30, 2017

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented May 9, 2015

Puli isn't able to do move actions yet, so the back-end is not implemented. However, this should give a first impression of what drag 'n drop is going to look like in the tree.

Fixes #93

Depends On

this.requestData = options.request;
this.rootNode = options.root_node || '/';
this.dndOptions = jQuery.extend({
enabled: false,
isNodeDraggable: alwaysTrueFunction,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this option specifies a function that can determine if a node can be dragged (e.g. based on the FQCN).

@wouterj wouterj modified the milestone: 2.0 FancyTree & Resource May 9, 2015
@dbu
Copy link
Member

dbu commented May 11, 2015

great! impressive how little code is needed for this!

this needs a rebase, i guess the other PRs i merged this morning are in conflict with this one.

is there a plan when puli will implement move? is there an issue we could link to?

@wouterj
Copy link
Member Author

wouterj commented May 11, 2015

is there a plan when puli will implement move? is there an issue we could link to?

puli/issues#42 It'll be implemented before 1.0 stable is released.

@wouterj
Copy link
Member Author

wouterj commented Jun 2, 2016

Rebased, this can be finished once symfony-cmf/resource-rest-bundle#31 is merged.

@dantleech
Copy link
Member

Would this require "reorder" in addition to "move"?

@wouterj
Copy link
Member Author

wouterj commented Jun 3, 2016

This PR is now updated to actually request moves to the backend. The good news is that it's working locally. The less-good news: I had to use lots of dev branches of other bundles to get things working (doctrine, sonata, symfony CMF). So there still is work to do here

@dantleech reorder isn't required, but would be nice :) (especially because every move node now ends up at the end of the tree, it would be nice if nodes could be put a specific place).

@dantleech
Copy link
Member

reorder isn't required, but would be nice

we can start on that when we merge the existing move / remove PR.

@ElectricMaxxx
Copy link
Member

ElectricMaxxx commented Jun 3, 2016

Moving to a specific Position would mean to have a position property on the node to order the siblings. I think we do have that but have no access through the phpcr-odm. Exactly @dbu ? I had Same question some years ago especially for menue nodes.
Second thing we need to update that property through the api.

@dantleech
Copy link
Member

Moving to a specific Position would mean to have a position property on the node to order the siblings

I think we just need the name of the target node and if it should be reordered before or after it, I don't think there is any need for adding a property.

@ElectricMaxxx
Copy link
Member

I understood moving through siblings. That would mean they all have same parent(i do so g). That would be no move it would change the sorting Order of siblings. And that is extremely important on menue nodes and unimportant on all others. (Except we will have Collection Documents with a specific meaning in their order i.e. ranked profiles in a game)

@dbu
Copy link
Member

dbu commented Jun 4, 2016 via email

@wouterj
Copy link
Member Author

wouterj commented Jun 4, 2016

That reordering fits perfectly in the way Fancytree is handling dropping reorderings (move before/after a node). Would be great if it can be included in the rest bundle. (but let's focus on just moving first)

@ElectricMaxxx
Copy link
Member

ElectricMaxxx commented Jun 4, 2016 via email

@dbu
Copy link
Member

dbu commented Jun 5, 2016

👍 lets get moving merged first. can you please update the PR description with links to the other PRs that need to be merged for this to work? resp. issues if there are problems without a PR.

@ElectricMaxxx
Copy link
Member

Can you rebase please?

@wouterj
Copy link
Member Author

wouterj commented Jan 30, 2017

Updated this PR, it now depends on symfony-cmf/resource-rest-bundle#46 to work.

@dbu
Copy link
Member

dbu commented Jan 30, 2017

i merged the resource-rest-bundle pr. can you check if all is fine, and remove the [WIP] in the title if it is?

@wouterj wouterj changed the title [WIP] Reintroduce Drag 'n Drop Reintroduce Drag 'n Drop Jan 30, 2017
@wouterj
Copy link
Member Author

wouterj commented Jan 30, 2017

I've tested this PR and the just-merged PR on the CMF sandbox, so I'm sure it's fine.

@dbu dbu merged commit c2a4ace into symfony-cmf:master Jan 30, 2017
@dbu dbu removed the wip/poc label Jan 30, 2017
@dbu
Copy link
Member

dbu commented Jan 30, 2017

yeah!

@wouterj wouterj deleted the dragndrop branch January 30, 2017 11:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for drag/drop
5 participants