User story: As a user, When using a "reverse" nodequeue (ie, items added at from of queue and popped off bottom), I wish to mark some nodes as sticky so that they do not change position when new nodes are added to the queue.
Attached is a patch to do this. It needs work and review; I couldn't figure out how to get the table to look right when the queue is empty. It also needs review. It "works for me," though.
I'm hoping this can be integrated into the module as this would be a very nice addition.
This is largely taken from the patch posted in #841850: Add stick to position functionality to nodequeue + some general improvements , but it has some changes/improvements from my end.
Comment | File | Size | Author |
---|---|---|---|
#13 | Sticky_nodes-1351044-12.patch | 0 bytes | RajeevChoudhary |
#9 | nodequeue-sticky-rows-1351044-9.patch | 11.69 KB | ss81 |
#2 | nodequeue-1351044-2.patch | 14.24 KB | alexpetrov |
d7sticky.patch | 15.83 KB | mrryanjohnston | |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedI think this would be a nice feature, but there is a part that worries me in this patch:
I'd prefer getting this in first: #593468: adding the same node more than once to a queue causes bad behavior, so we can actually support duplicate nids in a queue. It seems that more people want that behavior than.. sticky nodes for example :)
Also, please follow the Drupal coding standards when creating a patch for a contrib module. A lot of stuff is camelCased in your patch and that's not the Drupal way ;) Leaving as 'needs work'..
Comment #2
alexpetrov CreditAttribution: alexpetrov commentedJust in case anybody needs it, I created a version of this patch compatible with 7.x-2.x branch. I modified the code to be compatible with the branch plus did some minor modifications/optimizations.
Comment #3
Dane Powell CreditAttribution: Dane Powell commentedpatch in #2 still doesn't match code standards, and has a devel function (dd) in the update hook.
Comment #4
ss81 CreditAttribution: ss81 commentedHere is a new patch, which adds sticky rows functionality. Sticky rows don't change their positions when a user adds new content or clicks on Revers or Shuffle, but they still could be moved with drag-and-drop.
Comment #5
ss81 CreditAttribution: ss81 commentedComment #8
ss81 CreditAttribution: ss81 commentedComment #9
ss81 CreditAttribution: ss81 commentedNew patch which was created based on 7.x-2.x branch
Comment #10
ss81 CreditAttribution: ss81 commentedComment #11
ss81 CreditAttribution: ss81 commentedIt could be great if somebody can test the recent patch. Thanks!
Comment #12
jenlamptonPatch does not apply cleanly to the latest 2.x-dev.
Comment #13
RajeevChoudhary CreditAttribution: RajeevChoudhary as a volunteer and at Asentech LLC commentedI have fixed the issue, Created new patch
@jenlampton can you try attached patch