You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

boulange.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. $(document).ready(function()
  7. {
  8. boulange_signup() ;
  9. boulange_index_commandes() ;
  10. });
  11. function boulange_scroll(id) {
  12. if($("#"+id).size())
  13. $('html,body').animate({
  14. scrollTop: $("#"+id).offset().top},
  15. 1000);
  16. }
  17. function boulange_index_commandes()
  18. {
  19. $('#bloc-add-etablissement .panel-heading').click(function() {
  20. var panel_body = $(this).parent().find('.panel-body') ;
  21. if(panel_body.css('display') == 'none')
  22. panel_body.fadeIn() ;
  23. else
  24. panel_body.hide() ;
  25. }) ;
  26. }
  27. function boulange_signup()
  28. {
  29. if($('#form-signup').size())
  30. {
  31. boulange_signup_champs_boulanger() ;
  32. $('#option-client, #option-boulanger').change(function() {
  33. boulange_signup_champs_boulanger() ;
  34. }) ;
  35. }
  36. }
  37. function boulange_signup_champs_boulanger()
  38. {
  39. if($('#option-boulanger').prop('checked'))
  40. {
  41. $('#champs-boulanger').fadeIn() ;
  42. $('#champs-client').hide() ;
  43. }
  44. else {
  45. $('#champs-boulanger').hide() ;
  46. $('#champs-client').fadeIn() ;
  47. }
  48. }