Load more buttons doesn't work with some fields like entity_reference (field_tags). To solve this using the classes that are a common among fields.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | load_more_button-2833326-13.patch | 3.25 KB | sharique |
| #7 | After Patch.png | 27.79 KB | krina.addweb |
Comments
Comment #2
xangyUsed '
.field__items .element-invisible' instead of '.field__item.element-invisible'. Plus did code cleanup.Comment #3
xangyComment #4
gg24 commentedAdd a new line in the last.
Add a new line in the last.
Add a new line in the last.
Add a new line in the last.
Comment #5
xangyComment #6
xangy@gg24, tested patch #2 on fresh git clone. It applies cleanly and adds the new line at the end of files where it was, earlier, missing.
Comment #7
krina.addweb commentedHi xangy,
Thanks! for the patch, But i think after load all field values load more button should be disabled , As it is confusing for end user that all values were already loaded or not.
Comment #8
xangyThanks, krina.addweb for the review. working on it now.
Comment #9
xangyComment #10
nrackleff commentedIn my case, the patch applied to the dev version of the module, but it did not fix the problem. It does only load the three (as per setting), but when I click the 'load more' button/link, the 'element-invisible' class is not removed from the hidden items. The button does disappear once it thinks it has made all of the content visible. I do not see any javascript errors. It just doesn't remove the class.
It works if I change:
$('.field__items .element-invisible', $parentFieldWrapper).each(function() {back to:
$('.field__item.element-invisible', $parentFieldWrapper).each(function() {Comment #11
glynster commentedVery easy fix everyone. The below class just needs to be updated
field__item->field--itemComment #12
sharique commentedPatch needs reroll for 2.x branch.
Comment #13
sharique commentedUpdate patch for 2.0 release.
Comment #14
sharique commentedComment #15
xangy