Posted by damiankloip on February 27, 2013 at 2:21pm
9 followers
Issue Summary
We currently have a theme_views_ui_rearrange_form function that renders the form build to be a table. Nowadays we can just do this natively using the form/render api in our form callback.
There is a related issue, #1921774: Javascript on reorder modal form tables is missing., meaning the javascript for tabledrag is not included when first opening the modal. This issue can still carry on without that though.
I have also created #1929070: Refactor views_ui_rearrange_filter_form to remove theme function for table rendering for the filter rearrange form.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| vdc.remove-theme-views-ui-rearrange-form.patch | 4.97 KB | Idle | PASSED: [[SimpleTest]]: [MySQL] 52,152 pass(es). | View details |
Comments
#1
#1919142: Convert Views UI AJAX forms to use FormInterface moves all of this around, and is pretty much done at this point. Just needs an RTBC... :)
But yes, let's PLEASE do this! Much better.
#2
Ok, that patch got in now, so I've rerolled these changes to be in Drupal\views_ui\Form\Ajax\Rearrange::buildForm().
#3
#4
Oh i figured out why the tabledrag doesn't work: The problem is the insertion order of the commands.
As the settings comes after the actual replaced HTML the Drupal.behavior.attach functions are executed before the settings are in there. Interesting, I will create a follow up for that.
This good is looking really great, just removing the unused code above it.
#5
#1848880: Test order of AJAX commands: add Ajax\FrameworkTest::testOrder(), strengthen testLazyLoad(), fix JS settings not being prepended has a fix for that.
#6
Even less code, nice!
#7
#4: drupal-1929064-4.patch queued for re-testing.
#8
#4: drupal-1929064-4.patch queued for re-testing.
#9
#10
#4: drupal-1929064-4.patch queued for re-testing.
#11
Committed dee9ef6 and pushed to 8.x. Thanks!
#12
Quick follow-up to clean-up hook_theme()
#13
Great! Thanks for fixing this.
#14
Committed dc8aeca and pushed to 8.x. Nice catch - thanks!
#15
Automatically closed -- issue fixed for 2 weeks with no activity.