Different sized modals for different button functions
Different sized modals for different button functions
I'm using foundation theme, but I think this issue is universal, just different id's and classes effected.
Is it possible to have different sized modal windows leveraged for different actions? i.e. the New is full screen, the edit is 50% and other functions are smaller?
I've got the size set right now with css:
.reveal-modal.DTED {
left: 1em;
right: 1em;
margin: 0 auto;
width: auto;
overflow: hidden;
}
But the modal doesn't have an ID or a differentiator between functions, so I can't distinguish. I added an id to the div hardcoded, but when i do a javascript add class on click, it doesnt work because the div doesnt exist yet when you click the button. At a loss for the usual working methods here.
This question has an accepted answers - jump to answer
Answers
There is a class you may be able to use -
DTE_Action_Create
andDTE_Action_Edit
- this is on the lightbox itself. Would that work?Colin
Hmm. Going to see if I can break it into those two spots but I have a bunch of extends of edit that would fall into different sizes in a perfect world.
Just tried and this doesn't work because the - DTE_Action_Create and DTE_Action_Edit - are within the modal container, the container is what I am trying to control the size of.
I'm thinking a workaround might be to modify this file:
So that this section is conditional to if it is an edit/create/delete function and then add a unique class name to the div in each case, but not sure how to make that conditional work?
Hi,
What I'd suggest doing here is making use of the
open
event:I've just used example class names - you need to use Foundation's classes of course.
Allan
Thanks, will give it a try!
This worked great for my situation. It's a little tricky if you are extending functions a lot like I am. It worked out though as I was able to group appropriately, and the couple of overlaps I was using multiple editors, so could define differently.
Thanks!