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 += '<a href="' + s_url + '"><img src="' + s_img + '" title="' + s_title + '" alt="' + s_alt + '"></a><br />';
- }
+ }
text += '<a href="https://www.polytechnique.org/Xorg/Goodies">Plus de bonus</a> ...</div>';
return this.overlib({
}
if ((!href.contains(fqdn) && !this.className.contains('popup')) || node.hasClass('popup')) {
node.click(function () {
- window.open(href);
+ window.open(this.href);
return false;
});
}
}
}
-function hashResponse(password1, password2, hasConfirmation) {
+function hashResponse(password1, password2, hasConfirmation, doAuth) {
var pw1 = $('[name=' + password1 + ']').val();
var pw2;
return false;
}
- alert("Le mot de passe que tu as rentré va être chiffré avant de nous parvenir par Internet ! Ainsi il ne circulera pas en clair.");
+ alert("Le mot de passe va être chiffré avant de nous parvenir par Internet ! Ainsi il ne circulera pas en clair.");
$('[name=' + password1 + ']').val('');
$('[name=pwhash]').val(hash_encrypt(pw1));
+
+ if (doAuth) {
+ $('[name=password]').val(pw1);
+ doChallengeResponse();
+ }
+
return true;
}
} else {
msg += " sur ton addresse.";
}
- $('#mail_sent').successMessage($url + '?token=' + token, msg);
+ $('#mail_sent').successMessage(url + '?token=' + token, msg);
return false;
}
function buildPopup(input, destination, linkBindFunction)
{
- var pos = findPos(input.get(0));
var $popup = destination;
var selected = null;
var hovered = 0;
position: 'absolute',
width: '300px',
top: input.css('bottom'),
- left: pos.x - 300 + input.width(),
clear: 'both',
'text-align': 'left'
});
},
show: function() {
- $popup.show();
+ var pos = findPos(input.get(0));
+ $popup.css('left', pos.x - 300 + input.width()).show();
return true;
},
queryParams: {
offset: 0,
count: 10,
- allow_special: true,
+ allow_special: true
},
loadingClassLeft: 'ac_loading',
loadingClassRight: 'ac_loading_left',