Is there are a way to select multiple items from node explorer's view?

Comments

gnindl’s picture

Status: Active » Needs work

Well, that would efford some work :)

Each view item has since version 1.1-beta 2 a hidden radio button (by CSS) that enables selection.

For realizing this feature the follwing steps have to be done:

1. Provide a configuration option for "Multiple" in the widget settings.

2. Extend the two view preprocess function with check boxes and load them when configuration option enabled:
- Row fields: theme.inc, function template_preprocess_nodereference_explorer_view_row_fields_selectable
- Table selectable: theme.inc, function nodereference_explorer_preprocess_views_view_table

3. Extend JS for check box selection in explorer.js, function Drupal.behaviors.NodereferenceExplorerSelection

4. Set values for parent widgets in exploreractions.js, function Drupal.nodereference_explorer.actions.setValue.
Synchronization with the form CCK fields may be needed, e. g. load addition widget via content/js_add_more call back.

Some more tasks have to be completed, f. e. when selection on different pages is wanted.

Patches welcome.

avibrazil@gmail.com’s picture

I desperately need this.
I can't ask users to click "browse" on each reference they want to add.

Actually, I'd like to add references to a node without editing that node.

For example, I have a view that I use to simply browse my content with a table display. I'd like to switch it to your table (selectable) display and have a button on bottom or a block on the sidebar that will let users add the selected stuff as reference to a node they have permission to edit (a list of current user's editable nodes may be presented with a popup). I'm lookig for a beahavior similar to a shopping cart (but Ubercart is overkill for me). The cart is the node that has node reference fields and users may "put" there (or add references to) content they found browsing around the site. Later, the cart may be reviewed and other references may be added there too or deleted.

In terms of usability, this would be the perfect world for me.

Thanks in advance.

gnindl’s picture

Version: 6.x-1.1-beta4 » 6.x-1.x-dev
Assigned: Unassigned » gnindl
Status: Needs work » Postponed

Planned feature in version 1.2

timlie’s picture

Is this something for version 1.3 ?

Thanx for the great module!

thommyboy’s picture

any news on this? this would be a REAL killer-feature ;)

Remon’s picture

This has been implemented decades ago in Noderelationships.

gnindl’s picture

Status: Postponed » Active

Actually the solution of Noderelationships is quite bold. The NRE doesn't need any dialog re-ordering or advanced features. The approach should be something like:

- Make the views' table display and row fields multiple select-able: Currently the items are made select-able by radio buttons. If the option "Number of values" in the field settings is greater than 1, then check boxes should be rendered. Therefore the rendering of view displays, as well as the jQuery selection code and CSS classes need some re-factoring.
- Temporary selection caching and display: In order to enable multiple selection across views pages, the selected items must be stored and shown while the dialog is shown. I'd recommend a simple select list which is shown at the top right corner (maybe sticky) or at the bottom of the dialog window. JS/DOM storage code and form handling needs to be adapted, as well it requires some more simple CSS.
- Return selected values to the node form: An additional AHAH request must be triggered setting the selected items to the node form. If the "Number of values" is "Unlimited" two fields are rendered in the node edit form by default. We have to be prepared for more selection that's why we have to re-render the the fields. This requires significant re-factoring of the server-side form handling as the selection is currently set client side.

Targeted for next release.

ionmedia’s picture

Version: 6.x-1.x-dev » 6.x-1.4
Category: support » bug

in field settings number of values is unlimited, but radios not converted to checkboxes