While overriding the presentation of the action element, I had to use a phptemplate function to strip out some of the inline styles that were being added in the $form. It'd be nice to have these divs built with classes and ids instead and put the CSS definitions in a css file. This wold make it easier to update some styles and opens the door for more options when a theme developer is trying to select various divs.
This small patch creates a css file and adds it in hook_menu. I also removed some of the inline style in views_bulk_operations_form(). The css definitions are pretty general, and might need to be adjusted depending on whether you have anything more planned here. The big thing I'm not sure about is that I floated any .form-items under #views-bulk-operations-form, but you might want to use the #views_bulk_operations_action div that I wrapped around the action div.
Note that I also wrapped the 'Enable or disable allowed operations' link in a div with the id "allowed_operations_link".
Needs review.
| Comment | File | Size | Author |
|---|---|---|---|
| vbo_css.patch | 2.83 KB | seanbfuller |
Comments
Comment #1
infojunkieExcellent initiative. Thanks.
I just moved the drupal_add_css() call to hook_init(), which seems to be where other modules place it.
Comment #2
seanbfuller commentedGlad it was useful. The only thing I noticed was that my previous css declaration for the submit button resulted in some bad margins on the confirm and cancel buttons on the confirmation screen. I added a:
to override the previous declaration for the other "Execute" button. Something to consider going forward.
Comment #3
infojunkieThanks for following up on this. I fixed the CSS and module to only apply the styles to the desired elements.
Comment #4
(not verified) commented