Needs work
Project:
DraggableViews
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2012 at 14:17 UTC
Updated:
29 Apr 2015 at 15:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
checker commentedChanging title
Comment #2
ygerasimov commentedI would suggest in this case use Field API handler instead of Native. I believe there you can have exposed filter for sort criteria.
Comment #4
checker commentedThat is possible. But with field api you cannot use amazing arguments handling, can I!?
Comment #5
fernly commentedchecker is correct. The native draggableviews should be exposable.
At this moment other exposed filters are overruling the native draggableviews sorting, even though it's set as first sorting criteria. See #8506355: default draggableviews sort with exposed filter
One of the solutions could be to make it exposable.
Comment #6
grahamcI've just been trying to get this to work - the functionality is actually all here, inherited from the default Views sort handler.
The option to enable exposed sort is set to #access = FALSE in the options_form() method in draggableviews_handler_sort.inc - removing that makes it exposable again.
The exposed options do unhelpfully leak into the view arguments, so I had to clean these out using 'Prepare arguments with PHP code' to match my stored weight arguments. Perhaps a warning about this would be useful, if not excluding them automatically?
But otherwise not encountered any problems, so I don't know why this was disabled in the first place.
Comment #7
istryker commentedusing 'git log -S "$form['expose_button']"' you will find #1410460: Breaking changes with commit b9acb58 or 22a0cd5 that introduce #access false.
I see no reason to have this on the save order display. It just adds confusing. I can see it may be usefully on the other displays.
I tried the follow patch, but it does not work because, as @grahamC said in #6, it leaks the expose options into the view arguments which get save to the database through the POST. I think it tries to load them too.
Again attached patch is just the start.