Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-alpha3
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2008 at 06:58 UTC
Updated:
1 Jul 2009 at 13:22 UTC
This patch addresses "Javascript: Prevent 'Save' button from being clicked if 'Update' button is visible", specified by Merlin at http://groups.drupal.org/node/9834 .
It disables (and then appropriately re-enables) the 'Save' button when any Views AJAX forms are displayed.
I seem to be getting a WSOD when I try to edit the g.d.o wiki to claim this item so I'll try again later.
| Comment | File | Size | Author |
|---|---|---|---|
| disable-save.patch | 395 bytes | ezra-g |
Comments
Comment #1
merlinofchaos commentedFirst, can you use -up as options to the diff? That makes it a unified diff with context; makes it a little easier to read where the changes are being added.
Second, this is a good start but it's unfortunately a little too naive; it doesn't work if forms happen to be chained: Try adding a field, checking a one or more fields, and clicking add.
However, by placing the re-enable to the spot where we update the live preview, I think we do a pretty good job. It's still naive enough to make me nervous that we might miss some edge case, but we'll go with this and see.
So committed, with that change.
Comment #2
mfbWould it be possible for the Save button to both Update (if needed) and Save? This would save a little clicking time and effort.
Comment #3
merlinofchaos commentedI'm not sure that's a good idea. If it's not really really obvious that this will happen, you might mistakenly update data you didn't intend to; I think it's better to just disable the Save button until you've been forced to commit/cancel. Yes it's an extra click but clarity is worth it, I think. (I could be talked out of this stance, I suppose, if people are convincing that I'm wrong).
Comment #4
ezra-g commentedI think it's reasonable to keep save and update as separate buttons. It's nice to have the option to say, "Oops, I didn't want that. At least I didn't click save yet.."
Also, @Merlin: I'll remember to use -up next time. It slipped my mind with this patch.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
matteogeco commentedWhat about a message sayin':
(or so'en' similar), that would appear after clickin' on "Update"?