1$(document).ready(onBoostrapExtendedReady) 2 3function onBoostrapExtendedReady() 4{ 5 // événements : 6 $(window).resize( onWindowResize ); 7 8 // initialisation des éléments de navigation 9 initNavigation(); 10 11 // initialisation du zoning du contenu 12 initContentZone(); 13 14 /*-------------------------------- 15 Behaviours 16 --------------------------------*/ 17 onWindowResize(); 18 function onWindowResize() 19 { 20 initNestedBehaviours(); 21 } 22 23 /*-------------------------------- 24 Navigation 25 --------------------------------*/ 26 function initNestedBehaviours() 27 { 28 // xs : 29 if( $("#nested .navbar-toggle").is(":visible") ){ 30 // gestion du click : 31 $("#nested li>ul").each(function (i , n ){ 32 $($(n).parent().children("a")[0]).addClass("dropdown-toggle"); 33 $($(n).parent().children("a")[0]).attr("data-toggle" , "dropdown"); 34 35 }); 36 37 // gestion des différents niveaux de menu : 38 $( ".dropdown-submenu>ul" ).each(function (i , n ){ 39 $(n).parent().children("a").removeAttr("data-toggle") 40 }) 41 } 42 // sm , md , lg: 43 else{ 44 // gestion du survol 45 $("#nested li>ul").each(function (i , n ){ 46 $($(n).parent().children("a")[0]).removeClass("dropdown-toggle"); 47 $($(n).parent().children("a")[0]).removeAttr("data-toggle"); 48 }); 49 } 50 } 51 function initNavigation() 52 { 53 $("#nested li").each( function(i , n ){ 54 if( $(n).children("ul").length ==0 ){ 55 $(n).removeClass( "dropdown" ); 56 $(n).removeClass( "dropdown-submenu" ); 57 } 58 }); 59 } 60 function initContentZone() 61 { 62 if( ! sideAsContent( $("#leftbar") ) ){ 63 if( ! sideAsContent( $("#rightbar") ) ){ 64 oneColumn(); 65 }else{ 66 $("#leftbar").remove(); 67 $("#wrapperInner").removeClass("col-sm-6"); 68 $("#wrapperInner").addClass("col-sm-9"); 69 } 70 } 71 else if( ! sideAsContent( $("#rightbar") ) ){ 72 if( ! sideAsContent( $("#leftbar") ) ){ 73 oneColumn(); 74 }else{ 75 $("#rightbar").remove(); 76 $("#wrapperInner").removeClass("col-sm-6"); 77 $("#wrapperInner").addClass("col-sm-9"); 78 } 79 } 80 } 81 82 function oneColumn() 83 { 84 $("#leftbar").remove(); 85 $("#rightbar").remove(); 86 $("#wrapperInner").attr("class" , "col-sm-12"); 87 } 88 89 function sideAsContent( side ) 90 { 91 return !( side.children().length == 0 || (side.children(".row").length==1 && $(side.children(".row")[0]).children().length==0 ) ) 92 } 93} 94 95 96 97 98
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.