X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2Fjavascript%2Fxorg.js;h=c05ed85febae241d74375c39c313eace06bde868;hb=e9cd8d9c409feca6cbfa1ff0125a033fc33a604d;hp=b95c756c41cf35e94a3df83d6746393875c82d1c;hpb=fd4ec421ad44e439defbed7bc80e6526051fe899;p=platal.git diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index b95c756..c05ed85 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -179,7 +179,7 @@ function auto_links() { } if ((!href.contains(fqdn) && !this.className.contains('popup')) || node.hasClass('popup')) { node.click(function () { - window.open(href); + window.open(this.href); return false; }); } @@ -839,20 +839,23 @@ function previewWiki(idFrom, idTo, withTitle, idShow) } // }}} -// {{{ send test email - -function sendTestEmail(token, hruid) -{ - var url = 'emails/test'; - var msg = "Un email a été envoyé avec succès"; - if (hruid != null) { - url += '/' + hruid; - msg += " sur l'adresse de " + hruid + "."; - } else { - msg += " sur ton addresse."; +// {{{ updatepromofields + +function updatepromofields(egal1, egal2, promo2) { + var comparator = egal1.val(); + + if (comparator == '=') { + egal2.attr('disabled', 'disabled'); + promo2.attr('disabled', 'disabled'); + } else if (comparator == '<=' || comparator == '>=') { + egal2.removeAttr('disabled'); + promo2.removeAttr('disabled'); + if (comparator == '<=') { + egal2.val('>='); + } else { + egal2.val('<='); + } } - $('#mail_sent').successMessage($url + '?token=' + token, msg); - return false; } // }}} @@ -1049,7 +1052,7 @@ function sendTestEmail(token, hruid) queryParams: { offset: 0, count: 10, - allow_special: true, + allow_special: true }, loadingClassLeft: 'ac_loading', loadingClassRight: 'ac_loading_left',