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 */
  
function initNav() {
+
function minimize( target ) {
         $( '#p-logo' ).css({'position': 'relative', 'display': 'block'});
+
         var id = $( target ).parent().attr( 'id' );
        $( '.generated-sidebar h5,#p-tb h5 ').each( function( i ) {
+
        // You can change the expires parameter to save the cookie longer/shorter than 7 days like in this code
                var id = $( this ).parent().attr( 'id' );
+
        $.cookie( expandCookieName + id, 'false', { expires: 7} );
                maxHeights[id] = $( this ).next( 'div' ).height();
+
        var str = labels[id] + '  ►';
                var str = $( this ).html();
+
        $( target ).next( 'div' ).animate({'height': '0px'});
                labels[id] = str;
+
        $( target ).html( 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 );
+
        } );
+
 
}
 
}

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

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

function minimize( target ) {
        var id = $( target ).parent().attr( 'id' );
        // You can change the expires parameter to save the cookie longer/shorter than 7 days like in this code
        $.cookie( expandCookieName + id, 'false', { expires: 7} );
        var str = labels[id] + '  ►';
        $( target ).next( 'div' ).animate({'height': '0px'});
        $( target ).html( str );
}