reha.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /**
  2. * @file
  3. * reha behaviors.
  4. */
  5. (function (Drupal) {
  6. 'use strict';
  7. Drupal.behaviors.reha = {
  8. attach: function (context, settings) {
  9. console.log('It works!');
  10. }
  11. };
  12. } (Drupal));
  13. jQuery(document).ready(function($){
  14. // menu déroulant
  15. ////////////// contacts ///////
  16. $(".bouton-contact").click(function(event) {
  17. // Fermer .connexion-full s'il est déroulé
  18. if ($(".connexion-full").is(":visible")) {
  19. $(".connexion-full").slideUp();
  20. }
  21. if ($(".connected-full").is(":visible")) {
  22. $(".connected-full").slideUp();
  23. }
  24. // Ouvrir .contacts-full
  25. $(".contacts-full").slideToggle();
  26. });
  27. ////////////// connexion ///////
  28. $(".bouton-connexion").click(function(event) {
  29. // Fermer .contacts-full s'il est déroulé
  30. if ($(".contacts-full").is(":visible")) {
  31. $(".contacts-full").slideUp();
  32. }
  33. // Ouvrir .connexion-full
  34. $(".connexion-full").slideToggle();
  35. });
  36. $(".bouton-connected").click(function(event) {
  37. // Fermer .contacts-full s'il est déroulé
  38. if ($(".contacts-full").is(":visible")) {
  39. $(".contacts-full").slideUp();
  40. }
  41. // Ouvrir .connected-full
  42. $(".connected-full").slideToggle();
  43. });
  44. $(".titre").click(function(event) {
  45. if ($(".connected-full").is(":visible")) {
  46. $(".connected-full").slideUp();
  47. }
  48. if ($(".contacts-full").is(":visible")) {
  49. $(".contacts-full").slideUp();
  50. }
  51. if ($(".connexion-full").is(":visible")) {
  52. $(".connexion-full").slideUp();
  53. }
  54. // // Ouvrir .connexion-full
  55. // $(".connected-full").slideToggle();
  56. });
  57. $("#edit-field-dossier-de-candidature-0--label").click(function(event) {
  58. event.preventDefault();
  59. // Ouvrir .connexion-full
  60. $("#edit-field-dossier-de-candidature-0--description>ul.main").slideToggle();
  61. });
  62. });
  63. // slideshow home
  64. (function($, window) {
  65. console.log('hello slick')
  66. $(document).ready(function(){
  67. $('.view-id-sites.view-display-id-block_1').slick({
  68. slidesToShow: 1,
  69. // slidesToScroll: 1,
  70. dots: false,
  71. arrows: true,
  72. centerMode: true,
  73. adaptiveHeight: true,
  74. // centerPadding: '100px',
  75. responsive: [
  76. {
  77. breakpoint: 810,
  78. settings: {
  79. slidesToShow: 1,
  80. adaptiveHeight: true,
  81. arrows: false,
  82. draggable: true,
  83. centerMode: true,
  84. }
  85. }]
  86. });
  87. console.log('salut slick home');
  88. });
  89. $(document).ready(function(){
  90. $('.view-id-actus.view-display-id-block_1').slick({
  91. slidesToShow: 3,
  92. // slidesToScroll: 1,
  93. dots: false,
  94. arrows: true,
  95. centerMode: true,
  96. // centerPadding: '100px',
  97. responsive: [
  98. {
  99. breakpoint: 810,
  100. settings: {
  101. slidesToShow: 1,
  102. adaptiveHeight: true,
  103. arrows: false,
  104. draggable: true,
  105. centerMode: true,
  106. }
  107. }]
  108. });
  109. console.log('slick actu');
  110. });
  111. $(document).ready(function(){
  112. $('.page-node-site .node-type-site .field--name-field-image > div:nth-child(2)').slick({
  113. slidesToShow: 1,
  114. slidesToScroll: 1,
  115. dots: true,
  116. arrows: false,
  117. adaptiveHeight: true,
  118. // centerMode: true,
  119. // centerPadding: '100px',
  120. responsive: [
  121. {
  122. breakpoint: 810,
  123. settings: {
  124. slidesToShow: 1,
  125. adaptiveHeight: true,
  126. arrows: false,
  127. draggable: true,
  128. centerMode: true,
  129. }
  130. }]
  131. });
  132. console.log('slick actu');
  133. });
  134. })(jQuery, window);