Project:Editview
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

If I have a lot of nodes on the page and I've edited many of them it would be great to have an "update all" button that updated all of the edited nodes on the page.

This may require some new UI like a checkbox for each record so you can say "include in the update" on a per record basis and default them to "not checked" but automatically check it if the row gets edited.

Comments

#1

Very good idea!

#2

Gosh yes.
This is what I really want.
I've got it set up great (thanks for the recipe) to list my many image thumbnails alongside their captions and tags ... but we have to hit a different 'update' button each change.

I know that it's quite a bit harder to put all the nested fields into one big form then figure out what to change ... but this would be the real killer app for bulk edits if it can happen.

#3

Editable fields offers such a button, within a specific view. But it can't edit other content types such as taxonomy terms or even the title of the node...

#4

Status:active» closed (duplicate)

[canceling comment]

#5

Version:5.x-0.1» 6.x-1.x-dev
Status:closed (duplicate)» active

Reverting status and moving to 6.x because this is a new feature.

I think the way to do this is have a master Save All button for the entire view. The button is normally disabled, but if any field is edited, the button would become active. Once the user is done editing, he hits Save All, and all nodes that were changed will be saved.

#6

subscribing

#7

subscribing

#8

Subscribing

#9

subscribing

#10

Put this in the header of the view, you have to use PHP filter.

<style type="text/css">
.view .form-submit{display:none;}
</style>
<script type="text/javascript">
function submitforms()
{
    for (i=0;i<=$('.view form').size()+1;i++)
         {
             $('#node-form-' + i).submit();
         }
$('#node-form').submit();
}
</script>
<a href="javascript:submitforms()">Save All</a>

#11

subscribing

#12

subscribing

#13

I tested out the script in #10 and didn't work for me. It only submitted the first (#node-form).

As I was playing around with it, I added alert('test') after both .submit actions. This had the obvious action of creating a bunch of alert boxes and the unintended result of submitting all the forms and gave me a bunch of drupal_messages of success (1 for each form).

I can't quite get my brain around why. Or how to do this without having the alerts there.

#14

Eeek. That jquery way will try to fire a bunch of form submissions all at the same time. Highly fragile.
Either the form is restructured (currently it's a big set of different forms) into a tree so that it can take a number of submissions at once (you'll still get many messages) or the individual submit buttons need to become AJAXified - which is not impossible, and probably will turn out pretty sweet.