Re: Modal window position - always centred, even on long page

2009-09-01 Thread mfs

Igor,

Thanks..what you suggested worked. I was making a mistake in adding the
javascript, it wasnt getting included due to a missing wicket:link tag.

Farhan



mfs wrote:
> 
> I believe what you are suggesting requires modifying the ModalWindow class
> where the modal.js is added.  Am i right ? Because without that I am not
> sure how can i ensure that my snippet is added/rendered after the modal.js
> on my wicket page. I have tried adding the js-snippet on my wicket page
> (after the modal-window div tag) but it doesn't work.
> 
> I am just trying to avoid adding a dependency on the new/custom
> wicket-extensions.jar (with the modified modal center method) and rely on
> the 1.3.6 version only.
> 
> Thanks
> Farhan.
> 
> 
> 
> igor.vaynberg wrote:
>> 
>> Simply include a js snippet after the modal.js that overrides the method.
>> 
>> -igor
>> 
>> 
>> On 8/31/09, mfs  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 

> 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: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Modal-window-position---always-centred%2C-even-on-long-page-tp21629148p25251492.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Modal window position - always centred, even on long page

2009-08-31 Thread mfs

I believe what you are suggesting requires modifying the ModalWindow class
where the modal.js is added.  Am i right ? Because without that I am not
sure how can i ensure that my snippet is added/rendered after the modal.js
on my wicket page. I have tried adding the js-snippet on my wicket page
(after the modal-window div tag) but it doesn't work.

I am just trying to avoid adding a dependency on the new/custom
wicket-extensions.jar (with the modified modal center method) and rely on
the 1.3.6 version only.

Thanks
Farhan.



igor.vaynberg wrote:
> 
> Simply include a js snippet after the modal.js that overrides the method.
> 
> -igor
> 
> 
> On 8/31/09, mfs  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 
>>>
 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Modal-window-position---always-centred%2C-even-on-long-page-tp21629148p25229751.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Modal window position - always centred, even on long page

2009-08-31 Thread Igor Vaynberg
Simply include a js snippet after the modal.js that overrides the method.

-igor


On 8/31/09, mfs  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 
>>
>>> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Modal window position - always centred, even on long page

2009-08-31 Thread mfs

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 
> 
>> 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Modal window position - always centred, even on long page

2009-01-27 Thread Steve Swinsburg

Thanks German,

Adding this to the HTML of my ModalWindow is working nicely.

I'm now in the process of working out some code that will put the  
modal window in the vertical centre of the actual viewport, even when  
scrolled, rather than the overall iframe height.

If anyone has done this, feel free to save me the hassle!


cheers,
Steve



On 23 Jan 2009, at 20:31, German Morales 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 


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









smime.p7s
Description: S/MIME cryptographic signature


Re: Modal window position - always centred, even on long page

2009-01-23 Thread German Morales
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 

> 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
>
>
>
>
>