Simply include a js snippet after the modal.js that overrides the method.

-igor


On 8/31/09, mfs <[email protected]> wrote:
>
> Hi Steve,
>
> I have come across a scenario where I need to provide custom implementation
> for the Wicket.Window.prototype.center method. The question I had was, that
> is there anyway I can override this method without injecting the new
> modified modal.js (i.e. with the custom center() method impl) in the
> wicket-extensions.jar.
>
> Thanks
> Farhan.
>
>
> German Morales-3 wrote:
>>
>> Hi Steve,
>>
>> I answer quickly with some ideas, perhaps it helps.
>>
>> It seems that you need a different implementation of the center method
>> provided by ModalWindow.
>>
>> You can see the original in modal.js, in the package
>> org.apache.wicket.extensions.ajax.markup.html.modal.res of the
>> wicket-extensions.
>> You should attempt centering the window to the current browser window,
>> instead of the viewport.
>>
>> You could provide an own javascript with a content like:
>>
>>    Wicket.Window.prototype.center = function() {
>>       // your own version
>>    };
>>
>> Hope this helps,
>>
>> German
>>
>>
>> 2009/1/23 Steve Swinsburg <[email protected]>
>>
>>> Hi all,
>>>
>>> I have a fairly long page making use of Modal Windows, and any
>>> ModalWindow
>>> that I place onto this page always renders in the exact centre of the
>>> page
>>> (vertically). So if the button that opens the window is at the top, you
>>> need
>>> to scroll down to get to the window. Likewise if the button is at the
>>> bottom, you'll need to scroll up. This is a pain because sometimes the
>>> screen just dims out but the window is off screen.
>>>
>>> How can I control where the Modal Window is placed on the screen
>>> vertically? Doesn't seem to be any options.
>>>
>>> BTW this is inside an iframe which takes up most of the screen (but not
>>> all). Ideally I'd like the mask to extend over the whole window, not just
>>> the part that the iframe is in (which it currently does, but I can live
>>> with
>>> that)
>>>
>>>
>>> cheers,
>>> Steve
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Modal-window-position---always-centred%2C-even-on-long-page-tp21629148p25229119.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to