Giter Club home page Giter Club logo

indexmenu's Introduction

indexmenu's People

Contributors

akhzz905 avatar alexgearbox avatar araname avatar becjie32 avatar brilanto avatar coastgnu avatar delpoint avatar dturkalj avatar eduardomozart avatar epergo avatar fukuyori avatar hammerversion avatar insspb avatar jbinard avatar johanneskleine avatar kastra28 avatar klap-in avatar micgro42 avatar nerun avatar objectivesea avatar richard-strittmatter avatar rikblok avatar sadupl avatar samuelet avatar saschalalala avatar sawachan avatar schplurtz avatar tictactoe101 avatar yllelder avatar zastarbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

indexmenu's Issues

Navigation bar disappears

Hello,

I've got a problem with indexmenu at my dokuwiki installation. Sometimes the navigation disappears and only an error message is displayed. After activating / deactivating a random plugin (most time I use some Latex - Plugin) the navigation bar reappears. In /var/log/httpd/error_log no message is shown concerning this matter.

Currently I use the Binky-Release of Dokuwiki ("Release 2013-12-08 "Binky") and the 2013-04-24 Version of the indexmenu plugin.

Is this a known bug within indexmenu? If not, has someone an idea what else could be the problem?

Best regards,
Mathias

nons show current page in links

when I write nons, plugin show current page as link.

{{indexmenu>.:#1|context nons tsort}}

This code not show current page as link

{{indexmenu>.:#1|context tsort}}

cookies not working properly in sidebar

Hi!

I have a sidebar that looks like

{{indexmenu>. | js navbar noscroll notoc id#random}}

It seems the cookies and navbar aren't working properly-- when I navigate to a particular namespace, nothing is expanded (expecting current namespace to be expanded). When I expand a namespace then navigate, I expect the namespace to remain expanded, but instead the folder icon looks expanded, but doesn't show its contents. Something seems to be going wrong in the JS console:

Uncaught TypeError: Cannot call method 'apply' of undefined js.php:421
(anonymous function) js.php:421
(anonymous function) js.php:421
e.resolveWith js.php:3
e.extend.ready js.php:3
c.addEventListener.C js.php:3

Here's line 421... It's a doosy.

var qq=qq||{};qq.extend=function(first,second){for(var prop in second){first[prop]=second[prop];}};qq.indexOf=function(arr,elt,from){if(arr.indexOf)return arr.indexOf(elt,from);from=from||0;var len=arr.length;if(from<0)from+=len;for(;from<len;from++){if(from in arr&&arr[from]===elt){return from;}}return-1;};qq.getUniqueId=(function(){var id=0;return function(){return id++;};})();qq.attach=function(element,type,fn){if(element.addEventListener){element.addEventListener(type,fn,false);}else if(element.attachEvent){element.attachEvent('on'+type,fn);}};qq.detach=function(element,type,fn){if(element.removeEventListener){element.removeEventListener(type,fn,false);}else if(element.attachEvent){element.detachEvent('on'+type,fn);}};qq.preventDefault=function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}};qq.insertBefore=function(a,b){b.parentNode.insertBefore(a,b);};qq.remove=function(element){element.parentNode.removeChild(element);};qq.contains=function(parent,descendant){if(parent==descendant)return true;if(parent.contains){return parent.contains(descendant);}else{return!!(descendant.compareDocumentPosition(parent)&8);}};qq.toElement=(function(){var div=document.createElement('div');return function(html){div.innerHTML=html;var element=div.firstChild;div.removeChild(element);return element;};})();qq.css=function(element,styles){if(styles.opacity!=null){if(typeof element.style.opacity!='string'&&typeof(element.filters)!='undefined'){styles.filter='alpha(opacity='+Math.round(100*styles.opacity)+')';}}qq.extend(element.style,styles);};qq.hasClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');return re.test(element.className);};qq.addClass=function(element,name){if(!qq.hasClass(element,name)){element.className+=' '+name;}};qq.removeClass=function(element,name){var re=new RegExp('(^| )'+name+'( |$)');element.className=element.className.replace(re,' ').replace(/^\s+|\s+$/g,"");};qq.setText=function(element,text){element.innerText=text;element.textContent=text;};qq.children=function(element){var children=[],child=element.firstChild;while(child){if(child.nodeType==1){children.push(child);}child=child.nextSibling;}return children;};qq.getByClass=function(element,className){if(element.querySelectorAll){return element.querySelectorAll('.'+className);}var result=[];var candidates=element.getElementsByTagName("*");var len=candidates.length;for(var i=0;i<len;i++){if(qq.hasClass(candidates[i],className)){result.push(candidates[i]);}}return result;};qq.obj2url=function(obj,temp,prefixDone){var uristrings=[],prefix='&',add=function(nextObj,i){var nextTemp=temp?(/\[\]$/.test(temp))?temp:temp+'['+i+']':i;if((nextTemp!='undefined')&&(i!='undefined')){uristrings.push((typeof nextObj==='object')?qq.obj2url(nextObj,nextTemp,true):(Object.prototype.toString.call(nextObj)==='[object Function]')?encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj()):encodeURIComponent(nextTemp)+'='+encodeURIComponent(nextObj));}};if(!prefixDone&&temp){prefix=(/\?/.test(temp))?(/\?$/.test(temp))?'':'&':'?';uristrings.push(temp);uristrings.push(qq.obj2url(obj));}else if((Object.prototype.toString.call(obj)==='[object Array]')&&(typeof obj!='undefined')){for(var i=0,len=obj.length;i<len;++i){add(obj[i],i);}}else if((typeof obj!='undefined')&&(obj!==null)&&(typeof obj==="object")){for(var i in obj){add(obj[i],i);}}else{uristrings.push(encodeURIComponent(temp)+'='+encodeURIComponent(obj));}return uristrings.join(prefix).replace(/^&/,'').replace(/%20/g,'+');};var qq=qq||{};qq.FileUploaderBasic=function(o){this._options={debug:false,action:'/server/upload',params:{},button:null,multiple:true,maxConnections:3,allowedExtensions:[],sizeLimit:0,minSizeLimit:0,onSubmit:function(id,fileName){},onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,responseJSON){},onCancel:function(id,fileName){},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",onLeave:"The files are being uploaded, if you leave now the upload will be cancelled."},showMessage:function(message){alert(message);}};qq.extend(this._options,o);this._filesInProgress=0;this._handler=this._createUploadHandler();if(this._options.button){this._button=this._createUploadButton(this._options.button);}this._preventLeaveInProgress();};qq.FileUploaderBasic.prototype={setParams:function(params){this._options.params=params;},getInProgress:function(){return this._filesInProgress;},_createUploadButton:function(element){var self=this;return new qq.UploadButton({element:element,multiple:this._options.multiple&&qq.UploadHandlerXhr.isSupported(),onChange:function(input){self._onInputChange(input);}});},_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);}});return handler;},_preventLeaveInProgress:function(){var self=this;qq.attach(window,'beforeunload',function(e){if(!self._filesInProgress){return;}var e=e||window.event;e.returnValue=self._options.messages.onLeave;return self._options.messages.onLeave;});},_onSubmit:function(id,fileName){this._filesInProgress++;},_onProgress:function(id,fileName,loaded,total){},_onComplete:function(id,fileName,result){this._filesInProgress--;if(result.error){this._options.showMessage(result.error);}},_onCancel:function(id,fileName){this._filesInProgress--;},_onInputChange:function(input){if(this._handler instanceof qq.UploadHandlerXhr){this._uploadFileList(input.files);}else{if(this._validateFile(input)){this._uploadFile(input);}}this._button.reset();},_uploadFileList:function(files){for(var i=0;i<files.length;i++){if(!this._validateFile(files[i])){return;}}for(var i=0;i<files.length;i++){this._uploadFile(files[i]);}},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);this._handler.upload(id,this._options.params);}},_validateFile:function(file){var name,size;if(file.value){name=file.value.replace(/.*(\/|\\)/,"");}else{name=file.fileName!=null?file.fileName:file.name;size=file.fileSize!=null?file.fileSize:file.size;}if(!this._isAllowedExtension(name)){this._error('typeError',name);return false;}else if(size===0){this._error('emptyError',name);return false;}else if(size&&this._options.sizeLimit&&size>this._options.sizeLimit){this._error('sizeError',name);return false;}else if(size&&size<this._options.minSizeLimit){this._error('minSizeError',name);return false;}return true;},_error:function(code,fileName){var message=this._options.messages[code];function r(name,replacement){message=message.replace(name,replacement);}r('{file}',this._formatFileName(fileName));r('{extensions}',this._options.allowedExtensions.join(', '));r('{sizeLimit}',this._formatSize(this._options.sizeLimit));r('{minSizeLimit}',this._formatSize(this._options.minSizeLimit));this._options.showMessage(message);},_formatFileName:function(name){if(name.length>33){name=name.slice(0,19)+'...'+name.slice(-13);}return name;},_isAllowedExtension:function(fileName){var ext=(-1!==fileName.indexOf('.'))?fileName.replace(/.*[.]/,'').toLowerCase():'';var allowed=this._options.allowedExtensions;if(!allowed.length){return true;}for(var i=0;i<allowed.length;i++){if(allowed[i].toLowerCase()==ext){return true;}}return false;},_formatSize:function(bytes){var i=-1;do{bytes=bytes/1024;i++;}while(bytes>99);return Math.max(bytes,0.1).toFixed(1)+['kB','MB','GB','TB','PB','EB'][i];}};qq.FileUploader=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>'+'<div class="qq-upload-button">Upload a file</div>'+'<ul class="qq-upload-list"></ul>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file"></span>'+'<span class="qq-upload-spinner"></span>'+'<span class="qq-upload-size"></span>'+'<a class="qq-upload-cancel" href="#">Cancel</a>'+'<span class="qq-upload-failed-text">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._setupDragDrop();};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{_find:function(parent,type){var element=qq.getByClass(parent,this._options.classes[type])[0];if(!element){throw new Error('element not found '+type);}return element;},_setupDragDrop:function(){var self=this,dropArea=this._find(this._element,'drop');var dz=new qq.UploadDropZone({element:dropArea,onEnter:function(e){qq.addClass(dropArea,self._classes.dropActive);e.stopPropagation();},onLeave:function(e){e.stopPropagation();},onLeaveNotDescendants:function(e){qq.removeClass(dropArea,self._classes.dropActive);},onDrop:function(e){dropArea.style.display='none';qq.removeClass(dropArea,self._classes.dropActive);self._uploadFileList(e.dataTransfer.files);}});dropArea.style.display='none';qq.attach(document,'dragenter',function(e){if(!dz._isValidFileDrag(e))return;dropArea.style.display='block';});qq.attach(document,'dragleave',function(e){if(!dz._isValidFileDrag(e))return;var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(!relatedTarget||relatedTarget.nodeName=="HTML"){dropArea.style.display='none';}});},_onSubmit:function(id,fileName){qq.FileUploaderBasic.prototype._onSubmit.apply(this,arguments);this._addToList(id,fileName);},_onProgress:function(id,fileName,loaded,total){qq.FileUploaderBasic.prototype._onProgress.apply(this,arguments);var item=this._getItemByFileId(id);var size=this._find(item,'size');size.style.display='inline';var text;if(loaded!=total){text=Math.round(loaded/total*100)+'% from '+this._formatSize(total);}else{text=this._formatSize(total);}qq.setText(size,text);},_onComplete:function(id,fileName,result){qq.FileUploaderBasic.prototype._onComplete.apply(this,arguments);var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));if(result.success){qq.addClass(item,this._classes.success);}else{qq.addClass(item,this._classes.fail);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,this._formatFileName(fileName));this._find(item,'size').style.display='none';this._listElement.appendChild(item);},_getItemByFileId:function(id){var item=this._listElement.firstChild;while(item){if(item.qqFileId==id)return item;item=item.nextSibling;}},_bindCancelEvent:function(){var self=this,list=this._listElement;qq.attach(list,'click',function(e){e=e||window.event;var target=e.target||e.srcElement;if(qq.hasClass(target,self._classes.cancel)){qq.preventDefault(e);var item=target.parentNode;self._handler.cancel(item.qqFileId);qq.remove(item);}});}});qq.UploadDropZone=function(o){this._options={element:null,onEnter:function(e){},onLeave:function(e){},onLeaveNotDescendants:function(e){},onDrop:function(e){}};qq.extend(this._options,o);this._element=this._options.element;this._disableDropOutside();this._attachEvents();};qq.UploadDropZone.prototype={_disableDropOutside:function(e){if(!qq.UploadDropZone.dropOutsideDisabled){qq.attach(document,'dragover',function(e){if(e.dataTransfer){e.dataTransfer.dropEffect='none';e.preventDefault();}});qq.UploadDropZone.dropOutsideDisabled=true;}},_attachEvents:function(){var self=this;qq.attach(self._element,'dragover',function(e){if(!self._isValidFileDrag(e))return;var effect=e.dataTransfer.effectAllowed;if(effect=='move'||effect=='linkMove'){e.dataTransfer.dropEffect='move';}else{e.dataTransfer.dropEffect='copy';}e.stopPropagation();e.preventDefault();});qq.attach(self._element,'dragenter',function(e){if(!self._isValidFileDrag(e))return;self._options.onEnter(e);});qq.attach(self._element,'dragleave',function(e){if(!self._isValidFileDrag(e))return;self._options.onLeave(e);var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(qq.contains(this,relatedTarget))return;self._options.onLeaveNotDescendants(e);});qq.attach(self._element,'drop',function(e){if(!self._isValidFileDrag(e))return;e.preventDefault();self._options.onDrop(e);});},_isValidFileDrag:function(e){var dt=e.dataTransfer,isWebkit=navigator.userAgent.indexOf("AppleWebKit")>-1;return dt&&dt.effectAllowed!='none'&&(dt.files||(!isWebkit&&dt.types.contains&&dt.types.contains('Files')));}};qq.UploadButton=function(o){this._options={element:null,multiple:false,name:'file',onChange:function(input){},hoverClass:'qq-upload-button-hover',focusClass:'qq-upload-button-focus'};qq.extend(this._options,o);this._element=this._options.element;qq.css(this._element,{position:'relative',overflow:'hidden',direction:'ltr'});this._input=this._createInput();};qq.UploadButton.prototype={getInput:function(){return this._input;},reset:function(){if(this._input.parentNode){qq.remove(this._input);}qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput();},_createInput:function(){var input=document.createElement("input");if(this._options.multiple){input.setAttribute("multiple","multiple");}input.setAttribute("type","file");input.setAttribute("name",this._options.name);qq.css(input,{position:'absolute',right:0,top:0,fontFamily:'Arial',fontSize:'118px',margin:0,padding:0,cursor:'pointer',opacity:0});this._element.appendChild(input);var self=this;qq.attach(input,'change',function(){self._options.onChange(input);});qq.attach(input,'mouseover',function(){qq.addClass(self._element,self._options.hoverClass);});qq.attach(input,'mouseout',function(){qq.removeClass(self._element,self._options.hoverClass);});qq.attach(input,'focus',function(){qq.addClass(self._element,self._options.focusClass);});qq.attach(input,'blur',function(){qq.removeClass(self._element,self._options.focusClass);});if(window.attachEvent){input.setAttribute('tabIndex',"-1");}return input;}};qq.UploadHandlerAbstract=function(o){this._options={debug:false,action:'/upload.php',maxConnections:999,onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,response){},onCancel:function(id,fileName){}};qq.extend(this._options,o);this._queue=[];this._params=[];};qq.UploadHandlerAbstract.prototype={log:function(str){if(this._options.debug&&window.console)console.log('[uploader] '+str);},add:function(file){},upload:function(id,params){var len=this._queue.push(id);var copy={};qq.extend(copy,params);this._params[id]=copy;if(len<=this._options.maxConnections){this._upload(id,this._params[id]);}},cancel:function(id){this._cancel(id);this._dequeue(id);},cancelAll:function(){for(var i=0;i<this._queue.length;i++){this._cancel(this._queue[i]);}this._queue=[];},getName:function(id){},getSize:function(id){},getQueue:function(){return this._queue;},_upload:function(id){},_cancel:function(id){},_dequeue:function(id){var i=qq.indexOf(this._queue,id);this._queue.splice(i,1);var max=this._options.maxConnections;if(this._queue.length>=max&&i<max){var nextId=this._queue[max-1];this._upload(nextId,this._params[nextId]);}}};qq.UploadHandlerForm=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._inputs={};};qq.extend(qq.UploadHandlerForm.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerForm.prototype,{add:function(fileInput){fileInput.setAttribute('name','qqfile');var id='qq-upload-handler-iframe'+qq.getUniqueId();this._inputs[id]=fileInput;if(fileInput.parentNode){qq.remove(fileInput);}return id;},getName:function(id){return this._inputs[id].value.replace(/.*(\/|\\)/,"");},_cancel:function(id){this._options.onCancel(id,this.getName(id));delete this._inputs[id];var iframe=document.getElementById(id);if(iframe){iframe.setAttribute('src','javascript:false;');qq.remove(iframe);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;},_attachLoadEvent:function(iframe,callback){qq.attach(iframe,'load',function(){if(!iframe.parentNode){return;}if(iframe.contentDocument&&iframe.contentDocument.body&&iframe.contentDocument.body.innerHTML=="false"){return;}callback();});},_getIframeContentJSON:function(iframe){var doc=iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document,response;this.log("converting iframe's innerHTML to JSON");this.log("innerHTML = "+doc.body.innerHTML);try{response=eval("("+doc.body.innerHTML+")");}catch(err){response={};}return response;},_createIframe:function(id){var iframe=qq.toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute('id',id);iframe.style.display='none';document.body.appendChild(iframe);return iframe;},_createForm:function(iframe,params){var form=qq.toElement('<form method="post" enctype="multipart/form-data"></form>');var queryString=qq.obj2url(params,this._options.action);form.setAttribute('action',queryString);form.setAttribute('target',iframe.name);form.style.display='none';document.body.appendChild(form);return form;}});qq.UploadHandlerXhr=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[];};qq.UploadHandlerXhr.isSupported=function(){var input=document.createElement('input');input.type='file';return('multiple'in input&&typeof File!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined");};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerXhr.prototype,{add:function(file){if(!(file instanceof File)){throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');}return this._files.push(file)-1;},getName:function(id){var file=this._files[id];return file.fileName!=null?file.fileName:file.name;},getSize:function(id){var file=this._files[id];return file.fileSize!=null?file.fileSize:file.size;},getLoaded:function(id){return this._loaded[id]||0;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_onComplete:function(id,xhr){if(!this._files[id])return;var name=this.getName(id);var size=this.getSize(id);this._options.onProgress(id,name,size,size);if(xhr.status==200){this.log("xhr - server response received");this.log("responseText = "+xhr.responseText);var response;try{response=eval("("+xhr.responseText+")");}catch(err){response={};}this._options.onComplete(id,name,response);}else{this._options.onComplete(id,name,{});}this._files[id]=null;this._xhrs[id]=null;this._dequeue(id);},_cancel:function(id){this._options.onCancel(id,this.getName(id));this._files[id]=null;if(this._xhrs[id]){this._xhrs[id].abort();this._xhrs[id]=null;}}});qq.extend(qq.FileUploader.prototype,{_createUploadHandler:function(){var self=this,handlerClass;if(qq.UploadHandlerXhr.isSupported()){handlerClass='UploadHandlerXhr';}else{handlerClass='UploadHandlerForm';}var handler=new qq[handlerClass]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(id,fileName,loaded,total){self._onProgress(id,fileName,loaded,total);self._options.onProgress(id,fileName,loaded,total);},onComplete:function(id,fileName,result){self._onComplete(id,fileName,result);self._options.onComplete(id,fileName,result);},onCancel:function(id,fileName){self._onCancel(id,fileName);self._options.onCancel(id,fileName);},onUpload:function(){self._onUpload();}});return handler;},_onUpload:function(){this._handler.uploadAll(this._options.params);},_uploadFile:function(fileContainer){var id=this._handler.add(fileContainer);var fileName=this._handler.getName(id);if(this._options.onSubmit(id,fileName)!==false){this._onSubmit(id,fileName);}},_addToList:function(id,fileName){var item=qq.toElement(this._options.fileTemplate);item.qqFileId=id;var fileElement=this._find(item,'file');qq.setText(fileElement,fileName);this._find(item,'size').style.display='none';var nameElement=this._find(item,'nameInput');fileName=fileName.toLowerCase();fileName=fileName.replace(/([ !"#$%&\'()+,\/;<=>?@[\]^`{|}~:]+)/g,'_');fileName=fileName.replace(/^_+/,'');nameElement.value=fileName;nameElement.id='mediamanager__upload_item'+id;this._listElement.appendChild(item);}});qq.FileUploaderExtended=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader">'+'<div class="qq-upload-drop-area"><span>'+LANG.media_drop+'</span></div>'+'<div class="qq-upload-button">'+LANG.media_select+'</div>'+'<ul class="qq-upload-list"></ul>'+'<div class="qq-action-container">'+'  <input class="qq-upload-action button" type="submit" value="'+LANG.media_upload_btn+'" id="mediamanager__upload_button">'+'  <label class="qq-overwrite-check"><input type="checkbox" value="1" name="ow" class="dw__ow"> <span>'+LANG.media_overwrt+'</span></label>'+'</div>'+'</div>',fileTemplate:'<li>'+'<span class="qq-upload-file hidden"></span>'+'  <input class="qq-upload-name-input edit" type="text" value="" />'+'  <span class="qq-upload-spinner hidden"></span>'+'  <span class="qq-upload-size"></span>'+'  <a class="qq-upload-cancel" href="#">'+LANG.media_cancel+'</a>'+'  <span class="qq-upload-failed-text error">Failed</span>'+'</li>',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',list:'qq-upload-list',nameInput:'qq-upload-name-input',overwriteInput:'qq-overwrite-check',uploadButton:'qq-upload-action',file:'qq-upload-file',spinner:'qq-upload-spinner',size:'qq-upload-size',cancel:'qq-upload-cancel',success:'qq-upload-success',fail:'qq-upload-fail',failedText:'qq-upload-failed-text'}});qq.extend(this._options,o);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,'button'));this._bindCancelEvent();this._bindUploadEvent();this._setupDragDrop();};qq.extend(qq.FileUploaderExtended.prototype,qq.FileUploader.prototype);qq.extend(qq.FileUploaderExtended.prototype,{_bindUploadEvent:function(){var self=this,list=this._listElement;qq.attach(document.getElementById('mediamanager__upload_button'),'click',function(e){e=e||window.event;var target=e.target||e.srcElement;qq.preventDefault(e);self._handler._options.onUpload();jQuery(".qq-upload-name-input").each(function(i){jQuery(this).attr('disabled','disabled');});});},_onComplete:function(id,fileName,result){this._filesInProgress--;var item=this._getItemByFileId(id);qq.remove(this._find(item,'cancel'));qq.remove(this._find(item,'spinner'));var nameInput=this._find(item,'nameInput');var fileElement=this._find(item,'file');qq.setText(fileElement,nameInput.value);qq.removeClass(fileElement,'hidden');qq.remove(nameInput);jQuery('.qq-upload-button, #mediamanager__upload_button').remove();jQuery('.dw__ow').parent().hide();jQuery('.qq-upload-drop-area').remove();if(result.success){qq.addClass(item,this._classes.success);$link='<a href="'+result.link+'" name="h_:'+result.id+'" class="select">'+nameInput.value+'</a>';jQuery(fileElement).html($link);}else{qq.addClass(item,this._classes.fail);var fail=this._find(item,'failedText');if(result.error)qq.setText(fail,result.error);}if(document.getElementById('media__content')&&!document.getElementById('mediamanager__done_form')){var action=document.location.href;var i=action.indexOf('?');if(i)action=action.substr(0,i);var button='<form method="post" action="'+action+'" id="mediamanager__done_form"><div>';button+='<input type="hidden" value="'+result.ns+'" name="ns">';button+='<input class="button" type="submit" value="'+LANG.media_done_btn+'"></div></form>';jQuery('#mediamanager__uploader').append(button);}}});qq.extend(qq.UploadHandlerForm.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._inputs[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.value.replace(/.*(\/|\\)/,"");}else{return null;}}},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._inputs){this.upload(key,params);}},_upload:function(id,params){var input=this._inputs[id];if(!input){throw new Error('file with passed id was not added, or already uploaded or cancelled');}var fileName=this.getName(id);var iframe=this._createIframe(id);var form=this._createForm(iframe,params);form.appendChild(input);var nameInput=qq.toElement('<input name="mediaid" value="'+fileName+'" type="text">');form.appendChild(nameInput);var checked=jQuery('.dw__ow').attr('checked');var owCheckbox=jQuery('.dw__ow').clone();owCheckbox.attr('checked',checked);jQuery(form).append(owCheckbox);var self=this;this._attachLoadEvent(iframe,function(){self.log('iframe loaded');var response=self._getIframeContentJSON(iframe);self._options.onComplete(id,fileName,response);self._dequeue(id);delete self._inputs[id];setTimeout(function(){qq.remove(iframe);},1);});form.submit();qq.remove(form);return id;}});qq.extend(qq.UploadHandlerXhr.prototype,{uploadAll:function(params){this._uploadAll(params);},getName:function(id){var file=this._files[id];var name=document.getElementById('mediamanager__upload_item'+id);if(name!=null){return name.value;}else{if(file!=null){return file.fileName!=null?file.fileName:file.name;}else{return null;}}},getSize:function(id){var file=this._files[id];if(file==null)return null;return file.fileSize!=null?file.fileSize:file.size;},_upload:function(id,params){var file=this._files[id],name=this.getName(id),size=this.getSize(id);if(name==null||size==null)return;this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params['qqfile']=name;params['ow']=jQuery('.dw__ow').attr('checked');var queryString=qq.obj2url(params,this._options.action);xhr.open("POST",queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.send(file);},_uploadAll:function(params){jQuery(".qq-upload-spinner").each(function(i){jQuery(this).removeClass('hidden');});for(key in this._files){this.upload(key,params);}}});function hasFlash(version){var ver=0;try{if(navigator.plugins!=null&&navigator.plugins.length>0){ver=navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];}else{ver=(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").split(' ')[1].split(',')[0];}}catch(e){}return ver>=version;}function substr_replace(str,replace,start,length){var a2,b1;a2=(start<0?str.length:0)+start;if(typeof length==='undefined'){length=str.length-a2;}else if(length<0&&start<0&&length<=start){length=0;}b1=(length<0?str.length:a2)+length;return str.substring(0,a2)+replace+str.substring(b1);}function bind(fnc){var Aps=Array.prototype.slice,static_args=Aps.call(arguments,1);return function(){return fnc.apply(this,static_args.concat(Aps.call(arguments,0)));};}var timer={_cur_id:0,_handlers:{},execDispatch:function(id){timer._handlers[id]();},add:function(func,timeout){var id=++timer._cur_id;timer._handlers[id]=func;return window.setTimeout('timer.execDispatch('+id+')',timeout);}};function Delay(func,timeout){this.func=func;if(timeout){this.timeout=timeout;}}Delay.prototype={func:null,timeout:500,delTimer:function(){if(this.timer!==null){window.clearTimeout(this.timer);this.timer=null;}},start:function(){DEPRECATED('don\'t use the Delay object, use window.timeout with a callback instead');this.delTimer();var _this=this;this.timer=timer.add(function(){_this.exec.call(_this);},this.timeout);this._data={_this:arguments[0],_params:Array.prototype.slice.call(arguments,2)};},exec:function(){this.delTimer();this.func.call(this._data._this,this._data._params);}};var DokuCookie={data:{},name:'DOKU_PREFS',setValue:function(key,val){var text=[],_this=this;this.init();this.data[key]=val;jQuery.each(_this.data,function(key,val){if(_this.data.hasOwnProperty(key)){text.push(encodeURIComponent(key)+'#'+encodeURIComponent(val));}});jQuery.cookie(this.name,text.join('#'),{expires:365,path:DOKU_BASE});},getValue:function(key){this.init();return this.data[key];},init:function(){var text,parts,i;if(!jQuery.isEmptyObject(this.data)){return;}text=jQuery.cookie(this.name);if(text){parts=text.split('#');for(i=0;i<parts.length;i+=2){this.data[decodeURIComponent(parts[i])]=decodeURIComponent(parts[i+1]);}}}};if('function'===typeof jQuery&&'function'===typeof jQuery.noConflict){jQuery.noConflict();}var clientPC=navigator.userAgent.toLowerCase();var is_macos=navigator.appVersion.indexOf('Mac')!=-1;var is_gecko=((clientPC.indexOf('gecko')!=-1)&&(clientPC.indexOf('spoofer')==-1)&&(clientPC.indexOf('khtml')==-1)&&(clientPC.indexOf('netscape/7.0')==-1));var is_safari=((clientPC.indexOf('applewebkit')!=-1)&&(clientPC.indexOf('spoofer')==-1));var is_khtml=(navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled));if(clientPC.indexOf('opera')!=-1){var is_opera=true;var is_opera_preseven=(window.opera&&!document.childNodes);var is_opera_seven=(window.opera&&document.childNodes);}function showLoadBar(){document.write('<img src="'+DOKU_BASE+'lib/images/loading.gif" '+'width="150" height="12" alt="..." />');}function hideLoadBar(id){jQuery('#'+id).hide();}function closePopups(){jQuery('div.JSpopup').hide();}jQuery(function(){jQuery(document).click(closePopups);});function sack(file){this.AjaxFailedAlert="Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n";this.requestFile=file;this.method="POST";this.URLString="";this.encodeURIString=true;this.execute=false;this.asynchronous=true;this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.afterCompletion=function(){};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(err){this.xmlhttp=null;}}if(!this.xmlhttp&&typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest();}if(!this.xmlhttp){this.failed=true;}};this.setVar=function(name,value){if(this.URLString.length<3){this.URLString=name+"="+value;}else{this.URLString+="&"+name+"="+value;}};this.encVar=function(name,value){var varString=encodeURIComponent(name)+"="+encodeURIComponent(value);return varString;};this.encodeURLString=function(string){varArray=string.split('&');for(i=0;i<varArray.length;i++){urlVars=varArray[i].split('=');if(urlVars[0].indexOf('amp;')!=-1){urlVars[0]=urlVars[0].substring(4);}varArray[i]=this.encVar(urlVars[0],urlVars[1]);}return varArray.join('&');};this.runResponse=function(){eval(this.response);};this.runAJAX=function(urlstring){DEPRECATED('Please use jQuery.post() or any other of jQuery\'s AJAX methods.');this.responseStatus=new Array(2);if(this.failed&&this.AjaxFailedAlert)

internet explore 9 / 10 doesn't display the js option

i use the following syntax to use the indexmenu:
{{indexmenu>:#1 | js}}

in firefox the display menu shows correctly in js mode, but in internet explorer it displays only in the "normal" mode.

i have tested that in different wikis without plugins enabled and the js option never worked in internet explorer.

i am using the latest indexmenu devel version and weatherwax

Firefox and Opera

Hello,

While highlighting the current page in the index menu (bold) works in Opera, but not in Firefox. Does anyone have an idea what you could do?

Ralph

indexmenu id conflict appearing on simple wiki page

I'm experiencing a problem using the JS index menu.

I isolated the problem so far that I've got a rather simple wiki page:

====== Section A ======
 {{indexmenu>technik:*#1| js tsort}} 
===== Section B =====

Whenever I hover over the Edit-Button beneath Section A, the page content changes to a blank page showing only the index menu tree, preceeded by the text "Indexmenu id conflict".

I read the entry of the FAQ but this doesn't help me because I don't use any IDs nor do I have this issue regarding a sidebar.

The red triangle of Content Preview in the tree is not shown in some cases

When the most lengthy string in the tree ends at the border of the panel, then there is no place for the red triangle to preview the page content. And, on the other hand, the scrolling arrow doesn't appear, because it thinks the width is enough.

indexmenu_bug_5

I think that the width of that red arrow should be added to the tree width when determining final tree width. Otherwise also it's very not convinient when the sidebar gets resized according to the tree width - every time the lengthest pagename can't be previewed for content.

Can't configure indexmenu

I have tried a whole lot of configurations I can't seem to set any options on index menu at all. I have turned off all the other plugins (besides the core ones I didn't download). But nothing I seem to set the plugin»index menu»page_index setting to makes any different.

I can set it to "blargh" and the index menu still comes up.

I delete the plugin and then redownloaded it and I didn't change anything.

How do I go about debugging this so that I can set options, etc. Right now the menu is always completely expanded all the time.

I have tried

{{indexmenu>:#1|js navbar}}

and

{{indexmenu>..|js navbar nocookie id#random}}

and several other dozen variations. I think somehow the options are being set somewhere / cached. I have however been clearing the cache after every time I test via:

touch /home/admin/rubystack-bitnami/apache2/var/cache/mod_pagespeed/cache.flush
rm -r /home/admin/rubystack-bitnami/apps/dokuwiki/data/cache/*

Yet that does't make any difference either. Any hints??

Thanks,
Jason

Index not created

Hello,

I'm having a problem with contextmenu. The problem is that index is not created, not that it is not show, but it is not created in the page file. This what I do:

  • Edit the page I want
  • Insert the menu (with the assistant or writing it directly).
  • In the edit text I can see the text inserted like:
{{indexmenu>:sistemas:puppet#2|js}}
  • Then I save the document.
  • In the page the index is not shown.
  • Then I edit the page again, in the page source, the indexmenu entry is not there
  • If I go to the server and cat the txt of the file, the indexmenu entry is not there.
  • I have also tried to edit a page with an index created, and then save it without any change, and the same problem happens.

I have tried with firefox (v27 in ubuntu 12.04), chrome (v33 and previous in ubuntu 12.04) and IE8 (in XP) with the same problem. Other people in this same server (even the same page and navigator) doesn't have this problem.

Any idea?

Option to disable namespace grouping

Now with "nsort" option namespaces are grouped together and displayed before pages. Please add option to disable this grouping in order to show namespaces among pages.

indexmenu does not work - js problem with vector template?

Hey,

i installed my dokuwiki Weatherwax RC1 with the vector template. After that i installed your indexmenu plugin but it didn´t work fine...
Here is a screenshot:
indexmenu js_error

This is the syntax:
{{indexmenu>..|js#bj-tango.png navbar}}

With the default templates i didn´t work also...

Indexmenu Version: 2009-08-29

Can you help me?

Thanks a lot.
Henry (Germany)

JS Menu + error: indexmenu_getid is not defined

Hi. I have new instalation Dokuwiki (Release 2013-12-08 "Binky"
). I install plugin "indexmenu" from https://www.dokuwiki.org/plugin:indexmenu

Then I include indexmenu into page

{{indexmenu>namespace#2|js}}

I see menu tree, but I can't get context menu with right click and create "new page". In firefox console I see erros:

SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead js.php:2
SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead js.php:23
Error: http://site.com/lib/exe/js.php?tseed=919a4424a0a0004dd79f9bc996689055 is being assigned a //# sourceMappingURL, but already has one
ReferenceError: indexmenu_getid is not defined js.php:24
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. js.php:4

Please, tell me, what is the matter?

Thank you and sorry my English!

moved dokuwiki install - images broken

I recently moved my dokuwiki install to a new folder on my server and everything works except the index menu images. They are all showing the old path. Is this cached somwhere? Is there a hidden config option for this?

Indexmenu tree items add "%3" to the start of names

Fresh last version installed on (micro)Apache. Bug is:

In the tree view, when I click any page name there, it gives URL with %3 prepended, such as:

http://localhost:8800/%3playground%3Bplayground

(However in the Content Preview of pagenames in the tree there are correct links, without these %3).

I have set rewrite with .htaccess

  • which is usual uncommented .htaccess.dist from DokuWiki distrib (see below).
  • I also had to add to my server/conf/httpd.conf:
<directory "./../dokuwiki">
AllowOverride All
</directory>
  • Wiki config:
useslash = false
fnencode = safe

(but when I switched to "fnencode = url", the bug was the same).

By the way, namespace separator appears to be ";" not ":", I don't know why.

Before this bug appeared, I set "start" page first header to non-latin characters:
==== Тест ​====

But when I changed them to latin characters:
==== Test ​====

and cleared the cache, the bug persisted, so I don't know if it's related.

== Here is my .htaccess:

# Enable this to restrict editing to logged in users only

# You should disable Indexes and MultiViews either here or in the
# global config. Symlinks maybe needed for URL rewriting.
Options -Indexes -MultiViews +FollowSymLinks

# make sure nobody gets the htaccess, README, COPYING or VERSION files
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
    Order allow,deny
    Deny from all
</Files>

# Uncomment these rules if you want to have nice URLs using
# $conf['userewrite'] = 1 - not needed for rewrite mode 2
RewriteEngine on

RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

# Not all installations will require the following line.  If you do,
# change "/dokuwiki" to the path to your dokuwiki directory relative
# to your document root.
#RewriteBase /dokuwiki
RewriteBase /

# If you enable DokuWikis XML-RPC interface, you should consider to
# restrict access to it over HTTPS only! Uncomment the following two
# rules if your server setup allows HTTPS.
#RewriteCond %{HTTPS} !=on
#RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

indexmenu_bug_4a

useheading config has no effect (with Weatherwax)

The useheading config option has no effect. In my wiki (Weatherwax RC1) indexmenu always uses headings, no matter what I have set as useheading option (never, ...).

Maybe the solution is arround line 448 in indexmenu.php. It is working if I use

            if($conf['useheading'] == 1 || $conf['useheading'] === 'navigation') {

instead of
if($conf['useheading'] == 1 || $conf['useheading'] == 'navigation') {

addoncontextmenu event via delegate

Bug reported on plugin page:

Even if I disable the context menu with nomenu, it makes right click doing nothing instead of bringing the usual context menu of my browser, how can I do that ?
In indexmenu.js, search for «dTree.prototype.nodeRemove» function. Remove the “oncontextmenu=…” part where it occurs.

about solution:

  • nodeRemove don't exist
  • removing oncontextmenu=.. remove all this event handling, contextmenus are always shown.

In dTree.prototype.node at all parts of a node this event is added. Better use something like delegate, to catch them all, and what is only added for nomenu = false.

Possible to specify a custom title in the indexmenu?

Hello,

I've been reading the documentation and examples back and forth trying to figure out if it's possible to specify a custom/"fake" title to be displayed in the indexmenu.

Scenario:

We need a page that is actually a skeleton (template) to be copied and pasted to a new page. Currently this page holds the title (h1) "Documentation for X".

Since we've enabed the "useheading" option the indexmenu (navbar on the left) displays the same title. If possible, I would like indexmenu to use the title "Documentation template" instead.

Basically, this would be a quirk for this particular page only. All other pages should continue to "useheading" ;).

Is this possible with indexmenu or any other plugins/dokuwiki settings?

Thanks a lot for your efforts with this plugin!

Thomas

Can't reach the sub menu

I can't reach the menu because there is a big space from the first menu to the sub menu. I need to create a childpage, is that possible some other way?

Se the screenshot, the arrow is where the space is, and when the mouse pointer is in that space the sub menu dissapears.

indexmenu_menubug

Deleted, malformed page still shows up in indexmenu

Hi,

I have kind of a weird problem: I restructured a wiki and splitted up one huge page in seperate pages. These pages were uploaded to a namespace and one page accidently had an apostroph ' in its filename. I then deleted the page and recreated it without apostroph. It showed up in indexmenu like this:
bildschirmfoto 2014-01-17 um 19 09 11
It won't show up with the right name, it won't go away if I delete the file from the server. If I click on it the wiki says: "Page does not exist" but it has a history tab.
Whats wrong here? I deactivated and reactivated the indexmenu plugin, did a &purge=truebut it is still there despite the corresponding file was deleted and is not showing up in the dokuwiki namespace index.
Thanks in advance!

contextmenu - suggestion: translation support

Support for translations within the contextmenu would be nice.
It is possible to add an contextmenu.local.js, however, if anything changes it may happen you overwrite the wrong fields inside the array.

e.g.:
lang['en']['page'] = 'page';
lang['en']['revisions'] = 'Revisions';
lang['de']['page'] = 'Seite';
lang['de']['revisions'] = 'Revisionen';

An alternative may be a commented line inside the contextmenu.local.js dummy, which loops through all items, enabling a string replace. For example, the user may write: replace "page" with "Seite"

Hide a namespace

I am using the {{indexmenu>.:#2| }}

I would like to hide,

playground
wiki
dokuwiki
syntax
welcome
sidebar

I have read the help 100 time cant figure it out :(

thank you

Contextmenu disapears on Mouseup /w wrong Position

Hi,
since i updated to the last version, the context menu stays open only when I hold down the right mouse button. After releasing the mouse button, the menu disappears. And it opens slightly shifted to the right/down.

http://load.my-azur.de/f/o/2013-07-03_13-52-29.png

Tested with two DW installations in Vector theme and my own theme with Firefox. In DW Default Themes it works. In Chrome the menu stays open but is also shifted.

Testing: http://my-azur.de/brain/pub:testnavi

non-English let not remember the current tree state

When page name selected contain non-english character it can't remember current tree state, but in the same sub-tree when only english character is used in page name it remember correctly! Any idea?

And here are my examples :

diary
diary:2013.10:2013.10.21_-_monday   (OK ✔)
diary:2013.10:2013.10.21_-_星期一   (Wrong ✘)
diary:2013.10:2013.10.21_-_월요일   (Wrong ✘)

Was reported at:
https://www.dokuwiki.org/plugin:indexmenu#js_does_not_remember_its_previous_state

max# conflicts with sort options

using max# option combined with nsort, tsort or msort the menu will be sorted by filename and wiull ignore all the sort options up to the the level specified as first parameter

in this example:

{{indexmenu>.#1 | js max#1#2 navbar nsort tsort}}

the first level of the menu will be sorted by filename and not by page title; the following levels will be correctly sorted by page title

namespaces don't hide if further sub-namespaces exist

Hi,
i have an ACL controlled dokuwiki and i use the latest version of indexmenu.

My problem is, that if you are NOT logged in, all namespaces containing further subnamespaces are still shown on the Menu. All other namespaces are hide.

So what can i do to hide the namespaces containing subnamespaces as well for not logged in User?

TypeError: JSINFO is null

Hi,

if i enable the indexmenu plugin and open the detail page of an image, i get the error

"TypeError: JSINFO is null"

Because of this, no other JavaScript is executed. This only happens on the detail page, not on a "normal" wikipage

JS index loads very slowly -> replace image loading

A large menu loads very slowly because there are so many images. While it's loading, it's too tall, and then it collapses down. Two things can be done to fix this:

  1. Specify width and height of all IMG tags. For example <img width="8" height="8" src="icon_plus.gif">

  2. Use CSS backgrounds instead of IMG tags. This will allow DokuWiki (Anguna or higher) to convert the images to inline CSS, which will make it immensely faster. For example:

CSS:

.indexmenu_icon_plus {
  display:inline-block;
  width:8px;
  height:8px;
  background-image:url(icon_plus.gif);
}

Indexmenu only expanded if page has a TOC

There seems to be a problem with indexmenu, that the menu is not expanded if the current page has no TOC (table of contents).
The current side is highlighted (yellow) correctly, but the namespace is not expanded. if you remove the NOTOC, the namespace is expanded.
The same occurs if you remove the headings, which means, the ~~NOTOC~~ just makes it easier to fire this bug.

Example: using vector template, with following inside page navigation (yes, the two dots are no typo. We want to show the "parent based on context" to get an "uplink" inside the navigation):
{{indexmenu>..:#1|js#thread navbar context tsort}}

testpage inside any test namespace:
====== Dummy ======
==== test 1 ====
==== test 2 ====
==== test 3 ====
NOTOC

not able to customize contextmenu

Hi,

I have a problem trying to get the context menu showing like in the indexmenu 2009 version (I just upgraded to the 2013-04 version).

If someone is connected (not the admin), " contextmenu -> 'New page here' " is not present on a namespace. 'New page here' appears only with pages or headpages. I would like to make it appears on namespaces too.

This behaviour correspond to indexmenu/scripts/contextmenu.js code. So I tried to modify it but the contextmenu do not change at all (I tried to restart apache or flush the cache of firefox: same).

Example of simple modification that does not modify the contextmenu :

--- contextmenu.js.wheezy-ori   2013-09-18 16:03:15.000000000 +0200
+++ contextmenu.js      2013-09-24 16:17:48.000000000 +0200

@@ -36,7 +36,7 @@
 indexmenu_contextmenu['all']['ns'] = {
     'view': [
         ['<span class="indexmenu_titlemenu"><b>Namespace</b></span>'],
-        ['Search ...', '"javascript: indexmenu_srchpage(\'"+index.config.urlbase+"\',\'"+index.config.sepchar+"\',\'"+node.isdir+"\',\'"+node.dokuid+"\');"', 'Search for pages within this namespace']
+        ['Search modif ...', '"javascript: indexmenu_srchpage(\'"+index.config.urlbase+"\',\'"+index.config.sepchar+"\',\'"+node.isdir+"\',\'"+node.dokuid+"\');"', 'Search for pages within this namespace']
     ]
 };

Perhaps I missed an important point. I'm not well aware of how javascript works.

How to disable link to headpage in the code

The question is:
step1.Headpage method checkboxes 「inside」→checked
step2.Headpage method checkboxes 「same」→unchecked
step3.Headpage method checkboxes 「start」→unchecked
step4.textfield→I don't give any pagenames in textfield.
step5.hide_headpage →checked

Namespage:Lns(:Lns)
headpage:Lns(:Lns:Lns)

When I click here:
2013-6-16 17-23-29
It will directly link to :Lns:Lns.
I hope when I click the folder of Lns,it will not link to anything like this:
2013-6-16 17-26-08
I know if I uncheck the 「inside」checkboxes of headpage method ,it will not link to anything when I click the folder of Lns,but I don't want to uncheck the 「inside」checkbox.Can you teach me how to change the code so that I can do what I want?It will so nice if you can help me.Thank you!

Indexmenu id conflict

I create fresh DokuWiki install (DokuWiki on a Stick), add indexmenu and create "sidebar" file:
{{indexmenu>:|js navbar nocookie id#random}}

Then going to sidebar file gives
Indexmenu id conflict
indexmenu_bug_3a

article title

Hi,
Sorry for my broken English.
I would like the article title has title level 1 of article or the first sentence of article instead of the name of page.
It's possible?
Thanks you.

Namespaces are displayed

This is the menu of a user to whom I have given the following rights:

  • Read permissions for the page "Intern:start", so he did approach comes to the Index menu in the sidebar,
  • All rights for the "Neue Verwaltung".
    menue1

There are many namespaces under "Intern", but only the two namespaces "events" and "events2" are displayed. I found out why.

The namespace is always displayed if another namespace is in him and in this still a namespace. So in the case

ns1
- ns2
-- ns3

ns1 is displayed.

If you still creates another namespace, then the top two are shown, ie when:

ns1
- ns2
-- ns3
--- ns4

you see ns1 and ns2. Is this a bug?

Greeting

Ralph

No 'selected node' or 'hover' highlight when rendering indexmenu in a sidebar

When I create a "/sidebar" page with this indexmenu code in it

{{indexmenu>..#1|js navbar nocookie}}

... then the styles don't apply correctly. I am using the default theme for the May 2014 DokuWiki release (2014-05-05 "Ponder Stibbons")

Expected result. (This is what I see when I run indexmenu on a normal page)

  • The current page (from the browser URL bar) is highlighted with yellow background.
  • When I hover a page, it is highlighted with a blue/grey background.
  • Page names are green.

What I get when I run it in a sidebar:

  • Current page and hovered page name are not highlighted.
  • Page names are blue.

In a few minutes I will submit a pull request that will resolve this issue.

js option is displaying page titles instead of page ids, even for useheading = never

Hello, I am using Dokuwiki 2012-10-13 "Adora Belle" and Indexmenu Plugin 2013-02-25.

I want to use indexmenu to generate pagetree showing page ids, so my dokuwiki parameter useheading was set to never.

When I use {{indexmenu>.#1}}, it displayes page ids as expected.

However, when I use the javascript option {{indexmenu>.#1|js}}, it is showing page titles instead of page ids.

Are you able to reproduce the problem?

indexmenu does not work - can't find out why

Hi!

I upgraded my dokuwiki installation to Weatherwax RC1.
Also updated the indexmenu plugin to the devel version 2013-02-25.

But my indexmenu simply does not show at all.
Before updating it worked fine (except the menu did not stayed open when jumping to a certain page).

You can see the it running: http://www.noxsystems.com/noxwiki/doku.php

Any help would be highly appreciated!

Thanks a lot.
Sven

no js menu after wiki-move (Uncaught TypeError: Object #<dTree> has no method 'add')

Hi,

i moved my dokuwiki installation from one server to another and now i have no js-menu anymore.
I cleared the cache and even reinstalled the plugin but i still only get the 'normal' non-js menu.

Errors in the browser-console:

Uncaught TypeError: Object #<dTree> has no method 'add' start?do=edit
Uncaught ReferenceError: addEvent is not defined js.php

Any ideas?

Indexmenu wizard not working

In page source editor when using indexmenu wizard in toolbar, It does nothing when I click on Insert indexmenu button.

Firebug gives me following error : TypeError: selection.obj is undefined

Dokuwiki version : 2014-05-05 "Ponder Stibbons"
Indexmenu plugin version : 2013-04-24 Version 5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.