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.
- data/.loadpath +5 -5
- data/.project +18 -17
- data/VERSION.yml +1 -1
- data/compass-jquery-plugin.gemspec +26 -2
- data/gem_tasks/dynatree.rake +1 -1
- data/gem_tasks/jqgrid.rake +15 -14
- data/gem_tasks/jrails.rake +3 -13
- data/lib/compiler.jar +0 -0
- data/lib/jquery/gridify/grid_column.rb +16 -9
- data/lib/jquery/gridify/grid_finder.rb +36 -17
- data/lib/jquery/gridify/grid_options.rb +10 -8
- data/lib/jquery/gridify/grid_view.rb +2 -1
- data/lib/jquery.ui.rb +5 -27
- data/templates/dynatree/jquery.dynatree.js +822 -243
- data/templates/dynatree/jquery.dynatree.min.js +71 -58
- data/templates/dynatree/jquery.ui/dynatree.aero/copy_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aero/drop_accept.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aero/drop_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aero/drop_reject.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aero/move_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aero.scss +136 -52
- data/templates/dynatree/jquery.ui/dynatree.aqua/copy_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/drop_accept.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/drop_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/drop_reject.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/move_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua.scss +136 -52
- data/templates/dynatree/jquery.ui/dynatree.crystal/copy_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/drop_accept.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/drop_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/drop_reject.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/move_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal.scss +136 -52
- data/templates/dynatree/jquery.ui/dynatree.xp/copy_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/drop_accept.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/drop_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/drop_reject.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/move_here.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp.scss +229 -127
- data/templates/dynatree/manifest.rb +20 -0
- data/templates/jqgrid/i18n/jqgrid/locale-da.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-da.min.js +6 -0
- data/templates/jqgrid/i18n/jqgrid/locale-es.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-es.min.js +7 -0
- data/templates/jqgrid/jquery.jqGrid.js +6772 -6464
- data/templates/jqgrid/jquery.jqGrid.min.js +455 -441
- data/templates/jqgrid/jquery.ui/jqGrid.scss +24 -1
- data/templates/jqgrid/manifest.rb +4 -0
- data/templates/jqical/jquery.jqical.min.js +170 -171
- data/templates/jqical/jquery.ui/jqical.scss +2 -2
- data/templates/jqtouch/jqtouch/jqtouch.scss +1 -1
- data/templates/jrails/jquery-1.4.2.min.js +210 -210
- data/templates/jrails/jquery-ui-1.8.2.min.js +761 -759
- data/templates/jrails/jquery.compat-1.3.min.js +2 -2
- data/templates/jrails/jquery.contextMenu.min.js +1 -1
- data/templates/jrails/jquery.farbtastic.min.js +2 -2
- data/templates/jrails/jquery.haml.min.js +5 -5
- data/templates/jrails/jquery.metadata.min.js +2 -2
- data/templates/jrails/jquery.pngFix.min.js +1 -1
- data/templates/jrails/jquery.themeswitchertool.min.js +7 -8
- data/templates/jrails/jquery.ui/_theme.scss +6 -1
- data/templates/jrails/jquery.ui/base.scss +38 -43
- data/templates/jrails/jquery.ui/black-tie/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_inset-hard_55_ffeb80_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_4ca300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_ffcf29_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie.scss +38 -43
- data/templates/jrails/jquery.ui/blitzer/ui-bg_dots-small_65_a6a6a6_2x2.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_glass_55_fbf8ee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/blitzer.scss +38 -43
- data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino.scss +38 -43
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_33_003147_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_a83300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive.scss +38 -43
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_diagonals-thick_15_0b3e6f_40x40.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_30_a32d00_2x2.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_40_00498f_2x2.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-icons_00498f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv.scss +38 -43
- data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_45_5f5964_1x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_ebccce_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant.scss +38 -43
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-thick_20_e69700_40x40.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_flat_0_e69700_40x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_highlight-soft_100_f9f9f9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_0a82eb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_0b54d5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike.scss +38 -43
- data/templates/jrails/jquery.ui/flick/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/templates/jrails/jquery.ui/flick.scss +38 -43
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_50_ff3853_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_75_ccd232_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_flat_75_ba9217_40x100.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_e1e463_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks.scss +38 -43
- data/templates/jrails/jquery.ui/humanity/ui-bg_glass_100_f5f0e5_1x400.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_inset-soft_100_f4f0ec_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_f35f07_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_ff7519_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity.scss +38 -43
- data/templates/jrails/jquery.ui/le-frog/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_33_3a8104_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_50_4eb305_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_60_4ca20b_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-icons_72b42d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/le-frog.scss +38 -43
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_glass_15_5f391b_1x400.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_gloss-wave_20_1c160d_500x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_9bcc60_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc.scss +38 -43
- data/templates/jrails/jquery.ui/overcast/ui-bg_flat_55_c0402a_40x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_70b2e1_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_fbc856_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast.scss +38 -43
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_fbdb93_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder.scss +38 -43
- data/templates/jrails/jquery.ui/redmond/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_d8e7f3_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond.scss +38 -43
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness.scss +38 -43
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_100_f5f3e5_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_25_67b021_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_847e71_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street.scss +38 -43
- data/templates/jrails/jquery.ui/start/ui-bg_glass_55_f8da4e_1x400.png +0 -0
- data/templates/jrails/jquery.ui/start/ui-bg_gloss-wave_75_2191c0_500x100.png +0 -0
- data/templates/jrails/jquery.ui/start/ui-icons_056b93_256x240.png +0 -0
- data/templates/jrails/jquery.ui/start/ui-icons_d8e7f3_256x240.png +0 -0
- data/templates/jrails/jquery.ui/start/ui-icons_f7a50d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/start/ui-icons_fcd113_256x240.png +0 -0
- data/templates/jrails/jquery.ui/start.scss +38 -43
- data/templates/jrails/jquery.ui/sunny/ui-bg_diagonals-medium_20_d34d17_40x40.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_90_fff9e5_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_highlight-soft_100_feeebd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_3d3d3d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_d19405_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_eb990f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_ffe180_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny.scss +38 -43
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_10_4f4221_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_8_443113_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_e8e2b5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_f9f2bd_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_ff7519_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse.scss +38 -43
- data/templates/jrails/jquery.ui/trontastic/ui-bg_diagonals-small_50_262626_40x40.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_flat_0_4c4c4c_40x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_85_9fda58_500x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_95_f6ecd5_500x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_9fda58_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic.scss +38 -43
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_glass_40_0078a3_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_a83300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness.scss +38 -43
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_228ef1_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness.scss +38 -43
- data/templates/jrails/jquery.ui/vader/ui-bg_highlight-soft_35_adadad_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader.scss +38 -43
- data/templates/jrails/jrails.min.js +4 -4
- data/templates/jrails/manifest.rb +0 -1
- data/templates/ribbon/jquery.ribbon.min.js +12 -12
- metadata +28 -4
@@ -1,59 +1,72 @@
|
|
1
|
-
var _canLog=
|
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){
|
4
|
-
|
5
|
-
|
6
|
-
"'":"")+">"+this.data.title+"</a>";return
|
7
|
-
this.
|
8
|
-
this.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
b&&
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
this.
|
26
|
-
|
27
|
-
this
|
28
|
-
|
29
|
-
|
30
|
-
b
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
var
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
a.
|
43
|
-
|
44
|
-
this.
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
g.
|
57
|
-
|
58
|
-
|
59
|
-
|
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…",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;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|