').prepend($toggler);var $wrap=jQuery('
').addClass('nav-panel');var $sibs=$me.nextAll();for(var i=0;i<$sibs.length;i++){var $sib=jQuery($sibs[i]);if($sib.is(ELEMENT))break;$sib.detach().appendTo($wrap);addContentMenuCurrentStates($sib,$toggler);}var $links=jQuery($wrap[0]).find('a');if($links.length===1&&$links.first().attr('href')!=='#'){$toggler.children().first().attr('href',jQuery($links[0]).attr('href'));}else{$wrap.insertAfter($me);if($toggler.parent('li').length){$toggler.parent('li').addClass('toggler');}if(window.sessionStorage.getItem('sidebar-section-'+sidebarId+'-'+index+'-open')==='true'){$wrap.css('display','block');setTogglerClass($toggler,'is-open');}}$me.replaceWith($toggler);});$main.css({opacity:0,visibility:"visible"}).animate({opacity:1},200);},initMenuHandling=function(){$nav.on('click','div.nav a',function(e){if(jQuery(this).attr('href').startsWith('#')){toggleNav(jQuery(this));e.preventDefault();}});},setTogglerClass=function($toggler,classVal){if($toggler.is('a')){$toggler.addClass(classVal);}else{$toggler.find('a').addClass(classVal);}},addContentMenuCurrentStates=function($menuObj,$toggler){if($menuObj[0]&&String($menuObj[0].innerHTML).indexOf('curid')>0){setTogglerClass($toggler,'is-active');}},initContentMinHeight=function(){var $sidebar=jQuery('.page-wrapper').find('> .tools').find('.col-xs-12');if($sidebar.length==1){var num=parseFloat($sidebar.height());if(!isNaN(num)){jQuery('#dokuwiki__content').css('minHeight',num+100);}}},initSidebarToggling=function(){var $toggler=jQuery('.togglelink.page_main-content').find('a');$toggler.click(function(e){e.preventDefault();if(jQuery('body').hasClass('wide-content')){setDefaultContent();}else{setWideContent();removeOpenStates();}});if(window.sessionStorage.getItem('wide-content')==='true'){setWideContent();}},initSearchToggling=function(){jQuery('.toggleSearch').find('a').click(function(e){setDefaultContent();e.preventDefault();jQuery('#qsearch__in').focus();});},initMobileToggling=function(){jQuery('.menu-togglelink').find('a').click(function(e){e.preventDefault();var $body=jQuery('body');$body.toggleClass('show-mobile-sidebar');});},setActive=function(selectorArray,$nav){for(var i=0;i
');}}},initTemplateMenues=function(){var $body=jQuery('body'),$siteTools=$nav.find('> .nav-sitetools'),$userTools=$nav.find('> .nav-usermenu'),$templateMenus=$nav.find('> nav:not(.nav-main)'),stModes=['recent','media','index'],utModes=['profile','admin'],isWideContent=false;setActive(stModes,$siteTools);setActive(utModes,$userTools);if($body.is('.do-show')&&$body.is('.wide-content')){window.sessionStorage.setItem('wide-content',true);isWideContent=true;}$templateMenus.each(function(index){var $t=jQuery(this).find('.nav'),y=$nav.find('.nav-main').find('.nav').length,$toggler=($t.is('a'))?$t:$t.find('a:last'),tIndex=y+index;$toggler.data('index',tIndex);var item=window.sessionStorage.getItem('sidebar-section-'+sidebarId+'-'+tIndex+'-open');if(item){if(isWideContent){window.sessionStorage.setItem('sidebar-section-'+sidebarId+'-'+tIndex+'-open','false');}else{if(item==='true'){jQuery(this).find('.nav-panel').css('display','block');setTogglerClass($toggler,'is-open');}}}});};initContentNav();initSidebarToggling();initTemplateMenues();initMenuHandling();initContentMinHeight();initSearchToggling();initMobileToggling();});(function($){var $body,scrollingForDirectNav=function($directMenu){$body=$('body');checkAnchorsOnLoad($directMenu);registerClickForDirectLinks($directMenu);},registerClickForDirectLinks=function($menu){$menu.find('a').on('click',function(e){e.stopPropagation();var target=$(this).attr('href');tasksBeforeScrolling(target);scrollToTarget(target);});},checkAnchorsOnLoad=function($menu){var hash=window.location.hash;if(hash){$menu.find('a').each(function(){var target=$(this).attr('href');if(hash===target){tasksBeforeScrolling(target);scrollToTarget(target);setFocusOnLoad(target);}});}},tasksBeforeScrolling=function(target){switch(target){case'#qsearch__in':showSearchField(target);break;case'#dokuwiki__usertools':$(target).find('li:first-child').find('a').focus();break;}},setFocusOnLoad=function(target){var $target=$(target);switch(target){case'#qsearch__in':case'#spr__toggle-content':$target.focus();break;case'#dokuwiki__usertools':break;default:$target.attr('tabindex',0);$target.focus();}},showSearchField=function(target){if($body.hasClass('wide-content')){$('#spr__toggle-content').trigger('click');}},scrollToTarget=function(target){$(target).velocity('scroll',{duration:400,offset:-60,easing:'ease-in-out'});};$(function(){var $directMenu=$('#spr__direct');if(!$directMenu.length)return;scrollingForDirectNav($directMenu);});})(jQuery);jQuery(function(){jQuery('#dokuwiki__content.main-content').find('h1,h2,h3,h4,h5').append(function(){if(this.id){return''+''+'';}else{return'';}})});var dw_acl={init:function(){var $tree;if(jQuery('#acl_manager').length===0){return;}jQuery('#acl__user select').on('change',dw_acl.userselhandler);jQuery('#acl__user button').on('click',dw_acl.loadinfo);$tree=jQuery('#acl__tree');$tree.dw_tree({toggle_selector:'img',load_data:function(show_sublist,$clicky){var $frm=jQuery('#acl__detail form');jQuery.post(DOKU_BASE+'lib/exe/ajax.php',jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search),{call:'plugin_acl',ajax:'tree',current_ns:$frm.find('input[name=ns]').val(),current_id:$frm.find('input[name=id]').val()}),show_sublist,'html');},toggle_display:function($clicky,opening){$clicky.attr('src',DOKU_BASE+'lib/images/'+(opening?'minus':'plus')+'.gif');}});$tree.delegate('a','click',dw_acl.treehandler);},userselhandler:function(){jQuery('#acl__user input').toggle(this.value==='__g__'||this.value==='__u__');dw_acl.loadinfo();},loadinfo:function(){jQuery('#acl__info').attr('role','alert').html('').load(DOKU_BASE+'lib/exe/ajax.php',jQuery('#acl__detail form').serialize()+'&call=plugin_acl&ajax=info');return false;},parseatt:function(str){if(str[0]==='?'){str=str.substr(1);}var attributes={};var all=str.split('&');for(var i=0;iClick to close
').appendTo(jQuery('body')).hide().on('click',function(){$lightbox.hide();});}$lightbox .show().find('div').html('
');return false;});$extmgr.find('button.disable, button.enable').on('click',function(e){e.preventDefault();var $btn=jQuery(this);var extension=$btn.attr('name').split('[')[2];extension=extension.substr(0,extension.length-1);var act=($btn.hasClass('disable'))?'disable':'enable';$btn.attr('disabled','disabled');$btn.css('cursor','wait');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:extension,act:act,sectok:$btn.parents('form').find('input[name=sectok]').val()},function(data){$btn.css('cursor','').removeAttr('disabled').removeClass('disable').removeClass('enable').text(data.label).addClass(data.reverse).parents('li').removeClass('disabled').removeClass('enabled').addClass(data.state);}).fail(function(){$btn.css('cursor','').removeAttr('disabled');});});$extmgr.find('a.info').on('click',function(e){e.preventDefault();var $link=jQuery(this);var $details=$link.parent().find('dl.details');if($details.length){$link.toggleClass('close');$details.toggle();return;}$link.addClass('close');jQuery.get(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_extension',ext:$link.data('extid'),act:'info'},function(data){$link.parent().append(data);});});if($extmgr.find('.plugins, .templates').hasClass('active')){var $extlist=jQuery('#extension__list');$extlist.addClass('hasDisplayOptions');var $displayOpts=jQuery('
',{id:'extension__viewoptions'}).appendTo($extmgr.find('.panelHeader'));$displayOpts.append(LANG.plugins.extension.display_viewoptions);var displayOptionsHandler=function(){$extlist.toggleClass(this.name);DokuCookie.setValue('ext_'+this.name,$extlist.hasClass(this.name)?'1':'0');};jQuery(['enabled','disabled','updatable']).each(function(index,chkName){var $label=jQuery('').appendTo($displayOpts);var $input=jQuery('',{type:'checkbox',name:chkName}).on('change',displayOptionsHandler).appendTo($label);var previous=DokuCookie.getValue('ext_'+chkName);if(typeof previous==="undefined"||previous=='1'){$input.trigger('click');}jQuery('').append(' '+LANG.plugins.extension['display_'+chkName]).appendTo($label);});}});jQuery(function(){var $dl=jQuery('#plugin__logviewer').find('dl');if(!$dl.length)return;$dl.animate({scrollTop:$dl.prop("scrollHeight")},500);var $filter=jQuery('');$filter.on('keyup',function(e){var re=new RegExp($filter.val(),'i');$dl.find('dt').each(function(idx,elem){if(elem.innerText.match(re)){jQuery(elem).removeClass('hidden');}else{jQuery(elem).addClass('hidden');}});});$dl.before($filter);$filter.wrap('');$filter.before(LANG.plugins.logviewer.filter+' ');});jQuery(function(){function applyPreview(target){var $style=target.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]');$style.attr('href','');var $loader=target.jQuery('#plugin__styling_loader');if(!$loader.length){$loader=target.jQuery('
'+LANG.plugins.styling.loader+'
');$loader.css({'position':'absolute','width':'100%','height':'100%','top':0,'left':0,'z-index':5000,'background-color':'#fff','opacity':'0.7','color':'#000','font-size':'2.5em','text-align':'center','line-height':1.5,'padding-top':'2em'});target.jQuery('body').append($loader);}setTimeout(function(){var now=new Date().getTime();$style.attr('href',DOKU_BASE+'lib/exe/css.php?preview=1&tseed='+now);},500);}var doreload=1;var $styling_plugin=jQuery('#plugin__styling');if(!$styling_plugin.length){if(DokuCookie.getValue('styling_plugin')==1){applyPreview(window);}return;}if(!$styling_plugin.hasClass('ispopup')){var $form=$styling_plugin.find('form.styling').first();var $btn=jQuery('
');$form.prepend($btn);$btn.on('click',function(e){var windowFeatures="menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500";window.open(DOKU_BASE+'lib/plugins/styling/popup.php','styling_popup',windowFeatures);e.preventDefault();e.stopPropagation();}).wrap('
');return;}window.onunload=function(e){if(doreload){DokuCookie.setValue('styling_plugin',0);if(window.opener)window.opener.document.location.reload();}return null;};jQuery(':button').click(function(e){doreload=false;});if(window.opener)applyPreview(window.opener);DokuCookie.setValue('styling_plugin',1);});jQuery(function(){jQuery('form.plugin__tag_search table input').change(function(){if(jQuery(this).attr('checked')){if(jQuery(this).parent().hasClass('minus')){jQuery(this).closest('tr').find('.plus input').attr('checked',false);}else{jQuery(this).closest('tr').find('.minus input').attr('checked',false);}}})});var ToDoPlugin={locked:false,todo:function($chk){if(ToDoPlugin.locked){return;}ToDoPlugin.locked=true;var $spanTodoinnertext=$chk.nextAll("span.todotext:first").find("span.todoinnertext"),param=$chk.data(),checked=!$chk.is(':checked');if(param.index===undefined)param.index=-1;if($spanTodoinnertext.length){var whenCompleted=function(data){if(data.date){jQuery('input.todocheckbox').data('date',data.date);}if(data.message){alert(data.message);}if(data.succeed){$chk.prop('checked',checked);if(checked){if(param.strikethrough&&!$spanTodoinnertext.parent().is("del")){$spanTodoinnertext.wrap("
");}}else{if($spanTodoinnertext.parent().is("del")){$spanTodoinnertext.unwrap();}}}ToDoPlugin.locked=false;};jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_todo',mode:'checkbox',index:param.index,pageid:param.pageid,checked:checked?"1":"0",date:param.date},whenCompleted,'json');}else{alert("Appropriate javascript element not found.\nReverting checkmark.");}},uncheckall:function(){if(ToDoPlugin.locked){return;}ToDoPlugin.locked=true;var whenCompleted=function(){jQuery('input.todocheckbox').each(function(){jQuery(this).prop('checked',false);});jQuery('span.todoinnertext').each(function(){if(jQuery(this).parent().is("del")){jQuery(this).unwrap();}});jQuery('span.todouser').each(function(){jQuery(this).remove();});ToDoPlugin.locked=false;};jQuery.post(DOKU_BASE+'lib/exe/ajax.php',{call:'plugin_todo',mode:'uncheckall',pageid:jQuery('input.todocheckbox:first').data().pageid},whenCompleted,'json');}};jQuery(function(){jQuery('input.todocheckbox').click(function(e){e.preventDefault();e.stopPropagation();var $this=jQuery(this);$this.prop('checked',!$this.is(':checked'));ToDoPlugin.todo($this);});jQuery('span.todotext.clickabletodo').click(function(){var $chk=jQuery(this).prevAll('input.todocheckbox:first');ToDoPlugin.todo($chk);});jQuery('button.todouncheckall').click(function(){ToDoPlugin.uncheckall();});});jQuery(function(){jQuery('#usrmgr__del').on('click',function(){return confirm(LANG.del_confirm);});});jQuery(function(){dw_locktimer.init(840,1);});