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="#" onClick="javascript:openEditLinks('Edit','.views-field-edit-node a'); return false;" 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="#" onClick="javascript:openEditLinks('Workflow','a.workflow-link'); return false;" 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>
