compass-jquery-plugin 0.3.0.beta.10 → 0.3.0.beta.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. data/.loadpath +5 -5
  2. data/.project +18 -17
  3. data/VERSION.yml +1 -1
  4. data/compass-jquery-plugin.gemspec +26 -2
  5. data/gem_tasks/dynatree.rake +1 -1
  6. data/gem_tasks/jqgrid.rake +15 -14
  7. data/gem_tasks/jrails.rake +3 -13
  8. data/lib/compiler.jar +0 -0
  9. data/lib/jquery/gridify/grid_column.rb +16 -9
  10. data/lib/jquery/gridify/grid_finder.rb +36 -17
  11. data/lib/jquery/gridify/grid_options.rb +10 -8
  12. data/lib/jquery/gridify/grid_view.rb +2 -1
  13. data/lib/jquery.ui.rb +5 -27
  14. data/templates/dynatree/jquery.dynatree.js +822 -243
  15. data/templates/dynatree/jquery.dynatree.min.js +71 -58
  16. data/templates/dynatree/jquery.ui/dynatree.aero/copy_here.png +0 -0
  17. data/templates/dynatree/jquery.ui/dynatree.aero/drop_accept.png +0 -0
  18. data/templates/dynatree/jquery.ui/dynatree.aero/drop_here.png +0 -0
  19. data/templates/dynatree/jquery.ui/dynatree.aero/drop_reject.png +0 -0
  20. data/templates/dynatree/jquery.ui/dynatree.aero/move_here.png +0 -0
  21. data/templates/dynatree/jquery.ui/dynatree.aero.scss +136 -52
  22. data/templates/dynatree/jquery.ui/dynatree.aqua/copy_here.png +0 -0
  23. data/templates/dynatree/jquery.ui/dynatree.aqua/drop_accept.png +0 -0
  24. data/templates/dynatree/jquery.ui/dynatree.aqua/drop_here.png +0 -0
  25. data/templates/dynatree/jquery.ui/dynatree.aqua/drop_reject.png +0 -0
  26. data/templates/dynatree/jquery.ui/dynatree.aqua/move_here.png +0 -0
  27. data/templates/dynatree/jquery.ui/dynatree.aqua.scss +136 -52
  28. data/templates/dynatree/jquery.ui/dynatree.crystal/copy_here.png +0 -0
  29. data/templates/dynatree/jquery.ui/dynatree.crystal/drop_accept.png +0 -0
  30. data/templates/dynatree/jquery.ui/dynatree.crystal/drop_here.png +0 -0
  31. data/templates/dynatree/jquery.ui/dynatree.crystal/drop_reject.png +0 -0
  32. data/templates/dynatree/jquery.ui/dynatree.crystal/move_here.png +0 -0
  33. data/templates/dynatree/jquery.ui/dynatree.crystal.scss +136 -52
  34. data/templates/dynatree/jquery.ui/dynatree.xp/copy_here.png +0 -0
  35. data/templates/dynatree/jquery.ui/dynatree.xp/drop_accept.png +0 -0
  36. data/templates/dynatree/jquery.ui/dynatree.xp/drop_here.png +0 -0
  37. data/templates/dynatree/jquery.ui/dynatree.xp/drop_reject.png +0 -0
  38. data/templates/dynatree/jquery.ui/dynatree.xp/move_here.png +0 -0
  39. data/templates/dynatree/jquery.ui/dynatree.xp.scss +229 -127
  40. data/templates/dynatree/manifest.rb +20 -0
  41. data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -0
  42. data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +6 -0
  43. data/templates/jqgrid/i18n/jqgrid/locale-es.js +128 -0
  44. data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +7 -0
  45. data/templates/jqgrid/jquery.jqGrid.js +6772 -6464
  46. data/templates/jqgrid/jquery.jqGrid.min.js +455 -441
  47. data/templates/jqgrid/jquery.ui/jqGrid.scss +24 -1
  48. data/templates/jqgrid/manifest.rb +4 -0
  49. data/templates/jqical/jquery.jqical.min.js +170 -171
  50. data/templates/jqical/jquery.ui/jqical.scss +2 -2
  51. data/templates/jqtouch/jqtouch/jqtouch.scss +1 -1
  52. data/templates/jrails/jquery-1.4.2.min.js +210 -210
  53. data/templates/jrails/jquery-ui-1.8.2.min.js +761 -759
  54. data/templates/jrails/jquery.compat-1.3.min.js +2 -2
  55. data/templates/jrails/jquery.contextMenu.min.js +1 -1
  56. data/templates/jrails/jquery.farbtastic.min.js +2 -2
  57. data/templates/jrails/jquery.haml.min.js +5 -5
  58. data/templates/jrails/jquery.metadata.min.js +2 -2
  59. data/templates/jrails/jquery.pngFix.min.js +1 -1
  60. data/templates/jrails/jquery.themeswitchertool.min.js +7 -8
  61. data/templates/jrails/jquery.ui/_theme.scss +6 -1
  62. data/templates/jrails/jquery.ui/base.scss +38 -43
  63. data/templates/jrails/jquery.ui/black-tie/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
  64. data/templates/jrails/jquery.ui/black-tie/ui-bg_inset-hard_55_ffeb80_1x100.png +0 -0
  65. data/templates/jrails/jquery.ui/black-tie/ui-icons_4ca300_256x240.png +0 -0
  66. data/templates/jrails/jquery.ui/black-tie/ui-icons_bbbbbb_256x240.png +0 -0
  67. data/templates/jrails/jquery.ui/black-tie/ui-icons_ffcf29_256x240.png +0 -0
  68. data/templates/jrails/jquery.ui/black-tie.scss +38 -43
  69. data/templates/jrails/jquery.ui/blitzer/ui-bg_dots-small_65_a6a6a6_2x2.png +0 -0
  70. data/templates/jrails/jquery.ui/blitzer/ui-bg_glass_55_fbf8ee_1x400.png +0 -0
  71. data/templates/jrails/jquery.ui/blitzer.scss +38 -43
  72. data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
  73. data/templates/jrails/jquery.ui/cupertino.scss +38 -43
  74. data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_33_003147_1x100.png +0 -0
  75. data/templates/jrails/jquery.ui/dark-hive/ui-icons_a83300_256x240.png +0 -0
  76. data/templates/jrails/jquery.ui/dark-hive.scss +38 -43
  77. data/templates/jrails/jquery.ui/dot-luv/ui-bg_diagonals-thick_15_0b3e6f_40x40.png +0 -0
  78. data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_30_a32d00_2x2.png +0 -0
  79. data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_40_00498f_2x2.png +0 -0
  80. data/templates/jrails/jquery.ui/dot-luv/ui-icons_00498f_256x240.png +0 -0
  81. data/templates/jrails/jquery.ui/dot-luv.scss +38 -43
  82. data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_45_5f5964_1x100.png +0 -0
  83. data/templates/jrails/jquery.ui/eggplant/ui-icons_ebccce_256x240.png +0 -0
  84. data/templates/jrails/jquery.ui/eggplant.scss +38 -43
  85. data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-thick_20_e69700_40x40.png +0 -0
  86. data/templates/jrails/jquery.ui/excite-bike/ui-bg_flat_0_e69700_40x100.png +0 -0
  87. data/templates/jrails/jquery.ui/excite-bike/ui-bg_highlight-soft_100_f9f9f9_1x100.png +0 -0
  88. data/templates/jrails/jquery.ui/excite-bike/ui-icons_0a82eb_256x240.png +0 -0
  89. data/templates/jrails/jquery.ui/excite-bike/ui-icons_0b54d5_256x240.png +0 -0
  90. data/templates/jrails/jquery.ui/excite-bike.scss +38 -43
  91. data/templates/jrails/jquery.ui/flick/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  92. data/templates/jrails/jquery.ui/flick.scss +38 -43
  93. data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_50_ff3853_40x40.png +0 -0
  94. data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_75_ccd232_40x40.png +0 -0
  95. data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_flat_75_ba9217_40x100.png +0 -0
  96. data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_e1e463_256x240.png +0 -0
  97. data/templates/jrails/jquery.ui/hot-sneaks.scss +38 -43
  98. data/templates/jrails/jquery.ui/humanity/ui-bg_glass_100_f5f0e5_1x400.png +0 -0
  99. data/templates/jrails/jquery.ui/humanity/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
  100. data/templates/jrails/jquery.ui/humanity/ui-bg_inset-soft_100_f4f0ec_1x100.png +0 -0
  101. data/templates/jrails/jquery.ui/humanity/ui-icons_f35f07_256x240.png +0 -0
  102. data/templates/jrails/jquery.ui/humanity/ui-icons_ff7519_256x240.png +0 -0
  103. data/templates/jrails/jquery.ui/humanity.scss +38 -43
  104. data/templates/jrails/jquery.ui/le-frog/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
  105. data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_33_3a8104_1x100.png +0 -0
  106. data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_50_4eb305_1x100.png +0 -0
  107. data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_60_4ca20b_1x100.png +0 -0
  108. data/templates/jrails/jquery.ui/le-frog/ui-icons_72b42d_256x240.png +0 -0
  109. data/templates/jrails/jquery.ui/le-frog.scss +38 -43
  110. data/templates/jrails/jquery.ui/mint-choc/ui-bg_glass_15_5f391b_1x400.png +0 -0
  111. data/templates/jrails/jquery.ui/mint-choc/ui-bg_gloss-wave_20_1c160d_500x100.png +0 -0
  112. data/templates/jrails/jquery.ui/mint-choc/ui-icons_9bcc60_256x240.png +0 -0
  113. data/templates/jrails/jquery.ui/mint-choc.scss +38 -43
  114. data/templates/jrails/jquery.ui/overcast/ui-bg_flat_55_c0402a_40x100.png +0 -0
  115. data/templates/jrails/jquery.ui/overcast/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
  116. data/templates/jrails/jquery.ui/overcast/ui-icons_70b2e1_256x240.png +0 -0
  117. data/templates/jrails/jquery.ui/overcast/ui-icons_fbc856_256x240.png +0 -0
  118. data/templates/jrails/jquery.ui/overcast.scss +38 -43
  119. data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
  120. data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_fbdb93_256x240.png +0 -0
  121. data/templates/jrails/jquery.ui/pepper-grinder.scss +38 -43
  122. data/templates/jrails/jquery.ui/redmond/ui-bg_flat_55_fbec88_40x100.png +0 -0
  123. data/templates/jrails/jquery.ui/redmond/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  124. data/templates/jrails/jquery.ui/redmond/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  125. data/templates/jrails/jquery.ui/redmond/ui-icons_d8e7f3_256x240.png +0 -0
  126. data/templates/jrails/jquery.ui/redmond.scss +38 -43
  127. data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  128. data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  129. data/templates/jrails/jquery.ui/smoothness.scss +38 -43
  130. data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_100_f5f3e5_1x100.png +0 -0
  131. data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_25_67b021_1x100.png +0 -0
  132. data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
  133. data/templates/jrails/jquery.ui/south-street/ui-icons_847e71_256x240.png +0 -0
  134. data/templates/jrails/jquery.ui/south-street.scss +38 -43
  135. data/templates/jrails/jquery.ui/start/ui-bg_glass_55_f8da4e_1x400.png +0 -0
  136. data/templates/jrails/jquery.ui/start/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
  137. data/templates/jrails/jquery.ui/start/ui-icons_056b93_256x240.png +0 -0
  138. data/templates/jrails/jquery.ui/start/ui-icons_d8e7f3_256x240.png +0 -0
  139. data/templates/jrails/jquery.ui/start/ui-icons_f7a50d_256x240.png +0 -0
  140. data/templates/jrails/jquery.ui/start/ui-icons_fcd113_256x240.png +0 -0
  141. data/templates/jrails/jquery.ui/start.scss +38 -43
  142. data/templates/jrails/jquery.ui/sunny/ui-bg_diagonals-medium_20_d34d17_40x40.png +0 -0
  143. data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png +0 -0
  144. data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_90_fff9e5_500x100.png +0 -0
  145. data/templates/jrails/jquery.ui/sunny/ui-bg_highlight-soft_100_feeebd_1x100.png +0 -0
  146. data/templates/jrails/jquery.ui/sunny/ui-icons_3d3d3d_256x240.png +0 -0
  147. data/templates/jrails/jquery.ui/sunny/ui-icons_d19405_256x240.png +0 -0
  148. data/templates/jrails/jquery.ui/sunny/ui-icons_eb990f_256x240.png +0 -0
  149. data/templates/jrails/jquery.ui/sunny/ui-icons_ffe180_256x240.png +0 -0
  150. data/templates/jrails/jquery.ui/sunny.scss +38 -43
  151. data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_10_4f4221_10x8.png +0 -0
  152. data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_8_443113_10x8.png +0 -0
  153. data/templates/jrails/jquery.ui/swanky-purse/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
  154. data/templates/jrails/jquery.ui/swanky-purse/ui-icons_e8e2b5_256x240.png +0 -0
  155. data/templates/jrails/jquery.ui/swanky-purse/ui-icons_f9f2bd_256x240.png +0 -0
  156. data/templates/jrails/jquery.ui/swanky-purse/ui-icons_ff7519_256x240.png +0 -0
  157. data/templates/jrails/jquery.ui/swanky-purse.scss +38 -43
  158. data/templates/jrails/jquery.ui/trontastic/ui-bg_diagonals-small_50_262626_40x40.png +0 -0
  159. data/templates/jrails/jquery.ui/trontastic/ui-bg_flat_0_4c4c4c_40x100.png +0 -0
  160. data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_85_9fda58_500x100.png +0 -0
  161. data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_95_f6ecd5_500x100.png +0 -0
  162. data/templates/jrails/jquery.ui/trontastic/ui-icons_9fda58_256x240.png +0 -0
  163. data/templates/jrails/jquery.ui/trontastic.scss +38 -43
  164. data/templates/jrails/jquery.ui/ui-darkness/ui-bg_glass_40_0078a3_1x400.png +0 -0
  165. data/templates/jrails/jquery.ui/ui-darkness/ui-icons_a83300_256x240.png +0 -0
  166. data/templates/jrails/jquery.ui/ui-darkness.scss +38 -43
  167. data/templates/jrails/jquery.ui/ui-lightness/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  168. data/templates/jrails/jquery.ui/ui-lightness/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  169. data/templates/jrails/jquery.ui/ui-lightness/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  170. data/templates/jrails/jquery.ui/ui-lightness/ui-icons_228ef1_256x240.png +0 -0
  171. data/templates/jrails/jquery.ui/ui-lightness.scss +38 -43
  172. data/templates/jrails/jquery.ui/vader/ui-bg_highlight-soft_35_adadad_1x100.png +0 -0
  173. data/templates/jrails/jquery.ui/vader/ui-icons_bbbbbb_256x240.png +0 -0
  174. data/templates/jrails/jquery.ui/vader.scss +38 -43
  175. data/templates/jrails/jrails.min.js +4 -4
  176. data/templates/jrails/manifest.rb +0 -1
  177. data/templates/ribbon/jquery.ribbon.min.js +12 -12
  178. metadata +28 -4
@@ -1,59 +1,72 @@
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(l){window.console||(_canLog=false)}}}
1
+ var _canLog=false;function _log(g){if(_canLog){var j=Array.prototype.slice.apply(arguments,[1]),l=new Date;l=l.getHours()+":"+l.getMinutes()+":"+l.getSeconds()+"."+l.getMilliseconds();j[0]=l+" - "+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(n){window.console||(_canLog=false)}}}
2
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,b){var c=b&&b.tooltip?b.tooltip:null;b=b&&b.info?" ("+b.info+")":"";switch(a){case DTNodeStatus_Ok:this._setStatusNode(null);this.isLoading=false;this.render(false,
11
- false);if(this.tree.options.autoFocus)this===this.tree.tnRoot&&!this.tree.options.rootVisible&&this.childList?this.childList[0].focus():this.focus();break;case DTNodeStatus_Loading:this.isLoading=true;this._setStatusNode({title:this.tree.options.strings.loading+b,tooltip:c,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+b,tooltip:c,addClass:this.tree.options.classNames.nodeError});break;
12
- default:throw"Bad LazyNodeStatus: '"+a+"'.";}},_parentList:function(a,b){var c=[];for(b=b?this:this.parent;b;){if(a||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],
13
- h=f.offsetLeft-c.offsetLeft,k=f.offsetTop-c.offsetTop,n=f.clientWidth,o=f.clientHeight;if(d>=h&&d<=h+n&&a>=k&&a<=k+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";
14
- else if(b==c.nodeIcon)return"icon";else if(b==c.empty||b==c.vline||b==c.connector)return"prefix";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){}},
15
- _activate:function(a,b){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",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);
16
- b&&c.onActivate&&c.onActivate.call(this.span,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)},
17
- isActive:function(){return this.tree.activeNode===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)}},
18
- _fixSelectionState:function(){if(this.bSelected){this.visit(function(e){e.parent._setSubSel(true);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=
19
- 0;c<a.childList.length;c++)if(a.childList[c].bSelected||a.childList[c].hasSubSel){b=true;break}a._setSubSel(b);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);
20
- c&&d.selectMode==3&&this._fixSelectionState();b&&d.onSelect&&d.onSelect.call(this.span,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},
21
- _loadContent:function(){try{var a=this.tree.options;this.tree.logDebug("_loadContent: start - %o",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){this.setLazyNodeStatus(DTNodeStatus_Error);this.tree.logWarning("_loadContent: failed - %o",b)}},_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",
22
- a,this);else if(!(b.onQueryExpand&&b.onQueryExpand.call(this.span,a,this)==false)){this.bExpanded=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==
23
- null&&!this.isLoading)this._loadContent();else{c=b.fx?b.fx.duration||200:0;if(this.childList)for(d=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!=
24
- null)for(var a=this.parent.childList,b=0;b<a.length;b++)a[b]!==this&&a[b].bExpanded&&a[b]._expand(false)},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&&
25
- this.toggleExpand();break;case 32:this._userActivate();break;case 8: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 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-
26
- 1];if(!c&&this.parent&&(this.tree.options.rootVisible||this.parent.parent))c=this.parent;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);
27
- this.tree.tnFocused=null;b.persist&&g.cookie(b.cookieId+"-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)}},
28
- visit:function(a,b,c){var d=0;if(c==true){if(a(this,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);
29
- a.bExpanded&&this.tree.persistence.clearExpand(a.data.key)}a.removeChildren(true);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,
30
- b);this.div.removeChild(f.div);delete f}this.childList=null}if(!a){this.isLoading=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=[];
31
- else b||g(this.childList[this.childList.length-1].span).removeClass(d.classNames.lastsib);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=
32
- a;if(d.persist)e.activeKey=a.data.key}if(a.data.focus){c.focusNode=a;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==
33
- 0)){if(a instanceof i)return this._addChildNode(a,b);a.length||(a=[a]);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);
34
- var b=this,c=a.success,d=a.error,e=g.extend({},this.tree.options.ajaxDefaults,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,k){b.tree.logWarning("appendAjax failed:",h,":\n",f,"\n",k);b.setLazyNodeStatus(DTNodeStatus_Error,{info:h,tooltip:""+k});d&&d.call(e,b,f,h,k)}});g.ajax(e)},lastentry:undefined};var l=j.create();l._getTreePersistData=function(a,b){a=
35
- new l(a,b);a.read();return a.toDict()};getDynaTreePersistData=l._getTreePersistData;l.prototype={initialize:function(a,b){this._log("DynaTreeStatus: initialize");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");
36
- this.cookiesFound=false;var a=g.cookie(this.cookieId+"-active");this.activeKey=a==null?"":a;if(a!=null)this.cookiesFound=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");
37
- g.cookie(this.cookieId+"-active",this.activeKey==null?"":this.activeKey,this.cookieOpts);g.cookie(this.cookieId+"-focus",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);
38
- g.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},clearExpand:function(a){this._log("clearExpand(%o)",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)}},
39
- 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+"-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=
40
- "$Version: 0.5.3$";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)},_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("/")>=
41
- 0?this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":"skin/";return false}});this.persistence=new l(a.cookieId,a.cookie);if(a.persist){g.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='"+a.classNames.empty+"'></span>",tagVline:"<span class='"+a.classNames.vline+"'></span>",tagExpander:"<span class='"+a.classNames.expander+"'></span>",tagConnector:"<span class='"+
42
- a.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+a.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+a.classNames.checkbox+"'></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);
43
- var b=this.tnRoot,c=a.persist&&this.persistence.isReloading(),d=false,e=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");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);
44
- this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";a.persist&&this.persistence.write();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,
45
- 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=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();
46
- 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...");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>=
47
- 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.logDebug("dynatree.redraw()...");this.tnRoot.render(true,
48
- 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(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=
49
- [];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);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,
50
- 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=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=
51
- 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'"+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(){if(parseFloat(g.ui.version)<1.8){_log("warn",
52
- "ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");return this._create()}_log("debug","ui.dynatree._init() was called; no current default functionality.")},_create:function(){if(parseFloat(g.ui.version)>=1.8)this.options=g.extend(true,g[this.namespace][this.widgetName].defaults,this.options);logMsg("Dynatree._create(): 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();
53
- this.tree.logDebug("Dynatree._create(): 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 k=h.tree.phase;h.tree.phase="userEvent";try{h.tree.logDebug("bind(%o): dtnode: %o",
54
- 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=k}});c=this.tree.divTree;if(c.addEventListener){c.addEventListener("focus",b,true);c.addEventListener("blur",b,true)}else c.onfocusin=
55
- 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";
56
- 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,
57
- 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",
58
- 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,
59
- 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;
3
+ (function(g){function j(a){for(var b=5;a&&b--;){if(a.dtnode)return a.dtnode;a=a.parentNode}return null}function l(a){var b=a.options.dnd||null;if(b&&(b.onDragStart||b.onDrop))r();b&&b.onDragStart&&a.$tree.draggable({addClasses:false,appendTo:"body",containment:false,delay:0,distance:4,revert:false,connectToDynatree:true,helper:function(c){var d=j(c.target);return d.tree._onDragEvent("helper",d,null,c,null,null)},_last:null});b&&b.onDrop&&a.$tree.droppable({addClasses:false,tolerance:"touch",greedy:false,
4
+ _last:null})}var n={create:function(){return function(){this.initialize.apply(this,arguments)}}},o=n.create();o.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.ul=this.span=this.li=null;this.hasSubSel=this.isLoading=false},toString:function(){return"dtnode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(a,b){var c=g.extend({},
5
+ 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(var d=0;d<this.childList.length;d++)c.children.push(this.childList[d].toDict(true,b))}else delete c.children;return c},_getInnerHtml:function(){var a=this.tree.options,b=this.tree.cache,c="";this.getLevel()<a.minExpandLevel||(c+=this.childList||this.data.isLazy?b.tagExpander:b.tagConnector);if(a.checkbox&&this.data.hideCheckbox!=
6
+ true&&!this.data.isStatusNode)c+=b.tagCheckbox;if(this.data.icon)c+="<img src='"+a.imagePath+this.data.icon+"' alt='' />";else if(this.data.icon!=false)c+=b.tagNodeIcon;c+="<a href='#' class='"+a.classNames.title+"'"+(this.data&&typeof this.data.tooltip=="string"?" title='"+this.data.tooltip+"'":"")+">"+this.data.title+"</a>";return c},_fixOrder:function(){var a=this.childList;if(a)for(var b=this.ul.firstChild,c=0;c<a.length-1;c++){var d=a[c],e=b.dtnode;if(d!==e){this.tree.logDebug("_fixOrder: mismatch at index "+
7
+ c+": "+d+" != "+e);this.ul.insertBefore(d.li,e.li)}else b=b.nextSibling}},render:function(a){this.tree.logDebug("%o.render(%s)",this,a);var b=this.tree.options,c=b.classNames,d=this.isLastSibling();if(!this.parent&&!this.ul){this.li=this.span=null;this.ul=document.createElement("ul");this.ul.className=b.minExpandLevel>1?c.container+" "+c.noConnector:c.container}else if(this.parent){if(!this.li){this.li=document.createElement("li");this.li.dtnode=this;if(this.data.key&&b.generateIds)this.li.id=b.idPrefix+
8
+ this.data.key;this.span=document.createElement("span");this.span.className=c.title;this.li.appendChild(this.span);if(!this.parent.ul){this.parent.ul=document.createElement("ul");this.parent.ul.style.display="none";this.parent.li.appendChild(this.parent.ul)}this.parent.ul.appendChild(this.li)}this.span.innerHTML=this._getInnerHtml();var e=[];e.push(c.node);this.data.isFolder&&e.push(c.folder);this.bExpanded&&e.push(c.expanded);this.childList!=null&&e.push(c.hasChildren);this.data.isLazy&&this.childList==
9
+ 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(" ");this.li.className=d?c.lastsib:""}if(this.bExpanded&&this.childList){for(c=
10
+ 0;c<this.childList.length;c++)this.childList[c].render();this._fixOrder()}if(this.ul){c=this.ul.style.display=="none";if(a&&b.fx&&!!c==!!this.bExpanded){a=b.fx.duration||200;g(this.ul).animate(b.fx,a)}else this.ul.style.display=this.bExpanded||!this.parent?"":"none"}},getParent:function(){return this.parent},getChildren:function(){return this.childList},hasChildren:function(){return this.childList!=null},isLastSibling:function(){var a=this.parent;if(!a)return true;return a.childList[a.childList.length-
11
+ 1]===this},getPrevSibling: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},getNextSibling: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+1];return null},isStatusNode:function(){return this.data.isStatusNode===true},isChildOf:function(a){return this.parent&&this.parent===a},isDescendantOf:function(a){if(!a)return false;for(var b=this.parent;b;){if(b===
12
+ a)return true;b=b.parent}return false},sortChildren:function(a,b){var c=this.childList;if(c){a=a||function(e,f){return e.data.title===f.data.title?0:e.data.title>f.data.title};c.sort(a);if(b)for(var d=0;d<c.length;d++)c[d].childList&&c[d].sortChildren(a,"$norender$");b!=="$norender$"&&this.render()}},_setStatusNode:function(a){var b=this.childList?this.childList[0]:null;if(a)if(b){a.isStatusNode=true;b.data=a;b.render()}else{a.isStatusNode=true;this.addChild(a)}else if(b){this.ul.removeChild(b.li);
13
+ if(this.childList.length==1)this.childList=null;else this.childList.shift()}},setLazyNodeStatus:function(a,b){var c=b&&b.tooltip?b.tooltip:null,d=b&&b.info?" ("+b.info+")":"";switch(a){case DTNodeStatus_Ok:this._setStatusNode(null);this.isLoading=false;this.render();if(this.tree.options.autoFocus)this===this.tree.tnRoot&&this.childList?this.childList[0].focus():this.focus();break;case DTNodeStatus_Loading:this.isLoading=true;this._setStatusNode({title:this.tree.options.strings.loading+d,tooltip:c,
14
+ addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+d,tooltip:c,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+a+"'.";}},_parentList:function(a,b){for(var c=[],d=b?this:this.parent;d;){if(a||d.parent)c.unshift(d);d=d.parent}return c},getLevel:function(){for(var a=0,b=this.parent;b;){a++;b=b.parent}return a},_getTypeForOuterNodeEvent:function(a){var b=
15
+ this.tree.options.classNames,c=a.target;if(c.className.indexOf(b.node)<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,i=f.offsetTop-c.offsetTop,k=f.clientWidth,s=f.clientHeight;if(d>=h&&d<=h+k&&a>=i&&a<=i+s)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"},
16
+ 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";else if(b.indexOf(c.node)>=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},
17
+ 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",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&&
18
+ 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,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=
19
+ 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===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)b=false;if(b){this.toggleExpand();this.focus()}a&&this.activate()},_setSubSel:function(a){if(a){this.hasSubSel=
20
+ 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);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);
21
+ 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);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,
22
+ 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,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;
23
+ 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",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){this.tree.logWarning("_loadContent: failed - %o",b);this.setLazyNodeStatus(DTNodeStatus_Error,
24
+ {tooltip:""+b})}},_expand:function(a){if(this.bExpanded!=a){var b=this.tree.options;if(!a&&this.getLevel()<b.minExpandLevel)this.tree.logDebug("dtnode._expand(%o) prevented collapse - %o",a,this);else if(!(b.onQueryExpand&&b.onQueryExpand.call(this.span,a,this)==false)){this.bExpanded=a;if(b.persist)a?this.tree.persistence.addExpand(this.data.key):this.tree.persistence.clearExpand(this.data.key);this.render(!(this.data.isLazy&&this.childList==null)&&!this.isLoading);if(this.bExpanded&&this.parent&&
25
+ 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 b.onExpand&&b.onExpand.call(this.span,a,this)}}},expand:function(a){!this.childList&&!this.data.isLazy&&a||this.parent==null&&!a||this._expand(a)},scheduleAction:function(a,b){if(this.tree.timer){clearTimeout(this.tree.timer);
26
+ logMsg("clearTimeout(%o)",this.tree.timer)}var c=this;switch(a){case "cancel":break;case "expand":this.tree.timer=setTimeout(function(){logMsg("setTimeout: trigger");c.expand(true)},b);break;case "activate":this.tree.timer=setTimeout(function(){c.activate()},b);break;default:throw"Invalid mode "+a;}logMsg("setTimeout(%s, %s): %s",a,b,this.tree.timer)},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]!==
27
+ this&&a[b].bExpanded&&a[b]._expand(false)},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();
28
+ break;case 8:this.parent&&this.parent.focus();break;case 37:if(this.bExpanded){this.toggleExpand();this.focus()}else this.parent&&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.getPrevSibling();c&&c.bExpanded&&c.childList;)c=c.childList[c.childList.length-1];if(!c&&this.parent&&this.parent.parent)c=this.parent;c&&c.focus();break;
29
+ 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].getNextSibling())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+"-focus",
30
+ "",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,b)===
31
+ 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},visitParents:function(a,b){if(b&&a(this)===false)return false;for(var c=this.parent;c;){if(a(c)===false)return false;c=c.parent}},remove:function(){if(this===this.tree.root)throw"Cannot remove system root";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===
32
+ 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);this.ul.removeChild(a.li);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&&
33
+ this.tree.persistence.clearSelect(f.data.key);f.bExpanded&&this.tree.persistence.clearExpand(f.data.key)}f.removeChildren(true,b);this.ul&&this.ul.removeChild(f.li);delete f}this.childList=null}if(!a){this.isLoading=false;this.render()}},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,
34
+ 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);if(b){var f=g.inArray(b,this.childList);if(f<0)throw"<beforeNode> must be a child of <this>";this.childList.splice(f,0,a)}else this.childList.push(a);f=c.isInitializing();if(d.persist&&e.cookiesFound&&f){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,
35
+ 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;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);
36
+ d=d.parent}c.bEnableUpdate&&this.render();return a},addChild:function(a,b){if(!(!a||a.length==0)){if(a instanceof o)return this._addChildNode(a,b);a.length||(a=[a]);for(var c=this.tree.enableUpdate(false),d=null,e=0;e<a.length;e++){var f=a[e],h=this._addChildNode(new o(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,
37
+ 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,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,i){b.tree.logWarning("appendAjax failed:",h,":\n",f,"\n",i);b.setLazyNodeStatus(DTNodeStatus_Error,{info:h,tooltip:""+i});d&&
38
+ d.call(e,b,f,h,i)}});g.ajax(e)},move:function(a,b){if(this!==a){if(!this.parent)throw"Cannot move system root";if(b===undefined||b=="over")b="child";var c=this.parent,d=b==="child"?a:a.parent;if(d.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(this.parent.childList.length==1){this.parent.childList=null;this.parent.bExpanded=false}else{var e=g.inArray(this,this.parent.childList);if(e<0)throw"Internal error";this.parent.childList.splice(e,1)}this.parent.ul.removeChild(this.li);
39
+ this.li=null;this.parent=d;if(d.hasChildren())switch(b){case "child":d.childList.push(this);break;case "before":e=g.inArray(a,d.childList);if(e<0)throw"Internal error";d.childList.splice(e,0,this);break;case "after":e=g.inArray(a,d.childList);if(e<0)throw"Internal error";d.childList.splice(e+1,0,this);break;default:throw"Invalid mode "+b;}else d.childList=[this];if(this.tree!==a.tree){this.visit(function(f){f.tree=a.tree},null,true);throw"Not yet implemented.";}c.isDescendantOf(d)||c.render();d.isDescendantOf(c)||
40
+ d.render()}},lastentry:undefined};var m=n.create();m._getTreePersistData=function(a,b){var c=new m(a,b);c.read();return c.toDict()};getDynaTreePersistData=m._getTreePersistData;m.prototype={initialize:function(a,b){this._log("DynaTreeStatus: initialize");if(a===undefined)a=g.ui.dynatree.prototype.options.cookieId;b=g.extend({},g.ui.dynatree.prototype.options.cookie,b);this.cookieId=a;this.cookieOpts=b;this.cookiesFound=undefined;this.selectedKeyList=this.expandedKeyList=this.focusedKey=this.activeKey=
41
+ 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=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+
42
+ "-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",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(","),
43
+ 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)",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,
44
+ 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+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound==true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,
45
+ expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var p=n.create();p.version="$Version:$";p.prototype={initialize:function(a){this.phase="init";this.$widget=a;this.options=a.options;this.$tree=a.element;this.timer=null;this.divTree=this.$tree.get(0);l(this)},_load:function(){var a=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.focusNode=this.activeNode=null;a.rootVisible!==undefined&&_log("warn","Option 'rootVisible' is no longer supported.");
46
+ a.title!==undefined&&_log("warn","Option 'title' is no longer supported.");if(a.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");a.minExpandLevel=1}if(a.classNames!==g.ui.dynatree.prototype.options.classNames)a.classNames=g.extend({},g.ui.dynatree.prototype.options.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}});
47
+ this.persistence=new m(a.cookieId,a.cookie);if(a.persist){g.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='"+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='"+
48
+ a.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+a.classNames.checkbox+"'></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 o(null,this,{});this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var b=this.tnRoot,c=a.persist&&this.persistence.isReloading(),d=false,e=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(a.children)b.addChild(a.children);
49
+ 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:first").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();if(this.focusNode&&
50
+ 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=b.expandedKeyList.join(",");
51
+ if(c.addSelectedKeyList)c.data.selectedKeyList=b.selectedKeyList.join(",");if(a.onPostInit){c.success&&this.logWarning("initAjax: success callback is ignored when onPostInit was specified.");c.error&&this.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...");this.tnRoot.appendAjax(c)},
52
+ toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},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,["warn"]);
53
+ _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();this.logDebug("dynatree.redraw() done.")},reloadAjax:function(){this.logWarning("tree.reloadAjax() is deprecated since v0.5.2 (use reload() instead).")},
54
+ 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);
55
+ if(!a){this.activeNode&&this.activeNode.deactivate();return this.activeNode=null}a.focus();a.activate();return a},selectKey:function(a,b){var c=this.getNodeByKey(a);if(!c)return null;c.select(b);return c},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=
56
+ 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'"+
57
+ f+"'";}}e=a.addChild(e);d=d.find(">ul:first");d.length&&c._createFromTag(e,d)})},_checkConsistency:function(){},_setDndStatus:function(a,b,c,d,e){a=a?g(a.span):null;b=g(b.span);if(!this.$dndMarker){this.$dndMarker=g("<div id='dynatree_drop_marker'></div>").hide().prependTo("body");logMsg("Creating marker: %o",this.$dndMarker)}if(d==="after"||d==="before"||d==="over"){b.addClass("dynatree-drop-target");var f=b.position();switch(d){case "before":f.top-=8;break;case "after":f.top+=8;break;default:f.left+=
58
+ 8}this.$dndMarker.css({left:f.left+"px",top:f.top+"px"}).show()}else{b.removeClass("dynatree-drop-target");this.$dndMarker.hide()}d==="after"?b.addClass("dynatree-drop-after"):b.removeClass("dynatree-drop-after");d==="before"?b.addClass("dynatree-drop-before"):b.removeClass("dynatree-drop-before");if(e===true){a&&a.addClass("dynatree-drop-accept");b.addClass("dynatree-drop-accept");c.addClass("dynatree-drop-accept")}else{a&&a.removeClass("dynatree-drop-accept");b.removeClass("dynatree-drop-accept");
59
+ c.removeClass("dynatree-drop-accept")}if(e===false){a&&a.addClass("dynatree-drop-reject");b.addClass("dynatree-drop-reject");c.addClass("dynatree-drop-reject")}else{a&&a.removeClass("dynatree-drop-reject");b.removeClass("dynatree-drop-reject");c.removeClass("dynatree-drop-reject")}},_onDragEvent:function(a,b,c,d,e,f){a!=="over"&&this.logDebug("tree._onDragEvent(%s, %o, %o) - %o",a,b,c,this);var h=this.options.dnd,i=null,k=g(b.span);switch(a){case "helper":c=g("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /></div>").append(g(d.target).closest("a").clone());
60
+ c.data("dtSourceNode",b);logMsg("helper.sourceNode=%o",c.data("dtSourceNode"));i=c;break;case "start":if(b.isStatusNode())i=false;else if(h.onDragStart)i=h.onDragStart(b);if(i===false){this.logDebug("tree.onDragStart() cancelled");f._clear()}else k.addClass("dynatree-drag-source");break;case "enter":i=h.onDragEnter?h.onDragEnter(b,c):null;e.helper.data("enterResponse",i);this.logDebug("helper.enterResponse: %o",i);break;case "over":h.autoExpandMS&&b.hasChildren()&&!b.bExpanded&&b.scheduleAction("expand",
61
+ h.autoExpandMS);a=e.helper.data("enterResponse");f=null;if(a===false)break;else if(typeof a==="string")f=a;else{a=k.position();d={x:d.clientX-a.left,y:d.clientY-a.top};k={x:d.x/k.width(),y:d.y/k.height()};f=k.y>0.25&&k.y<0.75?"over":k.y<=0.25?"before":"after";e.helper.data("hitMode",f)}if(h.onDragOver)i=h.onDragOver(b,c,f);this._setDndStatus(c,b,e.helper,f,i!==false);break;case "drop":a=e.helper.data("enterResponse");f=e.helper.data("hitMode");h.onDrop&&a!==false&&h.onDrop(b,c,f);break;case "leave":b.scheduleAction("cancel");
62
+ e.helper.data("enterResponse",null);e.helper.data("hitMode",null);this._setDndStatus(c,b,e.helper,"out",undefined);h.onDragLeave&&h.onDragLeave(b,c);break;case "stop":k.removeClass("dynatree-drag-source");h.onDragStop&&h.onDragStop(b);break;default:throw"Unsupported drag event: "+a;}return i},lastentry:undefined};g.widget("ui.dynatree",{_init:function(){if(parseFloat(g.ui.version)<1.8){_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");return this._create()}_log("debug",
63
+ "ui.dynatree._init() was called; no current default functionality.")},_create:function(){logMsg("Dynatree._create(): version='%s', debugLevel=%o.",p.version,this.options.debugLevel);this.options.event+=".dynatree";this.element.get(0);this.tree=new p(this);this.tree._load();this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function a(e){e=e=g.event.fix(e||window.event);var f=j(e.target);return f?f.onFocus(e):false}var b=this.element,c=this.options;this.unbind();var d="click.dynatree dblclick.dynatree";
64
+ if(c.keyboard)d+=" keypress.dynatree keydown.dynatree";b.bind(d,function(e){var f=j(e.target);if(!f)return true;var h=f.tree.phase;f.tree.phase="userEvent";try{f.tree.logDebug("bind(%o): dtnode: %o",e,f);switch(e.type){case "click":return c.onClick&&c.onClick(f,e)===false?false:f.onClick(e);case "dblclick":return c.onDblClick&&c.onDblClick(f,e)===false?false:f.onDblClick(e);case "keydown":return c.onKeydown&&c.onKeydown(f,e)===false?false:f.onKeydown(e);case "keypress":return c.onKeypress&&c.onKeypress(f,
65
+ e)===false?false:f.onKeypress(e)}}catch(i){f.tree.logWarning("bind(%o): dtnode: %o, error: %o",e,f,i)}finally{f.tree.phase=h}});b=this.tree.divTree;if(b.addEventListener){b.addEventListener("focus",a,true);b.addEventListener("blur",a,true)}else b.onfocusin=b.onfocusout=a},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},
66
+ getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:undefined});g.ui.dynatree.prototype.options={title:"Dynatree",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,enableDrag:false,enableDrop:false,onClick:null,onDblClick:null,
67
+ 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,dnd:{onDragStart:null,onDragStop:null,helper:null,autoExpandMS:1E3,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading&#8230;",loadError:"Load error!"},generateIds:false,idPrefix:"dynatree-id-",cookieId:"dynatree",
68
+ 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-",
69
+ 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:0,lastentry:undefined};g.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};var q=
70
+ false,r=function(){if(!q){g.ui.plugin.add("draggable","connectToDynatree",{start:function(a,b){var c=g(this).data("draggable"),d=b.helper.data("dtSourceNode")||null;logMsg("draggable-connectToDynatree.start, %o",d);logMsg(" this: %o",this);logMsg(" event: %o",a);logMsg(" draggable: %o",c);logMsg(" ui: %o",b);if(d){c.offset.click.top=-2;c.offset.click.left=+16;logMsg(" draggable.offset.click FIXED: %s/%s",c.offset.click.left,c.offset.click.top);return d.tree._onDragEvent("start",d,null,
71
+ a,b,c)}},drag:function(a,b){var c=g(this).data("draggable"),d=b.helper.data("dtSourceNode")||null,e=b.helper.data("dtTargetNode")||null,f=j(a.target);b.helper.data("dtTargetNode",f);e&&e!==f&&e.tree._onDragEvent("leave",e,d,a,b,c);if(f)if(f.tree.options.dnd.onDrop)f===e?f.tree._onDragEvent("over",f,d,a,b,c):f.tree._onDragEvent("enter",f,d,a,b,c)},stop:function(a,b){var c=g(this).data("draggable"),d=b.helper.data("dtSourceNode")||null,e=j(a.target);logMsg("draggable-connectToDynatree.stop, %o",d);
72
+ var f=a.type;logMsg(" type: %o, downEvent: %o, upEvent: %o",f,c._mouseDownEvent,a);(f=f=="mouseup"&&a.which==1)||logMsg("Drag was cancelled");if(e){f&&e.tree._onDragEvent("drop",e,d,a,b,c);e.tree._onDragEvent("leave",e,d,a,b,c)}d&&d.tree._onDragEvent("stop",d,null,a,b,c)}});q=true}}})(jQuery);var _rexDtLibName=/.*dynatree[^/]*\.js$/i;