Skip to content

Conversation

@Tofandel
Copy link
Contributor

No description provided.

Tofandel added 8 commits June 12, 2017 22:50
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~...)
@Tofandel
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant