ModalWindow position

2015-03-02 Thread mister anonym
Hi,
 
I need to modify the position of the modal window before it gets displayed in 
the middle.
I have a ajaxbutton which will open the modal window. In the onClick method I 
tried something like...

target.appendJavaScript($(\.wicket-modal\).css('width', 888+'px'););
or

target.appendJavaScript($(\[id^=_wicket_window]\).css('top', 100+'px'););

and some more variations of it...

It seems I can't manipulate the position of the ModalWindow before it gets 
displayed. But I can manipulate the position and size of an element INSIDE this 
modal window.
For example:

target.appendJavaScript($(\.formdiv\).css('width', 888+'px'););

works. formdiv is a div in the modal window. It changes it's width, color and 
what I want.
But I need the position of the ModalWindow somewhere else at the first 
appearance. How can I do it?
 
Related stackoverflow question:  
http://stackoverflow.com/questions/28811547/wicket-modalwindow-position

Hope anyone can help.
 
Regards

 
 

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



Re: ModalWindow Position

2009-04-23 Thread Mathias P.W Nilsson

You could maybe make your own javascript for the modal window

Wicket.Window.prototype.center = function() { 
  // Set your window here.
 }; 
-- 
View this message in context: 
http://www.nabble.com/ModalWindow-Position-tp23156615p23197519.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: ModalWindow Position

2009-04-22 Thread Steve Swinsburg

Hi,

I use a javascript function to move it and then a  
target.appendJavascript() to call it. This is for an iframe but should  
work for you. Every now and then I notice a very tiny delay in the  
appearance of the ModalWindow and the movement of it to its final  
location. if you can fix that let me know ;)


final AjaxLink link = new AjaxLink(modal-link) {
public void onClick(AjaxRequestTarget target) {
window.show(target);
target.appendJavascript(fixWindowVertical(););
}
};


/* fix vertical issue with Wicket Modal window in an iframe. puts it  
50px below top of viewport rather than vertically centered. */

function fixWindowVertical() {
var myWindow=Wicket.Window.get();
if(myWindow) {
var top = getScroll() + 50;
myWindow.window.style.top = top + px;
}
return false;
}


cheers,
Steve






On 21 Apr 2009, at 14:53, Matías Tito wrote:


Hi, I have the following problem.
I add a ModalWindow in a Page. I want to change the initial top- 
position

of that. I try adding an AtributteModifier but it doesn't work.

Thanks!


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





smime.p7s
Description: S/MIME cryptographic signature


ModalWindow Position

2009-04-21 Thread Matías Tito
Hi, I have the following problem.
I add a ModalWindow in a Page. I want to change the initial top-position
of that. I try adding an AtributteModifier but it doesn't work. 

Thanks!


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