Hello, and that's for the great work you've done on this so far.
I'm hoping that I missed where you already built these controls, but maybe it's not in yet.
I'm currently building a site that uses a "bottom bar" similar to Facebook. The relationship actions pop up from a mouse over div at the very bottom of the screen. My problem is that the elaboration's UI's javascript is adding inline styles to the pop up that place it at the bottom of the site, below the usable area. Since the styles are being done inline, I can't override through styles.
Is there a way to make the window open in a css fixed position in the center of the screen? If you need help writing the JS to do it, I'll work it out for you.
| Comment | File | Size | Author |
|---|---|---|---|
| elaborations_request.jpg | 401.83 KB | lance.gliser |
Comments
Comment #1
alex.k commentedI agree it's not a very elegant solution using inline styles. Could you look at a patch in #361376: css support for popup window and see if it works for you, or provide a fix of your own? I'd be ok with simply displaying the popup in the center of the screen, if that is easier. Thanks.
Comment #2
lance.gliser commentedI took a look at the patch, it's still setting it below the link. Which is great pretty impressive visually, if you're not using a side zone.
But, I think there will be more people like myself though that bury it to save screen space.
I'm not sure how to patch, I'm somewhat new here but I'll see what I can learn.
There's choice but to use inline css to get it to the center of someone's screen, we just need a settings option built in for: Below or Center.
Let me dig out the centering JS for this...
Comment #3
lance.gliser commenteduser_relationships
- user_relationships_ui
- - user_relationships_ui.js
Comment #4
lance.gliser commenteduser_relationships
- user_relationships_ui
- - user_relationships_ui.admin.inc
Comment #5
lance.gliser commenteduser_relationships
- user_relationships_ui
- - user_relationships_ui.module
Comment #6
lance.gliser commentedAlright Alex. I've gotten a working version on my local computer, the code changes needed are listed for you.
Users can change between absolute layout, related to the mouse. Or the fixed layout. Both accept left and top parameters to move relative to the starting point.
I've had to just paste in an entire new JS page, lots of changes.
But, one thing does remain and it's a design choice how we handle it.
In trying to do a % height for the fixed version, the height of the window is an unknown variable at the time it's fired.
We could leave it, and let people adjust on their own (measure what they produce and set that as a negative amount in the admin position top).
If that's not alright, we'll have to find a way to pass a standard height.
Tell me what you want to do, and I'll see about learning how to hand you a patch of this.
Comment #7
lance.gliser commentedI've been assigned to other projects for a while now. The above code works, but I haven't had time to make a patch.
I'm handing it over to whoever wants to run with it.
Comment #8
alex.k commentedFix committed with some tweaks. Thanks for contributing, and sorry about having sat on it.
Tested only in FF3, IE7, and Safari 4 beta. If anyone could try other browsers it'd be great.
Comment #9
darren.ferguson commentedAlex, will test in IE6 tonight but the patch looks good IE6 will be the only place where we need to make absolutely sure.