Closed (fixed)
Project:
Views Bulk Operations (VBO)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2016 at 20:57 UTC
Updated:
11 Jun 2018 at 15:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aaronbaumanPretty simple JS-only patch to accomplish this.
Includes alert message.
Comment #3
hgoto commented+1 for this improvement. The patch #2 works well.
I'd like to propose another approach. The patch #2 seems to add an alert box when the submit button is clicked. I believe, we can use the HTML "disabled" property directly to disable buttons.
This patch introduces the following function in VBO views:
(To support bulk select checkboxes, we should write JS code instead of using #states API, I think.)
Comment #4
joelpittetI like this a lot, it works with the select and the actions as a button. Hopefully admin themes style [disabled] which would make this every better.
I've committed this to the dev branch.
Comment #6
hgoto commented@joelpittet, thank you!
Comment #7
plazik commentedIt work on "Table" format, but it doesn't work on "Unformatted list" format and "Select all items on this page" checkbox.
See attached view export.
Comment #8
hgoto commentedThank you, @Plazik. Surely "Select all items on this page" checkbox isn't supported by the patch #3.
I created a new patch to support the "Unformatted list" format additionally. As the patch #3 has no problem with the "Table" format and IMHO it's OK to just add a new patch, I think. I'd like someone to review this.
The following change in this patch is not for supporting "Unfromatted list". This is just an adjustment for consistency with the existing code :)
Comment #9
joelpittetThat work and fixes the format that's not the table. And we don't need the polyfix for removeProperty because checked and disabled are both boolean properties, so true/false works for both.
Thanks for testing @Plazik, didn't test that scenario.
Comment #10
joelpittetThe patch I committed for posterity.
Comment #12
plazik commentedIt works, thank you.
Comment #13
hgoto commented@joelpittet @Plazik thanks!
Comment #15
joelpittet@hgoto could you checkout a couple issues that have arisen from this change to see if you can help?
Comment #16
hgoto commented@joelpittet thank you for sharing the issues! Yes, I'll check them. (I'm sorry for introducing the problems.)
Comment #17
joelpittetNo worries, it's bound to happen without tests and JS test are a bit tricky in 7 to boot.
Comment #18
joseph.olstad***EDIT***
still investigatingignore this comment
ignore patch
different issue.
here instead #2856944: 'Please select at least one item' - after upgrading to 7.x-3.4