From: Florent Bruneau Date: Tue, 8 Mar 2011 21:15:52 +0000 (+0100) Subject: Fix bad position of the popup in case of window resizing. X-Git-Tag: xorg/1.1.0~45 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=974c494795f273616bd411c7ea4fdcf8165cedd9;p=platal.git Fix bad position of the popup in case of window resizing. Signed-off-by: Florent Bruneau --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 20221e2..0bd885f 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -882,7 +882,6 @@ function sendTestEmail(token, hruid) function buildPopup(input, destination, linkBindFunction) { - var pos = findPos(input.get(0)); var $popup = destination; var selected = null; var hovered = 0; @@ -932,7 +931,6 @@ function sendTestEmail(token, hruid) position: 'absolute', width: '300px', top: input.css('bottom'), - left: pos.x - 300 + input.width(), clear: 'both', 'text-align': 'left' }); @@ -951,7 +949,8 @@ function sendTestEmail(token, hruid) }, show: function() { - $popup.show(); + var pos = findPos(input.get(0)); + $popup.css('left', pos.x - 300 + input.width()).show(); return true; },