Tribunal de Justiça do Estado da Bahia

Mudanças entre as edições de "MediaWiki:Monobook.js"

De DMO
Ir para: navegação, pesquisa
Linha 1: Linha 1:
 
/* Qualquer JavaScript aqui colocado afetará os usuários do skin MonoBook */
 
/* Qualquer JavaScript aqui colocado afetará os usuários do skin MonoBook */
  
$( document ).ready( function() {
+
function initNav() {
         // Set the default expanded items by their headline
+
         $( '#p-logo' ).css({'position': 'relative', 'display': 'block'});
        var defaultExpandItems = ['Navigation', 'Orga'];
+
         $( '.generated-sidebar h5,#p-tb h5 ').each( function( i ) {
         // Set the basic-name for the cookies, which save the current state of expanding
+
                var id = $( this ).parent().attr( 'id' );
        var expandCookieName = 'disdance_project_wiki_nav_expanded_';
+
                maxHeights[id] = $( this ).next( 'div' ).height();
 +
                var str = $( this ).html();
 +
                labels[id] = str;
 
   
 
   
        var maxHeights = [];
+
                if ( $.cookie( expandCookieName + id ) == 'false' ) {
        var expandeds = [];
+
                        expandeds[id] = false;
        var labels = [];
+
                        minimize( $( this ) );
        initNav();
+
                } else if ( $.cookie( expandCookieName + id ) == 'true' ) {
});
+
                        expandeds[id] = true;
 +
                        maximize( $( this ) );
 +
                } else if ( defaultExpandItems.indexOf( str ) == -1 ) {
 +
                        expandeds[id] = false;
 +
                        minimize( $( this ) );
 +
                } else {
 +
                        expandeds[id] = true;
 +
                        maximize( $( this ) );
 +
                }
 +
                $( this ).css({'cursor': 'pointer'});
 +
                $( this ).click( toggleNav );
 +
        } );
 +
}

Edição das 11h02min de 19 de agosto de 2013

/* Qualquer JavaScript aqui colocado afetará os usuários do skin MonoBook */

function initNav() {
        $( '#p-logo' ).css({'position': 'relative', 'display': 'block'});
        $( '.generated-sidebar h5,#p-tb h5 ').each( function( i ) {
                var id = $( this ).parent().attr( 'id' );
                maxHeights[id] = $( this ).next( 'div' ).height();
                var str = $( this ).html();
                labels[id] = str;
 
                if ( $.cookie( expandCookieName + id ) == 'false' ) {
                        expandeds[id] = false;
                        minimize( $( this ) );
                } else if ( $.cookie( expandCookieName + id ) == 'true' ) {
                        expandeds[id] = true;
                        maximize( $( this ) );
                } else if ( defaultExpandItems.indexOf( str ) == -1 ) {
                        expandeds[id] = false;
                        minimize( $( this ) );
                } else {
                        expandeds[id] = true;
                        maximize( $( this ) );
                }
                $( this ).css({'cursor': 'pointer'});
                $( this ).click( toggleNav );
        } );
}