Aktionen

MediaWiki

Pivot.js: Unterschied zwischen den Versionen

Aus INOVe

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(40 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
$('li#n-Worum-es-geht a').prepend('<div id="drop-icon"><i class="fa fa-lightbulb-o fa-fw"></i></div>');
$('li#n-Worum-es-geht a').prepend('<div id="drop-icon"><i class="fa fa-lightbulb-o fa-fw"></i></div>');
$('li#n-Anleitungen a').prepend('<div id="drop-icon"><i class="fa fa-question-circle fa-fw"></i></div>');
$('li#n-Erste-Schritte a').prepend('<div id="drop-icon"><i class="fa fa-flag-checkered fa-fw"></i></div>');
$('li#n-Kopiervorlage a').prepend('<div id="drop-icon"><i class="fa fa-clipboard fa-fw"></i></div>');
$('li#n-Digitale-Tools a').prepend('<div id="drop-icon"><i class="fa fa-code-fork fa-fw"></i></div>');
$('li#n-Initiativenubersicht a').prepend('<div id="drop-icon"><i class="fa fa-id-card fa-fw"></i></div>');
$('li#n-Initiativenubersicht a').prepend('<div id="drop-icon"><i class="fa fa-map fa-fw"></i></div>');
 
$('li#n-Struktur-sidebar a').prepend('<div id="drop-icon"><i class="fa fa-sitemap fa-fw"></i></div>');
$( document ).ready( function() {
$('li#n-Struktur-sidebar a').append('<br><span style="margin-left: 25px;">Artikelvorschläge</span>');
// Set the default expanded items by their headline
$('li#n-Kopiervorlage a').prepend('<div id="drop-icon"><i class="fa fa-files-o fa-fw"></i></div>');
var defaultExpandItems = ['Navigation', 'Orga'];
$('li#n-Wiki-Anleitungen a').prepend('<div id="drop-icon"><i class="fa fa-question-circle fa-fw"></i></div>');
// Set the basic-name for the cookies, which save the current state of expanding
$('li#n-Alle-Artikel a').prepend('<div id="drop-icon"><i class="fa fa-list-ul fa-fw"></i></div>');
var expandCookieName = 'disdance_project_wiki_nav_expanded_';
$('li#n-Uber-INOVe a').prepend('<div id="drop-icon"><i class="fa fa-info-circle fa-fw"></i></div>');
 
$('li#n-recentchanges a').prepend('<div id="drop-icon"><i class="fa fa-history fa-fw"></i></div>');
var maxHeights = [];
$('li#n-Online-Treffen a').prepend('<div id="drop-icon"><i class="fa fa-calendar-check-o fa-fw"></i></div>');
var expandeds = [];
var labels = [];
initNav();
});
 
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 );
} );
}
 
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 );
}
 
function maximize( 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, 'true', { expires: 7} );
var str = labels[id] + '  ▼';
var newHeight = maxHeights[id];
$( target ).next( 'div' ).animate({'height': newHeight + 'px'});
$( target ).html( str );
}
 
function toggleNav( e ) {
var id = $(e.target ).parent().attr( 'id' );
expandeds[id] = !expandeds[id];
if( expandeds[id] == true ) {
maximize( e.target );
} else {
minimize( e.target );
}
}

Aktuelle Version vom 27. März 2021, 12:33 Uhr

$('li#n-Worum-es-geht a').prepend('<div id="drop-icon"><i class="fa fa-lightbulb-o fa-fw"></i></div>');
$('li#n-Erste-Schritte a').prepend('<div id="drop-icon"><i class="fa fa-flag-checkered fa-fw"></i></div>');
$('li#n-Digitale-Tools a').prepend('<div id="drop-icon"><i class="fa fa-code-fork fa-fw"></i></div>');
$('li#n-Initiativenubersicht a').prepend('<div id="drop-icon"><i class="fa fa-map fa-fw"></i></div>');
$('li#n-Struktur-sidebar a').prepend('<div id="drop-icon"><i class="fa fa-sitemap fa-fw"></i></div>');
$('li#n-Struktur-sidebar a').append('<br><span style="margin-left: 25px;">Artikelvorschläge</span>');
$('li#n-Kopiervorlage a').prepend('<div id="drop-icon"><i class="fa fa-files-o fa-fw"></i></div>');
$('li#n-Wiki-Anleitungen a').prepend('<div id="drop-icon"><i class="fa fa-question-circle fa-fw"></i></div>');
$('li#n-Alle-Artikel a').prepend('<div id="drop-icon"><i class="fa fa-list-ul fa-fw"></i></div>');
$('li#n-Uber-INOVe a').prepend('<div id="drop-icon"><i class="fa fa-info-circle fa-fw"></i></div>');
$('li#n-recentchanges a').prepend('<div id="drop-icon"><i class="fa fa-history fa-fw"></i></div>');
$('li#n-Online-Treffen a').prepend('<div id="drop-icon"><i class="fa fa-calendar-check-o fa-fw"></i></div>');
Cookies helfen uns bei der Bereitstellung von INOVe. Durch die Nutzung von INOVe erklärst du dich damit einverstanden, dass wir Cookies speichern.