X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fxorg.js;h=4837da99877eec2817caf36c87ff695b71ff75c1;hb=45ea6160465aeba0aa780e49c12272819dedffd1;hp=20221e2849705afb82ce6b3d3b7f4f3065ffc6d7;hpb=241ba4945741a0c1512b24ac2893f7415886e850;p=platal.git diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 20221e2..4837da9 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -132,16 +132,17 @@ function addSearchEngine() var s_img; var s_title; var s_url; + var href = this.attr('href'); for (site in goodies[type].sites) { entry = goodies[type].sites[site]; s_alt = entry.alt || ""; s_img = entry.img; s_title = entry.title || ""; - s_url = entry.url_prefix.length > 0 ? entry.url_prefix + escape(this.href) : this.href; + s_url = entry.url_prefix.length > 0 ? entry.url_prefix + escape(href) : href; text += '' + s_alt + '
'; - } + } text += 'Plus de bonus ...'; return this.overlib({ @@ -882,7 +883,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 +932,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 +950,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; },