Fix for sortGrouped drag and drop#66
Open
Tofandel wants to merge 8 commits intopix-digital:masterfrom
Open
Conversation
Simple but more efficient validation of the position range Relative $movePosition for drag and drop with sortGroups (because drag and drop doesn't actually works with sortGroups) That's a quick fix, I'm planning to use the data-group as a filter for the actual index
Data group for sortGroups directly inside twig template so the group can be used in init.js
You need to call the template like this now :
$listMapper->add('_action', 'actions', array(
'actions' => array(
'move' => array(
'template' => 'PixSortableBehaviorBundle:Default:_sort_drag_drop.html.twig',
'enable_top_bottom_buttons' => false,
'groups' => array('parent') //Array of sortGroups goes here
)
)));
It will generate a unique data-group signature for the groups of the form (groupFieldName~FieldID~groupFieldName~FieldID~...)
Contributor
Author
|
The groups passed in the twig template could be directly retrieved from the config/options, but I don't know how to do that so if anyone knows of a way or want to do it. (I'd say twig extension but I'm not familiar with this) So feel free to edit or help me |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.