Hey,
Thanks for back-porting this from D8.
I am doing some prototyping using the entity_embed module, which now uses the Dialog API module. I just installed Views and I found that the dialogs in Views are all transparent.
I found a few bug reports that mention jquery.ui.theme.css. I notice that with Dialog that CSS file seems to be removed when using the Seven theme. This happens in dialog_library_alter. I found that I was able to get Views dialogs working if I comment out
unset($libraries['ui']['css'][$path]); (in dialog_library_alter)
I also noticed that if I added this piece of CSS to themes/seven/css/components/jquery.ui/theme.css it also resolved the transparency issue
.ui-dialog {
background: #fff;
}
I am assuming neither of these are good enough solutions, but I thought it might help someone who understand this module more resolve it.
This was the bug that got me onto the idea of the jquery.ui.theme.css file https://www.drupal.org/node/1473306
thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | views-ui-2535222-11.patch | 657 bytes | devin carlson |
| #10 | fix-transparent-background.patch | 737 bytes | rogerpfaff |
| #2 | views-background-2535222-2.patch | 1023 bytes | devin carlson |
Comments
Comment #1
david.czinege commentedI have the same problem. Thanks for the solutions.
Comment #2
devin carlson commentedThe default dialog styling doesn't included a background color for the dialog's content so the Seven theme declares its own in
dialog.theme.css. However, this styling is only added to the page when a dialog is present which means it isn't loaded for Views modals since they use ctools modals.I think "reverting" to a white background by default for
.ui-dialogis a good approach.Comment #3
devin carlson commentedTested #2 and committed to Dialog 7.x-2.x.
Comment #6
mstrelan commentedThis was overridden and the background is transparent again.
Comment #7
rogerpfaffIn which version of Dialog is this not broken? I got a site with working background color and installed the dev version of dialog. Got the transparent background, downgraded to alpha7 -> transparent background. Downgraded to alpha6 -> transparent background.
I truncated all cache tables in the database -> transparent background. How do I get rid of this? Or better: How do I get my lovely white background back?
Comment #8
rogerpfaffRe-Opening because the error is back
Comment #9
mstrelan commentedI believe there may have been a specific dev release where this was fixed for a few months.
Comment #10
rogerpfaffI wrote a patch to get back to a white background. This is patched against latest version from git (7.x-2.x).
Comment #11
devin carlson commentedUnfortunately, there's no straightforward fix to this issue. The CSS will continue to get overridden with new D8 core updates and Views UI uses ctools modals whose assets are very difficult to modify (they don't use libraries and call drupal_add_*) so this can't be fixed for all ctools modals.
Given the popularity of Views UI, I think the best solution is to attach the Dialog assets to the View UI edit page as if it were using Dialog. That way, the ctools modals will continue to be used but will be styled appropriately.
Comment #12
devin carlson commentedTested #11 and committed to Dialog 7.x-2.x.
Comment #15
apmsooner commentedThe way this was fixed completely messes up the ui of views. I urge to revert the way this was patched and just add a simple css style for views that sets the background color to white as originally proposed. I don't see the point in forcing all of dialog styles and javascript in views administration for such a minor issue.
Comment #16
apmsooner commentedComment #17
apmsooner commentedInstead of adding dialogs assets which breaks views ui, just add more specificity as an extra class like this will fix the problem:
Comment #18
apmsooner commentedComment #19
caschbre commented@ampsooner this shouldn't break the Views UI if the admin pages are using jQuery 1.7+. If you're using the jQuery version provided with Drupal or anything below 1.7 then Dialog does indeed break the Views UI.
This module should probably perform some sort of check before performing the form_alter, or add a hook_requirements that can let the admin know what's going on.
Another option could be disabling Dialog for certain paths (e.g. /admin)... though this should be a different issue.