Closed (fixed)
Project:
Entityreference Browser
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Apr 2012 at 19:30 UTC
Updated:
4 Apr 2012 at 16:56 UTC
Jump to comment: Most recent file
Hey David, when I was going through the files I saw some hardcoded things like $foo = "<a href=\"node/{$values->nid}\">{$values->node_title}</a>".
You can find my small "monsterpatch" in comment #14.
Comments
Comment #1
yannickooThe attached patch includes the t() function for "Select Content" and also the l() function for the rendered link in the view.
Comment #2
yannickooAttached patch removes one space in views group.
Comment #3
yannickooThe attached patch uses theme('item_list') instead of building an ul in
entityreference_browser_field_widget_form.Comment #4
yannickooAttached patch replaces hardcoded link with l function in
entityreference_browser_field_formatter_view.Comment #5
yannickooPlease use the patch from comment #12!
Attached patch maps $ on jQuery in the whole javascript file and it supports drupal sites in a subdirectory by using Drupal.settings.basePath when creating the links.
Why you're using
$(document).ready();instead ofDrupal.behaviorsin the second part of the js? I also added a small comment in the error section of the ajax stuff. I think it's from your current project right? I think we can remove or replace it:I also removed the space before the [remove] link.
Comment #6
yannickooOkay that was my part, now it's your part drupal community! ;) Please don't forget to attribute authorship to me when you'll commit this patch with adding
--author="yan_nick <yan_nick@531118.no-reply.drupal.org>"to the commit message ;)Comment #7
cyberwolf commentedWhat I would like to add to this issue is that the overview of the selected items should become easily adjustable. Currently there's just the title of the entity and it's impossible to display any other fields together with that title. Maybe you should go here for the same approach as the Entity Reference View Widget module does and use a build mode.
Comment #8
yannickooThat's a good point Cyberwolf. A custom build mode for the browser view is good but that requires big changes in the code. Did you take a look in the module?
Comment #9
davidseth commented@Cyberwolf, can you open up a new issue for that? But I would also like to add that it probably won't happen ;) due to how this module is built. It leverages jQuery Ajax calls along with simple HTML to be very fast. And as @yannickoo mentioned it would require a custom build mode with custom ajax callbacks and would sorta defeat the purpose of this module.
In saying that we can think about how to better render the Left hand selected nodes in your new issue!
Comment #10
yannickooPlease discuss this at #1514604: View mode for entity reference browser view. This issue is for improving the code. David, did you take a look at the patches?
Comment #11
yannickooI attached a patch which fixes the coding standards issues from the automated project review. dawehner told me that the views related issues can be ignored.
Comment #12
yannickooBecause you committed the patch from #1513840: You can add one entity multiple times I created a new patch. Please use this one instead of the patch from #5. But please answer my questions from there.
Comment #13
yannickooI merged all the patches into a "monsterpatch" so that it's easier to apply them. Sorry for confusing you with all these patches :)
Comment #14
yannickooOkay the patch fails... Here is a new one which works.
Comment #14.0
yannickooAdded monsterpatch information.
Comment #15
yannickooI think we also should redesign the browser. And adding an entity to the browser via javascript is not cool. So I think first we should use a table, so you can use tablesort later. And the inserting stuff should happens via ajax. I started with rebuildung the browser. Tomorrow I will work on the ajax stuff and the ctools object cache which should we use to store the selected entities.
My current work is attached as patch but you should only apply it when you wanna help us to improve this module. I just attach it to apply my work when I'm at home ;)
Comment #16
davidseth commented@yannickoo, not sure what you mean in #15. Have you included some changes in the newest patch that effects the browser?
I have already merged in a number of your patches in this issue, so things are getting a bit complicated. Let me finish merging in some of the stand alone patches (up to #12) in this issue. Once that is done can you open up a new issue with your comments? This issue is getting a bit long and is dealing with too many things :)
Thanks.
Comment #17
yannickooHey David, please review the patch from #14. Patch from comment #15 is just for developing, you can ignore it. Tomorrow I'll work on that. The next big patch is coming :D
Comment #18
davidseth commentedHello yannickoo,
I am going to close this issue now, I have added all patches up to #14. Thanks for all the hard work!
Please open up a new issue for anything new. It makes it easier for me to keep track ;)
Cheers,
David
Comment #18.0
davidseth commentedTypo fix