Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //original: http://pastebin.com/Wy81h3Mm
- //discussion here: http://wordpress.org/support/topic/plugin-wp-dtree-open-to-selection?replies=11#post-2604841
- wpdTree.prototype.openTo = function(nId, bSelect, bFirst){
- for (var n=0; n<this.adtNodes.length; n++){
- if(this.adtNodes[n].id == nId){
- nId=n;
- var cn=this.adtNodes[nId];
- if(cn.pid==this.root.id || !cn._p) return;
- cn._io = true;
- cn._is = bSelect;
- if(this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
- if(this.completed && bSelect) this.s(cn._ai);
- else if(bSelect) this._sn=cn._ai;
- this.openTo(cn._p._ai, false, true);
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement