Problem/Motivation

There doesn't seem to be a need for table drag when there is only one value and it just clutters up the interface.

Proposed resolution

Turn off table drag when only one value is allowed.

After patch in #2

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet’s picture

Issue summary: View changes
FileSize
28.45 KB
joelpittet’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1018 bytes
13.3 KB
joelpittet’s picture

+++ b/inline_entity_form.module
@@ -1609,8 +1610,9 @@ function theme_inline_entity_form_entity_table($variables) {
+  // If there is only ever one row, disable tabletrag.

whoops, sorry for the typo. tabledrag.

  • bojanz committed 8d8ee06 on 7.x-1.x
    Issue #2401171 by bojanz, joelpittet: Turn off table drag when only one...
bojanz’s picture

Title: Turn off table drag when only one value is allowed » Turn off table drag when only one value is available
Status: Needs review » Fixed

I moved the logic to a separate function to make it more clear.
I also changed the logic to disable tabledrag whenever there's only one row, not just if there's only one allowed row. I think that makes it even more clear.

Thanks for getting this started!

  • bojanz committed 86ac1eb on 8.x-1.x
    Issue #2401171 by bojanz, joelpittet: Turn off table drag when only one...
joelpittet’s picture

Issue summary: View changes

Thanks not sure why the IS images are broken

joelpittet’s picture

Issue summary: View changes

And they've sorted themselves out:)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.