|
|
(52 dazwischenliegende Versionen von 5 Benutzern werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| /////////////////////////////////////////////////////////
| | __NOTOC__<div>{{#addbodyclass:eig-main-page}}</div><metadesc>Das Planungskompendium Energieverteilung ist jetzt als Wiki verfügbar. Zur Unterstützung bei der normgerechten Ausführung von Elektroinstallationen, z. B. nach IEC 60364 (VDE 0100 ff). Zur Verfügung gestellt von Schneider Electric.</metadesc> |
| // Code snippet to make your sidebar items expandable //
| | {{hp-slider}} |
| // Use this code ONLY for the EIG skin - @Nirachand //
| | {{hp-blogpost}} |
| /////////////////////////////////////////////////////////
| | {{hp-intro}} |
|
| | {{hp-chapters}} |
| /*Added By Nirachand*/
| | <!--{{hp-book}}--> |
|
| | <div class="highlight-section container"> |
|
| | <div class="row"> |
|
| | {{Hp-highlight-emagazine-software-special-Vol-2}} |
| $( document ).ready( function() {
| | {{Hp-highlight-din-vde-0100-801-und-esxp}} |
|
| | <!-- keep but comment it |
| // Set the default expanded items by their headline
| | {{Hp-highlight-guidelines}} |
| var defaultExpandItemsID = ['p-About_us', 'p-navigation','p-lang', 'p-addthis'];
| | --> |
|
| | </div> |
| //Id based Key value pairs e.g.: p-navigation, p-lang
| | </div> |
| var staticTexts = [{
| | {{Hp-help}} |
| "key": "p-About_us",
| | {{Hp-other-languages}} |
| "isLink":true,
| | [[Category:Chapter - Hauptseite]] |
| "linkURL" : "Electrical Installation Wiki:About",
| | [[en:Main_Page]] |
| "linkCaption" : "To know more",
| | [[fr:Accueil]] |
| "staticText" : "> Collaborative platform brought to you by Schneider Electric<br>> Helping to design electrical installations according to standards as IEC60364<br>> Our Experts continuously improve the content.<br>> Collaboration is open to all."
| | {{#default_form:}} |
| }];
| |
|
| |
| addStaticText();
| |
| setMaxLMaT();
| |
| function setMaxLMaT(){
| |
| maxL = minL + $('#column-one').width();
| |
| maxT = minT + $('#column-one').height();
| |
| }
| |
|
| |
| // Set the basic-name for the cookies, which save the current state of expanding
| |
| var expandCookieName = 'wikieig_sidebar_expanded_';
| |
| var hoverID, minL, maxL, minT, maxT;
| |
| minL = $('#column-one').position().left;
| |
| minT = $('#column-one').position().top;
| |
| var maxHeights = [];
| |
| var expandeds = [];
| |
| var flags = [];
| |
| var labels = [];
| |
| initNav();
| |
| function initNav(){
| |
| $('.generated-sidebar').each( function( i ) {
| |
| var id = $(this).attr( 'id' );
| |
| if ( jQuery.inArray(id, defaultExpandItemsID) == -1 ){
| |
| $( this ).find('.barHeader').css({'cursor': 'pointer'});
| |
| maxHeights[id] = $(this).find('.pBody').height();
| |
|
| |
| //flags[ $(this).find('.barHeader').parent().attr('id')] = true;
| |
| }
| |
|
| |
| if ( $.cookie( expandCookieName + id ) == 'false' ) {
| |
| expandeds[id] = false;
| |
| minimize( $( this ) );
| |
| } else if ( $.cookie( expandCookieName + id ) == 'true' ) {
| |
| expandeds[id] = true;
| |
| maximize( $( this ) );
| |
| } else if ( jQuery.inArray(id, defaultExpandItemsID) == -1 ) {
| |
| expandeds[id] = false;
| |
| minimize( $( this ) );
| |
| } else {
| |
| expandeds[id] = true;
| |
| maximize( $( this ) );
| |
| }
| |
| //$(this).find('.barHeader').click( toggleNav );
| |
|
| |
| });
| |
|
| |
| }
| |
|
| |
|
| |
| function addStaticText(){
| |
| var length = staticTexts.length, j=0, str;
| |
| $("#column-one").find(".portlet").each(function(i){
| |
| if(staticTexts[0].key == $(this).attr('id') ){
| |
| defaultExpandItemsID.push($(this).attr('id'));
| |
| renderHTML(staticTexts[0], $(this));
| |
| }
| |
| });
| |
| }
| |
|
| |
| function renderHTML(staticText, thiz){
| |
| $("#"+staticText.key).append("<div class='staticText'>"+staticText.staticText+"</div>");
| |
| if(staticText.isLink)
| |
| {
| |
| $("#"+staticText.key).find('.staticText').append("<div class='staticLink'><a class='linkText'>"+staticText.linkCaption+"</a></div>");
| |
| $("#"+staticText.key).find('.staticText').find('.linkText').attr('href', staticText.linkURL );;
| |
| }
| |
| }
| |
|
| |
|
| |
|
| |
| function minimize( target ) {
| |
| var id = $(target).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: 1} );
| |
| $(target).find('.pBody').animate({'height': '0px'},300,function(){
| |
| $(target).find('.pBody').css("display","none");
| |
| setMaxLMaT();
| |
| });
| |
|
| |
| }
| |
|
| |
| function maximize( target ) {
| |
|
| |
| var id = $(target).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: 1} );
| |
| var newHeight = maxHeights[id];
| |
| $(target).find('.pBody').css("display","block");
| |
| $(target).find('.pBody').animate({'height': newHeight + 'px'}, 300);
| |
| setMaxLMaT();
| |
|
| |
| }
| |
|
| |
| function toggleNav() {
| |
| var id = $(this).parent().attr('id');
| |
| if ( jQuery.inArray(id, defaultExpandItemsID) == -1 ) {
| |
| expandeds[id] = !expandeds[id];
| |
| if( expandeds[id] == true ) {
| |
| maximize($(this).parent());
| |
| } else {
| |
| minimize($(this).parent());
| |
| }
| |
| }
| |
| }
| |
|
| |
| $('body').mousemove(function(e){
| |
| if(e.pageX > 197){
| |
|
| |
| $('.barHeader').each(function(){
| |
| var id = $(this).parent().attr('id');
| |
| if(jQuery.inArray(id, defaultExpandItemsID) == -1){
| |
| if($.cookie(id) != 'true'){
| |
| if( expandeds[id] == true ) {
| |
| expandeds[id] = !expandeds[id];
| |
| minimize($(this).parent());
| |
| }
| |
| }
| |
| }
| |
| });
| |
| }
| |
| });
| |
|
| |
|
| |
| $('.barHeader').bind("click", function(){
| |
| var id = $(this).parent().attr('id');
| |
| if(jQuery.inArray(id, defaultExpandItemsID) == -1){
| |
|
| |
| if( $.cookie(id) == null ){
| |
| $.cookie(id, 'true', { expires: 1} );
| |
|
| |
| }else if( $.cookie(id) == 'true' ){
| |
| $.cookie(id, 'false', { expires: 1} );
| |
| if( expandeds[id] == true ) {
| |
| expandeds[id] = !expandeds[id];
| |
| minimize($(this).parent());
| |
| }
| |
| //$('.barHeader').trigger("mouseout");
| |
|
| |
| }else if( $.cookie(id) == 'false')
| |
| {
| |
| $.cookie(id, 'true', { expires: 1} );
| |
|
| |
| }
| |
|
| |
|
| |
| }
| |
| });
| |
|
| |
| $('.barHeader').hover(function(){
| |
| var id = $(this).parent().attr('id');
| |
| if(jQuery.inArray(id, defaultExpandItemsID) == -1){
| |
| if( expandeds[id] == false ) {
| |
| expandeds[id] = !expandeds[id];
| |
| maximize($(this).parent());
| |
| }
| |
| }
| |
| }, function(){
| |
| });
| |
|
| |
|
| |
| }); | |
|
| |
|
| |
|
| |
|
| |
|
| |
| ///////////////////////////////////////////////////////
| |
| ///////////////////////////////////////////////////////
| |