Modal conflict with bootstrap.js when launched from Edit menu in C5 Toolbar
Permalink
99% of my problems are solved, but this modals is a bitch one.
I have added a #themewrapper and this cleared up all the CSS conflicts I had.
I am also currently using this technique so that my bootstrap.js does not clash with C5's bootstrap.js:
But, of course, since these modals are never in EditMode, I guess my script is loading my bootstrap.js in this particular case, so I guess I need a new rule when dealing with those particular modals. Is there an ID or something for these I can work with? This is really a huge pain in the butt to try to figure out on my own. Any idea how this could be fixed? I don't want to buy a theme because I want to know how to solve the problem.
Image attached in case you are still not clear which modals I'm talking about.
I have added a #themewrapper and this cleared up all the CSS conflicts I had.
I am also currently using this technique so that my bootstrap.js does not clash with C5's bootstrap.js:
<?php // bootstrap jQuery 1.10.2 conflicts with Concrete5's 1.7.2, so we only load bootstrap.js if not in Edit mode $page = Page::getCurrentPage(); if(!$page->isEditMode()) { ?> <script src="<?php echo $this->getThemePath(); ?>/_/js/bootstrap.js"></script> <?php } ?>
But, of course, since these modals are never in EditMode, I guess my script is loading my bootstrap.js in this particular case, so I guess I need a new rule when dealing with those particular modals. Is there an ID or something for these I can work with? This is really a huge pain in the butt to try to figure out on my own. Any idea how this could be fixed? I don't want to buy a theme because I want to know how to solve the problem.
Image attached in case you are still not clear which modals I'm talking about.
Well, the only real problem with that is the navbar breaks whenever C5's bootstrap.js is loaded instead, so they would never be able to navigate the site. Thanks for your suggestion, though.
I'm thinking I need to use some or conditionals like "if in Edit mode" OR page ID is 'versions' OR page ID is 'properties' or whatever. I'm tooling around now looking for page IDs for these modals...
I see stuff like this when I hover over the links:
...index.php/tools/required/versions.php?cID=1
.../index.php/tools/required/edit_collection_popup.php?approveImmediately=1&cID=1&ctask=edit_metadata
.../index.php/tools/required/edit_collection_popup.php?cID=1&ctask=set_theme
etc.
And am trying to figure out how to incorporate that into the conditional script.
I'm thinking I need to use some or conditionals like "if in Edit mode" OR page ID is 'versions' OR page ID is 'properties' or whatever. I'm tooling around now looking for page IDs for these modals...
I see stuff like this when I hover over the links:
...index.php/tools/required/versions.php?cID=1
.../index.php/tools/required/edit_collection_popup.php?approveImmediately=1&cID=1&ctask=edit_metadata
.../index.php/tools/required/edit_collection_popup.php?cID=1&ctask=set_theme
etc.
And am trying to figure out how to incorporate that into the conditional script.
I was more thinking about disabling your new jquery when logged in. Interesting problem though.
Yeah, that would be great except you can't navigate through the site to edit different pages since the nav breaks if the new js isn't loaded.
You know what? I ended up using your solution. I didn't bother with an else statement, but it seems to be better to just let them navigate through the dashboard sitemap and tell them the nav doesn't work when they're logged in. Meh.
PS - I marked yours as best answer first so you'd get the karma/credit. But, I marked mine so I would be able to see how I solved it in the future. I think it will be a while between C5 projects.
PS - I marked yours as best answer first so you'd get the karma/credit. But, I marked mine so I would be able to see how I solved it in the future. I think it will be a while between C5 projects.
Oh good. Just another thought, could you place another nav on the page and only show it when logged in?
I probably could (and thanks for the suggestion), but the original nav is a horizontal navbar with dropdowns (Bootstrap 3) so anything else is going to just interfere with the page. I think it makes enough sense to just say they have to navigate through the dashboard and forget about it for the price they are paying.
but if not, could you use something like: