/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
});
});
- $('#only_referent').change(function() { changeOnlyReferent(); });
-
$('.delete_address_component').click(function() {
var field_name = $(this).attr('href');
var hide = false;
// }}}
// {{{ Regexps to wipe out from search queries
-var default_form_values = [ /&woman=0(&|$)/, /&subscriber=0(&|$)/, /&alive=0(&|$)/, /&egal[12]=[^&]*&promo[12]=(&|$)/g, /&networking_type=0(&|$)/, /&[^&=]+=(&|$)/g ];
+var default_form_values = [ /&woman=0(&|$)/, /&subscriber=0(&|$)/, /&alive=0(&|$)/, /&egal2=[^&]*&promo2=(&|$)/,
+ /&egal1=[^&]*&promo1=&edu_type=(?:Ing[^n]+nieur|Master|Doctorat)(&|$)/, /&networking_type=0(&|$)/,
+ /&origin_corps=0(&|$)/, /¤t_corps=0(&|$)/,
+ /corps_rank=0(&|$)/, /&has_email_redirect=0(&|$)/, /&[^&=]+=(&|$)/g ];
/** Uses javascript to clean form from all empty fields */
function cleanForm(f, targeturl)
} while (old_query != query);
}
}
- query = query.replace(/^&*(.*)&*$/, '$1');
+ query = query.replace(/^(.*)&+$/, '$1');
+ query = query.replace(/^&+(.*)$/, '$1');
+
+ // Removes "(n camarades)" if any of them are remaining.
+ query = query.replace(/\+\(\d+\+camarade(?:s)?\)/, '');
if (query == 'rechercher=Chercher') {
alert("Aucun critère n'a été spécifié.");
return false;
}
// }}}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: