7eb17a91c9
These files have no route in mvc, so only cause 404 errors in browser dev tools.
1 line
42 KiB
JavaScript
1 line
42 KiB
JavaScript
function _log(n){if(_canLog){var t=Array.prototype.slice.apply(arguments,[1]),i=new Date,r=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();t[0]=r+" - "+t[0];try{switch(n){case"info":window.console.info.apply(window.console,t);break;case"warn":window.console.warn.apply(window.console,t);break;default:window.console.log.apply(window.console,t)}}catch(u){window.console||(_canLog=!1)}}}function logMsg(){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}var _canLog=!0,getDynaTreePersistData=null,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;(function($){function f(){}function o(n){var t=n.options.dnd||null;t&&(t.onDragStart||t.onDrop)&&e();t&&t.onDragStart&&n.$tree.draggable({addClasses:!1,appendTo:"body",containment:!1,delay:0,distance:4,revert:!1,scroll:!0,scrollSpeed:7,scrollSensitivity:10,connectToDynatree:!0,helper:function(n){var t=$.ui.dynatree.getNode(n.target);return t?t.tree._onDragEvent("helper",t,null,n,null,null):"<div><\/div>"},start:function(n,t){var i=t.helper.data("dtSourceNode");return!!i},_last:null});t&&t.onDrop&&n.$tree.droppable({addClasses:!1,tolerance:"intersect",greedy:!1,_last:null})}var r={create:function(){return function(){this.initialize.apply(this,arguments)}}},t=r.create(),n,i,u,e;t.prototype={initialize:function(n,t,i){this.parent=n;this.tree=t;typeof i=="string"&&(i={title:i});i.key===undefined&&(i.key="_"+t._nodeCount++);this.data=$.extend({},$.ui.dynatree.nodedatadefaults,i);this.li=null;this.span=null;this.ul=null;this.childList=null;this._isLoading=!1;this.hasSubSel=!1;this.bExpanded=!1;this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(n,t){var i=$.extend({},this.data),r,u;if(i.activate=this.tree.activeNode===this,i.focus=this.tree.focusNode===this,i.expand=this.bExpanded,i.select=this.bSelected,t&&t(i),n&&this.childList)for(i.children=[],r=0,u=this.childList.length;r<u;r++)i.children.push(this.childList[r].toDict(!0,t));else delete i.children;return i},fromDict:function(n){var t=n.children;if(t===undefined){this.data=$.extend(this.data,n);this.render();return}n=$.extend({},n);n.children=undefined;this.data=$.extend(this.data,n);this.removeChildren();this.addChild(t)},_getInnerHtml:function(){var e=this.tree,t=e.options,r=e.cache,s=this.getLevel(),n=this.data,i="",u,o,h;return s<t.minExpandLevel?s>1&&(i+=r.tagConnector):i+=this.hasChildren()!==!1?r.tagExpander:r.tagConnector,t.checkbox&&n.hideCheckbox!==!0&&!n.isStatusNode&&(i+=r.tagCheckbox),n.icon?i+="<img src='"+t.imagePath+n.icon+"' alt='' />":n.icon===!1?f():i+=r.tagNodeIcon,u="",t.onCustomRender&&(u=t.onCustomRender.call(e,this)||""),u||(o=n.tooltip?' title="'+n.tooltip.replace(/\"/g,""")+'"':"",h=n.href||"#",u=t.noLink||n.noLink?'<span style="display:inline-block;" class="'+t.classNames.title+'"'+o+">"+n.title+"<\/span>":'<a href="'+h+'" class="'+t.classNames.title+'"'+o+">"+n.title+"<\/a>"),i+u},_fixOrder:function(){var u=this.childList,t,n,f,i,r;if(u&&this.ul)for(t=this.ul.firstChild,n=0,f=u.length-1;n<f;n++)i=u[n],r=t.dtnode,i!==r?(this.tree.logDebug("_fixOrder: mismatch at index "+n+": "+i+" != "+r),this.ul.insertBefore(i.li,r.li)):t=t.nextSibling},render:function(n,t){var o=this.tree,f=this.parent,e=this.data,u=o.options,i=u.classNames,h=this.isLastSibling(),c=!1,r,s,l,a,v,y;if(f||this.ul?f&&(this.li||(c=!0,this.li=document.createElement("li"),this.li.dtnode=this,e.key&&u.generateIds&&(this.li.id=u.idPrefix+e.key),this.span=document.createElement("span"),this.span.className=i.title,this.li.appendChild(this.span),f.ul||(f.ul=document.createElement("ul"),f.ul.style.display="none",f.li.appendChild(f.ul)),f.ul.appendChild(this.li)),this.span.innerHTML=this._getInnerHtml(),r=[],r.push(i.node),e.isFolder&&r.push(i.folder),this.bExpanded&&r.push(i.expanded),this.hasChildren()!==!1&&r.push(i.hasChildren),e.isLazy&&this.childList===null&&r.push(i.lazy),h&&r.push(i.lastsib),this.bSelected&&r.push(i.selected),this.hasSubSel&&r.push(i.partsel),o.activeNode===this&&r.push(i.active),e.addClass&&r.push(e.addClass),r.push(i.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(e.isLazy&&this.childList===null?"d":"")+(h?"l":"")),r.push(i.combinedIconPrefix+(this.bExpanded?"e":"c")+(e.isFolder?"f":"")),this.span.className=r.join(" "),this.li.className=h?i.lastsib:"",c&&u.onCreate&&u.onCreate.call(o,this,this.span),u.onRender&&u.onRender.call(o,this,this.span)):(this.li=this.span=null,this.ul=document.createElement("ul"),this.ul.className=u.minExpandLevel>1?i.container+" "+i.noConnector:i.container),(this.bExpanded||t===!0)&&this.childList){for(s=0,l=this.childList.length;s<l;s++)this.childList[s].render(!1,t);this._fixOrder()}this.ul&&(a=this.ul.style.display==="none",v=!!this.bExpanded,n&&u.fx&&a===v?(y=u.fx.duration||200,$(this.ul).animate(u.fx,y)):this.ul.style.display=this.bExpanded||!f?"":"none")},getKeyPath:function(n){var t=[];return this.visitParents(function(n){n.parent&&t.unshift(n.data.key)},!n),"/"+t.join(this.tree.options.keyPathSeparator)},getParent:function(){return this.parent},getChildren:function(){return this.hasChildren()===undefined?undefined:this.childList},hasChildren:function(){return this.data.isLazy?this.childList===null||this.childList===undefined?undefined:this.childList.length===0?!1:this.childList.length===1&&this.childList[0].isStatusNode()?undefined:!0:!!this.childList},isFirstSibling:function(){var n=this.parent;return!n||n.childList[0]===this},isLastSibling:function(){var n=this.parent;return!n||n.childList[n.childList.length-1]===this},isLoading:function(){return!!this._isLoading},getPrevSibling:function(){var t,n,i;if(!this.parent)return null;for(t=this.parent.childList,n=1,i=t.length;n<i;n++)if(t[n]===this)return t[n-1];return null},getNextSibling:function(){var t,n,i;if(!this.parent)return null;for(t=this.parent.childList,n=0,i=t.length-1;n<i;n++)if(t[n]===this)return t[n+1];return null},isStatusNode:function(){return this.data.isStatusNode===!0},isChildOf:function(n){return this.parent&&this.parent===n},isDescendantOf:function(n){if(!n)return!1;for(var t=this.parent;t;){if(t===n)return!0;t=t.parent}return!1},countChildren:function(){var i=this.childList,n,t,r,u;if(!i)return 0;for(n=i.length,t=0,r=n;t<r;t++)u=i[t],n+=u.countChildren();return n},sortChildren:function(n,t){var i=this.childList,r,u;if(i){if(n=n||function(n,t){var i=n.data.title.toLowerCase(),r=t.data.title.toLowerCase();return i===r?0:i>r?1:-1},i.sort(n),t)for(r=0,u=i.length;r<u;r++)i[r].childList&&i[r].sortChildren(n,"$norender$");t!=="$norender$"&&this.render()}},_setStatusNode:function(n){var t=this.childList?this.childList[0]:null;if(n)t?(n.isStatusNode=!0,n.key="_statusNode",t.data=n,t.render()):(n.isStatusNode=!0,n.key="_statusNode",t=this.addChild(n));else if(t&&t.isStatusNode()){try{this.ul&&(this.ul.removeChild(t.li),t.li=null)}catch(i){}this.childList.length===1?this.childList=[]:this.childList.shift()}},setLazyNodeStatus:function(n,t){var i=t&&t.tooltip?t.tooltip:null,r=t&&t.info?" ("+t.info+")":"";switch(n){case DTNodeStatus_Ok:this._setStatusNode(null);$(this.span).removeClass(this.tree.options.classNames.nodeLoading);this._isLoading=!1;this.tree.options.autoFocus&&(this===this.tree.tnRoot&&this.childList&&this.childList.length>0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0;$(this.span).addClass(this.tree.options.classNames.nodeLoading);this.parent||this._setStatusNode({title:this.tree.options.strings.loading+r,tooltip:i,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1;this._setStatusNode({title:this.tree.options.strings.loadError+r,tooltip:i,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+n+"'.";}},_parentList:function(n,t){for(var r=[],i=t?this:this.parent;i;)(n||i.parent)&&r.unshift(i),i=i.parent;return r},getLevel:function(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t},_getTypeForOuterNodeEvent:function(n){var r=this.tree.options.classNames,i=n.target,f,e,u,o;if(i.className.indexOf(r.node)<0)return null;for(f=n.pageX-i.offsetLeft,e=n.pageY-i.offsetTop,u=0,o=i.childNodes.length;u<o;u++){var t=i.childNodes[u],s=t.offsetLeft-i.offsetLeft,h=t.offsetTop-i.offsetTop,c=t.clientWidth,l=t.clientHeight;if(f>=s&&f<=s+c&&e>=h&&e<=h+l){if(t.className==r.title)return"title";if(t.className==r.expander)return"expander";if(t.className==r.checkbox)return"checkbox";if(t.className==r.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(n){var t=n&&n.target?n.target.className:"",i=this.tree.options.classNames;return t===i.title?"title":t===i.expander?"expander":t===i.checkbox?"checkbox":t===i.nodeIcon?"icon":t===i.empty||t===i.vline||t===i.connector?"prefix":t.indexOf(i.node)>=0?this._getTypeForOuterNodeEvent(n):null},isVisible:function(){for(var t=this._parentList(!0,!1),n=0,i=t.length;n<i;n++)if(!t[n].bExpanded)return!1;return!0},makeVisible:function(){for(var t=this._parentList(!0,!1),n=0,i=t.length;n<i;n++)t[n]._expand(!0)},focus:function(){this.makeVisible();try{$(this.span).find(">a").focus()}catch(n){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(n,t){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",n,t,this);var i=this.tree.options;if(!this.data.isStatusNode&&(!t||!i.onQueryActivate||i.onQueryActivate.call(this.tree,n,this)!==!1))if(n){if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}i.activeVisible&&this.makeVisible();this.tree.activeNode=this;i.persist&&$.cookie(i.cookieId+"-active",this.data.key,i.cookie);this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(i.classNames.active);t&&i.onActivate&&i.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(i.onQueryActivate&&i.onQueryActivate.call(this.tree,!1,this)===!1)return;$(this.span).removeClass(i.classNames.active);i.persist&&$.cookie(i.cookieId+"-active","",i.cookie);this.tree.persistence.activeKey=null;this.tree.activeNode=null;t&&i.onDeactivate&&i.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var t=!0,n=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:t=!1;n=!0;break;case 3:t=n=!0}this.parent===null&&(n=!1);n&&(this.toggleExpand(),this.focus());t&&this.activate()},_setSubSel:function(n){n?(this.hasSubSel=!0,$(this.span).addClass(this.tree.options.classNames.partsel)):(this.hasSubSel=!1,$(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var n,o,i;if(!this.hasChildren())return n=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),n;for(var u=this.childList,f=!0,e=!0,t=0,r=u.length;t<r;t++)o=u[t],i=o._updatePartSelectionState(),i!==!1&&(e=!1),i!==!0&&(f=!1);return n=f?!0:e?!1:undefined,this._setSubSel(n===undefined),this.bSelected=n===!0,n},_fixSelectionState:function(){var n,t,i,u,r,f;if(this.bSelected)for(this.visit(function(n){n.parent._setSubSel(!0);n.data.unselectable||n._select(!0,!1,!1)}),n=this.parent;n;){for(n._setSubSel(!0),u=!0,t=0,i=n.childList.length;t<i;t++)if(r=n.childList[t],!r.bSelected&&!r.data.isStatusNode&&!r.data.unselectable){u=!1;break}u&&n._select(!0,!1,!1);n=n.parent}else for(this._setSubSel(!1),this.visit(function(n){n._setSubSel(!1);n._select(!1,!1,!1)}),n=this.parent;n;){for(n._select(!1,!1,!1),f=!1,t=0,i=n.childList.length;t<i;t++)if(n.childList[t].bSelected||n.childList[t].hasSubSel){f=!0;break}n._setSubSel(f);n=n.parent}},_select:function(n,t,i){var r=this.tree.options;this.data.isStatusNode||this.bSelected!==n&&(t&&r.onQuerySelect&&r.onQuerySelect.call(this.tree,n,this)===!1||(r.selectMode==1&&n&&this.tree.visit(function(n){if(n.bSelected)return n._select(!1,!1,!1),!1}),this.bSelected=n,n?(r.persist&&this.tree.persistence.addSelect(this.data.key),$(this.span).addClass(r.classNames.selected),i&&r.selectMode===3&&this._fixSelectionState(),t&&r.onSelect&&r.onSelect.call(this.tree,!0,this)):(r.persist&&this.tree.persistence.clearSelect(this.data.key),$(this.span).removeClass(r.classNames.selected),i&&r.selectMode===3&&this._fixSelectionState(),t&&r.onSelect&&r.onSelect.call(this.tree,!1,this))))},select:function(n){return this.data.unselectable?this.bSelected:this._select(n!==!1,!0,!0)},toggleSelect:function(){return this.select(!this.bSelected)},isSelected:function(){return this.bSelected},isLazy:function(){return!!this.data.isLazy},_loadContent:function(){try{var t=this.tree.options;this.tree.logDebug("_loadContent: start - %o",this);this.setLazyNodeStatus(DTNodeStatus_Loading);!0===t.onLazyRead.call(this.tree,this)&&(this.setLazyNodeStatus(DTNodeStatus_Ok),this.tree.logDebug("_loadContent: succeeded - %o",this))}catch(n){this.tree.logWarning("_loadContent: failed - %o",n);this.setLazyNodeStatus(DTNodeStatus_Error,{tooltip:""+n})}},_expand:function(n,t){var i,f,u,r,e;if(this.bExpanded===n){this.tree.logDebug("dtnode._expand(%o) IGNORED - %o",n,this);return}if(this.tree.logDebug("dtnode._expand(%o) - %o",n,this),i=this.tree.options,!n&&this.getLevel()<i.minExpandLevel){this.tree.logDebug("dtnode._expand(%o) prevented collapse - %o",n,this);return}if(!i.onQueryExpand||i.onQueryExpand.call(this.tree,n,this)!==!1){if(this.bExpanded=n,i.persist&&(n?this.tree.persistence.addExpand(this.data.key):this.tree.persistence.clearExpand(this.data.key)),f=!(this.data.isLazy&&this.childList===null)&&!this._isLoading&&!t,this.render(f),this.bExpanded&&this.parent&&i.autoCollapse)for(u=this._parentList(!1,!0),r=0,e=u.length;r<e;r++)u[r].collapseSiblings();if(i.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()&&this.tree.activeNode.deactivate(),n&&this.data.isLazy&&this.childList===null&&!this._isLoading){this._loadContent();return}i.onExpand&&i.onExpand.call(this.tree,n,this)}},isExpanded:function(){return this.bExpanded},expand:function(n){if(n=n!==!1,this.childList||this.data.isLazy||!n){if(this.parent===null&&!n)return}else return;this._expand(n)},scheduleAction:function(n,t){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.logDebug("clearTimeout(%o)",this.tree.timer));var i=this;switch(n){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){i.tree.logDebug("setTimeout: trigger expand");i.expand(!0)},t);break;case"activate":this.tree.timer=setTimeout(function(){i.tree.logDebug("setTimeout: trigger activate");i.activate()},t);break;default:throw"Invalid mode "+n;}this.tree.logDebug("setTimeout(%s, %s): %s",n,t,this.tree.timer)},toggleExpand:function(){this.expand(!this.bExpanded)},collapseSiblings:function(){var t,n,i;if(this.parent!==null)for(t=this.parent.childList,n=0,i=t.length;n<i;n++)t[n]!==this&&t[n].bExpanded&&t[n]._expand(!1)},_onClick:function(n){var i=this.getEventTargetType(n),t;if(i==="expander")this.toggleExpand(),this.focus();else if(i==="checkbox")this.toggleSelect(),this.focus();else if(this._userActivate(),t=this.span.getElementsByTagName("a"),t[0])$.browser.msie&&parseInt($.browser.version,10)<9||t[0].focus();else return!0;n.preventDefault()},_onDblClick:function(){},_onKeydown:function(n){var u=!0,t,r,i;switch(n.which){case 107:case 187:this.bExpanded||this.toggleExpand();break;case 109:case 189:this.bExpanded&&this.toggleExpand();break;case 32:this._userActivate();break;case 8:this.parent&&this.parent.focus();break;case 37:this.bExpanded?(this.toggleExpand(),this.focus()):this.parent&&this.parent.parent&&this.parent.focus();break;case 39:!this.bExpanded&&(this.childList||this.data.isLazy)?(this.toggleExpand(),this.focus()):this.childList&&this.childList[0].focus();break;case 38:for(t=this.getPrevSibling();t&&t.bExpanded&&t.childList;)t=t.childList[t.childList.length-1];!t&&this.parent&&this.parent.parent&&(t=this.parent);t&&t.focus();break;case 40:if(this.bExpanded&&this.childList)t=this.childList[0];else for(r=this._parentList(!1,!0),i=r.length-1;i>=0;i--)if(t=r[i].getNextSibling(),t)break;t&&t.focus();break;default:u=!1}u&&n.preventDefault()},_onKeypress:function(){},_onFocus:function(n){var t=this.tree.options;n.type=="blur"||n.type=="focusout"?(t.onBlur&&t.onBlur.call(this.tree,this),this.tree.tnFocused&&$(this.tree.tnFocused.span).removeClass(t.classNames.focused),this.tree.tnFocused=null,t.persist&&$.cookie(t.cookieId+"-focus","",t.cookie)):(n.type=="focus"||n.type=="focusin")&&(this.tree.tnFocused&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),$(this.tree.tnFocused.span).removeClass(t.classNames.focused)),this.tree.tnFocused=this,t.onFocus&&t.onFocus.call(this.tree,this),$(this.tree.tnFocused.span).addClass(t.classNames.focused),t.persist&&$.cookie(t.cookieId+"-focus",this.data.key,t.cookie))},visit:function(n,t){var i=!0,r,u;if(t===!0&&(i=n(this),i===!1||i=="skip"))return i;if(this.childList)for(r=0,u=this.childList.length;r<u;r++)if(i=this.childList[r].visit(n,!0),i===!1)break;return i},visitParents:function(n,t){if(t&&n(this)===!1)return!1;for(var i=this.parent;i;){if(n(i)===!1)return!1;i=i.parent}return!0},remove:function(){if(this===this.tree.root)throw"Cannot remove system root";return this.parent.removeChild(this)},removeChild:function(n){var i=this.childList,t,r;if(i.length==1){if(n!==i[0])throw"removeChild: invalid child";return this.removeChildren()}for(n===this.tree.activeNode&&n.deactivate(),this.tree.options.persist&&(n.bSelected&&this.tree.persistence.clearSelect(n.data.key),n.bExpanded&&this.tree.persistence.clearExpand(n.data.key)),n.removeChildren(!0),this.ul.removeChild(n.li),t=0,r=i.length;t<r;t++)if(i[t]===n){this.childList.splice(t,1);break}},removeChildren:function(n,t){var f,r,u,e,i;if(this.tree.logDebug("%s.removeChildren(%o)",this,n),f=this.tree,r=this.childList,r){for(u=0,e=r.length;u<e;u++)i=r[u],i!==f.activeNode||t||i.deactivate(),this.tree.options.persist&&!t&&(i.bSelected&&this.tree.persistence.clearSelect(i.data.key),i.bExpanded&&this.tree.persistence.clearExpand(i.data.key)),i.removeChildren(!0,t),this.ul&&$("li",$(this.ul)).remove();this.childList=null}n||(this._isLoading=!1,this.render())},setTitle:function(n){this.fromDict({title:n})},reload:function(){throw"Use reloadChildren() instead";},reloadChildren:function(n){if(this.parent===null)throw"Use tree.reload() instead";else if(!this.data.isLazy)throw"node.reloadChildren() requires lazy nodes.";if(n){var t=this,i="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key;this.tree.$tree.bind(i,function(r,u,f){if(t.tree.$tree.unbind(i),t.tree.logDebug("loaded %o, %o, %o",r,u,f),u!==t)throw"got invalid load event";n.call(t.tree,u,f)})}this.removeChildren();this._loadContent()},_loadKeyPath:function(n,t){var i=this.tree,u,f,e,o,r,s;if(i.logDebug("%s._loadKeyPath(%s)",this,n),n==="")throw"Key path must not be empty";if(u=n.split(i.options.keyPathSeparator),u[0]==="")throw"Key path must be relative (don't start with '/')";if(f=u.shift(),this.childList)for(e=0,o=this.childList.length;e<o;e++)if(r=this.childList[e],r.data.key===f){u.length===0?t.call(i,r,"ok"):r.data.isLazy&&(r.childList===null||r.childList===undefined)?(i.logDebug("%s._loadKeyPath(%s) -> reloading %s...",this,n,r),s=this,r.reloadChildren(function(f,e){e?(i.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",f,n,f),t.call(i,r,"loaded"),f._loadKeyPath(u.join(i.options.keyPathSeparator),t)):(i.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",s,n),t.call(i,r,"error"))})):(t.call(i,r,"loaded"),r._loadKeyPath(u.join(i.options.keyPathSeparator),t));return}t.call(i,undefined,"notfound",f,u.length===0);i.logWarning("Node not found: "+f);return},resetLazy:function(){if(this.parent===null)throw"Use tree.reload() instead";else if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1);this.removeChildren()},_addChildNode:function(n,t){var r=this.tree,u=r.options,i=r.persistence,e,o,f;if(n.parent=this,this.childList===null?this.childList=[]:t||this.childList.length>0&&$(this.childList[this.childList.length-1].span).removeClass(u.classNames.lastsib),t){if(e=$.inArray(t,this.childList),e<0)throw"<beforeNode> must be a child of <this>";this.childList.splice(e,0,n)}else this.childList.push(n);if(o=r.isInitializing(),u.persist&&i.cookiesFound&&o?(i.activeKey===n.data.key&&(r.activeNode=n),i.focusedKey===n.data.key&&(r.focusNode=n),n.bExpanded=$.inArray(n.data.key,i.expandedKeyList)>=0,n.bSelected=$.inArray(n.data.key,i.selectedKeyList)>=0):(n.data.activate&&(r.activeNode=n,u.persist&&(i.activeKey=n.data.key)),n.data.focus&&(r.focusNode=n,u.persist&&(i.focusedKey=n.data.key)),n.bExpanded=n.data.expand===!0,n.bExpanded&&u.persist&&i.addExpand(n.data.key),n.bSelected=n.data.select===!0,n.bSelected&&u.persist&&i.addSelect(n.data.key)),u.minExpandLevel>=n.getLevel()&&(this.bExpanded=!0),n.bSelected&&u.selectMode==3)for(f=this;f;)f.hasSubSel||f._setSubSel(!0),f=f.parent;return r.bEnableUpdate&&this.render(),n},addChild:function(n,i){var o,r,u,s,f,e;if(typeof n=="string")throw"Invalid data type for "+n;else if(n&&n.length!==0){if(n instanceof t)return this._addChildNode(n,i)}else return;for(n.length||(n=[n]),o=this.tree.enableUpdate(!1),r=null,u=0,s=n.length;u<s;u++)f=n[u],e=this._addChildNode(new t(this,this.tree,f),i),r||(r=e),f.children&&e.addChild(f.children,null);return this.tree.enableUpdate(o),r},append:function(n){return this.tree.logWarning("node.append() is deprecated (use node.addChild() instead)."),this.addChild(n,null)},appendAjax:function(n){var t=this,r;if(this.removeChildren(!1,!0),this.setLazyNodeStatus(DTNodeStatus_Loading),n.debugLazyDelay){r=n.debugLazyDelay;n.debugLazyDelay=0;this.tree.logInfo("appendAjax: waiting for debugLazyDelay "+r);setTimeout(function(){t.appendAjax(n)},r);return}var f=n.success,e=n.error,u="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key,i=$.extend({},this.tree.options.ajaxDefaults,n,{success:function(n,r){var e=t.tree.phase;t.tree.phase="init";i.postProcess?n=i.postProcess.call(this,n,this.dataType):n&&n.hasOwnProperty("d")&&(n=typeof n.d=="string"?$.parseJSON(n.d):n.d);$.isArray(n)&&n.length===0||t.addChild(n,null);t.tree.phase="postInit";f&&f.call(i,t,n,r);t.tree.logDebug("trigger "+u);t.tree.$tree.trigger(u,[t,!0]);t.tree.phase=e;t.setLazyNodeStatus(DTNodeStatus_Ok);$.isArray(n)&&n.length===0&&(t.childList=[],t.render())},error:function(n,r,f){t.tree.logWarning("appendAjax failed:",r,":\n",n,"\n",f);e&&e.call(i,t,n,r,f);t.tree.$tree.trigger(u,[t,!1]);t.setLazyNodeStatus(DTNodeStatus_Error,{info:r,tooltip:""+f})}});$.ajax(i)},move:function(n,t){var r,u,i;if(this!==n){if(!this.parent)throw"Cannot move system root";if((t===undefined||t=="over")&&(t="child"),u=this.parent,i=t==="child"?n:n.parent,i.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(this.parent.childList.length==1)this.parent.childList=this.parent.data.isLazy?[]:null,this.parent.bExpanded=!1;else{if(r=$.inArray(this,this.parent.childList),r<0)throw"Internal error";this.parent.childList.splice(r,1)}if(this.parent.ul&&this.parent.ul.removeChild(this.li),this.parent=i,i.hasChildren())switch(t){case"child":i.childList.push(this);break;case"before":if(r=$.inArray(n,i.childList),r<0)throw"Internal error";i.childList.splice(r,0,this);break;case"after":if(r=$.inArray(n,i.childList),r<0)throw"Internal error";i.childList.splice(r+1,0,this);break;default:throw"Invalid mode "+t;}else i.childList=[this];if(i.ul||(i.ul=document.createElement("ul"),i.ul.style.display="none",i.li.appendChild(i.ul)),this.li&&i.ul.appendChild(this.li),this.tree!==n.tree){this.visit(function(t){t.tree=n.tree},null,!0);throw"Not yet implemented.";}u.isDescendantOf(i)||u.render();i.isDescendantOf(u)||i.render()}},lastentry:undefined};n=r.create();n._getTreePersistData=function(t,i){var r=new n(t,i);return r.read(),r.toDict()};getDynaTreePersistData=n._getTreePersistData;n.prototype={initialize:function(n,t){n===undefined&&(n=$.ui.dynatree.prototype.options.cookieId);t=$.extend({},$.ui.dynatree.prototype.options.cookie,t);this.cookieId=n;this.cookieOpts=t;this.cookiesFound=undefined;this.activeKey=null;this.focusedKey=null;this.expandedKeyList=null;this.selectedKeyList=null},_log:function(){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)},read:function(){this.cookiesFound=!1;var n=$.cookie(this.cookieId+"-active");this.activeKey=n===null?"":n;n!==null&&(this.cookiesFound=!0);n=$.cookie(this.cookieId+"-focus");this.focusedKey=n===null?"":n;n!==null&&(this.cookiesFound=!0);n=$.cookie(this.cookieId+"-expand");this.expandedKeyList=n===null?[]:n.split(",");n!==null&&(this.cookiesFound=!0);n=$.cookie(this.cookieId+"-select");this.selectedKeyList=n===null?[]:n.split(",");n!==null&&(this.cookiesFound=!0)},write:function(){$.cookie(this.cookieId+"-active",this.activeKey===null?"":this.activeKey,this.cookieOpts);$.cookie(this.cookieId+"-focus",this.focusedKey===null?"":this.focusedKey,this.cookieOpts);$.cookie(this.cookieId+"-expand",this.expandedKeyList===null?"":this.expandedKeyList.join(","),this.cookieOpts);$.cookie(this.cookieId+"-select",this.selectedKeyList===null?"":this.selectedKeyList.join(","),this.cookieOpts)},addExpand:function(n){$.inArray(n,this.expandedKeyList)<0&&(this.expandedKeyList.push(n),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},clearExpand:function(n){var t=$.inArray(n,this.expandedKeyList);t>=0&&(this.expandedKeyList.splice(t,1),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(n){$.inArray(n,this.selectedKeyList)<0&&(this.selectedKeyList.push(n),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(n){var t=$.inArray(n,this.selectedKeyList);t>=0&&(this.selectedKeyList.splice(t,1),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return this.cookiesFound===!0},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};i=r.create();i.version="$Version: 1.2.1$";i.prototype={initialize:function(n){this.phase="init";this.$widget=n;this.options=n.options;this.$tree=n.element;this.timer=null;this.divTree=this.$tree.get(0);o(this)},_load:function(i){var c=this.$widget,r=this.options,o=this,f;this.bEnableUpdate=!0;this._nodeCount=1;this.activeNode=null;this.focusNode=null;r.rootVisible!==undefined&&this.logWarning("Option 'rootVisible' is no longer supported.");r.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),r.minExpandLevel=1);r.classNames!==$.ui.dynatree.prototype.options.classNames&&(r.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,r.classNames));r.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults&&(r.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,r.ajaxDefaults));r.dnd!==$.ui.dynatree.prototype.options.dnd&&(r.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,r.dnd));r.imagePath||$("script").each(function(){if(this.src.search(/.*dynatree[^\/]*\.js$/i)>=0)return r.imagePath=this.src.indexOf("/")>=0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/",o.logDebug("Guessing imagePath from '%s': '%s'",this.src,r.imagePath),!1});this.persistence=new n(r.cookieId,r.cookie);r.persist&&($.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read());this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"<span class='"+r.classNames.empty+"'><\/span>",tagVline:"<span class='"+r.classNames.vline+"'><\/span>",tagExpander:"<span class='"+r.classNames.expander+"'><\/span>",tagConnector:"<span class='"+r.classNames.connector+"'><\/span>",tagNodeIcon:"<span class='"+r.classNames.nodeIcon+"'><\/span>",tagCheckbox:"<span class='"+r.classNames.checkbox+"'><\/span>",lastentry:undefined};(r.children||r.initAjax&&r.initAjax.url||r.initId)&&$(this.divTree).empty();f=this.$tree.find(">ul:first").hide();this.tnRoot=new t(null,this,{});this.tnRoot.bExpanded=!0;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var u=this.tnRoot,s=r.persist&&this.persistence.isReloading(),e=!1,h=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure...");r.children?u.addChild(r.children):r.initAjax&&r.initAjax.url?(e=!0,u.data.isLazy=!0,this._reloadAjax(i)):r.initId?this._createFromTag(u,$("#"+r.initId)):(this._createFromTag(u,f),f.remove());this._checkConsistency();e||r.selectMode!=3||u._updatePartSelectionState();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(h);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";r.persist&&this.persistence.write();this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus());e||(r.onPostInit&&r.onPostInit.call(this,s,!1),i&&i.call(this,"ok"));this.phase="idle"},_reloadAjax:function(n){var i=this.options,r,t,u;if(!i.initAjax||!i.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";r=this.persistence;t=$.extend({},i.initAjax);t.addActiveKey&&(t.data.activeKey=r.activeKey);t.addFocusedKey&&(t.data.focusedKey=r.focusedKey);t.addExpandedKeyList&&(t.data.expandedKeyList=r.expandedKeyList.join(","));t.addSelectedKeyList&&(t.data.selectedKeyList=r.selectedKeyList.join(","));t.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead.");t.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");u=r.isReloading();t.success=function(t){i.selectMode==3&&t.tree.tnRoot._updatePartSelectionState();i.onPostInit&&i.onPostInit.call(t.tree,u,!1);n&&n.call(t.tree,"ok")};t.error=function(t,r,f,e){i.onPostInit&&i.onPostInit.call(t.tree,u,!0,r,f,e);n&&n.call(t.tree,"error",r,f,e)};this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(t)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(!0)},serializeArray:function(n){for(var i=this.getSelectedNodes(n),u=this.$tree.attr("name")||this.$tree.attr("id"),r=[],t=0,f=i.length;t<f;t++)r.push({name:u,value:i[t].data.key});return r},getPersistData:function(){return this.persistence.toDict()},logDebug:function(){this.options.debugLevel>=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(){Array.prototype.unshift.apply(arguments,["warn"]);_log.apply(this,arguments)},isInitializing:function(){return this.phase=="init"||this.phase=="postInit"},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return this.phase=="userEvent"},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(n){this._load(n)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(n){var t=document.getElementById(this.options.idPrefix+n),i;return t?t.dtnode?t.dtnode:null:(i=null,this.visit(function(t){if(t.data.key==n)return i=t,!1},!0),i)},getActiveNode:function(){return this.activeNode},reactivate:function(n){var t=this.activeNode;t&&(this.activeNode=null,t.activate(),n&&t.focus())},getSelectedNodes:function(n){var t=[];return this.tnRoot.visit(function(i){if(i.bSelected&&(t.push(i),n===!0))return"skip"}),t},activateKey:function(n){var t=n===null?null:this.getNodeByKey(n);return t?(t.focus(),t.activate(),t):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(n,t){var i=n.split(this.options.keyPathSeparator);return i[0]===""&&i.shift(),i[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),i.shift()),n=i.join(this.options.keyPathSeparator),this.tnRoot._loadKeyPath(n,t)},selectKey:function(n,t){var i=this.getNodeByKey(n);return i?(i.select(t),i):null},enableUpdate:function(n){return this.bEnableUpdate==n?n:(this.bEnableUpdate=n,n&&this.redraw(),!n)},count:function(){return this.tnRoot.countChildren()},visit:function(n,t){return this.tnRoot.visit(n,t)},_createFromTag:function(parentTreeNode,n){var self=this;n.find(">li").each(function(){var $li=$(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip,iPos,data,dataAttr,childNode,$ul;if($liSpan.length?title=$liSpan.html():$liA.length?(title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title")):(title=$li.html(),iPos=title.search(/<ul/i),title=iPos>=0?$.trim(title.substring(0,iPos)):$.trim(title)),data={title:title,tooltip:tooltip,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused"),noLink:$li.hasClass("noLink")},href&&(data.href=href,data.target=target),$li.attr("title")&&(data.tooltip=$li.attr("title")),$li.attr("id")&&(data.key=$li.attr("id")),$li.attr("data")&&(dataAttr=$.trim($li.attr("data")),dataAttr)){dataAttr.charAt(0)!="{"&&(dataAttr="{"+dataAttr+"}");try{$.extend(data,eval("("+dataAttr+")"))}catch(e){throw"Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'";}}childNode=parentTreeNode.addChild(data);$ul=$li.find(">ul:first");$ul.length&&self._createFromTag(childNode,$ul)})},_checkConsistency:function(){},_setDndStatus:function(n,t,i,r,u){var e=n?$(n.span):null,f=$(t.span),o;if(this.$dndMarker||(this.$dndMarker=$("<div id='dynatree-drop-marker'><\/div>").hide().prependTo($(this.divTree).parent())),r==="after"||r==="before"||r==="over"){o=f.offset();switch(r){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-before");o.top-=8;break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over");this.$dndMarker.addClass("dynatree-drop-after");o.top+=8;break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before");this.$dndMarker.addClass("dynatree-drop-over");f.addClass("dynatree-drop-target");o.left+=8}this.$dndMarker.css({left:o.left,top:o.top,"z-index":1e3}).show()}else f.removeClass("dynatree-drop-target"),this.$dndMarker.hide();r==="after"?f.addClass("dynatree-drop-after"):f.removeClass("dynatree-drop-after");r==="before"?f.addClass("dynatree-drop-before"):f.removeClass("dynatree-drop-before");u===!0?(e&&e.addClass("dynatree-drop-accept"),f.addClass("dynatree-drop-accept"),i.addClass("dynatree-drop-accept")):(e&&e.removeClass("dynatree-drop-accept"),f.removeClass("dynatree-drop-accept"),i.removeClass("dynatree-drop-accept"));u===!1?(e&&e.addClass("dynatree-drop-reject"),f.addClass("dynatree-drop-reject"),i.addClass("dynatree-drop-reject")):(e&&e.removeClass("dynatree-drop-reject"),f.removeClass("dynatree-drop-reject"),i.removeClass("dynatree-drop-reject"))},_onDragEvent:function(n,t,i,r,u,f){var w=this.options,s=this.options.dnd,e=null,c=$(t.span),o,h,l,p;switch(n){case"helper":l=$("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /><\/div>").append($(r.target).closest("a").clone());$("ul.dynatree-container",t.tree.divTree).append(l);l.data("dtSourceNode",t);e=l;break;case"start":t.isStatusNode()?e=!1:s.onDragStart&&(e=s.onDragStart(t));e===!1?(this.logDebug("tree.onDragStart() cancelled"),u.helper.trigger("mouseup"),u.helper.hide()):c.addClass("dynatree-drag-source");break;case"enter":e=s.onDragEnter?s.onDragEnter(t,i):null;e={over:e!==!1&&(e===!0||e==="over"||$.inArray("over",e)>=0),before:e!==!1&&(e===!0||e==="before"||$.inArray("before",e)>=0),after:e!==!1&&(e===!0||e==="after"||$.inArray("after",e)>=0)};u.helper.data("enterResponse",e);break;case"over":if(h=u.helper.data("enterResponse"),o=null,h===!1)break;else if(typeof h=="string")o=h;else{var v=c.offset(),y={x:r.pageX-v.left,y:r.pageY-v.top},a={x:y.x/c.width(),y:y.y/c.height()};h.after&&a.y>.75?o="after":!h.over&&h.after&&a.y>.5?o="after":h.before&&a.y<=.25?o="before":!h.over&&h.before&&a.y<=.5?o="before":h.over&&(o="over");s.preventVoidMoves&&(t===i?o=null:o==="before"&&i&&t===i.getNextSibling()?o=null:o==="after"&&i&&t===i.getPrevSibling()?o=null:o==="over"&&i&&i.parent===t&&i.isLastSibling()&&(o=null));u.helper.data("hitMode",o)}o==="over"&&s.autoExpandMS&&t.hasChildren()!==!1&&!t.bExpanded&&t.scheduleAction("expand",s.autoExpandMS);o&&s.onDragOver&&(e=s.onDragOver(t,i,o));this._setDndStatus(i,t,u.helper,o,e!==!1);break;case"drop":if(p=u.helper.hasClass("dynatree-drop-reject"),o=u.helper.data("hitMode"),o&&s.onDrop&&!p)s.onDrop(t,i,o,u,f);break;case"leave":if(t.scheduleAction("cancel"),u.helper.data("enterResponse",null),u.helper.data("hitMode",null),this._setDndStatus(i,t,u.helper,"out",undefined),s.onDragLeave)s.onDragLeave(t,i);break;case"stop":if(c.removeClass("dynatree-drag-source"),s.onDragStop)s.onDragStop(t);break;default:throw"Unsupported drag event: "+n;}return e},cancelDrag:function(){var n=$.ui.ddmanager.current;n&&n.cancel()},lastentry:undefined};$.widget("ui.dynatree",{_init:function(){if(parseFloat($.ui.version)<1.8)return this.options.debugLevel>=0&&_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher."),this._create();this.options.debugLevel>=2&&_log("debug","ui.dynatree._init() was called; no current default functionality.")},_create:function(){var n=this.options,t;n.debugLevel>=1&&logMsg("Dynatree._create(): version='%s', debugLevel=%o.",$.ui.dynatree.version,this.options.debugLevel);this.options.event+=".dynatree";t=this.element.get(0);this.tree=new i(this);this.tree._load();this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function i(n){n=$.event.fix(n||window.event);var t=$.ui.dynatree.getNode(n.target);return t?t._onFocus(n):!1}var t,n;this.unbind();t="click.dynatree dblclick.dynatree";this.options.keyboard&&(t+=" keypress.dynatree keydown.dynatree");this.element.bind(t,function(n){var t=$.ui.dynatree.getNode(n.target),i,r,u,e;if(!t)return!0;i=t.tree;r=i.options;i.logDebug("event(%s): dtnode: %s",n.type,t);u=i.phase;i.phase="userEvent";try{switch(n.type){case"click":return r.onClick&&r.onClick.call(i,t,n)===!1?!1:t._onClick(n);case"dblclick":return r.onDblClick&&r.onDblClick.call(i,t,n)===!1?!1:t._onDblClick(n);case"keydown":return r.onKeydown&&r.onKeydown.call(i,t,n)===!1?!1:t._onKeydown(n);case"keypress":return r.onKeypress&&r.onKeypress.call(i,t,n)===!1?!1:t._onKeypress(n)}}catch(f){e=null;i.logWarning("bind(%o): dtnode: %o, error: %o",n,t,f)}finally{i.phase=u}});n=this.tree.divTree;n.addEventListener?(n.addEventListener("focus",i,!0),n.addEventListener("blur",i,!0)):n.onfocusin=n.onfocusout=i},unbind:function(){this.element.unbind(".dynatree")},enable:function(){this.bind();$.Widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind();$.Widget.prototype.disable.apply(this,arguments)},getTree:function(){return this.tree},getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:undefined});parseFloat($.ui.version)<1.8&&($.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes");$.ui.dynatree.version="$Version: 1.2.1$";$.ui.dynatree.getNode=function(n){if(n instanceof t)return n;for(n.selector!==undefined&&(n=n[0]);n;){if(n.dtnode)return n.dtnode;n=n.parentNode}return null};$.ui.dynatree.getPersistData=n._getTreePersistData;$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:!0,keyboard:!0,persist:!1,autoCollapse:!1,clickFolderMode:3,activeVisible:!0,checkbox:!1,selectMode:2,fx:null,noLink:!1,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onCreate:null,onRender:null,postProcess:null,dnd:{onDragStart:null,onDragStop:null,autoExpandMS:1e3,preventVoidMoves:!0,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:!1,timeout:0,dataType:"json"},strings:{loading:"Loading…",loadError:"Load error!"},generateIds:!1,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-error",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:1,lastentry:undefined};parseFloat($.ui.version)<1.8&&($.ui.dynatree.defaults=$.ui.dynatree.prototype.options);$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:!1,isLazy:!1,tooltip:null,href:null,icon:null,addClass:null,noLink:!1,activate:!1,focus:!1,expand:!1,select:!1,hideCheckbox:!1,unselectable:!1,children:null,lastentry:undefined};u=!1;e=function(){u||($.ui.plugin.add("draggable","connectToDynatree",{start:function(n,t){var i=$(this).data("draggable"),r=t.helper.data("dtSourceNode")||null;if(r)return i.offset.click.top=-2,i.offset.click.left=16,r.tree._onDragEvent("start",r,null,n,t,i)},drag:function(n,t){var u=$(this).data("draggable"),e=t.helper.data("dtSourceNode")||null,r=t.helper.data("dtTargetNode")||null,i=$.ui.dynatree.getNode(n.target),o;n.target&&!i&&(o=$(n.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0,o)||(t.helper.data("dtTargetNode",i),r&&r!==i&&r.tree._onDragEvent("leave",r,e,n,t,u),i&&(i.tree.options.dnd.onDrop?i===r?i.tree._onDragEvent("over",i,e,n,t,u):i.tree._onDragEvent("enter",i,e,n,t,u):f()))},stop:function(n,t){var u=$(this).data("draggable"),i=t.helper.data("dtSourceNode")||null,r=t.helper.data("dtTargetNode")||null,o=u._mouseDownEvent,e=n.type,f=e=="mouseup"&&n.which==1;f||logMsg("Drag was cancelled");r&&(f&&r.tree._onDragEvent("drop",r,i,n,t,u),r.tree._onDragEvent("leave",r,i,n,t,u));i&&i.tree._onDragEvent("stop",i,null,n,t,u)}}),u=!0)}})(jQuery); |