Commit | Line | Data |
---|---|---|
86983865 EMS |
1 | (function() { |
2 | ||
86983865 EMS |
3 | $(document).ready(function() { |
4 | ||
5 | //Register review form submition function | |
428ae53e | 6 | $("#show_publications").click(function() { |
86983865 EMS |
7 | if($(".publications_autre").css('display') == 'none') { |
8 | $(".publications_autre").show(); | |
9 | } | |
10 | else { | |
11 | $(".publications_autre").hide(); | |
12 | } | |
13 | }); | |
14 | ||
428ae53e PP |
15 | $("#btnrechercheavance").click(function() { |
16 | if($("#rechercheavancee").css('display') == 'none') { | |
17 | $("#rechercheavancee").show(); | |
18 | } | |
19 | else { | |
20 | $("#rechercheavancee").hide(); | |
21 | } | |
22 | return false; | |
23 | }); | |
24 | ||
86983865 EMS |
25 | // Activer le datepicker sur les input de classe "date" |
26 | $.datepicker.setDefaults($.datepicker.regional['fr']); | |
805697ec EMS |
27 | $('input:text.date') |
28 | .datepicker({ | |
29 | autoSize: true, | |
30 | dateFormat: 'dd/mm/yy', | |
31 | showAnim: 'fadeIn', | |
32 | onSelect: function(dateText) { | |
33 | $('input:text.date').datepicker('option', 'defaultDate', dateText); | |
34 | } | |
35 | }) | |
36 | .change(function() { | |
37 | $(this).datepicker('setDate', $(this).datepicker('getDate')); | |
38 | return true; | |
39 | }); | |
0a95ac89 EMS |
40 | $('input:text.time').timepicker({ |
41 | timeFormat: 'HH:mm', | |
42 | }); | |
86983865 | 43 | |
37cce5f0 EMS |
44 | // S'assurer qu'on tient compte de ce qui se trouve dans le champ de |
45 | // recherche par mots-clés lorsqu'on choisit une région ou une | |
46 | // discipline. | |
47 | $('#col-menu a').click(function() { | |
48 | var href = this.href | |
49 | var pos = href.indexOf('?') | |
50 | if (pos != -1) { | |
51 | href = href.substring(0, pos) | |
52 | } | |
53 | var query = $('#fRecherche input[name=q]').val(); | |
54 | if (query) { | |
55 | if (href.search(/\/recherche\/?/) == -1) { | |
56 | href += 'recherche/'; | |
57 | } | |
58 | href += '?q=' + query; | |
59 | } | |
60 | window.location = href; | |
61 | return false; | |
62 | }); | |
63 | ||
00755d9b AJ |
64 | }); |
65 | ||
86983865 | 66 | })(); |