Posted by Stakcreativa on May 10, 2012 at 3:11am
5 followers
| Project: | Drupal Commerce |
| Version: | 7.x-1.x-dev |
| Component: | Product reference |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi people, i notice that wrappers of fields are always printed, even if it has no value. This cause themeing issues, since div exists.
I know there might be an issue, since if i switch to a second color, this one might have a value while the other does not. But it would be very helpfull to have, at least, an extra class on empty wrapper.....like "empty".
Then it would be solve like -> div.commerce-product-field.empty {display: none;}
thanks for everything.
Comments
#1
These wrapping divs are always rendered because they are actually necessary for dynamic value replacement – say, when you switch your color attribute. It would be nice however to have some context as to when the product field is empty, as you described for CSS purposes.
#2
Excellent helior, it works perfect. Many thanks for this patch and this module =)
#3
has no success patching.
#1: empty-product-field-classes-1570058-1.patch queued for re-testing.
#4
actually i tried patching against the dev version
#5
changed version and recreate the patch. it seems it's working
#6
#7
Trimmed a little from the patch and committed! Thanks.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/c98eca8
#8
Automatically closed -- issue fixed for 2 weeks with no activity.