modalbox plugin or similar?

Hi,

I'm looking for a rails plugin for modalbox http://www.wildbit.com/labs/modalbox/
Has anyone ever done something like that?

Do you know of anything similar? I tried redbox but it seems to have a
bug which I can't fix. (the overlay doesn't cover the full screen
vertically but only a small part of it)

thanks for your help in advance

Marc

Marc,

I struggled getting Redbox to do a couple of things - one of which was
the full screen coverage.
I added a line to the javascript to correct this, but have only tested
it in the context of my usage which is Firefox only.

Having said that, now I have got Redbox to work, I really like it. It
is worth looking at the css and javascript, it is not too complex and
helps to get things working nicely. (I also had to add z-index to my
autocomplete field to get the dropdown to appear on top of the
overlay.

Anyway, as far as getting full screen is concerned, you may like to
what I did in the public/javascript/redBox.jss file:
In the setOverlaySize function, I aded the notes under APM and the
simple condition to reset the overlay height

setOverlaySize: function()
  {
    if (window.innerHeight && window.scrollMaxY)
    {
      yScroll = window.innerHeight + window.scrollMaxY;
    }
    else if (document.body.scrollHeight > document.body.offsetHeight)
    { // all but Explorer Mac
      yScroll = document.body.scrollHeight;
    }
    else
    { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla
and Safari
      yScroll = document.body.offsetHeight;
    }
  // if condition below, added by APM to account for using absolute
positioning in my content.
  // for some reason, the above calculations don't give a large enough
height. It is
  // only the size of the banner.
  // When the scrollbars appear on the window, then all is ok. This is
because then, the first
  // option innerHeight+scrollMaxY is used. So I just check below if
the height is not enough
        // then I reset it to window.innerHeight
  if (yScroll < window.innerHeight)
        {
    yScroll=window.innerHeight //Added by APM
  }

    $("RB_overlay").style['height'] = yScroll +"px";
  },

hth
Tonypm

MarcS wrote:

Hi,

I'm looking for a rails plugin for modalbox http://www.wildbit.com/labs/modalbox/
Has anyone ever done something like that?

Do you know of anything similar? I tried redbox but it seems to have a
bug which I can't fix. (the overlay doesn't cover the full screen
vertically but only a small part of it)

thanks for your help in advance

Marc

>

I'm using Control.Modal
successfully(http://livepipe.net/projects/control_modal/). Found it
lightweight and easy to use.
HTH
Chris