compass-jquery-plugin 0.2.5.4 → 0.2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/VERSION.yml +2 -2
  2. data/compass-jquery-plugin.gemspec +4 -6
  3. data/gem_tasks/calendar.rake +2 -2
  4. data/gem_tasks/dynatree.rake +1 -1
  5. data/gem_tasks/jqgrid.rake +2 -2
  6. data/gem_tasks/jqtouch.rake +1 -1
  7. data/gem_tasks/jrails.rake +6 -6
  8. data/gem_tasks/secret_sauce.rake +1 -1
  9. data/lib/handle_js_files.rb +8 -5
  10. data/lib/jquery/jqgrid/jqgrid.rb +0 -47
  11. data/templates/calendar/jquery.calendar.min.js +10 -10
  12. data/templates/calendar/jquery.ui/calendar.sass +288 -288
  13. data/templates/dynatree/jquery.dynatree.min.js +58 -1
  14. data/templates/dynatree/jquery.ui/dynatree.aqua.sass +177 -177
  15. data/templates/dynatree/jquery.ui/dynatree.crystal.sass +177 -177
  16. data/templates/dynatree/jquery.ui/dynatree.vista.sass +177 -177
  17. data/templates/dynatree/jquery.ui/dynatree.xp.sass +178 -178
  18. data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +15 -1
  19. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +15 -1
  20. data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +7 -1
  21. data/templates/jqgrid/i18n/jqgrid/locale-cn.min.js +8 -1
  22. data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +8 -1
  23. data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +7 -1
  24. data/templates/jqgrid/i18n/jqgrid/locale-dk.min.js +6 -1
  25. data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +13 -1
  26. data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +6 -1
  27. data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +12 -1
  28. data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +6 -1
  29. data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +7 -1
  30. data/templates/jqgrid/i18n/jqgrid/locale-he.min.js +13 -1
  31. data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +7 -1
  32. data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +7 -1
  33. data/templates/jqgrid/i18n/jqgrid/locale-ja.js +155 -155
  34. data/templates/jqgrid/i18n/jqgrid/locale-ja.min.js +10 -1
  35. data/templates/jqgrid/i18n/jqgrid/locale-nl.min.js +6 -1
  36. data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +6 -1
  37. data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +7 -1
  38. data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +7 -1
  39. data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +7 -1
  40. data/templates/jqgrid/i18n/jqgrid/locale-ro.min.js +8 -1
  41. data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +16 -1
  42. data/templates/jqgrid/i18n/jqgrid/locale-sp.min.js +7 -1
  43. data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +7 -1
  44. data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +7 -1
  45. data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +16 -1
  46. data/templates/jqgrid/jquery.jqGrid.js +10255 -10245
  47. data/templates/jqgrid/jquery.jqGrid.min.js +424 -1
  48. data/templates/jqgrid/jquery.ui/jqGrid.sass +761 -761
  49. data/templates/jqgrid/manifest.rb +0 -2
  50. data/templates/jqtouch/jqtouch/apple.sass +651 -651
  51. data/templates/jqtouch/jqtouch/iphone-emulator.sass +17 -17
  52. data/templates/jqtouch/jqtouch/jqt.sass +580 -580
  53. data/templates/jqtouch/jqtouch/jqtouch.sass +75 -75
  54. data/templates/jqtouch/jquery.jqtouch.min.js +24 -1
  55. data/templates/jrails/i18n/jquery.ui/datepicker-ar.min.js +4 -1
  56. data/templates/jrails/i18n/jquery.ui/datepicker-bg.min.js +4 -1
  57. data/templates/jrails/i18n/jquery.ui/datepicker-ca.min.js +2 -1
  58. data/templates/jrails/i18n/jquery.ui/datepicker-cs.min.js +2 -1
  59. data/templates/jrails/i18n/jquery.ui/datepicker-da.min.js +2 -1
  60. data/templates/jrails/i18n/jquery.ui/datepicker-de.min.js +2 -1
  61. data/templates/jrails/i18n/jquery.ui/datepicker-el.min.js +4 -1
  62. data/templates/jrails/i18n/jquery.ui/datepicker-eo.min.js +2 -1
  63. data/templates/jrails/i18n/jquery.ui/datepicker-es.min.js +2 -1
  64. data/templates/jrails/i18n/jquery.ui/datepicker-fa.min.js +3 -1
  65. data/templates/jrails/i18n/jquery.ui/datepicker-fi.min.js +2 -1
  66. data/templates/jrails/i18n/jquery.ui/datepicker-fr.min.js +2 -1
  67. data/templates/jrails/i18n/jquery.ui/datepicker-he.min.js +3 -1
  68. data/templates/jrails/i18n/jquery.ui/datepicker-hr.min.js +2 -1
  69. data/templates/jrails/i18n/jquery.ui/datepicker-hu.min.js +2 -1
  70. data/templates/jrails/i18n/jquery.ui/datepicker-hy.min.js +4 -1
  71. data/templates/jrails/i18n/jquery.ui/datepicker-id.min.js +2 -1
  72. data/templates/jrails/i18n/jquery.ui/datepicker-is.min.js +2 -1
  73. data/templates/jrails/i18n/jquery.ui/datepicker-it.min.js +2 -1
  74. data/templates/jrails/i18n/jquery.ui/datepicker-ja.min.js +2 -1
  75. data/templates/jrails/i18n/jquery.ui/datepicker-ko.min.js +2 -1
  76. data/templates/jrails/i18n/jquery.ui/datepicker-lt.min.js +2 -1
  77. data/templates/jrails/i18n/jquery.ui/datepicker-lv.min.js +2 -1
  78. data/templates/jrails/i18n/jquery.ui/datepicker-ms.min.js +2 -1
  79. data/templates/jrails/i18n/jquery.ui/datepicker-nl.min.js +2 -1
  80. data/templates/jrails/i18n/jquery.ui/datepicker-no.min.js +2 -1
  81. data/templates/jrails/i18n/jquery.ui/datepicker-pl.min.js +2 -1
  82. data/templates/jrails/i18n/jquery.ui/datepicker-pt-BR.min.js +2 -1
  83. data/templates/jrails/i18n/jquery.ui/datepicker-ro.min.js +2 -1
  84. data/templates/jrails/i18n/jquery.ui/datepicker-ru.min.js +4 -1
  85. data/templates/jrails/i18n/jquery.ui/datepicker-sk.min.js +2 -1
  86. data/templates/jrails/i18n/jquery.ui/datepicker-sl.min.js +2 -1
  87. data/templates/jrails/i18n/jquery.ui/datepicker-sq.min.js +2 -1
  88. data/templates/jrails/i18n/jquery.ui/datepicker-sr-SR.min.js +2 -1
  89. data/templates/jrails/i18n/jquery.ui/datepicker-sr.min.js +3 -1
  90. data/templates/jrails/i18n/jquery.ui/datepicker-sv.min.js +2 -1
  91. data/templates/jrails/i18n/jquery.ui/datepicker-th.min.js +4 -1
  92. data/templates/jrails/i18n/jquery.ui/datepicker-tr.min.js +2 -1
  93. data/templates/jrails/i18n/jquery.ui/datepicker-uk.min.js +4 -1
  94. data/templates/jrails/i18n/jquery.ui/datepicker-zh-CN.min.js +2 -1
  95. data/templates/jrails/i18n/jquery.ui/datepicker-zh-TW.min.js +2 -1
  96. data/templates/jrails/jquery.min.js +18 -18
  97. data/templates/jrails/jquery.ui/_theme.sass +1462 -1462
  98. data/templates/jrails/jquery.ui/base.sass +85 -85
  99. data/templates/jrails/jquery.ui/black-tie.sass +85 -85
  100. data/templates/jrails/jquery.ui/blitzer.sass +85 -85
  101. data/templates/jrails/jquery.ui/cupertino.sass +85 -85
  102. data/templates/jrails/jquery.ui/dark-hive.sass +85 -85
  103. data/templates/jrails/jquery.ui/dot-luv.sass +85 -85
  104. data/templates/jrails/jquery.ui/eggplant.sass +85 -85
  105. data/templates/jrails/jquery.ui/excite-bike.sass +85 -85
  106. data/templates/jrails/jquery.ui/flick.sass +85 -85
  107. data/templates/jrails/jquery.ui/hot-sneaks.sass +85 -85
  108. data/templates/jrails/jquery.ui/humanity.sass +85 -85
  109. data/templates/jrails/jquery.ui/le-frog.sass +85 -85
  110. data/templates/jrails/jquery.ui/mint-choc.sass +85 -85
  111. data/templates/jrails/jquery.ui/overcast.sass +85 -85
  112. data/templates/jrails/jquery.ui/pepper-grinder.sass +85 -85
  113. data/templates/jrails/jquery.ui/redmond.sass +85 -85
  114. data/templates/jrails/jquery.ui/smoothness.sass +85 -85
  115. data/templates/jrails/jquery.ui/south-street.sass +85 -85
  116. data/templates/jrails/jquery.ui/sunny.sass +85 -85
  117. data/templates/jrails/jquery.ui/swanky-purse.sass +85 -85
  118. data/templates/jrails/jquery.ui/trontastic.sass +85 -85
  119. data/templates/jrails/jquery.ui/ui-darkness.sass +85 -85
  120. data/templates/jrails/jquery.ui/ui-lightness.sass +85 -85
  121. data/templates/jrails/jquery.ui/vader.sass +85 -85
  122. data/templates/secret_sauce/jquery.ui/secret_sauce.sass +32 -32
  123. data/templates/secret_sauce/secret_sauce.min.js +1 -1
  124. metadata +28 -11
  125. data/templates/jqgrid/i18n/jqgrid/locale-jp.js +0 -127
  126. data/templates/jqgrid/i18n/jqgrid/locale-jp.min.js +0 -1
@@ -1 +1,58 @@
1
- var _canLog=true;function _log(g,f){if(!_canLog){return}var b=Array.prototype.slice.apply(arguments,[1]);var c=new Date();var a=c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()+"."+c.getMilliseconds();b[0]=a+" - "+b[0];try{switch(g){case"info":window.console.info.apply(window.console,b);break;case"warn":window.console.warn.apply(window.console,b);break;default:window.console.log.apply(window.console,b)}}catch(d){if(!window.console){_canLog=false}}}function logMsg(a){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}var getDynaTreePersistData=undefined;var DTNodeStatus_Error=-1;var DTNodeStatus_Loading=1;var DTNodeStatus_Ok=0;(function($){var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(parent,tree,data){this.parent=parent;this.tree=tree;if(typeof data=="string"){data={title:data}}if(data.key==undefined){data.key="_"+tree._nodeCount++}this.data=$.extend({},$.ui.dynatree.nodedatadefaults,data);this.div=null;this.span=null;this.childList=null;this.isLoading=false;this.hasSubSel=false},toString:function(){return"dtnode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(recursive,callback){var dict=$.extend({},this.data);dict.activate=(this.tree.activeNode===this);dict.focus=(this.tree.focusNode===this);dict.expand=this.bExpanded;dict.select=this.bSelected;if(callback){callback(dict)}if(recursive&&this.childList){dict.children=[];for(var i=0;i<this.childList.length;i++){dict.children.push(this.childList[i].toDict(true,callback))}}else{delete dict.children}return dict},_getInnerHtml:function(){var opts=this.tree.options;var cache=this.tree.cache;var rootParent=opts.rootVisible?null:this.tree.tnRoot;var bHideFirstExpander=(opts.rootVisible&&opts.minExpandLevel>0)||opts.minExpandLevel>1;var bHideFirstConnector=opts.rootVisible||opts.minExpandLevel>0;var res="";var p=this.parent;while(p){if(bHideFirstConnector&&p==rootParent){break}res=(p.isLastSibling()?cache.tagEmpty:cache.tagVline)+res;p=p.parent}if(bHideFirstExpander&&this.parent==rootParent){}else{if(this.childList||this.data.isLazy){res+=cache.tagExpander}else{res+=cache.tagConnector}}if(opts.checkbox&&this.data.hideCheckbox!=true&&!this.data.isStatusNode){res+=cache.tagCheckbox}if(this.data.icon){res+="<img src='"+opts.imagePath+this.data.icon+"' alt='' />"}else{if(this.data.icon==false){}else{res+=cache.tagNodeIcon}}var tooltip=(this.data&&typeof this.data.tooltip=="string")?" title='"+this.data.tooltip+"'":"";res+="<a href='#' class='"+opts.classNames.title+"'"+tooltip+">"+this.data.title+"</a>";return res},_fixOrder:function(){var cl=this.childList;if(!cl){return}var childDiv=this.div.firstChild.nextSibling;for(var i=0;i<cl.length-1;i++){var childNode1=cl[i];var childNode2=childDiv.firstChild.dtnode;if(childNode1!==childNode2){this.tree.logDebug("_fixOrder: mismatch at index "+i+": "+childNode1+" != "+childNode2);this.div.insertBefore(childNode1.div,childNode2.div)}else{childDiv=childDiv.nextSibling}}},render:function(bDeep,bHidden){var opts=this.tree.options;var cn=opts.classNames;var isLastSib=this.isLastSibling();if(!this.div){this.span=document.createElement("span");this.span.dtnode=this;if(this.data.key){this.span.id=this.tree.options.idPrefix+this.data.key}this.div=document.createElement("div");this.div.appendChild(this.span);if(this.parent){this.parent.div.appendChild(this.div)}if(this.parent==null&&!this.tree.options.rootVisible){this.span.style.display="none"}}this.span.innerHTML=this._getInnerHtml();this.div.style.display=(this.parent==null||this.parent.bExpanded?"":"none");var cnList=[];cnList.push((this.data.isFolder)?cn.folder:cn.document);if(this.bExpanded){cnList.push(cn.expanded)}if(this.childList!=null){cnList.push(cn.hasChildren)}if(this.data.isLazy&&this.childList==null){cnList.push(cn.lazy)}if(isLastSib){cnList.push(cn.lastsib)}if(this.bSelected){cnList.push(cn.selected)}if(this.hasSubSel){cnList.push(cn.partsel)}if(this.tree.activeNode===this){cnList.push(cn.active)}if(this.data.addClass){cnList.push(this.data.addClass)}cnList.push(cn.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(this.data.isLazy&&this.childList==null?"d":"")+(isLastSib?"l":""));cnList.push(cn.combinedIconPrefix+(this.bExpanded?"e":"c")+(this.data.isFolder?"f":""));this.span.className=cnList.join(" ");if(bDeep&&this.childList&&(bHidden||this.bExpanded)){for(var i=0;i<this.childList.length;i++){this.childList[i].render(bDeep,bHidden)}this._fixOrder()}},hasChildren:function(){return this.childList!=null},isLastSibling:function(){var p=this.parent;if(!p){return true}return p.childList[p.childList.length-1]===this},prevSibling:function(){if(!this.parent){return null}var ac=this.parent.childList;for(var i=1;i<ac.length;i++){if(ac[i]===this){return ac[i-1]}}return null},nextSibling:function(){if(!this.parent){return null}var ac=this.parent.childList;for(var i=0;i<ac.length-1;i++){if(ac[i]===this){return ac[i+1]}}return null},_setStatusNode:function(data){var firstChild=(this.childList?this.childList[0]:null);if(!data){if(firstChild){this.div.removeChild(firstChild.div);if(this.childList.length==1){this.childList=null}else{this.childList.shift()}}}else{if(firstChild){data.isStatusNode=true;firstChild.data=data;firstChild.render(false,false)}else{data.isStatusNode=true;firstChild=this.addChild(data)}}},setLazyNodeStatus:function(lts){switch(lts){case DTNodeStatus_Ok:this._setStatusNode(null);this.isLoading=false;this.render(false,false);if(this.tree.options.autoFocus){if(this===this.tree.tnRoot&&!this.tree.options.rootVisible&&this.childList){this.childList[0].focus()}else{this.focus()}}break;case DTNodeStatus_Loading:this.isLoading=true;this._setStatusNode({title:this.tree.options.strings.loading,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+lts+"'."}},_parentList:function(includeRoot,includeSelf){var l=[];var dtn=includeSelf?this:this.parent;while(dtn){if(includeRoot||dtn.parent){l.unshift(dtn)}dtn=dtn.parent}return l},getLevel:function(){var level=0;var dtn=this.parent;while(dtn){level++;dtn=dtn.parent}return level},_getTypeForOuterNodeEvent:function(event){var cns=this.tree.options.classNames;var target=event.target;if(target.className.indexOf(cns.folder)<0&&target.className.indexOf(cns.document)<0){return null}var eventX=event.pageX-target.offsetLeft;var eventY=event.pageY-target.offsetTop;for(var i=0;i<target.childNodes.length;i++){var cn=target.childNodes[i];var x=cn.offsetLeft-target.offsetLeft;var y=cn.offsetTop-target.offsetTop;var nx=cn.clientWidth,ny=cn.clientHeight;if(eventX>=x&&eventX<=(x+nx)&&eventY>=y&&eventY<=(y+ny)){if(cn.className==cns.title){return"title"}else{if(cn.className==cns.expander){return"expander"}else{if(cn.className==cns.checkbox){return"checkbox"}else{if(cn.className==cns.nodeIcon){return"icon"}}}}}}return"prefix"},getEventTargetType:function(event){var tcn=event&&event.target?event.target.className:"";var cns=this.tree.options.classNames;if(tcn==cns.title){return"title"}else{if(tcn==cns.expander){return"expander"}else{if(tcn==cns.checkbox){return"checkbox"}else{if(tcn==cns.nodeIcon){return"icon"}else{if(tcn==cns.empty||tcn==cns.vline||tcn==cns.connector){return"prefix"}else{if(tcn.indexOf(cns.folder)>=0||tcn.indexOf(cns.document)>=0){return this._getTypeForOuterNodeEvent(event)}}}}}}return null},isVisible:function(){var parents=this._parentList(true,false);for(var i=0;i<parents.length;i++){if(!parents[i].bExpanded){return false}}return true},makeVisible:function(){var parents=this._parentList(true,false);for(var i=0;i<parents.length;i++){parents[i]._expand(true)}},focus:function(){this.makeVisible();try{$(this.span).find(">a").focus()}catch(e){}},_activate:function(flag,fireEvents){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",flag,fireEvents,this);var opts=this.tree.options;if(this.data.isStatusNode){return}if(fireEvents&&opts.onQueryActivate&&opts.onQueryActivate.call(this.span,flag,this)==false){return}if(flag){if(this.tree.activeNode){if(this.tree.activeNode===this){return}this.tree.activeNode.deactivate()}if(opts.activeVisible){this.makeVisible()}this.tree.activeNode=this;if(opts.persist){$.cookie(opts.cookieId+"-active",this.data.key,opts.cookie)}this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(opts.classNames.active);if(fireEvents&&opts.onActivate){opts.onActivate.call(this.span,this)}}else{if(this.tree.activeNode===this){var opts=this.tree.options;if(opts.onQueryActivate&&opts.onQueryActivate.call(this.span,false,this)==false){return}$(this.span).removeClass(opts.classNames.active);if(opts.persist){$.cookie(opts.cookieId+"-active","",opts.cookie)}this.tree.persistence.activeKey=null;this.tree.activeNode=null;if(fireEvents&&opts.onDeactivate){opts.onDeactivate.call(this.span,this)}}}},activate:function(){this._activate(true,true)},deactivate:function(){this._activate(false,true)},isActive:function(){return(this.tree.activeNode===this)},_userActivate:function(){var activate=true;var expand=false;if(this.data.isFolder){switch(this.tree.options.clickFolderMode){case 2:activate=false;expand=true;break;case 3:activate=expand=true;break}}if(this.parent==null&&this.tree.options.minExpandLevel>0){expand=false}if(expand){this.toggleExpand();this.focus()}if(activate){this.activate()}},_setSubSel:function(hasSubSel){if(hasSubSel){this.hasSubSel=true;$(this.span).addClass(this.tree.options.classNames.partsel)}else{this.hasSubSel=false;$(this.span).removeClass(this.tree.options.classNames.partsel)}},_fixSelectionState:function(){if(this.bSelected){this.visit(function(dtnode){dtnode.parent._setSubSel(true);dtnode._select(true,false,false)});var p=this.parent;while(p){p._setSubSel(true);var allChildsSelected=true;for(var i=0;i<p.childList.length;i++){var n=p.childList[i];if(!n.bSelected&&!n.data.isStatusNode){allChildsSelected=false;break}}if(allChildsSelected){p._select(true,false,false)}p=p.parent}}else{this._setSubSel(false);this.visit(function(dtnode){dtnode._setSubSel(false);dtnode._select(false,false,false)});var p=this.parent;while(p){p._select(false,false,false);var isPartSel=false;for(var i=0;i<p.childList.length;i++){if(p.childList[i].bSelected||p.childList[i].hasSubSel){isPartSel=true;break}}p._setSubSel(isPartSel);p=p.parent}}},_select:function(sel,fireEvents,deep){var opts=this.tree.options;if(this.data.isStatusNode){return}if(this.bSelected==sel){return}if(fireEvents&&opts.onQuerySelect&&opts.onQuerySelect.call(this.span,sel,this)==false){return}if(opts.selectMode==1&&sel){this.tree.visit(function(dtnode){if(dtnode.bSelected){dtnode._select(false,false,false);return false}})}this.bSelected=sel;if(sel){if(opts.persist){this.tree.persistence.addSelect(this.data.key)}$(this.span).addClass(opts.classNames.selected);if(deep&&opts.selectMode==3){this._fixSelectionState()}if(fireEvents&&opts.onSelect){opts.onSelect.call(this.span,true,this)}}else{if(opts.persist){this.tree.persistence.clearSelect(this.data.key)}$(this.span).removeClass(opts.classNames.selected);if(deep&&opts.selectMode==3){this._fixSelectionState()}if(fireEvents&&opts.onSelect){opts.onSelect.call(this.span,false,this)}}},select:function(sel){if(this.data.unselectable){return this.bSelected}return this._select(sel!=false,true,true)},toggleSelect:function(){return this.select(!this.bSelected)},isSelected:function(){return this.bSelected},_loadContent:function(){try{var opts=this.tree.options;this.tree.logDebug("_loadContent: start - %o",this);this.setLazyNodeStatus(DTNodeStatus_Loading);if(true==opts.onLazyRead.call(this.span,this)){this.setLazyNodeStatus(DTNodeStatus_Ok);this.tree.logDebug("_loadContent: succeeded - %o",this)}}catch(e){alert(e);this.setLazyNodeStatus(DTNodeStatus_Error)}},_expand:function(bExpand){if(this.bExpanded==bExpand){return}var opts=this.tree.options;if(!bExpand&&this.getLevel()<opts.minExpandLevel){this.tree.logDebug("dtnode._expand(%o) forced expand - %o",bExpand,this);return}if(opts.onQueryExpand&&opts.onQueryExpand.call(this.span,bExpand,this)==false){return}this.bExpanded=bExpand;if(opts.persist){if(bExpand){this.tree.persistence.addExpand(this.data.key)}else{this.tree.persistence.clearExpand(this.data.key)}}this.render(false);if(this.bExpanded&&this.parent&&opts.autoCollapse){var parents=this._parentList(false,true);for(var i=0;i<parents.length;i++){parents[i].collapseSiblings()}}if(opts.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()){this.tree.activeNode.deactivate()}if(bExpand&&this.data.isLazy&&this.childList==null&&!this.isLoading){this._loadContent();return}var fxDuration=opts.fx?(opts.fx.duration||200):0;if(this.childList){for(var i=0;i<this.childList.length;i++){var $child=$(this.childList[i].div);if(fxDuration){if(bExpand!=$child.is(":visible")){$child.animate(opts.fx,fxDuration)}}else{if(bExpand){$child.show()}else{$child.hide()}}}}if(opts.onExpand){opts.onExpand.call(this.span,bExpand,this)}},expand:function(flag){if(!this.childList&&!this.data.isLazy&&flag){return}if(this.parent==null&&this.tree.options.minExpandLevel>0&&!flag){return}this._expand(flag)},toggleExpand:function(){this.expand(!this.bExpanded)},collapseSiblings:function(){if(this.parent==null){return}var ac=this.parent.childList;for(var i=0;i<ac.length;i++){if(ac[i]!==this&&ac[i].bExpanded){ac[i]._expand(false)}}},onClick:function(event){var targetType=this.getEventTargetType(event);if(targetType=="expander"){this.toggleExpand();this.focus()}else{if(targetType=="checkbox"){this.toggleSelect();this.focus()}else{this._userActivate();this.span.getElementsByTagName("a")[0].focus()}}return false},onDblClick:function(event){},onKeydown:function(event){var handled=true;switch(event.which){case 107:case 187:if(!this.bExpanded){this.toggleExpand()}break;case 109:case 189:if(this.bExpanded){this.toggleExpand()}break;case 32:this._userActivate();break;case 8:if(this.parent){this.parent.focus()}break;case 37:if(this.bExpanded){this.toggleExpand();this.focus()}else{if(this.parent&&(this.tree.options.rootVisible||this.parent.parent)){this.parent.focus()}}break;case 39:if(!this.bExpanded&&(this.childList||this.data.isLazy)){this.toggleExpand();this.focus()}else{if(this.childList){this.childList[0].focus()}}break;case 38:var sib=this.prevSibling();while(sib&&sib.bExpanded&&sib.childList){sib=sib.childList[sib.childList.length-1]}if(!sib&&this.parent&&(this.tree.options.rootVisible||this.parent.parent)){sib=this.parent}if(sib){sib.focus()}break;case 40:var sib;if(this.bExpanded&&this.childList){sib=this.childList[0]}else{var parents=this._parentList(false,true);for(var i=parents.length-1;i>=0;i--){sib=parents[i].nextSibling();if(sib){break}}}if(sib){sib.focus()}break;default:handled=false}return !handled},onKeypress:function(event){},onFocus:function(event){var opts=this.tree.options;if(event.type=="blur"||event.type=="focusout"){if(opts.onBlur){opts.onBlur.call(this.span,this)}if(this.tree.tnFocused){$(this.tree.tnFocused.span).removeClass(opts.classNames.focused)}this.tree.tnFocused=null;if(opts.persist){$.cookie(opts.cookieId+"-focus","",opts.cookie)}}else{if(event.type=="focus"||event.type=="focusin"){if(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(opts.classNames.focused)}this.tree.tnFocused=this;if(opts.onFocus){opts.onFocus.call(this.span,this)}$(this.tree.tnFocused.span).addClass(opts.classNames.focused);if(opts.persist){$.cookie(opts.cookieId+"-focus",this.data.key,opts.cookie)}}}},visit:function(fn,data,includeSelf){var n=0;if(includeSelf==true){if(fn(this,data)==false){return 1}n++}if(this.childList){for(var i=0;i<this.childList.length;i++){n+=this.childList[i].visit(fn,data,true)}}return n},remove:function(){if(this===this.tree.root){return false}return this.parent.removeChild(this)},removeChild:function(tn){var ac=this.childList;if(ac.length==1){if(tn!==ac[0]){throw"removeChild: invalid child"}return this.removeChildren()}if(tn===this.tree.activeNode){tn.deactivate()}if(this.tree.options.persist){if(tn.bSelected){this.tree.persistence.clearSelect(tn.data.key)}if(tn.bExpanded){this.tree.persistence.clearExpand(tn.data.key)}}tn.removeChildren(true);this.div.removeChild(tn.div);for(var i=0;i<ac.length;i++){if(ac[i]===tn){this.childList.splice(i,1);delete tn;break}}},removeChildren:function(isRecursiveCall,retainPersistence){var tree=this.tree;var ac=this.childList;if(ac){for(var i=0;i<ac.length;i++){var tn=ac[i];if(tn===tree.activeNode&&!retainPersistence){tn.deactivate()}if(this.tree.options.persist&&!retainPersistence){if(tn.bSelected){this.tree.persistence.clearSelect(tn.data.key)}if(tn.bExpanded){this.tree.persistence.clearExpand(tn.data.key)}}tn.removeChildren(true,retainPersistence);this.div.removeChild(tn.div);delete tn}this.childList=null}if(!isRecursiveCall){this.isLoading=false;this.render(false,false)}},reload:function(force){if(this.parent==null){return this.tree.reload()}if(!this.data.isLazy){throw"node.reload() requires lazy nodes."}if(this.bExpanded){this.expand(false);this.removeChildren();this.expand(true)}else{this.removeChildren();if(force){this._loadContent()}}},_addChildNode:function(dtnode,beforeNode){var tree=this.tree;var opts=tree.options;var pers=tree.persistence;dtnode.parent=this;if(this.childList==null){this.childList=[]}else{if(!beforeNode){$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib)}}if(beforeNode){var iBefore=$.inArray(beforeNode,this.childList);if(iBefore<0){throw"<beforeNode> must be a child of <this>"}this.childList.splice(iBefore,0,dtnode)}else{this.childList.push(dtnode)}var isInitializing=tree.isInitializing();if(opts.persist&&pers.cookiesFound&&isInitializing){if(pers.activeKey==dtnode.data.key){tree.activeNode=dtnode}if(pers.focusedKey==dtnode.data.key){tree.focusNode=dtnode}dtnode.bExpanded=($.inArray(dtnode.data.key,pers.expandedKeyList)>=0);dtnode.bSelected=($.inArray(dtnode.data.key,pers.selectedKeyList)>=0)}else{if(dtnode.data.activate){tree.activeNode=dtnode;if(opts.persist){pers.activeKey=dtnode.data.key}}if(dtnode.data.focus){tree.focusNode=dtnode;if(opts.persist){pers.focusedKey=dtnode.data.key}}dtnode.bExpanded=(dtnode.data.expand==true);if(dtnode.bExpanded&&opts.persist){pers.addExpand(dtnode.data.key)}dtnode.bSelected=(dtnode.data.select==true);if(dtnode.bSelected&&opts.persist){pers.addSelect(dtnode.data.key)}}if(opts.minExpandLevel>=dtnode.getLevel()){this.bExpanded=true}if(dtnode.bSelected&&opts.selectMode==3){var p=this;while(p){if(!p.hasSubSel){p._setSubSel(true)}p=p.parent}}if(tree.bEnableUpdate){this.render(true,true)}return dtnode},addChild:function(obj,beforeNode){if(!obj||obj.length==0){return}if(obj instanceof DynaTreeNode){return this._addChildNode(obj,beforeNode)}if(!obj.length){obj=[obj]}var prevFlag=this.tree.enableUpdate(false);var tnFirst=null;for(var i=0;i<obj.length;i++){var data=obj[i];var dtnode=this._addChildNode(new DynaTreeNode(this,this.tree,data),beforeNode);if(!tnFirst){tnFirst=dtnode}if(data.children){dtnode.addChild(data.children,null)}}this.tree.enableUpdate(prevFlag);return tnFirst},append:function(obj){this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");return this.addChild(obj,null)},appendAjax:function(ajaxOptions){this.removeChildren(false,true);this.setLazyNodeStatus(DTNodeStatus_Loading);var self=this;var orgSuccess=ajaxOptions.success;var orgError=ajaxOptions.error;var options=$.extend({},this.tree.options.ajaxDefaults,ajaxOptions,{success:function(data,textStatus){var prevPhase=self.tree.phase;self.tree.phase="init";self.addChild(data,null);self.tree.phase="postInit";self.setLazyNodeStatus(DTNodeStatus_Ok);if(orgSuccess){orgSuccess.call(options,self)}self.tree.phase=prevPhase},error:function(XMLHttpRequest,textStatus,errorThrown){self.setLazyNodeStatus(DTNodeStatus_Error);if(orgError){orgError.call(options,self,XMLHttpRequest,textStatus,errorThrown)}}});$.ajax(options)},lastentry:undefined};var DynaTreeStatus=Class.create();DynaTreeStatus._getTreePersistData=function(cookieId,cookieOpts){var ts=new DynaTreeStatus(cookieId,cookieOpts);ts.read();return ts.toDict()};getDynaTreePersistData=DynaTreeStatus._getTreePersistData;DynaTreeStatus.prototype={initialize:function(cookieId,cookieOpts){this._log("DynaTreeStatus: initialize");if(cookieId===undefined){cookieId=$.ui.dynatree.defaults.cookieId}cookieOpts=$.extend({},$.ui.dynatree.defaults.cookie,cookieOpts);this.cookieId=cookieId;this.cookieOpts=cookieOpts;this.cookiesFound=undefined;this.activeKey=null;this.focusedKey=null;this.expandedKeyList=null;this.selectedKeyList=null},_log:function(msg){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)},read:function(){this._log("DynaTreeStatus: read");this.cookiesFound=false;var cookie=$.cookie(this.cookieId+"-active");this.activeKey=(cookie==null)?"":cookie;if(cookie!=null){this.cookiesFound=true}cookie=$.cookie(this.cookieId+"-focus");this.focusedKey=(cookie==null)?"":cookie;if(cookie!=null){this.cookiesFound=true}cookie=$.cookie(this.cookieId+"-expand");this.expandedKeyList=(cookie==null)?[]:cookie.split(",");if(cookie!=null){this.cookiesFound=true}cookie=$.cookie(this.cookieId+"-select");this.selectedKeyList=(cookie==null)?[]:cookie.split(",");if(cookie!=null){this.cookiesFound=true}},write:function(){this._log("DynaTreeStatus: write");$.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(key){this._log("addExpand(%o)",key);if($.inArray(key,this.expandedKeyList)<0){this.expandedKeyList.push(key);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},clearExpand:function(key){this._log("clearExpand(%o)",key);var idx=$.inArray(key,this.expandedKeyList);if(idx>=0){this.expandedKeyList.splice(idx,1);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},addSelect:function(key){this._log("addSelect(%o)",key);if($.inArray(key,this.selectedKeyList)<0){this.selectedKeyList.push(key);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},clearSelect:function(key){this._log("clearSelect(%o)",key);var idx=$.inArray(key,this.selectedKeyList);if(idx>=0){this.selectedKeyList.splice(idx,1);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound==true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version: 0.5.2$";DynaTree.prototype={initialize:function($widget){this.phase="init";this.$widget=$widget;this.options=$widget.options;this.$tree=$widget.element;this.divTree=this.$tree.get(0)},_load:function(){var $widget=this.$widget;var opts=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.activeNode=null;this.focusNode=null;if(opts.classNames!==$.ui.dynatree.defaults.classNames){opts.classNames=$.extend({},$.ui.dynatree.defaults.classNames,opts.classNames)}if(!opts.imagePath){$("script").each(function(){if(this.src.search(_rexDtLibName)>=0){if(this.src.indexOf("/")>=0){opts.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/"}else{opts.imagePath="skin/"}return false}})}this.persistence=new DynaTreeStatus(opts.cookieId,opts.cookie);if(opts.persist){if(!$.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='"+opts.classNames.empty+"'></span>",tagVline:"<span class='"+opts.classNames.vline+"'></span>",tagExpander:"<span class='"+opts.classNames.expander+"'></span>",tagConnector:"<span class='"+opts.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+opts.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+opts.classNames.checkbox+"'></span>",lastentry:undefined};if(opts.children||(opts.initAjax&&opts.initAjax.url)||opts.initId){$(this.divTree).empty()}else{if(this.divRoot){$(this.divRoot).remove()}}this.tnRoot=new DynaTreeNode(null,this,{title:opts.title,key:"root"});this.tnRoot.data.isFolder=true;this.tnRoot.render(false,false);this.divRoot=this.tnRoot.div;this.divRoot.className=opts.classNames.container;this.divTree.appendChild(this.divRoot);var root=this.tnRoot;var isReloading=(opts.persist&&this.persistence.isReloading());var isLazy=false;var prevFlag=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(opts.children){root.addChild(opts.children)}else{if(opts.initAjax&&opts.initAjax.url){isLazy=true;root.data.isLazy=true;this._reloadAjax()}else{if(opts.initId){this._createFromTag(root,$("#"+opts.initId))}else{var $ul=this.$tree.find(">ul").hide();this._createFromTag(root,$ul);$ul.remove()}}}this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(prevFlag);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";if(opts.persist){this.persistence.write()}if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus()}if(!isLazy&&opts.onPostInit){opts.onPostInit.call(this,isReloading,false)}this.phase="idle"},_reloadAjax:function(){var opts=this.options;if(!opts.initAjax||!opts.initAjax.url){throw"tree.reload() requires 'initAjax' mode."}var pers=this.persistence;var ajaxOpts=$.extend({},opts.initAjax);if(ajaxOpts.addActiveKey){ajaxOpts.data.activeKey=pers.activeKey}if(ajaxOpts.addFocusedKey){ajaxOpts.data.focusedKey=pers.focusedKey}if(ajaxOpts.addExpandedKeyList){ajaxOpts.data.expandedKeyList=pers.expandedKeyList.join(",")}if(ajaxOpts.addSelectedKeyList){ajaxOpts.data.selectedKeyList=pers.selectedKeyList.join(",")}if(opts.onPostInit){if(ajaxOpts.success){this.tree.logWarning("initAjax: success callback is ignored when onPostInit was specified.")}if(ajaxOpts.error){this.tree.logWarning("initAjax: error callback is ignored when onPostInit was specified.")}var isReloading=pers.isReloading();ajaxOpts.success=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,false)};ajaxOpts.error=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,true)}}this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(ajaxOpts)},toString:function(){return"DynaTree '"+this.options.title+"'"},toDict:function(){return this.tnRoot.toDict(true)},getPersistData:function(){return this.persistence.toDict()},logDebug:function(msg){if(this.options.debugLevel>=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}},logInfo:function(msg){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments)}},logWarning:function(msg){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.logDebug("dynatree.redraw()...");this.tnRoot.render(true,true);this.logDebug("dynatree.redraw() done.")},reloadAjax:function(){this.logWarning("tree.reloadAjax() is deprecated since v0.5.2 (use reload() instead).")},reload:function(){this._load()},getRoot:function(){return this.tnRoot},getNodeByKey:function(key){var el=document.getElementById(this.options.idPrefix+key);return(el&&el.dtnode)?el.dtnode:null},getActiveNode:function(){return this.activeNode},reactivate:function(setFocus){var node=this.activeNode;if(node){this.activeNode=null;node.activate();if(setFocus){node.focus()}}},getSelectedNodes:function(stopOnParents){var nodeList=[];this.tnRoot.visit(function(dtnode){if(dtnode.bSelected){nodeList.push(dtnode);if(stopOnParents==true){return false}}});return nodeList},activateKey:function(key){var dtnode=(key===null)?null:this.getNodeByKey(key);if(!dtnode){if(this.activeNode){this.activeNode.deactivate()}this.activeNode=null;return null}dtnode.focus();dtnode.activate();return dtnode},selectKey:function(key,select){var dtnode=this.getNodeByKey(key);if(!dtnode){return null}dtnode.select(select);return dtnode},enableUpdate:function(bEnable){if(this.bEnableUpdate==bEnable){return bEnable}this.bEnableUpdate=bEnable;if(bEnable){this.redraw()}return !bEnable},visit:function(fn,data,includeRoot){return this.tnRoot.visit(fn,data,includeRoot)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this);var $liSpan=$li.find(">span:first");var title;if($liSpan.length){title=$liSpan.html()}else{title=$li.html();var iPos=title.search(/<ul/i);if(iPos>=0){title=$.trim(title.substring(0,iPos))}else{title=$.trim(title)}}var data={title:title,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused")};if($li.attr("title")){data.tooltip=$li.attr("title")}if($li.attr("id")){data.key=$li.attr("id")}if($li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){if(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);var $ul=$li.find(">ul:first");if($ul.length){self._createFromTag(childNode,$ul)}})},_checkConsistency:function(){},lastentry:undefined};$.widget("ui.dynatree",{init:function(){_log("warn","ui.dynatree.init() was called; you should upgrade to ui.core.js v1.6 or higher.");return this._init()},_init:function(){logMsg("Dynatree._init(): version='%s', debugLevel=%o.",DynaTree.version,this.options.debugLevel);var opts=this.options;this.options.event+=".dynatree";var divTree=this.element.get(0);this.tree=new DynaTree(this);this.tree._load();this.tree.logDebug("Dynatree._init(): done.")},bind:function(){var $this=this.element;var o=this.options;this.unbind();function __getNodeFromElement(el){var iMax=5;while(el&&iMax--){if(el.dtnode){return el.dtnode}el=el.parentNode}return null}var eventNames="click.dynatree dblclick.dynatree";if(o.keyboard){eventNames+=" keypress.dynatree keydown.dynatree"}$this.bind(eventNames,function(event){var dtnode=__getNodeFromElement(event.target);if(!dtnode){return true}var prevPhase=dtnode.tree.phase;dtnode.tree.phase="userEvent";try{dtnode.tree.logDebug("bind(%o): dtnode: %o",event,dtnode);switch(event.type){case"click":return(o.onClick&&o.onClick(dtnode,event)===false)?false:dtnode.onClick(event);case"dblclick":return(o.onDblClick&&o.onDblClick(dtnode,event)===false)?false:dtnode.onDblClick(event);case"keydown":return(o.onKeydown&&o.onKeydown(dtnode,event)===false)?false:dtnode.onKeydown(event);case"keypress":return(o.onKeypress&&o.onKeypress(dtnode,event)===false)?false:dtnode.onKeypress(event)}}catch(e){var _=null}finally{dtnode.tree.phase=prevPhase}});function __focusHandler(event){event=arguments[0]=$.event.fix(event||window.event);var dtnode=__getNodeFromElement(event.target);return dtnode?dtnode.onFocus(event):false}var div=this.tree.divTree;if(div.addEventListener){div.addEventListener("focus",__focusHandler,true);div.addEventListener("blur",__focusHandler,true)}else{div.onfocusin=div.onfocusout=__focusHandler}},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});$.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes";$.ui.dynatree.defaults={title:"Dynatree root",rootVisible:false,minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:true,keyboard:true,persist:false,autoCollapse:false,clickFolderMode:3,activeVisible:true,checkbox:false,selectMode:2,fx:null,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,ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading&#8230;",loadError:"Load error!"},idPrefix:"ui-dynatree-id-",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"ui-dynatree-container",folder:"ui-dynatree-folder",document:"ui-dynatree-document",empty:"ui-dynatree-empty",vline:"ui-dynatree-vline",expander:"ui-dynatree-expander",connector:"ui-dynatree-connector",checkbox:"ui-dynatree-checkbox",nodeIcon:"ui-dynatree-icon",title:"ui-dynatree-title",nodeError:"ui-dynatree-statusnode-error",nodeWait:"ui-dynatree-statusnode-wait",hidden:"ui-dynatree-hidden",combinedExpanderPrefix:"ui-dynatree-exp-",combinedIconPrefix:"ui-dynatree-ico-",hasChildren:"ui-dynatree-has-children",active:"ui-dynatree-active",selected:"ui-dynatree-selected",expanded:"ui-dynatree-expanded",lazy:"ui-dynatree-lazy",focused:"ui-dynatree-focused",partsel:"ui-dynatree-partsel",lastsib:"ui-dynatree-lastsib"},debugLevel:1,lastentry:undefined};$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:false,isLazy:false,tooltip:null,icon:null,addClass:null,activate:false,focus:false,expand:false,select:false,hideCheckbox:false,unselectable:false,children:null,lastentry:undefined}})(jQuery);var _rexDtLibName=/.*dynatree[^/]*\.js$/i;
1
+ var _canLog=true;function _log(g){if(_canLog){var j=Array.prototype.slice.apply(arguments,[1]),i=new Date;i=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();j[0]=i+" - "+j[0];try{switch(g){case "info":window.console.info.apply(window.console,j);break;case "warn":window.console.warn.apply(window.console,j);break;default:window.console.log.apply(window.console,j)}}catch(k){window.console||(_canLog=false)}}}
2
+ function logMsg(){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}var getDynaTreePersistData=undefined,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;
3
+ (function(g){var j={create:function(){return function(){this.initialize.apply(this,arguments)}}},i=j.create();i.prototype={initialize:function(a,b,c){this.parent=a;this.tree=b;if(typeof c=="string")c={title:c};if(c.key==undefined)c.key="_"+b._nodeCount++;this.data=g.extend({},g.ui.dynatree.nodedatadefaults,c);this.childList=this.span=this.div=null;this.hasSubSel=this.isLoading=false},toString:function(){return"dtnode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(a,b){var c=g.extend({},
4
+ this.data);c.activate=this.tree.activeNode===this;c.focus=this.tree.focusNode===this;c.expand=this.bExpanded;c.select=this.bSelected;b&&b(c);if(a&&this.childList){c.children=[];for(a=0;a<this.childList.length;a++)c.children.push(this.childList[a].toDict(true,b))}else delete c.children;return c},_getInnerHtml:function(){for(var a=this.tree.options,b=this.tree.cache,c=a.rootVisible?null:this.tree.tnRoot,d=a.rootVisible&&a.minExpandLevel>0||a.minExpandLevel>1,e=a.rootVisible||a.minExpandLevel>0,f="",
5
+ h=this.parent;h;){if(e&&h==c)break;f=(h.isLastSibling()?b.tagEmpty:b.tagVline)+f;h=h.parent}d&&this.parent==c||(f+=this.childList||this.data.isLazy?b.tagExpander:b.tagConnector);if(a.checkbox&&this.data.hideCheckbox!=true&&!this.data.isStatusNode)f+=b.tagCheckbox;if(this.data.icon)f+="<img src='"+a.imagePath+this.data.icon+"' alt='' />";else if(this.data.icon!=false)f+=b.tagNodeIcon;f+="<a href='#' class='"+a.classNames.title+"'"+(this.data&&typeof this.data.tooltip=="string"?" title='"+this.data.tooltip+
6
+ "'":"")+">"+this.data.title+"</a>";return f},_fixOrder:function(){var a=this.childList;if(a)for(var b=this.div.firstChild.nextSibling,c=0;c<a.length-1;c++){var d=a[c],e=b.firstChild.dtnode;if(d!==e){this.tree.logDebug("_fixOrder: mismatch at index "+c+": "+d+" != "+e);this.div.insertBefore(d.div,e.div)}else b=b.nextSibling}},render:function(a,b){var c=this.tree.options.classNames,d=this.isLastSibling();if(!this.div){this.span=document.createElement("span");this.span.dtnode=this;if(this.data.key)this.span.id=
7
+ this.tree.options.idPrefix+this.data.key;this.div=document.createElement("div");this.div.appendChild(this.span);this.parent&&this.parent.div.appendChild(this.div);if(this.parent==null&&!this.tree.options.rootVisible)this.span.style.display="none"}this.span.innerHTML=this._getInnerHtml();this.div.style.display=this.parent==null||this.parent.bExpanded?"":"none";var e=[];e.push(this.data.isFolder?c.folder:c.document);this.bExpanded&&e.push(c.expanded);this.childList!=null&&e.push(c.hasChildren);this.data.isLazy&&
8
+ this.childList==null&&e.push(c.lazy);d&&e.push(c.lastsib);this.bSelected&&e.push(c.selected);this.hasSubSel&&e.push(c.partsel);this.tree.activeNode===this&&e.push(c.active);this.data.addClass&&e.push(this.data.addClass);e.push(c.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(this.data.isLazy&&this.childList==null?"d":"")+(d?"l":""));e.push(c.combinedIconPrefix+(this.bExpanded?"e":"c")+(this.data.isFolder?"f":""));this.span.className=e.join(" ");if(a&&this.childList&&(b||this.bExpanded)){for(c=0;c<
9
+ this.childList.length;c++)this.childList[c].render(a,b);this._fixOrder()}},hasChildren:function(){return this.childList!=null},isLastSibling:function(){var a=this.parent;if(!a)return true;return a.childList[a.childList.length-1]===this},prevSibling:function(){if(!this.parent)return null;for(var a=this.parent.childList,b=1;b<a.length;b++)if(a[b]===this)return a[b-1];return null},nextSibling:function(){if(!this.parent)return null;for(var a=this.parent.childList,b=0;b<a.length-1;b++)if(a[b]===this)return a[b+
10
+ 1];return null},_setStatusNode:function(a){var b=this.childList?this.childList[0]:null;if(a)if(b){a.isStatusNode=true;b.data=a;b.render(false,false)}else{a.isStatusNode=true;this.addChild(a)}else if(b){this.div.removeChild(b.div);if(this.childList.length==1)this.childList=null;else this.childList.shift()}},setLazyNodeStatus:function(a){switch(a){case DTNodeStatus_Ok:this._setStatusNode(null);this.isLoading=false;this.render(false,false);if(this.tree.options.autoFocus)this===this.tree.tnRoot&&!this.tree.options.rootVisible&&
11
+ this.childList?this.childList[0].focus():this.focus();break;case DTNodeStatus_Loading:this.isLoading=true;this._setStatusNode({title:this.tree.options.strings.loading,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+a+"'.";}},_parentList:function(a,b){var c=[];for(b=b?this:this.parent;b;){if(a||
12
+ b.parent)c.unshift(b);b=b.parent}return c},getLevel:function(){for(var a=0,b=this.parent;b;){a++;b=b.parent}return a},_getTypeForOuterNodeEvent:function(a){var b=this.tree.options.classNames,c=a.target;if(c.className.indexOf(b.folder)<0&&c.className.indexOf(b.document)<0)return null;var d=a.pageX-c.offsetLeft;a=a.pageY-c.offsetTop;for(var e=0;e<c.childNodes.length;e++){var f=c.childNodes[e],h=f.offsetLeft-c.offsetLeft,l=f.offsetTop-c.offsetTop,n=f.clientWidth,o=f.clientHeight;if(d>=h&&d<=h+n&&a>=
13
+ l&&a<=l+o)if(f.className==b.title)return"title";else if(f.className==b.expander)return"expander";else if(f.className==b.checkbox)return"checkbox";else if(f.className==b.nodeIcon)return"icon"}return"prefix"},getEventTargetType:function(a){var b=a&&a.target?a.target.className:"",c=this.tree.options.classNames;if(b==c.title)return"title";else if(b==c.expander)return"expander";else if(b==c.checkbox)return"checkbox";else if(b==c.nodeIcon)return"icon";else if(b==c.empty||b==c.vline||b==c.connector)return"prefix";
14
+ else if(b.indexOf(c.folder)>=0||b.indexOf(c.document)>=0)return this._getTypeForOuterNodeEvent(a);return null},isVisible:function(){for(var a=this._parentList(true,false),b=0;b<a.length;b++)if(!a[b].bExpanded)return false;return true},makeVisible:function(){for(var a=this._parentList(true,false),b=0;b<a.length;b++)a[b]._expand(true)},focus:function(){this.makeVisible();try{g(this.span).find(">a").focus()}catch(a){}},_activate:function(a,b){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",
15
+ a,b,this);var c=this.tree.options;if(!this.data.isStatusNode)if(!(b&&c.onQueryActivate&&c.onQueryActivate.call(this.span,a,this)==false))if(a){if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}c.activeVisible&&this.makeVisible();this.tree.activeNode=this;c.persist&&g.cookie(c.cookieId+"-active",this.data.key,c.cookie);this.tree.persistence.activeKey=this.data.key;g(this.span).addClass(c.classNames.active);b&&c.onActivate&&c.onActivate.call(this.span,
16
+ this)}else if(this.tree.activeNode===this){c=this.tree.options;if(!(c.onQueryActivate&&c.onQueryActivate.call(this.span,false,this)==false)){g(this.span).removeClass(c.classNames.active);c.persist&&g.cookie(c.cookieId+"-active","",c.cookie);this.tree.persistence.activeKey=null;this.tree.activeNode=null;b&&c.onDeactivate&&c.onDeactivate.call(this.span,this)}}},activate:function(){this._activate(true,true)},deactivate:function(){this._activate(false,true)},isActive:function(){return this.tree.activeNode===
17
+ this},_userActivate:function(){var a=true,b=false;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:a=false;b=true;break;case 3:a=b=true;break}if(this.parent==null&&this.tree.options.minExpandLevel>0)b=false;if(b){this.toggleExpand();this.focus()}a&&this.activate()},_setSubSel:function(a){if(a){this.hasSubSel=true;g(this.span).addClass(this.tree.options.classNames.partsel)}else{this.hasSubSel=false;g(this.span).removeClass(this.tree.options.classNames.partsel)}},_fixSelectionState:function(){if(this.bSelected){this.visit(function(e){e.parent._setSubSel(true);
18
+ e._select(true,false,false)});for(var a=this.parent;a;){a._setSubSel(true);for(var b=true,c=0;c<a.childList.length;c++){var d=a.childList[c];if(!d.bSelected&&!d.data.isStatusNode){b=false;break}}b&&a._select(true,false,false);a=a.parent}}else{this._setSubSel(false);this.visit(function(e){e._setSubSel(false);e._select(false,false,false)});for(a=this.parent;a;){a._select(false,false,false);b=false;for(c=0;c<a.childList.length;c++)if(a.childList[c].bSelected||a.childList[c].hasSubSel){b=true;break}a._setSubSel(b);
19
+ a=a.parent}}},_select:function(a,b,c){var d=this.tree.options;if(!this.data.isStatusNode)if(this.bSelected!=a)if(!(b&&d.onQuerySelect&&d.onQuerySelect.call(this.span,a,this)==false)){d.selectMode==1&&a&&this.tree.visit(function(e){if(e.bSelected){e._select(false,false,false);return false}});if(this.bSelected=a){d.persist&&this.tree.persistence.addSelect(this.data.key);g(this.span).addClass(d.classNames.selected);c&&d.selectMode==3&&this._fixSelectionState();b&&d.onSelect&&d.onSelect.call(this.span,
20
+ true,this)}else{d.persist&&this.tree.persistence.clearSelect(this.data.key);g(this.span).removeClass(d.classNames.selected);c&&d.selectMode==3&&this._fixSelectionState();b&&d.onSelect&&d.onSelect.call(this.span,false,this)}}},select:function(a){if(this.data.unselectable)return this.bSelected;return this._select(a!=false,true,true)},toggleSelect:function(){return this.select(!this.bSelected)},isSelected:function(){return this.bSelected},_loadContent:function(){try{var a=this.tree.options;this.tree.logDebug("_loadContent: start - %o",
21
+ this);this.setLazyNodeStatus(DTNodeStatus_Loading);if(true==a.onLazyRead.call(this.span,this)){this.setLazyNodeStatus(DTNodeStatus_Ok);this.tree.logDebug("_loadContent: succeeded - %o",this)}}catch(b){alert(b);this.setLazyNodeStatus(DTNodeStatus_Error)}},_expand:function(a){if(this.bExpanded!=a){var b=this.tree.options;if(!a&&this.getLevel()<b.minExpandLevel)this.tree.logDebug("dtnode._expand(%o) forced expand - %o",a,this);else if(!(b.onQueryExpand&&b.onQueryExpand.call(this.span,a,this)==false)){this.bExpanded=
22
+ a;if(b.persist)a?this.tree.persistence.addExpand(this.data.key):this.tree.persistence.clearExpand(this.data.key);this.render(false);if(this.bExpanded&&this.parent&&b.autoCollapse)for(var c=this._parentList(false,true),d=0;d<c.length;d++)c[d].collapseSiblings();b.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()&&this.tree.activeNode.deactivate();if(a&&this.data.isLazy&&this.childList==null&&!this.isLoading)this._loadContent();else{c=b.fx?b.fx.duration||200:0;if(this.childList)for(d=
23
+ 0;d<this.childList.length;d++){var e=g(this.childList[d].div);if(c)a!=e.is(":visible")&&e.animate(b.fx,c);else a?e.show():e.hide()}b.onExpand&&b.onExpand.call(this.span,a,this)}}}},expand:function(a){!this.childList&&!this.data.isLazy&&a||this.parent==null&&this.tree.options.minExpandLevel>0&&!a||this._expand(a)},toggleExpand:function(){this.expand(!this.bExpanded)},collapseSiblings:function(){if(this.parent!=null)for(var a=this.parent.childList,b=0;b<a.length;b++)a[b]!==this&&a[b].bExpanded&&a[b]._expand(false)},
24
+ onClick:function(a){a=this.getEventTargetType(a);if(a=="expander"){this.toggleExpand();this.focus()}else if(a=="checkbox"){this.toggleSelect();this.focus()}else{this._userActivate();this.span.getElementsByTagName("a")[0].focus()}return false},onDblClick:function(){},onKeydown:function(a){var b=true;switch(a.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();
25
+ break;case 37:if(this.bExpanded){this.toggleExpand();this.focus()}else if(this.parent&&(this.tree.options.rootVisible||this.parent.parent))this.parent.focus();break;case 39:if(!this.bExpanded&&(this.childList||this.data.isLazy)){this.toggleExpand();this.focus()}else this.childList&&this.childList[0].focus();break;case 38:for(var c=this.prevSibling();c&&c.bExpanded&&c.childList;)c=c.childList[c.childList.length-1];if(!c&&this.parent&&(this.tree.options.rootVisible||this.parent.parent))c=this.parent;
26
+ c&&c.focus();break;case 40:if(this.bExpanded&&this.childList)c=this.childList[0];else{a=this._parentList(false,true);for(var d=a.length-1;d>=0;d--)if(c=a[d].nextSibling())break}c&&c.focus();break;default:b=false}return!b},onKeypress:function(){},onFocus:function(a){var b=this.tree.options;if(a.type=="blur"||a.type=="focusout"){b.onBlur&&b.onBlur.call(this.span,this);this.tree.tnFocused&&g(this.tree.tnFocused.span).removeClass(b.classNames.focused);this.tree.tnFocused=null;b.persist&&g.cookie(b.cookieId+
27
+ "-focus","",b.cookie)}else if(a.type=="focus"||a.type=="focusin"){if(this.tree.tnFocused&&this.tree.tnFocused!==this){this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused);g(this.tree.tnFocused.span).removeClass(b.classNames.focused)}this.tree.tnFocused=this;b.onFocus&&b.onFocus.call(this.span,this);g(this.tree.tnFocused.span).addClass(b.classNames.focused);b.persist&&g.cookie(b.cookieId+"-focus",this.data.key,b.cookie)}},visit:function(a,b,c){var d=0;if(c==true){if(a(this,
28
+ b)==false)return 1;d++}if(this.childList)for(c=0;c<this.childList.length;c++)d+=this.childList[c].visit(a,b,true);return d},remove:function(){if(this===this.tree.root)return false;return this.parent.removeChild(this)},removeChild:function(a){var b=this.childList;if(b.length==1){if(a!==b[0])throw"removeChild: invalid child";return this.removeChildren()}a===this.tree.activeNode&&a.deactivate();if(this.tree.options.persist){a.bSelected&&this.tree.persistence.clearSelect(a.data.key);a.bExpanded&&this.tree.persistence.clearExpand(a.data.key)}a.removeChildren(true);
29
+ this.div.removeChild(a.div);for(var c=0;c<b.length;c++)if(b[c]===a){this.childList.splice(c,1);delete a;break}},removeChildren:function(a,b){var c=this.tree,d=this.childList;if(d){for(var e=0;e<d.length;e++){var f=d[e];f===c.activeNode&&!b&&f.deactivate();if(this.tree.options.persist&&!b){f.bSelected&&this.tree.persistence.clearSelect(f.data.key);f.bExpanded&&this.tree.persistence.clearExpand(f.data.key)}f.removeChildren(true,b);this.div.removeChild(f.div);delete f}this.childList=null}if(!a){this.isLoading=
30
+ false;this.render(false,false)}},reload:function(a){if(this.parent==null)return this.tree.reload();if(!this.data.isLazy)throw"node.reload() requires lazy nodes.";if(this.bExpanded){this.expand(false);this.removeChildren();this.expand(true)}else{this.removeChildren();a&&this._loadContent()}},_addChildNode:function(a,b){var c=this.tree,d=c.options,e=c.persistence;a.parent=this;if(this.childList==null)this.childList=[];else b||g(this.childList[this.childList.length-1].span).removeClass(d.classNames.lastsib);
31
+ if(b){b=g.inArray(b,this.childList);if(b<0)throw"<beforeNode> must be a child of <this>";this.childList.splice(b,0,a)}else this.childList.push(a);b=c.isInitializing();if(d.persist&&e.cookiesFound&&b){if(e.activeKey==a.data.key)c.activeNode=a;if(e.focusedKey==a.data.key)c.focusNode=a;a.bExpanded=g.inArray(a.data.key,e.expandedKeyList)>=0;a.bSelected=g.inArray(a.data.key,e.selectedKeyList)>=0}else{if(a.data.activate){c.activeNode=a;if(d.persist)e.activeKey=a.data.key}if(a.data.focus){c.focusNode=a;
32
+ if(d.persist)e.focusedKey=a.data.key}a.bExpanded=a.data.expand==true;a.bExpanded&&d.persist&&e.addExpand(a.data.key);a.bSelected=a.data.select==true;a.bSelected&&d.persist&&e.addSelect(a.data.key)}if(d.minExpandLevel>=a.getLevel())this.bExpanded=true;if(a.bSelected&&d.selectMode==3)for(d=this;d;){d.hasSubSel||d._setSubSel(true);d=d.parent}c.bEnableUpdate&&this.render(true,true);return a},addChild:function(a,b){if(!(!a||a.length==0)){if(a instanceof i)return this._addChildNode(a,b);a.length||(a=[a]);
33
+ for(var c=this.tree.enableUpdate(false),d=null,e=0;e<a.length;e++){var f=a[e],h=this._addChildNode(new i(this,this.tree,f),b);d||(d=h);f.children&&h.addChild(f.children,null)}this.tree.enableUpdate(c);return d}},append:function(a){this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");return this.addChild(a,null)},appendAjax:function(a){this.removeChildren(false,true);this.setLazyNodeStatus(DTNodeStatus_Loading);var b=this,c=a.success,d=a.error,e=g.extend({},this.tree.options.ajaxDefaults,
34
+ a,{success:function(f){var h=b.tree.phase;b.tree.phase="init";b.addChild(f,null);b.tree.phase="postInit";b.setLazyNodeStatus(DTNodeStatus_Ok);c&&c.call(e,b);b.tree.phase=h},error:function(f,h,l){b.setLazyNodeStatus(DTNodeStatus_Error);d&&d.call(e,b,f,h,l)}});g.ajax(e)},lastentry:undefined};var k=j.create();k._getTreePersistData=function(a,b){a=new k(a,b);a.read();return a.toDict()};getDynaTreePersistData=k._getTreePersistData;k.prototype={initialize:function(a,b){this._log("DynaTreeStatus: initialize");
35
+ if(a===undefined)a=g.ui.dynatree.defaults.cookieId;b=g.extend({},g.ui.dynatree.defaults.cookie,b);this.cookieId=a;this.cookieOpts=b;this.cookiesFound=undefined;this.selectedKeyList=this.expandedKeyList=this.focusedKey=this.activeKey=null},_log:function(){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)},read:function(){this._log("DynaTreeStatus: read");this.cookiesFound=false;var a=g.cookie(this.cookieId+"-active");this.activeKey=a==null?"":a;if(a!=null)this.cookiesFound=
36
+ true;a=g.cookie(this.cookieId+"-focus");this.focusedKey=a==null?"":a;if(a!=null)this.cookiesFound=true;a=g.cookie(this.cookieId+"-expand");this.expandedKeyList=a==null?[]:a.split(",");if(a!=null)this.cookiesFound=true;a=g.cookie(this.cookieId+"-select");this.selectedKeyList=a==null?[]:a.split(",");if(a!=null)this.cookiesFound=true},write:function(){this._log("DynaTreeStatus: write");g.cookie(this.cookieId+"-active",this.activeKey==null?"":this.activeKey,this.cookieOpts);g.cookie(this.cookieId+"-focus",
37
+ this.focusedKey==null?"":this.focusedKey,this.cookieOpts);g.cookie(this.cookieId+"-expand",this.expandedKeyList==null?"":this.expandedKeyList.join(","),this.cookieOpts);g.cookie(this.cookieId+"-select",this.selectedKeyList==null?"":this.selectedKeyList.join(","),this.cookieOpts)},addExpand:function(a){this._log("addExpand(%o)",a);if(g.inArray(a,this.expandedKeyList)<0){this.expandedKeyList.push(a);g.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},clearExpand:function(a){this._log("clearExpand(%o)",
38
+ a);a=g.inArray(a,this.expandedKeyList);if(a>=0){this.expandedKeyList.splice(a,1);g.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},addSelect:function(a){this._log("addSelect(%o)",a);if(g.inArray(a,this.selectedKeyList)<0){this.selectedKeyList.push(a);g.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},clearSelect:function(a){this._log("clearSelect(%o)",a);a=g.inArray(a,this.selectedKeyList);if(a>=0){this.selectedKeyList.splice(a,1);g.cookie(this.cookieId+
39
+ "-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound==true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var m=j.create();m.version="$Version: 0.5.2$";m.prototype={initialize:function(a){this.phase="init";this.$widget=a;this.options=a.options;this.$tree=a.element;this.divTree=this.$tree.get(0)},
40
+ _load:function(){var a=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.focusNode=this.activeNode=null;if(a.classNames!==g.ui.dynatree.defaults.classNames)a.classNames=g.extend({},g.ui.dynatree.defaults.classNames,a.classNames);a.imagePath||g("script").each(function(){if(this.src.search(_rexDtLibName)>=0){a.imagePath=this.src.indexOf("/")>=0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/";return false}});this.persistence=new k(a.cookieId,a.cookie);if(a.persist){g.cookie||_log("warn",
41
+ "Please include jquery.cookie.js to use persistence.");this.persistence.read()}this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"<span class='"+a.classNames.empty+"'></span>",tagVline:"<span class='"+a.classNames.vline+"'></span>",tagExpander:"<span class='"+a.classNames.expander+"'></span>",tagConnector:"<span class='"+a.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+a.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+a.classNames.checkbox+
42
+ "'></span>",lastentry:undefined};if(a.children||a.initAjax&&a.initAjax.url||a.initId)g(this.divTree).empty();else this.divRoot&&g(this.divRoot).remove();this.tnRoot=new i(null,this,{title:a.title,key:"root"});this.tnRoot.data.isFolder=true;this.tnRoot.render(false,false);this.divRoot=this.tnRoot.div;this.divRoot.className=a.classNames.container;this.divTree.appendChild(this.divRoot);var b=this.tnRoot,c=a.persist&&this.persistence.isReloading(),d=false,e=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");
43
+ if(a.children)b.addChild(a.children);else if(a.initAjax&&a.initAjax.url){d=true;b.data.isLazy=true;this._reloadAjax()}else if(a.initId)this._createFromTag(b,g("#"+a.initId));else{var f=this.$tree.find(">ul").hide();this._createFromTag(b,f);f.remove()}this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(e);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";a.persist&&this.persistence.write();
44
+ if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus()}!d&&a.onPostInit&&a.onPostInit.call(this,c,false);this.phase="idle"},_reloadAjax:function(){var a=this.options;if(!a.initAjax||!a.initAjax.url)throw"tree.reload() requires 'initAjax' mode.";var b=this.persistence,c=g.extend({},a.initAjax);if(c.addActiveKey)c.data.activeKey=b.activeKey;if(c.addFocusedKey)c.data.focusedKey=b.focusedKey;if(c.addExpandedKeyList)c.data.expandedKeyList=
45
+ b.expandedKeyList.join(",");if(c.addSelectedKeyList)c.data.selectedKeyList=b.selectedKeyList.join(",");if(a.onPostInit){c.success&&this.tree.logWarning("initAjax: success callback is ignored when onPostInit was specified.");c.error&&this.tree.logWarning("initAjax: error callback is ignored when onPostInit was specified.");var d=b.isReloading();c.success=function(e){a.onPostInit.call(e.tree,d,false)};c.error=function(e){a.onPostInit.call(e.tree,d,true)}}this.logDebug("Dynatree._init(): send Ajax request...");
46
+ this.tnRoot.appendAjax(c)},toString:function(){return"DynaTree '"+this.options.title+"'"},toDict:function(){return this.tnRoot.toDict(true)},getPersistData:function(){return this.persistence.toDict()},logDebug:function(){if(this.options.debugLevel>=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}},logInfo:function(){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments)}},logWarning:function(){Array.prototype.unshift.apply(arguments,
47
+ ["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.logDebug("dynatree.redraw()...");this.tnRoot.render(true,true);this.logDebug("dynatree.redraw() done.")},reloadAjax:function(){this.logWarning("tree.reloadAjax() is deprecated since v0.5.2 (use reload() instead).")},
48
+ reload:function(){this._load()},getRoot:function(){return this.tnRoot},getNodeByKey:function(a){return(a=document.getElementById(this.options.idPrefix+a))&&a.dtnode?a.dtnode:null},getActiveNode:function(){return this.activeNode},reactivate:function(a){var b=this.activeNode;if(b){this.activeNode=null;b.activate();a&&b.focus()}},getSelectedNodes:function(a){var b=[];this.tnRoot.visit(function(c){if(c.bSelected){b.push(c);if(a==true)return false}});return b},activateKey:function(a){a=a===null?null:this.getNodeByKey(a);
49
+ if(!a){this.activeNode&&this.activeNode.deactivate();return this.activeNode=null}a.focus();a.activate();return a},selectKey:function(a,b){a=this.getNodeByKey(a);if(!a)return null;a.select(b);return a},enableUpdate:function(a){if(this.bEnableUpdate==a)return a;(this.bEnableUpdate=a)&&this.redraw();return!a},visit:function(a,b,c){return this.tnRoot.visit(a,b,c)},_createFromTag:function(a,b){var c=this;b.find(">li").each(function(){var d=g(this),e=d.find(">span:first");if(e.length)e=e.html();else{e=
50
+ d.html();var f=e.search(/<ul/i);e=f>=0?g.trim(e.substring(0,f)):g.trim(e)}e={title:e,isFolder:d.hasClass("folder"),isLazy:d.hasClass("lazy"),expand:d.hasClass("expanded"),select:d.hasClass("selected"),activate:d.hasClass("active"),focus:d.hasClass("focused")};if(d.attr("title"))e.tooltip=d.attr("title");if(d.attr("id"))e.key=d.attr("id");if(d.attr("data"))if(f=g.trim(d.attr("data"))){if(f.charAt(0)!="{")f="{"+f+"}";try{g.extend(e,eval("("+f+")"))}catch(h){throw"Error parsing node data: "+h+"\ndata:\n'"+
51
+ f+"'";}}childNode=a.addChild(e);d=d.find(">ul:first");d.length&&c._createFromTag(childNode,d)})},_checkConsistency:function(){},lastentry:undefined};g.widget("ui.dynatree",{init:function(){_log("warn","ui.dynatree.init() was called; you should upgrade to ui.core.js v1.6 or higher.");return this._init()},_init:function(){logMsg("Dynatree._init(): version='%s', debugLevel=%o.",m.version,this.options.debugLevel);this.options.event+=".dynatree";this.element.get(0);this.tree=new m(this);this.tree._load();
52
+ this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function a(f){for(var h=5;f&&h--;){if(f.dtnode)return f.dtnode;f=f.parentNode}return null}function b(f){f=f=g.event.fix(f||window.event);var h=a(f.target);return h?h.onFocus(f):false}var c=this.element,d=this.options;this.unbind();var e="click.dynatree dblclick.dynatree";if(d.keyboard)e+=" keypress.dynatree keydown.dynatree";c.bind(e,function(f){var h=a(f.target);if(!h)return true;var l=h.tree.phase;h.tree.phase="userEvent";try{h.tree.logDebug("bind(%o): dtnode: %o",
53
+ f,h);switch(f.type){case "click":return d.onClick&&d.onClick(h,f)===false?false:h.onClick(f);case "dblclick":return d.onDblClick&&d.onDblClick(h,f)===false?false:h.onDblClick(f);case "keydown":return d.onKeydown&&d.onKeydown(h,f)===false?false:h.onKeydown(f);case "keypress":return d.onKeypress&&d.onKeypress(h,f)===false?false:h.onKeypress(f)}}catch(n){}finally{h.tree.phase=l}});c=this.tree.divTree;if(c.addEventListener){c.addEventListener("focus",b,true);c.addEventListener("blur",b,true)}else c.onfocusin=
54
+ c.onfocusout=b},unbind:function(){this.element.unbind(".dynatree")},enable:function(){this.bind();g.widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind();g.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});g.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes";
55
+ g.ui.dynatree.defaults={title:"Dynatree root",rootVisible:false,minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:true,keyboard:true,persist:false,autoCollapse:false,clickFolderMode:3,activeVisible:true,checkbox:false,selectMode:2,fx:null,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,
56
+ ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading&#8230;",loadError:"Load error!"},idPrefix:"ui-dynatree-id-",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"ui-dynatree-container",folder:"ui-dynatree-folder",document:"ui-dynatree-document",empty:"ui-dynatree-empty",vline:"ui-dynatree-vline",expander:"ui-dynatree-expander",connector:"ui-dynatree-connector",checkbox:"ui-dynatree-checkbox",nodeIcon:"ui-dynatree-icon",title:"ui-dynatree-title",nodeError:"ui-dynatree-statusnode-error",
57
+ nodeWait:"ui-dynatree-statusnode-wait",hidden:"ui-dynatree-hidden",combinedExpanderPrefix:"ui-dynatree-exp-",combinedIconPrefix:"ui-dynatree-ico-",hasChildren:"ui-dynatree-has-children",active:"ui-dynatree-active",selected:"ui-dynatree-selected",expanded:"ui-dynatree-expanded",lazy:"ui-dynatree-lazy",focused:"ui-dynatree-focused",partsel:"ui-dynatree-partsel",lastsib:"ui-dynatree-lastsib"},debugLevel:1,lastentry:undefined};g.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:false,isLazy:false,
58
+ tooltip:null,icon:null,addClass:null,activate:false,focus:false,expand:false,select:false,hideCheckbox:false,unselectable:false,children:null,lastentry:undefined}})(jQuery);var _rexDtLibName=/.*dynatree[^/]*\.js$/i;
@@ -1,177 +1,177 @@
1
- // Generated by compass-jquery-plugin/gem-tasks/dynatree.rake
2
-
3
- div.ui-dynatree-container
4
- font-family: segoe ui, tahoma, verdana, arial, helvetica, sans-serif
5
- font-size: 1.0em
6
- white-space: nowrap
7
- padding: 3px
8
- background-color: white
9
- border: 1px dotted #aaaaaa
10
- -moz-border-radius: 4px
11
- -webkit-border-radius: 4px
12
- border-radius: 4px
13
-
14
- img
15
- width: 16px
16
- height: 16px
17
- margin-left: 3px
18
- vertical-align: top
19
-
20
- a
21
- color: black
22
- text-decoration: none
23
- vertical-align: top
24
- margin: 0px
25
- margin-left: 3px
26
- border: 1px solid white
27
-
28
- &:hover
29
- text-decoration: underline
30
-
31
- &:focus
32
- background-color: #EFEBDE
33
-
34
-
35
- .ui-dynatree-disabled div.ui-dynatree-container
36
- opacity: 0.5
37
- background-color: silver
38
-
39
-
40
- span
41
- &.ui-dynatree-empty, &.ui-dynatree-vline, &.ui-dynatree-connector
42
- width: 16px
43
- height: 16px
44
- display: -moz-inline-box
45
- display: inline-block
46
- vertical-align: top
47
- background-repeat: no-repeat
48
- background-position: left
49
-
50
- &.ui-dynatree-expander
51
- width: 16px
52
- height: 16px
53
- display: -moz-inline-box
54
- display: inline-block
55
- vertical-align: top
56
- background-repeat: no-repeat
57
- background-position: left
58
- background-image: url("/images/jquery.ui/dynatree.aqua/collapsed.png")
59
-
60
- &:hover
61
- background-image: url("/images/jquery.ui/dynatree.aqua/collapsed_hover.png")
62
-
63
- &.ui-dynatree-icon
64
- width: 16px
65
- height: 16px
66
- display: -moz-inline-box
67
- display: inline-block
68
- vertical-align: top
69
- background-repeat: no-repeat
70
- background-position: left
71
- margin-left: 3px
72
- background-image: url("/images/jquery.ui/dynatree.aqua/document.png")
73
-
74
- &.ui-dynatree-checkbox
75
- width: 16px
76
- height: 16px
77
- display: -moz-inline-box
78
- display: inline-block
79
- vertical-align: top
80
- background-repeat: no-repeat
81
- background-position: left
82
- margin-left: 3px
83
- background-image: url("/images/jquery.ui/dynatree.aqua/cbUnchecked.png")
84
-
85
- &:hover
86
- background-image: url("/images/jquery.ui/dynatree.aqua/cbUnchecked_hover.png")
87
-
88
- &.ui-dynatree-radio
89
- margin-left: 3px
90
- background-image: url("/images/jquery.ui/dynatree.aqua/rbUnchecked.png")
91
-
92
- &:hover
93
- background-image: url("/images/jquery.ui/dynatree.aqua/rbUnchecked_hover.png")
94
-
95
- &.ui-dynatree-document a, &.ui-dynatree-folder a
96
- display: inline-block
97
- padding-left: 3px
98
- padding-right: 3px
99
-
100
- &.ui-dynatree-focused a:link
101
- background-color: #EFEBDE
102
-
103
- &.ui-dynatree-selected a
104
- color: green
105
- font-style: italic
106
-
107
- &.ui-dynatree-active a
108
- border: 1px solid #99DEFD
109
- background-color: #D8F0FA
110
-
111
- &.custom1
112
- a
113
- background-color: #ffffbb
114
- color: maroon
115
-
116
- span.ui-dynatree-icon
117
- background-image: url("/images/jquery.ui/dynatree.aqua/doc_with_children.png")
118
-
119
- &.custom2
120
- a
121
- font-weight: bold
122
- background-color: silver
123
- color: navy
124
-
125
- span.ui-dynatree-icon
126
- background-image: url("/images/jquery.ui/dynatree.aqua/folder_page.png")
127
-
128
-
129
- .ui-dynatree-expanded span.ui-dynatree-expander
130
- background-image: url("/images/jquery.ui/dynatree.aqua/expanded.png")
131
-
132
- &:hover
133
- background-image: url("/images/jquery.ui/dynatree.aqua/expanded_hover.png")
134
-
135
-
136
- .ui-dynatree-partsel span.ui-dynatree-checkbox
137
- background-image: url("/images/jquery.ui/dynatree.aqua/cbIntermediate.png")
138
-
139
- &:hover
140
- background-image: url("/images/jquery.ui/dynatree.aqua/cbIntermediate_hover.png")
141
-
142
-
143
- .ui-dynatree-selected span.ui-dynatree-checkbox
144
- background-image: url("/images/jquery.ui/dynatree.aqua/cbChecked.png")
145
-
146
- &:hover
147
- background-image: url("/images/jquery.ui/dynatree.aqua/cbChecked_hover.png")
148
-
149
-
150
- .ui-dynatree-partsel span.ui-dynatree-radio
151
- background-image: url("/images/jquery.ui/dynatree.aqua/rbIntermediate.png")
152
-
153
- &:hover
154
- background-image: url("/images/jquery.ui/dynatree.aqua/rbIntermediate_hover.png")
155
-
156
-
157
- .ui-dynatree-selected span.ui-dynatree-radio
158
- background-image: url("/images/jquery.ui/dynatree.aqua/rbChecked.png")
159
-
160
- &:hover
161
- background-image: url("/images/jquery.ui/dynatree.aqua/rbChecked_hover.png")
162
-
163
-
164
- .ui-dynatree-folder
165
- span.ui-dynatree-icon
166
- background-image: url("/images/jquery.ui/dynatree.aqua/folder.png")
167
-
168
- &.ui-dynatree-expanded span.ui-dynatree-icon
169
- background-image: url("/images/jquery.ui/dynatree.aqua/folder_open.png")
170
-
171
-
172
- .ui-dynatree-statusnode-wait span.ui-dynatree-icon
173
- background-image: url("/images/jquery.ui/dynatree.aqua/ltWait.gif")
174
-
175
-
176
- .ui-dynatree-statusnode-error span.ui-dynatree-icon
177
- background-image: url("/images/jquery.ui/dynatree.aqua/ltError.png")
1
+ // Generated by compass-jquery-plugin/gem-tasks/dynatree.rake
2
+
3
+ div.ui-dynatree-container
4
+ font-family: segoe ui, tahoma, verdana, arial, helvetica, sans-serif
5
+ font-size: 1.0em
6
+ white-space: nowrap
7
+ padding: 3px
8
+ background-color: white
9
+ border: 1px dotted #aaaaaa
10
+ -moz-border-radius: 4px
11
+ -webkit-border-radius: 4px
12
+ border-radius: 4px
13
+
14
+ img
15
+ width: 16px
16
+ height: 16px
17
+ margin-left: 3px
18
+ vertical-align: top
19
+
20
+ a
21
+ color: black
22
+ text-decoration: none
23
+ vertical-align: top
24
+ margin: 0px
25
+ margin-left: 3px
26
+ border: 1px solid white
27
+
28
+ &:hover
29
+ text-decoration: underline
30
+
31
+ &:focus
32
+ background-color: #EFEBDE
33
+
34
+
35
+ .ui-dynatree-disabled div.ui-dynatree-container
36
+ opacity: 0.5
37
+ background-color: silver
38
+
39
+
40
+ span
41
+ &.ui-dynatree-empty, &.ui-dynatree-vline, &.ui-dynatree-connector
42
+ width: 16px
43
+ height: 16px
44
+ display: -moz-inline-box
45
+ display: inline-block
46
+ vertical-align: top
47
+ background-repeat: no-repeat
48
+ background-position: left
49
+
50
+ &.ui-dynatree-expander
51
+ width: 16px
52
+ height: 16px
53
+ display: -moz-inline-box
54
+ display: inline-block
55
+ vertical-align: top
56
+ background-repeat: no-repeat
57
+ background-position: left
58
+ background-image: url("/images/jquery.ui/dynatree.aqua/collapsed.png")
59
+
60
+ &:hover
61
+ background-image: url("/images/jquery.ui/dynatree.aqua/collapsed_hover.png")
62
+
63
+ &.ui-dynatree-icon
64
+ width: 16px
65
+ height: 16px
66
+ display: -moz-inline-box
67
+ display: inline-block
68
+ vertical-align: top
69
+ background-repeat: no-repeat
70
+ background-position: left
71
+ margin-left: 3px
72
+ background-image: url("/images/jquery.ui/dynatree.aqua/document.png")
73
+
74
+ &.ui-dynatree-checkbox
75
+ width: 16px
76
+ height: 16px
77
+ display: -moz-inline-box
78
+ display: inline-block
79
+ vertical-align: top
80
+ background-repeat: no-repeat
81
+ background-position: left
82
+ margin-left: 3px
83
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbUnchecked.png")
84
+
85
+ &:hover
86
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbUnchecked_hover.png")
87
+
88
+ &.ui-dynatree-radio
89
+ margin-left: 3px
90
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbUnchecked.png")
91
+
92
+ &:hover
93
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbUnchecked_hover.png")
94
+
95
+ &.ui-dynatree-document a, &.ui-dynatree-folder a
96
+ display: inline-block
97
+ padding-left: 3px
98
+ padding-right: 3px
99
+
100
+ &.ui-dynatree-focused a:link
101
+ background-color: #EFEBDE
102
+
103
+ &.ui-dynatree-selected a
104
+ color: green
105
+ font-style: italic
106
+
107
+ &.ui-dynatree-active a
108
+ border: 1px solid #99DEFD
109
+ background-color: #D8F0FA
110
+
111
+ &.custom1
112
+ a
113
+ background-color: #ffffbb
114
+ color: maroon
115
+
116
+ span.ui-dynatree-icon
117
+ background-image: url("/images/jquery.ui/dynatree.aqua/doc_with_children.png")
118
+
119
+ &.custom2
120
+ a
121
+ font-weight: bold
122
+ background-color: silver
123
+ color: navy
124
+
125
+ span.ui-dynatree-icon
126
+ background-image: url("/images/jquery.ui/dynatree.aqua/folder_page.png")
127
+
128
+
129
+ .ui-dynatree-expanded span.ui-dynatree-expander
130
+ background-image: url("/images/jquery.ui/dynatree.aqua/expanded.png")
131
+
132
+ &:hover
133
+ background-image: url("/images/jquery.ui/dynatree.aqua/expanded_hover.png")
134
+
135
+
136
+ .ui-dynatree-partsel span.ui-dynatree-checkbox
137
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbIntermediate.png")
138
+
139
+ &:hover
140
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbIntermediate_hover.png")
141
+
142
+
143
+ .ui-dynatree-selected span.ui-dynatree-checkbox
144
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbChecked.png")
145
+
146
+ &:hover
147
+ background-image: url("/images/jquery.ui/dynatree.aqua/cbChecked_hover.png")
148
+
149
+
150
+ .ui-dynatree-partsel span.ui-dynatree-radio
151
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbIntermediate.png")
152
+
153
+ &:hover
154
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbIntermediate_hover.png")
155
+
156
+
157
+ .ui-dynatree-selected span.ui-dynatree-radio
158
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbChecked.png")
159
+
160
+ &:hover
161
+ background-image: url("/images/jquery.ui/dynatree.aqua/rbChecked_hover.png")
162
+
163
+
164
+ .ui-dynatree-folder
165
+ span.ui-dynatree-icon
166
+ background-image: url("/images/jquery.ui/dynatree.aqua/folder.png")
167
+
168
+ &.ui-dynatree-expanded span.ui-dynatree-icon
169
+ background-image: url("/images/jquery.ui/dynatree.aqua/folder_open.png")
170
+
171
+
172
+ .ui-dynatree-statusnode-wait span.ui-dynatree-icon
173
+ background-image: url("/images/jquery.ui/dynatree.aqua/ltWait.gif")
174
+
175
+
176
+ .ui-dynatree-statusnode-error span.ui-dynatree-icon
177
+ background-image: url("/images/jquery.ui/dynatree.aqua/ltError.png")