Closed (fixed)
Project:
Entity Reference View Widget
Version:
7.x-2.1
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2018 at 06:41 UTC
Updated:
8 Feb 2018 at 09:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jsacksick commentedI added a click listener to the checkboxes in the last 2 commits, to remove the row when clicking on the checkbox.
The problem is, the row was also removed when clicking on the label, the attached patch is fixing that.
Comment #4
samvel commentedPlease set status fixed issue if it's ok.
I reviewed and see next:
1) There is no empty message when all rows removed. (see screen)
2) Need to change title and description of checkbox in settings "Pass selected entity ids to View" to "Pass all entity ids to View", because there are now new logic and can't be unselected items.
And i think that there are not needed checkboxes anymore (it not work as checkbox) - #2939033-5: Unable to remove item simply
Comment #5
jsacksick commented1) true, but won't have time to fix that now
2) I don't think the text is confusing, if you uncheck items, they're gone (i.e non selected).
Well, it won't be needed if we have an icon to remove the row, in that case we won't need the checkbox anymore, but it's currently used (When you uncheck it, item is removed, otherwise, it can't be)...
Comment #6
samvel commented1) Patch attached
Also fixed typo errors and one javascript error - there are in behavior was code with triggers (click), but without .once - it's cause multiple execution of trigger. I fixed it for widget part (not for modal), because it's prevented me doing this issue.
For modal - may be need review code if there are same errors - but it's another issue.
2) Will be done in #2939033: Unable to remove item simply
Comment #7
jsacksick commentedI simplified the JS code, there's no need to perform an each loop now that we added "once", please let me know if the attached patch works as expected on your side as well.
Comment #8
samvel commentedHi! It looks simpler and work for me.
Here few moments from me:
1) Why we need
:firstinvar $table = $row.parents('table.field-multiple-table:first');In what case we have few tables with that class? I not changed it.2) I replaced also one place with $row
3) I suggest not set empty row when message empty (it wil lbe possible if empty text will be moved in future to settings form), because it will look bad if table have any borders...
See patch and interdiff (with #7).
Comment #9
jsacksick commentedThis doesn't look right to me... $row is the
So are you sure this is functional?
Comment #10
jsacksick commentedComment #11
jsacksick commented1) Why we need :first in var $table = $row.parents('table.field-multiple-table:first'); In what case we have few tables with that class? I not changed it.
We could probably remove the :first and change to parent, this needs to be tested.
Comment #12
samvel commentedOh yes, sorry, my mistake.
Now i understand, it's ok.
patch and interdiff (with #7)
Comment #13
samvel commentedComment #15
jsacksick commentedCommitted.