Comments

yannickoo’s picture

The attached patch includes the t() function for "Select Content" and also the l() function for the rendered link in the view.

yannickoo’s picture

StatusFileSize
new795 bytes

Attached patch removes one space in views group.

yannickoo’s picture

The attached patch uses theme('item_list') instead of building an ul in entityreference_browser_field_widget_form.

yannickoo’s picture

Attached patch replaces hardcoded link with l function in entityreference_browser_field_formatter_view.

yannickoo’s picture

Status: Needs review » Active
StatusFileSize
new5.06 KB

Please 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 of Drupal.behaviors in 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:

var target = $('div.entityreference-browser-view-widget');
target.html('<p id="artist-load-error">Error text.</p>');
$('#block-request-0').hide();

I also removed the space before the [remove] link.

yannickoo’s picture

Status: Active » Needs review

Okay 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 ;)

cyberwolf’s picture

What 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.

yannickoo’s picture

That'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?

davidseth’s picture

@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!

yannickoo’s picture

Please 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?

yannickoo’s picture

I 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.

yannickoo’s picture

Because 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.

yannickoo’s picture

Status: Active » Needs review
StatusFileSize
new8.39 KB

I merged all the patches into a "monsterpatch" so that it's easier to apply them. Sorry for confusing you with all these patches :)

yannickoo’s picture

Okay the patch fails... Here is a new one which works.

yannickoo’s picture

Issue summary: View changes

Added monsterpatch information.

yannickoo’s picture

I 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 ;)

davidseth’s picture

Assigned: Unassigned » davidseth

@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.

yannickoo’s picture

Hey 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

davidseth’s picture

Status: Needs review » Closed (fixed)

Hello 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

davidseth’s picture

Issue summary: View changes

Typo fix