1 2 /** 3 * Gestion du comportement des élément de connexion 4 * - panneau de connexion et déconnexion 5 * - validation du formulaire de connexion 6 * 7 * @package templates/default 8 * @upadte 29/06/2015 9 */ 10 11 // @var integer taille de l'élément nom de l'utilisateur 12 var user_panel_name_width = 0; 13 14 $(window).ready(function(e) { 15 16 17 // Effet Affichage / Masquage du nom 18 user_panel_name_width = $('#user-panel').children('.user-panel-name').width(); 19 //console.log( $('#user-panel').parent() ); 20 $('#user-panel').children('.user-panel-name').css({ width: 0 }).hide(); 21 $('#user-panel').hover( 22 function(){ 23 $('#user-panel').children('.user-panel-name').stop(true,false).show().animate({ width: user_panel_name_width }, { easing: "easeOutElastic" }); 24 }, 25 function(){ 26 $('#user-panel').children('.user-panel-name').stop(true,false).animate({ 27 width: 0 28 }, { 29 easing: "easeOutCirc", 30 complete: function(){ 31 $(this).hide() 32 } 33 } 34 ); 35 } 36 ); 37 38 // Effet Affichage / Masquage du lien admin 39 $('#admin-panel').css({ left: '-110px' }); 40 $('#admin-panel').hover( 41 function(){ 42 $('#admin-panel').stop(true,false).animate({ left: 0 }, 300 ); 43 }, 44 function(){ 45 $('#admin-panel').stop(true,false).animate({ left: '-110px' }, 300); 46 } 47 ); 48 49 50 // Validation du formulaire à la pression de la touche Enter 51 if( $('#btn-form-login-valid').length > 0 ) { 52 $('.esm-user-input').keypress(function(evt){ 53 if( evt.which == 13 ) $('#btn-form-login-valid').trigger('click'); 54 }); 55 } 56 57 // Action au click sur le bouton de connexion 58 $('#btn-form-login-valid').click(function(){ 59 ValideLoginForm(); 60 }); 61 62 /* SU tool box */ 63 if( $('#su_tool_box').length ) { 64 65 $('#su_tool_box .handle').click(function(){ 66 if( $('#su_tool_box').hasClass('actif') ) { 67 $('#su_tool_box').removeClass('actif').animate({right: '-300px'}); 68 69 } else { 70 $('#su_tool_box').addClass('actif').animate({right: 0}); 71 } 72 }); 73 74 } 75 76 77 }); // ready 78 79 80 /* =================================================================== */ 81 82 83 function ValideLoginForm(){ 84 85 if( ( $('#esm_login').val() == "" ) ||( $('#esm_password').val() == "" ) ) { 86 $.prompt("Vous devez remplir tous les champs"); 87 } else { 88 $('#form-login').submit(); 89 } 90 91 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.