Needs review
Project:
References dialog
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 14:28 UTC
Updated:
11 Aug 2016 at 19:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaSome wip JS code to chew on:
The question is how should this work:
I think that the links should be more intelligent anyway, they should recognize when the field has changed and show/hide the edit and/or create links as appropriate.
Comment #2
damienmckennaReading through the code more, I think the links themselves should be inserted via JS so that they can be more readily manipulated rather than only being inserted via PHP.
Comment #3
damienmckennaUpdated JS that hides the row entirely.
Comment #4
damienmckennaI'm not the best at JS, so feel free to poke fun at it :)
Comment #5
damienmckennaRelated issue for EntityReference: #1946010: Improve UX around clearing an item
Comment #6
damienmckennaRelated: #1946086: Restructure so the links are built via JS
Comment #7
damienmckennaA patch to provide a 'remove' link if there is an existing 'edit' link.
Comment #8
sk2013 commentedThank you all for the good work.
We have tried the patch with the alpha4 version, but did not have any luck. Would it be possible to guide us or any pointer will help.
We are using this module with references module for adding and editing node. Edit is working fine. We want to remove the node, but we did not get the "remove" link after applying the patch.
Thanks in advance.
Comment #9
damienmckenna@sk2013: You need to apply it to the latest -dev version.
Comment #10
sk2013 commentedThanks a lot Damien! I will update once I complete the work as suggested.
Thanks again
Comment #11
sk2013 commentedHello Damien,
I have tried with the latest -dev version and updated with this patch. But there is no "remove"link appeared. Tested in a fresh Drupal installation and there is no luck.
Is there any way we can find what's causing the "remove" link not appearing?
Thanks a Lot!
Comment #12
cecrs commentedWorks beautifully, thanks Damien!
Comment #13
nicholas.alipaz commentedWorks nicely for us.
Comment #14
mengi commentedPatch in #7 works for me with one very minor exception with the inline_entity_form module on the same page. Any interaction of the ief module will make mutiple (4-6) remove buttons appear. I attached a image to better explain. This doesn't seem to effect the functionality as the reference will still be removed if I click on any of the buttons.
Comment #15
liquidcms commenteda few things wrong with this patch:
- this doesnt create the correct UL structure; it adds the new LI inside the last one as opposed to inside the UL
- doesn't incl an icon
- doesn't work for newly added items (like picking one from search)
this patch is closer:
- correct UL structure
- add icon
- fix other LI classes
but still doesn't do the .live() part of this to add remove when an item is newly added
Comment #16
paramnida commentedThe patch in #15 didn't work for me. I'm using version 7.x-1.0-beta1+4-dev.
Comment #17
marcopbazz commentedPatch in #15 doesn't work form me.
changing the html selectors and adding few controls (because function itself create duplicate buttons with multiple value field or multiple entityreference fields) made it work
Comment #18
nicholas.alipaz commentedupdating issue status
Comment #22
marcopbazz commentedAny update? Can I help?
Comment #23
socialnicheguru commentedReplace "Rimuovi" with a translatable string.
Comment #24
marcopbazz commentedHi SocialNicheGuru,
here's the patch!
Comment #25
Cogax commentedAll previous patches selects only entity reference fields. This patch also supports an translateable link label.
Comment #27
lklimek commentedAdded some triggers to the code to ensure compatibility with entityreference_live_preview (see also #2682665: Automatically load entity preview when using entityreference_live_preview)
Comment #28
fox_01 commented#27 works for me with entityreference_live_preview but if you select an entity and then remove it the remove button will get hidden and does not apear again
Comment #29
lklimek commentedFixed issue from comment 28 by removing lines:
(however, I don't understand why it was placed there by original author of the patch).
Comment #30
fox_01 commented#29 works. thanks
Comment #31
kmajzlik commentedJust trying to schedule CI test.