University of Oregon

Drupal6 VBO – ‘Open Links’ header link option updated

Last month I posted the code I used to add a link to header that opens all the edit links in a view. Developments » Drupal6 VBO – ‘Open Edit Links’ link added to header.
This month I had a view with a workflow link and I wanted to add a link to open those links as well.

So I updated the function to take two variables: the descriptive name of the link type (descName) and the jQuery css selector (cssSelector).
So the original ‘Edit’ link had to be updated from

openEditLinks()

to:

openEditLinks('Edit','.views-field-edit-node a');

But now it can be called side by side with the workflow link option:

openEditLinks('Workflow','a.workflow-link');

. Like so:

<a href="#" title="Click to open ALL edit links or highlight a group of edit links to limit the number of links that open.">Open Edit Links</a> |
<a href="#" title="Click to open ALL Workflow links or highlight a group of workflow links to limit the number of links that open.">Open Workflow Links</a>

(more…)

Drupal6 VBO – 'Open Edit Links' link added to header

Update 4-13-11: Developments » Drupal6 VBO – ‘Open Links’ header link option updated.

I took the bookmarklet that opens all the ‘Edit’ links on the Views Bulk Operations content management page and updated it to work in the header of the view.

Here are some screenshots of what it looks like and the code I placed in the header of the view.
(more…)

Drupal6 VBO Open all Edit Links Bookmarklet

I needed to edit some custom content in a large number of nodes and while Views Bulk Operations (VBO) allowed me to filter down to those nodes there isn’t a custom operation to edit text in custom fields. Not that I would expect there to be one.
So I wanted to open all the edit links in one fell swoop. I have a bookmarklet: ‘Open Selected Links’ which would work OK if the edit link was the only link for each node but it’s not. So I thought Why don’t I update the script to use just the edit links.
And so I did.
The working script is all JS with one line of jQuery.
The line in question previously set the available links using

dl = document.links;

and now uses:

dl = $('#views-bulk-operations-form--1 .views-field-edit-node a');

Which is a collection of all the edit links on the page.

I could probably keep in the old default and prompt the user to use just the edit links but quick and dirty is the name of the game right now.
(more…)