Closed (fixed)
Project:
Entityqueue
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2013 at 01:33 UTC
Updated:
29 Dec 2013 at 21:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jojonaloha commentedAttached patch adds the Shuffle, Reverse and Clear actions. I tried making them #type=button instead of #type=submit, so that you stayed on the edit form like Nodequeue does, but it doesn't seem that the form values are updated appropriately (at least the way I'm doing it in this patch) when I do that.
Comment #2
amateescu commentedWe should try to make these operations work via AJAX. Right now, the action happens and you're redirected to the queue listing, which is.. not the best user experience :)
Comment #3
jojonaloha commentedUpdated patch makes the buttons use ajax. Currently clicking one of these buttons doesn't add a "Changes will not be saved until the form is submitted" message because that will just make this issue worse #2154115: Duplicate "Changes will not be saved until the form is submitted." warnings
Comment #4
amateescu commentedThis is not used in the function.
This means that the field wrapper will have the same id if we have multiple instances of this form on the same page. It would be easier to add a div wrapper with #prefix and #suffix, and use drupal_html_id() for its id.
Comment #5
jojonaloha commentedAttached patch uses drupal_html_id() for the wrapper id. In order for that to work the entire form needs to be replaced, otherwise the second or third click of one of the ajax buttons will not work because they are referencing the old wrapper id.
This also means that the code in entityqueue_field_widget_form() would need to be updated. Also, I'm wondering when we'd have multiple instances of the form on the same page? I was thinking that IEF might be an example, but doesn't that still only have one instance of the form on the page at a time?
Comment #6
amateescu commentedThere was a bug/feature request in nodequeue (back in the day..) about a custom module that provided queue forms in blocks and that's how they ended up with multiple queue forms on one page :)
I don't think returning the entire form bothers us too much, so the patch looks good to me.
Comment #7
jojonaloha commentedOk, I think I'm going to commit this and create a follow-up issue for the widget form then.
Comment #8
amateescu commentedGo right ahead :)
Comment #9
jojonaloha commentedCommitted 0518829