compass-jquery-plugin 0.3.0.beta.14 → 0.3.0.beta.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/.loadpath +5 -5
  2. data/.project +18 -18
  3. data/README.textile +19 -1
  4. data/VERSION.yml +1 -1
  5. data/compass-jquery-plugin.gemspec +42 -7
  6. data/gem_tasks/jrails.rake +1 -1
  7. data/gem_tasks/jstree.rake +96 -0
  8. data/gem_tasks/rubygems.rake +1 -1
  9. data/lib/jquery/flash_messages.rb +45 -45
  10. data/lib/jquery/jstree/jstree.rb +116 -0
  11. data/lib/jquery/jstree.rb +7 -0
  12. data/templates/dynatree/jquery.ui/dynatree.aero/ltWait.gif +0 -0
  13. data/templates/dynatree/manifest.rb +146 -147
  14. data/templates/jqgrid/i18n/jqgrid/locale-gl.js +126 -0
  15. data/templates/jqgrid/i18n/jqgrid/locale-gl.min.js +7 -0
  16. data/templates/jqgrid/jquery.jqGrid.js +11565 -11572
  17. data/templates/jqgrid/jquery.jqGrid.min.js +472 -473
  18. data/templates/jqgrid/manifest.rb +70 -72
  19. data/templates/jqical/jquery.jqical.js +7907 -7321
  20. data/templates/jqical/jquery.jqical.min.js +209 -185
  21. data/templates/jqical/jquery.ui/jqical.scss +940 -941
  22. data/templates/jrails/config/initializers/jrails.rb +1 -0
  23. data/templates/jrails/jquery.hotkeys.js +99 -0
  24. data/templates/jrails/jquery.hotkeys.min.js +3 -0
  25. data/templates/jrails/manifest.rb +2 -0
  26. data/templates/jstree/config/initializers/jstree.rb +8 -0
  27. data/templates/jstree/jquery.jstree.js +3664 -0
  28. data/templates/jstree/jquery.jstree.min.js +174 -0
  29. data/templates/jstree/jquery.ui/jstree.aero/clicked.png +0 -0
  30. data/templates/jstree/jquery.ui/jstree.aero/d.gif +0 -0
  31. data/templates/jstree/jquery.ui/jstree.aero/d.png +0 -0
  32. data/templates/jstree/jquery.ui/jstree.aero/hovered.png +0 -0
  33. data/templates/jstree/jquery.ui/jstree.aero/throbber.gif +0 -0
  34. data/templates/jstree/jquery.ui/jstree.aero.scss +209 -0
  35. data/templates/jstree/jquery.ui/jstree.aqua/clicked.png +0 -0
  36. data/templates/jstree/jquery.ui/jstree.aqua/d.gif +0 -0
  37. data/templates/jstree/jquery.ui/jstree.aqua/d.png +0 -0
  38. data/templates/jstree/jquery.ui/jstree.aqua/hovered.png +0 -0
  39. data/templates/jstree/jquery.ui/jstree.aqua/throbber.gif +0 -0
  40. data/templates/jstree/jquery.ui/jstree.aqua.scss +214 -0
  41. data/templates/jstree/jquery.ui/jstree.chrystal/d.gif +0 -0
  42. data/templates/jstree/jquery.ui/jstree.chrystal/d.png +0 -0
  43. data/templates/jstree/jquery.ui/jstree.chrystal/throbber.gif +0 -0
  44. data/templates/jstree/jquery.ui/jstree.chrystal.scss +205 -0
  45. data/templates/jstree/jquery.ui/jstree.classic/d.png +0 -0
  46. data/templates/jstree/jquery.ui/jstree.classic/dot_for_ie.gif +0 -0
  47. data/templates/jstree/jquery.ui/jstree.classic/throbber.gif +0 -0
  48. data/templates/jstree/jquery.ui/jstree.classic.scss +148 -0
  49. data/templates/jstree/jquery.ui/jstree.default/d.gif +0 -0
  50. data/templates/jstree/jquery.ui/jstree.default/d.png +0 -0
  51. data/templates/jstree/jquery.ui/jstree.default/throbber.gif +0 -0
  52. data/templates/jstree/jquery.ui/jstree.default-rtl/d.gif +0 -0
  53. data/templates/jstree/jquery.ui/jstree.default-rtl/d.png +0 -0
  54. data/templates/jstree/jquery.ui/jstree.default-rtl/dots.gif +0 -0
  55. data/templates/jstree/jquery.ui/jstree.default-rtl/throbber.gif +0 -0
  56. data/templates/jstree/jquery.ui/jstree.default-rtl.scss +228 -0
  57. data/templates/jstree/jquery.ui/jstree.default.scss +189 -0
  58. data/templates/jstree/manifest.rb +35 -0
  59. metadata +44 -9
  60. data/templates/dynatree/jquery.ui/dynatree.aero/ltWait.ani +0 -0
  61. data/templates/jqgrid/i18n/jqgrid/locale-dk.js +0 -128
  62. data/templates/jqgrid/i18n/jqgrid/locale-dk.min.js +0 -6
  63. data/templates/jqgrid/i18n/jqgrid/locale-sp.js +0 -128
  64. data/templates/jqgrid/i18n/jqgrid/locale-sp.min.js +0 -7
@@ -0,0 +1,174 @@
1
+ (function(b){b.vakata={};b.vakata.css={get_css:function(a,d,e){a=a.toLowerCase();var f=e.cssRules||e.rules,i=0;do{if(f.length&&i>f.length+5)return false;if(f[i].selectorText&&f[i].selectorText.toLowerCase()==a)if(d===true){e.removeRule&&e.removeRule(i);e.deleteRule&&e.deleteRule(i);return true}else return f[i]}while(f[++i]);return false},add_css:function(a,d){if(b.jstree.css.get_css(a,false,d))return false;d.insertRule?d.insertRule(a+" { }",0):d.addRule(a,null,0);return b.vakata.css.get_css(a)},remove_css:function(a,
2
+ d){return b.vakata.css.get_css(a,true,d)},add_sheet:function(a){var d;if(a.str){d=document.createElement("style");d.setAttribute("type","text/css");if(d.styleSheet){document.getElementsByTagName("head")[0].appendChild(d);d.styleSheet.cssText=a.str}else{d.appendChild(document.createTextNode(a.str));document.getElementsByTagName("head")[0].appendChild(d)}return d.sheet||d.styleSheet}if(a.url)if(document.createStyleSheet)try{document.createStyleSheet(a.url)}catch(e){}else{d=document.createElement("link");
3
+ d.rel="stylesheet";d.type="text/css";d.media="all";d.href=a.url;document.getElementsByTagName("head")[0].appendChild(d);return d.styleSheet}}}})(jQuery);
4
+ (function(b){var a=[],d=-1,e={},f={},i=false;b.fn.jstree=function(c){var g=typeof c=="string",h=Array.prototype.slice.call(arguments,1),j=this;!g&&b.meta&&h.push(b.metadata.get(this).jstree);c=!g&&h.length?b.extend.apply(null,[true,c].concat(h)):c;if(g&&c.substring(0,1)=="_")return j;g?this.each(function(){var l=a[b.data(this,"jstree-instance-id")];l=l&&b.isFunction(l[c])?l[c].apply(l,h):l;if(typeof l!=="undefined"&&(c.indexOf("is_"===0)||l!==true&&l!==false)){j=l;return false}}):this.each(function(){var l=
5
+ b.data(this,"jstree-instance-id"),k=false;typeof l!=="undefined"&&a[l]&&a[l].destroy();l=parseInt(a.push({}),10)-1;b.data(this,"jstree-instance-id",l);c||(c={});c.plugins=b.isArray(c.plugins)?c.plugins:b.jstree.defaults.plugins;b.inArray("core",c.plugins)===-1&&c.plugins.unshift("core");k=b.extend(true,{},b.jstree.defaults,c);k.plugins=c.plugins;b.each(e,function(m){if(b.inArray(m,k.plugins)===-1){k[m]=null;delete k[m]}});a[l]=new b.jstree._instance(l,b(this).addClass("jstree jstree-"+l),k);b.each(a[l]._get_settings().plugins,
6
+ function(m,n){a[l].data[n]={}});b.each(a[l]._get_settings().plugins,function(m,n){e[n]&&e[n].__init.apply(a[l])});a[l].init()});return j};b.jstree={defaults:{plugins:[]},_focused:function(){return a[d]||null},_reference:function(c){if(a[c])return a[c];var g=b(c);if(!g.length&&typeof c==="string")g=b("#"+c);if(!g.length)return null;return a[g.closest(".jstree").data("jstree-instance-id")]||null},_instance:function(c,g,h){this.data={core:{}};this.get_settings=function(){return b.extend(true,{},h)};
7
+ this._get_settings=function(){return h};this.get_index=function(){return c};this.get_container=function(){return g};this._set_settings=function(j){h=b.extend(true,{},h,j)}},_fn:{},plugin:function(c,g){g=b.extend({},{__init:b.noop,__destroy:b.noop,_fn:{},defaults:false},g);e[c]=g;b.jstree.defaults[c]=g.defaults;b.each(g._fn,function(h,j){j.plugin=c;j.old=b.jstree._fn[h];b.jstree._fn[h]=function(){var l,k=j,m=Array.prototype.slice.call(arguments);l=new b.Event("before.jstree");var n=false;do{if(k&&
8
+ k.plugin&&b.inArray(k.plugin,this._get_settings().plugins)!==-1)break;k=k.old}while(k);if(k){l=this.get_container().triggerHandler(l,{func:h,inst:this,args:m});if(l!==false){if(typeof l!=="undefined")m=l;return l=h.indexOf("_")===0?k.apply(this,m):k.apply(b.extend({},this,{__callback:function(p){this.get_container().triggerHandler(h+".jstree",{inst:this,args:m,rslt:p,rlbk:n})},__rollback:function(){return n=this.get_rollback()},__call_old:function(p){return k.old.apply(this,p?Array.prototype.slice.call(arguments,
9
+ 1):m)}}),m)}}};b.jstree._fn[h].old=j.old;b.jstree._fn[h].plugin=c})},rollback:function(c){if(c){b.isArray(c)||(c=[c]);b.each(c,function(g,h){a[h.i].set_rollback(h.h,h.d)})}}};b.jstree._fn=b.jstree._instance.prototype={};b(function(){var c=navigator.userAgent.toLowerCase(),g=(c.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],h=".jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } .jstree a:focus { outline: none; } .jstree a > ins { height:16px; width:16px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";
10
+ if(/msie/.test(c)&&parseInt(g,10)==6){i=true;h+=".jstree li { height:18px; margin-left:0; margin-right:0; } .jstree li li { margin-left:18px; } .jstree-rtl li li { margin-left:0px; margin-right:18px; } li.jstree-open ul { display:block; } li.jstree-closed ul { display:none !important; } .jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } .jstree li a ins { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a ins { margin-right:0px; margin-left:3px; } "}if(/msie/.test(c)&&
11
+ parseInt(g,10)==7)h+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } ";b.vakata.css.add_sheet({str:h})});b.jstree.plugin("core",{__init:function(){this.data.core.to_open=b.map(b.makeArray(this.get_settings().core.initially_open),function(c){return"#"+c.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/")})},defaults:{html_titles:false,animation:500,initially_open:[],rtl:false,strings:{loading:"Loading ...",new_node:"New node"}},_fn:{init:function(){this.set_focus();
12
+ this._get_settings().core.rtl&&this.get_container().addClass("jstree-rtl").css("direction","rtl");this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+this._get_settings().core.strings.loading+"</a></li></ul>");this.data.core.li_height=this.get_container().find("ul li.jstree-closed, ul li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",b.proxy(function(c){var g=
13
+ b(c.target);g.is("ins")&&c.pageY-g.offset().top<this.data.core.li_height&&this.toggle_node(g)},this)).bind("mousedown.jstree",b.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(){var c;if(document.selection&&document.selection.empty)document.selection.empty();else if(window.getSelection){c=window.getSelection();try{c.removeAllRanges();c.collapse()}catch(g){}}});this.__callback();this.load_node(-1,function(){this.loaded();this.reopen()})},destroy:function(){var c,g=this.get_index(),
14
+ h=this._get_settings(),j=this;b.each(h.plugins,function(l,k){try{e[k].__destroy.apply(j)}catch(m){}});this.__callback();if(this.is_focused())for(c in a)if(a.hasOwnProperty(c)&&c!=g){a[c].set_focus();break}if(g===d)d=-1;this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree-instance-id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"")});a[g]=null;delete a[g]},save_opened:function(){var c=this;this.data.core.to_open=
15
+ [];this.get_container().find(".jstree-open").each(function(){c.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/"))});this.__callback(c.data.core.to_open)},reopen:function(c){var g=this,h=true,j=[],l=[];if(!c){this.data.core.reopen=false;this.data.core.refreshing=true}if(this.data.core.to_open.length){b.each(this.data.core.to_open,function(k,m){if(m=="#")return true;b(m).length&&b(m).is(".jstree-closed")?j.push(m):l.push(m)});if(j.length){this.data.core.to_open=
16
+ l;b.each(j,function(k,m){g.open_node(m,function(){g.reopen(true)},true)});h=false}}if(h){this.data.core.reopen&&clearTimeout(this.data.core.reopen);this.data.core.reopen=setTimeout(function(){g.__callback({},g)},50);this.data.core.refreshing=false}},refresh:function(c){var g=this;this.save_opened();c||(c=-1);(c=this._get_node(c))||(c=-1);c!==-1&&c.children("UL").remove();this.load_node(c,function(){g.__callback({obj:c});g.reopen()})},loaded:function(){this.__callback()},set_focus:function(){var c=
17
+ b.jstree._focused();c&&c!==this&&c.get_container().removeClass("jstree-focused");if(c!==this){this.get_container().addClass("jstree-focused");d=this.get_index()}this.__callback()},is_focused:function(){return d==this.get_index()},_get_node:function(c){var g=b(c,this.get_container());if(g.is(".jstree")||c==-1)return-1;g=g.closest("li",this.get_container());return g.length?g:false},_get_next:function(c,g){c=this._get_node(c);if(c===-1)return this.get_container().find("> ul > li:first-child");if(!c.length)return false;
18
+ if(g)return c.nextAll("li").size()>0?c.nextAll("li:eq(0)"):false;return c.hasClass("jstree-open")?c.find("li:eq(0)"):c.nextAll("li").size()>0?c.nextAll("li:eq(0)"):c.parentsUntil(".jstree","li").next("li").eq(0)},_get_prev:function(c,g){c=this._get_node(c);if(c===-1)return this.get_container().find("> ul > li:last-child");if(!c.length)return false;if(g)return c.prevAll("li").length>0?c.prevAll("li:eq(0)"):false;if(c.prev("li").length){for(c=c.prev("li").eq(0);c.hasClass("jstree-open");)c=c.children("ul:eq(0)").children("li:last");
19
+ return c}else{var h=c.parentsUntil(".jstree","li:eq(0)");return h.length?h:false}},_get_parent:function(c){c=this._get_node(c);if(c==-1||!c.length)return false;c=c.parentsUntil(".jstree","li:eq(0)");return c.length?c:-1},_get_children:function(c){c=this._get_node(c);if(c===-1)return this.get_container().children("ul:eq(0)").children("li");if(!c.length)return false;return c.children("ul:eq(0)").children("li")},get_path:function(c,g){var h=[],j=this;c=this._get_node(c);if(c===-1||!c||!c.length)return false;
20
+ c.parentsUntil(".jstree","li").each(function(){h.push(g?this.id:j.get_text(this))});h.reverse();h.push(g?c.attr("id"):this.get_text(c));return h},is_open:function(c){return(c=this._get_node(c))&&c!==-1&&c.hasClass("jstree-open")},is_closed:function(c){return(c=this._get_node(c))&&c!==-1&&c.hasClass("jstree-closed")},is_leaf:function(c){return(c=this._get_node(c))&&c!==-1&&c.hasClass("jstree-leaf")},open_node:function(c,g,h){c=this._get_node(c);if(!c.length)return false;if(!c.hasClass("jstree-closed")){g&&
21
+ g.call();return false}var j=h||i?0:this._get_settings().core.animation,l=this;if(this._is_loaded(c)){j&&c.children("ul").css("display","none");c.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");j&&c.children("ul").stop(true).slideDown(j,function(){this.style.display=""});this.__callback({obj:c});g&&g.call()}else{c.children("a").addClass("jstree-loading");this.load_node(c,function(){l.open_node(c,g,h)},g)}},close_node:function(c,g){c=this._get_node(c);
22
+ var h=g||i?0:this._get_settings().core.animation;if(!c.length||!c.hasClass("jstree-open"))return false;h&&c.children("ul").attr("style","display:block !important");c.removeClass("jstree-open").addClass("jstree-closed");h&&c.children("ul").stop(true).slideUp(h,function(){this.style.display=""});this.__callback({obj:c})},toggle_node:function(c){c=this._get_node(c);if(c.hasClass("jstree-closed"))return this.open_node(c);if(c.hasClass("jstree-open"))return this.close_node(c)},open_all:function(c,g){c=
23
+ c?this._get_node(c):this.get_container();if(!c||c===-1)c=this.get_container();if(g)c=c.find("li.jstree-closed");else{g=c;c=c.is(".jstree-closed")?c.find("li.jstree-closed").andSelf():c.find("li.jstree-closed")}var h=this;c.each(function(){var j=this;h._is_loaded(this)?h.open_node(this,false,true):h.open_node(this,function(){h.open_all(j,g)},true)});g.find("li.jstree-closed").length===0&&this.__callback({obj:g})},close_all:function(c){var g=this;c=c?this._get_node(c):this.get_container();if(!c||c===
24
+ -1)c=this.get_container();c.find("li.jstree-open").andSelf().each(function(){g.close_node(this)});this.__callback({obj:c})},clean_node:function(c){c=c&&c!=-1?b(c):this.get_container();c=c.is("li")?c.find("li").andSelf():c.find("li");c.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");c.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:c})},
25
+ get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data}},set_rollback:function(c,g){this.get_container().empty().append(c);this.data=g;this.__callback()},load_node:function(c){this.__callback({obj:c})},_is_loaded:function(){return true},create_node:function(c,g,h,j,l){c=this._get_node(c);g=typeof g==="undefined"?"last":g;var k=b("<li>"),m=this._get_settings().core,n;if(c!==-1&&!c.length)return false;if(!l&&!this._is_loaded(c)){this.load_node(c,
26
+ function(){this.create_node(c,g,h,j,true)});return false}this.__rollback();if(typeof h==="string")h={data:h};h||(h={});h.attr&&k.attr(h.attr);h.state&&k.addClass("jstree-"+h.state);if(!h.data)h.data=m.strings.new_node;if(!b.isArray(h.data)){n=h.data;h.data=[];h.data.push(n)}b.each(h.data,function(p,o){n=b("<a>");if(b.isFunction(o))o=o.call(this,h);if(typeof o=="string")n.attr("href","#")[m.html_titles?"html":"text"](o);else{if(!o.attr)o.attr={};if(!o.attr.href)o.attr.href="#";n.attr(o.attr)[m.html_titles?
27
+ "html":"text"](o.title);o.language&&n.addClass(o.language)}n.prepend("<ins class='jstree-icon'>&#160;</ins>");if(o.icon)o.icon.indexOf("/")===-1?n.children("ins").addClass(o.icon):n.children("ins").css("background","url('"+o.icon+"') center center no-repeat");k.append(n)});k.prepend("<ins class='jstree-icon'>&#160;</ins>");if(c===-1){c=this.get_container();if(g==="before")g="first";if(g==="after")g="last"}switch(g){case "before":c.before(k);n=this._get_parent(c);break;case "after":c.after(k);n=this._get_parent(c);
28
+ break;case "inside":case "first":c.children("ul").length||c.append("<ul>");c.children("ul").prepend(k);n=c;break;case "last":c.children("ul").length||c.append("<ul>");c.children("ul").append(k);n=c;break;default:c.children("ul").length||c.append("<ul>");g||(g=0);n=c.children("ul").children("li").eq(g);n.length?n.before(k):c.children("ul").append(k);n=c;break}if(n===-1||n.get(0)===this.get_container().get(0))n=-1;this.clean_node(n);this.__callback({obj:k,parent:n});j&&j.call(this,k);return k},get_text:function(c){c=
29
+ this._get_node(c);if(!c.length)return false;var g=this._get_settings().core.html_titles;c=c.children("a:eq(0)");if(g){c=c.clone();c.children("INS").remove();return c.html()}else{c=c.contents().filter(function(){return this.nodeType==3})[0];return c.nodeValue}},set_text:function(c,g){c=this._get_node(c);if(!c.length)return false;c=c.children("a:eq(0)");if(this._get_settings().core.html_titles){var h=c.children("INS").clone();c.html(g).prepend(h);this.__callback({obj:c,name:g});return true}else{c=c.contents().filter(function(){return this.nodeType==
30
+ 3})[0];this.__callback({obj:c,name:g});return c.nodeValue=g}},rename_node:function(c,g){c=this._get_node(c);this.__rollback();c&&c.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))&&this.__callback({obj:c,name:g})},delete_node:function(c){c=this._get_node(c);if(!c.length)return false;this.__rollback();var g=this._get_parent(c),h=this._get_prev(c);c=c.remove();g!==-1&&g.find("> ul > li").length===0&&g.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");this.clean_node(g);
31
+ this.__callback({obj:c,prev:h});return c},prepare_move:function(c,g,h,j,l){var k={};k.ot=b.jstree._reference(k.o)||this;k.o=k.ot._get_node(c);k.r=g===-1?-1:this._get_node(g);k.p=typeof k==="undefined"?"last":h;if(!(!l&&f.o&&f.o[0]===k.o[0]&&f.r[0]===k.r[0]&&f.p===k.p)){k.ot=b.jstree._reference(k.o)||this;k.rt=g===-1?k.ot:b.jstree._reference(k.r)||this;if(k.r===-1){k.cr=-1;switch(k.p){case "first":case "before":case "inside":k.cp=0;break;case "after":case "last":k.cp=k.rt.get_container().find(" > ul > li").length;
32
+ break;default:k.cp=k.p;break}}else{if(!/^(before|after)$/.test(k.p)&&!this._is_loaded(k.r))return this.load_node(k.r,function(){this.prepare_move(c,g,h,j,true)});switch(k.p){case "before":k.cp=k.r.index();k.cr=k.rt._get_parent(k.r);break;case "after":k.cp=k.r.index()+1;k.cr=k.rt._get_parent(k.r);break;case "inside":case "first":k.cp=0;k.cr=k.r;break;case "last":k.cp=k.r.find(" > ul > li").length;k.cr=k.r;break;default:k.cp=k.p;k.cr=k.r;break}}k.np=k.cr==-1?k.rt.get_container():k.cr;k.op=k.ot._get_parent(k.o);
33
+ k.or=k.np.find(" > ul > li:nth-child("+(k.cp+1)+")");f=k}this.__callback(f);j&&j.call(this,f)},check_move:function(){var c=f,g=true;if(c.or[0]===c.o[0])return false;c.o.each(function(){if(c.r.parentsUntil(".jstree").andSelf().filter("li").index(this)!==-1)return g=false});return g},move_node:function(c,g,h,j,l,k){if(!l)return this.prepare_move(c,g,h,function(n){this.move_node(n,false,false,j,true,k)});if(!k&&!this.check_move())return false;this.__rollback();g=false;if(j){g=c.o.clone();g.find("*[id]").andSelf().each(function(){if(this.id)this.id=
34
+ "copy_"+this.id})}else g=c.o;if(c.or.length)c.or.before(g);else{c.np.children("ul").length||b("<ul>").appendTo(c.np);c.np.children("ul:eq(0)").append(g)}try{c.ot.clean_node(c.op);c.rt.clean_node(c.np);c.op.find("> ul > li").length||c.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(m){}if(j){f.cy=true;f.oc=g}this.__callback(f);return f},_get_move:function(){return f}}})})(jQuery);
35
+ (function(b){b.jstree.plugin("ui",{__init:function(){this.data.ui.selected=b();this.data.ui.last_selected=false;this.data.ui.hovered=null;this.data.ui.to_select=this.get_settings().ui.initially_select;this.get_container().delegate("a","click.jstree",b.proxy(function(a){a.preventDefault();this.select_node(a.currentTarget,true,a)},this)).delegate("a","mouseenter.jstree",b.proxy(function(a){this.hover_node(a.target)},this)).delegate("a","mouseleave.jstree",b.proxy(function(a){this.dehover_node(a.target)},
36
+ this)).bind("reopen.jstree",b.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",b.proxy(function(){this.dehover_node();this.save_selected()},this)).bind("set_rollback.jstree",b.proxy(function(){this.reselect()},this)).bind("close_node.jstree",b.proxy(function(a,d){var e=this._get_settings().ui,f=this._get_node(d.rslt.obj),i=f&&f.length?f.children("ul").find(".jstree-clicked"):b(),c=this;e.selected_parent_close===false||!i.length||i.each(function(){c.deselect_node(this);e.selected_parent_close===
37
+ "select_parent"&&c.select_node(f)})},this)).bind("delete_node.jstree",b.proxy(function(a,d){var e=this._get_settings().ui.select_prev_on_delete,f=this._get_node(d.rslt.obj);f=f&&f.length?f.find(".jstree-clicked"):[];var i=this;f.each(function(){i.deselect_node(this)});e&&f.length&&this.select_node(d.rslt.prev)},this)).bind("move_node.jstree",b.proxy(function(a,d){d.rslt.cy&&d.rslt.oc.find(".jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",
38
+ selected_parent_close:"select_parent",select_prev_on_delete:true,disable_selecting_children:false,initially_select:[]},_fn:{_get_node:function(a,d){if(typeof a==="undefined"||a===null)return d?this.data.ui.selected:this.data.ui.last_selected;var e=b(a,this.get_container());if(e.is(".jstree")||a==-1)return-1;e=e.closest("li",this.get_container());return e.length?e:false},save_selected:function(){var a=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){a.data.ui.to_select.push("#"+
39
+ this.id.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/"))});this.__callback(this.data.ui.to_select)},reselect:function(){var a=this,d=this.data.ui.to_select;d=b.map(b.makeArray(d),function(e){return"#"+e.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/")});this.deselect_all();b.each(d,function(e,f){f&&f!=="#"&&a.select_node(f)});this.__callback()},refresh:function(){this.save_selected();return this.__call_old()},hover_node:function(a){a=this._get_node(a);if(!a.length)return false;
40
+ a.hasClass("jstree-hovered")||this.dehover_node();this.data.ui.hovered=a.children("a").addClass("jstree-hovered").parent();this.__callback({obj:a})},dehover_node:function(){var a=this.data.ui.hovered;if(!a||!a.length)return false;if(this.data.ui.hovered[0]===a.children("a").removeClass("jstree-hovered").parent()[0])this.data.ui.hovered=null;this.__callback({obj:a})},select_node:function(a,d,e){a=this._get_node(a);if(a==-1||!a||!a.length)return false;var f=this._get_settings().ui;e=f.select_multiple_modifier==
41
+ "on"||f.select_multiple_modifier!==false&&e&&e[f.select_multiple_modifier+"Key"];var i=this.is_selected(a),c=true;if(d){if(f.disable_selecting_children&&e&&a.parents("li",this.get_container()).children(".jstree-clicked").length)return false;c=false;switch(true){case i&&!e:this.deselect_all();i=false;c=true;break;case !i&&!e:if(f.select_limit==-1||f.select_limit>0){this.deselect_all();c=true}break;case i&&e:this.deselect_node(a);break;case !i&&e:if(f.select_limit==-1||this.data.ui.selected.length+
42
+ 1<=f.select_limit)c=true;break}}if(c&&!i){a.children("a").addClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.add(a);this.data.ui.last_selected=a;this.__callback({obj:a})}},deselect_node:function(a){a=this._get_node(a);if(!a.length)return false;if(this.is_selected(a)){a.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(a);if(this.data.ui.last_selected.get(0)===a.get(0))this.data.ui.last_selected=this.data.ui.selected.eq(0);this.__callback({obj:a})}},
43
+ toggle_select:function(a){a=this._get_node(a);if(!a.length)return false;this.is_selected(a)?this.deselect_node(a):this.select_node(a)},is_selected:function(a){return this.data.ui.selected.index(this._get_node(a))>=0},get_selected:function(a){return a?b(a).find(".jstree-clicked").parent():this.data.ui.selected},deselect_all:function(a){a?b(a).find(".jstree-clicked").removeClass("jstree-clicked"):this.get_container().find(".jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=b([]);
44
+ this.data.ui.last_selected=false;this.__callback()}}});b.jstree.defaults.plugins.push("ui")})(jQuery);
45
+ (function(b){b.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",b.proxy(function(a,d){if(this._get_settings().crrm.move.open_onmove){var e=this;d.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){e.open_node(this,false,true)})}},this))},defaults:{input_width_limit:200,move:{always_copy:false,open_onmove:true,default_position:"last",check_move:function(){return true}}},_fn:{_show_input:function(a,d){a=this._get_node(a);var e=this._get_settings().core.rtl,
46
+ f=this._get_settings().crrm.input_width_limit,i=a.children("ins").width(),c=a.find("> a:visible > ins").width()*a.find("> a:visible > ins").length,g=this.get_text(a),h=b("<div>",{css:{position:"absolute",top:"-200px",left:e?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),j=a.css("position","relative").append(b("<input>",{value:g,css:{padding:"0",border:"1px solid silver",position:"absolute",left:e?"auto":i+c+4+"px",right:e?i+c+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",
47
+ lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:b.proxy(function(){var l=a.children("input"),k=l.val();if(k==="")k=g;l.remove();this.set_text(a,g);this.rename_node(a,k);d.call(this,a,k,g);a.css("position","")},this),keyup:function(l){l=l.keyCode||l.which;if(l==27){this.value=g;this.blur()}else l==13?this.blur():j.width(Math.min(h.text("pW"+this.value).width(),f))}})).children("input");this.set_text(a,"");h.css({fontFamily:j.css("fontFamily")||"",fontSize:j.css("fontSize")||"",fontWeight:j.css("fontWeight")||
48
+ "",fontStyle:j.css("fontStyle")||"",fontStretch:j.css("fontStretch")||"",fontVariant:j.css("fontVariant")||"",letterSpacing:j.css("letterSpacing")||"",wordSpacing:j.css("wordSpacing")||""});j.width(Math.min(h.text("pW"+j[0].value).width(),f))[0].select()},rename:function(a){a=this._get_node(a);this.__rollback();var d=this.__callback;this._show_input(a,function(e,f,i){d.call(this,{obj:e,new_name:f,old_name:i})})},create:function(a,d,e,f,i){var c=this;(a=this._get_node(a))||(a=-1);this.__rollback();
49
+ return this.create_node(a,d,e,function(g){var h=this._get_parent(g),j=b(g).index();f&&f.call(this,g);h.length&&h.hasClass("jstree-closed")&&this.open_node(h,false,true);i?c.__callback({obj:g,name:this.get_text(g),parent:h,position:j}):this._show_input(g,function(l,k){c.__callback({obj:l,name:k,parent:h,position:j})})})},remove:function(a){a=this._get_node(a,true);this.__rollback();this.delete_node(a);this.__callback({obj:a})},check_move:function(){if(!this.__call_old())return false;if(!this._get_settings().crrm.move.check_move.call(this,
50
+ this._get_move()))return false;return true},move_node:function(a,d,e,f,i,c){var g=this._get_settings().crrm.move;if(!i){if(!e)e=g.default_position;if(e==="inside"&&!g.default_position.match(/^(before|after)$/))e=g.default_position;return this.__call_old(true,a,d,e,f,false,c)}if(g.always_copy===true||g.always_copy==="multitree"&&a.rt.get_index()!==a.ot.get_index())f=true;this.__call_old(true,a,d,e,f,true,c)},cut:function(a){a=this._get_node(a);this.data.crrm.cp_nodes=false;this.data.crrm.ct_nodes=
51
+ false;if(!a||!a.length)return false;this.data.crrm.ct_nodes=a},copy:function(a){a=this._get_node(a);this.data.crrm.cp_nodes=false;this.data.crrm.ct_nodes=false;if(!a||!a.length)return false;this.data.crrm.cp_nodes=a},paste:function(a){a=this._get_node(a);if(!a||!a.length)return false;if(!this.data.crrm.ct_nodes&&!this.data.crrm.cp_nodes)return false;this.data.crrm.ct_nodes&&this.move_node(this.data.crrm.ct_nodes,a);this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,a,false,true);this.data.crrm.cp_nodes=
52
+ false;this.data.crrm.ct_nodes=false}}});b.jstree.defaults.plugins.push("crrm")})(jQuery);
53
+ (function(b){var a=[];b.jstree._themes=false;b.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",b.proxy(function(){var d=this._get_settings().themes;this.data.themes.dots=d.dots;this.data.themes.icons=d.icons;this.set_theme(d.theme,d.url)},this)).bind("loaded.jstree",b.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots();this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:false,dots:true,icons:true},
54
+ _fn:{set_theme:function(d,e){if(!d)return false;e||(e=b.jstree._themes+"jstree."+d+".css");if(b.inArray(e,a)==-1){b.vakata.css.add_sheet({url:e,rel:"jstree"});a.push(e)}if(this.data.themes.theme!=d){this.get_container().removeClass("jstree-"+this.data.themes.theme);this.data.themes.theme=d}this.get_container().addClass("jstree-"+d);this.data.themes.dots?this.show_dots():this.hide_dots();this.data.themes.icons?this.show_icons():this.hide_icons();this.__callback()},get_theme:function(){return this.data.themes.theme},
55
+ show_dots:function(){this.data.themes.dots=true;this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=false;this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=true;this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=false;this.get_container().children("ul").addClass("jstree-no-icons")},
56
+ toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}});b(function(){if(b.jstree._themes===false)b.jstree._themes="/stylesheets/compiled/jquery.ui/"});b.jstree.defaults.plugins.push("themes")})(jQuery);
57
+ (function(b){var a=[];b.jstree.plugin("hotkeys",{__init:function(){if(typeof b.hotkeys==="undefined")throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";b.each(this._get_settings().hotkeys,function(d){if(b.inArray(d,a)==-1){b(document).bind("keydown",d,function(e){var f;var i=b.jstree._focused(),c;if(i&&i.data&&i.data.hotkeys&&i.data.hotkeys.enabled)if(c=i._get_settings().hotkeys[d])f=c.call(i,e);return f});a.push(d)}});
58
+ this.enable_hotkeys()},defaults:{up:function(){this.hover_node(this._get_prev(this.data.ui.hovered||this.data.ui.last_selected||-1));return false},down:function(){this.hover_node(this._get_next(this.data.ui.hovered||this.data.ui.last_selected||-1));return false},left:function(){var d=this.data.ui.hovered||this.data.ui.last_selected;if(d)d.hasClass("jstree-open")?this.close_node(d):this.hover_node(this._get_prev(d));return false},right:function(){var d=this.data.ui.hovered||this.data.ui.last_selected;
59
+ if(d&&d.length)d.hasClass("jstree-closed")?this.open_node(d):this.hover_node(this._get_next(d));return false},space:function(){this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click();return false},"ctrl+space":function(d){d.type="click";this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(d);return false},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=
60
+ true},disable_hotkeys:function(){this.data.hotkeys.enabled=false}}})})(jQuery);
61
+ (function(b){b.jstree.plugin("json_data",{defaults:{data:false,ajax:false,correct_state:true,progressive_render:false},_fn:{load_node:function(a,d,e){var f=this;this.load_node_json(a,function(){f.__callback({obj:a});d.call(this)},e)},_is_loaded:function(a){var d=this._get_settings().json_data;if((a=this._get_node(a))&&a!==-1&&d.progressive_render&&!a.is(".jstree-open, .jstree-leaf")&&a.children("ul").children("li").length===0&&a.data("jstree-children")){if(d=this._parse_json(a.data("jstree-children"))){a.append(d);
62
+ b.removeData(a,"jstree-children")}this.clean_node(a);return true}return a==-1||!a||!d.ajax||a.is(".jstree-open, .jstree-leaf")||a.children("ul").children("li").size()>0},load_node_json:function(a,d,e){var f=this.get_settings().json_data,i,c=function(){};i=function(){};if((a=this._get_node(a))&&a!==-1)if(a.data("jstree-is-loading"))return;else a.data("jstree-is-loading",true);switch(true){case !f.data&&!f.ajax:throw"Neither data nor ajax settings supplied.";case !!f.data&&!f.ajax||!!f.data&&!!f.ajax&&
63
+ (!a||a===-1):if(!a||a==-1)if(i=this._parse_json(f.data)){this.get_container().children("ul").empty().append(i.children());this.clean_node()}else f.correct_state&&this.get_container().children("ul").empty();d&&d.call(this);break;case !f.data&&!!f.ajax||!!f.data&&!!f.ajax&&a&&a!==-1:c=function(g,h,j){var l=this.get_settings().json_data.ajax.error;l&&l.call(this,g,h,j);if(a!=-1&&a.length){a.children(".jstree-loading").removeClass("jstree-loading");a.data("jstree-is-loading",false);h==="success"&&f.correct_state&&
64
+ a.removeClass("jstree-open jstree-closed").addClass("jstree-leaf")}else h==="success"&&f.correct_state&&this.get_container().children("ul").empty();e&&e.call(this)};i=function(g,h,j){var l=this.get_settings().json_data.ajax.success;if(l)g=l.call(this,g,h,j)||g;if(g===""||!b.isArray(g)&&!b.isPlainObject(g))return c.call(this,j,h,"");if(g=this._parse_json(g)){if(a===-1||!a)this.get_container().children("ul").empty().append(g.children());else{a.append(g).children(".jstree-loading").removeClass("jstree-loading");
65
+ a.data("jstree-is-loading",false)}this.clean_node(a);d&&d.call(this)}else if(a===-1||!a){if(f.correct_state){this.get_container().children("ul").empty();d&&d.call(this)}}else{a.children(".jstree-loading").removeClass("jstree-loading");a.data("jstree-is-loading",false);if(f.correct_state){a.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");d&&d.call(this)}}};f.ajax.context=this;f.ajax.error=c;f.ajax.success=i;if(!f.ajax.dataType)f.ajax.dataType="json";if(b.isFunction(f.ajax.url))f.ajax.url=
66
+ f.ajax.url.call(this,a);if(b.isFunction(f.ajax.data))f.ajax.data=f.ajax.data.call(this,a);b.ajax(f.ajax);break}},_parse_json:function(a,d){var e=false,f=this._get_settings(),i=f.json_data,c=f.core.html_titles,g;if(!a)return e;if(b.isFunction(a))a=a.call(this);if(b.isArray(a)){e=b();if(!a.length)return false;f=0;for(i=a.length;f<i;f++){g=this._parse_json(a[f],true);if(g.length)e=e.add(g)}}else{if(typeof a=="string")a={data:a};if(!a.data&&a.data!=="")return e;e=b("<li>");a.attr&&e.attr(a.attr);a.metadata&&
67
+ e.data("jstree",a.metadata);a.state&&e.addClass("jstree-"+a.state);if(!b.isArray(a.data)){g=a.data;a.data=[];a.data.push(g)}b.each(a.data,function(h,j){g=b("<a>");if(b.isFunction(j))j=j.call(this,a);if(typeof j=="string")g.attr("href","#")[c?"html":"text"](j);else{if(!j.attr)j.attr={};if(!j.attr.href)j.attr.href="#";g.attr(j.attr)[c?"html":"text"](j.title);j.language&&g.addClass(j.language)}g.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!j.icon&&a.icon)j.icon=a.icon;if(j.icon)j.icon.indexOf("/")===
68
+ -1?g.children("ins").addClass(j.icon):g.children("ins").css("background","url('"+j.icon+"') center center no-repeat");e.append(g)});e.prepend("<ins class='jstree-icon'>&#160;</ins>");if(a.children)if(i.progressive_render&&a.state!=="open")e.addClass("jstree-closed").data("jstree-children",a.children);else{if(b.isFunction(a.children))a.children=a.children.call(this,a);if(b.isArray(a.children)&&a.children.length){g=this._parse_json(a.children,true);if(g.length){f=b("<ul>");f.append(g);e.append(f)}}}}if(!d){f=
69
+ b("<ul>");f.append(e);e=f}return e},get_json:function(a,d,e,f){var i=[],c=this._get_settings(),g=this,h,j,l,k,m,n;a=this._get_node(a);if(!a||a===-1)a=this.get_container().find("> ul > li");d=b.isArray(d)?d:["id","class"];!f&&this.data.types&&d.push(c.types.type_attr);e=b.isArray(e)?e:[];a.each(function(){l=b(this);h={data:[]};if(d.length)h.attr={};b.each(d,function(p,o){if((j=l.attr(o))&&j.length&&j.replace(/jstree[^ ]*|$/ig,"").length)h.attr[o]=j.replace(/jstree[^ ]*|$/ig,"")});if(l.hasClass("jstree-open"))h.state=
70
+ "open";if(l.hasClass("jstree-closed"))h.state="closed";k=l.children("a");k.each(function(){m=b(this);if(e.length||b.inArray("languages",c.plugins)!==-1||m.children("ins").get(0).style.backgroundImage.length||m.children("ins").get(0).className&&m.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").length){n=false;b.inArray("languages",c.plugins)!==-1&&b.isArray(c.languages)&&c.languages.length&&b.each(c.languages,function(p,o){if(m.hasClass(o)){n=o;return false}});j={attr:{},title:g.get_text(m,
71
+ n)};b.each(e,function(p,o){h.attr[o]=(m.attr(o)||"").replace(/jstree[^ ]*|$/ig,"")});b.each(c.languages,function(p,o){if(m.hasClass(o)){j.language=o;return true}});if(m.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"").length)j.icon=m.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"");if(m.children("ins").get(0).style.backgroundImage.length)j.icon=m.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","")}else j=
72
+ g.get_text(m);if(k.length>1)h.data.push(j);else h.data=j});l=l.find("> ul > li");if(l.length)h.children=g.get_json(l,d,e,true);i.push(h)});return i}}})})(jQuery);
73
+ (function(b){b.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(a){var d=this._get_settings().languages,e=false,f=".jstree-"+this.get_index()+" a";if(!b.isArray(d)||d.length===0)return false;if(b.inArray(a,d)==-1)if(d[a])a=d[a];else return false;if(a==this.data.languages.current_language)return true;e=b.vakata.css.get_css(f+"."+this.data.languages.current_language,false,this.data.languages.language_css);if(e!==false)e.style.display="none";e=b.vakata.css.get_css(f+
74
+ "."+a,false,this.data.languages.language_css);if(e!==false)e.style.display="";this.data.languages.current_language=a;this.__callback(a);return true},get_lang:function(){return this.data.languages.current_language},get_text:function(a,d){a=this._get_node(a)||this.data.ui.last_selected;if(!a.size())return false;var e=this._get_settings().languages,f=this._get_settings().core.html_titles;if(b.isArray(e)&&e.length){d=d&&b.inArray(d,e)!=-1?d:this.data.languages.current_language;a=a.children("a."+d)}else a=
75
+ a.children("a:eq(0)");if(f){a=a.clone();a.children("INS").remove();return a.html()}else{a=a.contents().filter(function(){return this.nodeType==3})[0];return a.nodeValue}},set_text:function(a,d,e){a=this._get_node(a)||this.data.ui.last_selected;if(!a.size())return false;var f=this._get_settings().languages,i=this._get_settings().core.html_titles;if(b.isArray(f)&&f.length){e=e&&b.inArray(e,f)!=-1?e:this.data.languages.current_language;a=a.children("a."+e)}else a=a.children("a:eq(0)");if(i){f=a.children("INS").clone();
76
+ a.html(d).prepend(f);this.__callback({obj:a,name:d,lang:e});return true}else{a=a.contents().filter(function(){return this.nodeType==3})[0];this.__callback({obj:a,name:d,lang:e});return a.nodeValue=d}},_load_css:function(){var a=this._get_settings().languages,d="/* languages css */",e=".jstree-"+this.get_index()+" a",f;if(b.isArray(a)&&a.length){this.data.languages.current_language=a[0];for(f=0;f<a.length;f++){d+=e+"."+a[f]+" {";if(a[f]!=this.data.languages.current_language)d+=" display:none; ";d+=
77
+ " } "}this.data.languages.language_css=b.vakata.css.add_sheet({str:d})}},create_node:function(a,d,e,f){return this.__call_old(true,a,d,e,function(i){var c=this._get_settings().languages,g=i.children("a"),h;if(b.isArray(c)&&c.length){for(h=0;h<c.length;h++)g.is("."+c[h])||i.append(g.eq(0).clone().removeClass(c.join(" ")).addClass(c[h]));g.not("."+c.join(", .")).remove()}f&&f.call(this,i)})}}})})(jQuery);
78
+ (function(b){b.jstree.plugin("cookies",{__init:function(){if(typeof b.cookie==="undefined")throw"jsTree cookie: jQuery cookie plugin not included.";var a=this._get_settings().cookies,d;if(a.save_opened)if((d=b.cookie(a.save_opened))&&d.length)this.data.core.to_open=d.split(",");if(a.save_selected)if((d=b.cookie(a.save_selected))&&d.length&&this.data.ui)this.data.ui.to_select=d.split(",");this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",b.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",
79
+ b.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_opened:"jstree_open",save_selected:"jstree_select",auto_save:true,cookie_options:{}},_fn:{save_cookie:function(a){if(!this.data.core.refreshing){var d=this._get_settings().cookies;if(a)switch(a){case "open_node":case "close_node":if(d.save_opened){this.save_opened();b.cookie(d.save_opened,this.data.core.to_open.join(","),d.cookie_options)}break;
80
+ case "select_node":case "deselect_node":if(d.save_selected&&this.data.ui){this.save_selected();b.cookie(d.save_selected,this.data.ui.to_select.join(","),d.cookie_options)}break}else{if(d.save_opened){this.save_opened();b.cookie(d.save_opened,this.data.core.to_open.join(","),d.cookie_options)}if(d.save_selected&&this.data.ui){this.save_selected();b.cookie(d.save_selected,this.data.ui.to_select.join(","),d.cookie_options)}}}}}});b.jstree.defaults.plugins.push("cookies")})(jQuery);
81
+ (function(b){b.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",b.proxy(function(a,d){var e=this._get_node(d.rslt.obj);e=e===-1?this.get_container().children("ul"):e.children("ul");this.sort(e)},this)).bind("rename_node.jstree",b.proxy(function(a,d){this.sort(d.rslt.obj.parent())},this)).bind("move_node.jstree",b.proxy(function(a,d){this.sort((d.rslt.np==-1?this.get_container():d.rslt.np).children("ul"))},this))},defaults:function(a,d){return this.get_text(a)>this.get_text(d)?
82
+ 1:-1},_fn:{sort:function(a){var d=this._get_settings().sort,e=this;a.append(b.makeArray(a.children("li")).sort(b.proxy(d,e)));a.find("> li > ul").each(function(){e.sort(b(this))});this.clean_node(a)}}})})(jQuery);
83
+ (function(b){var a=false,d=false,e=false,f=false,i=false,c=false,g=false;b.vakata.dnd={is_down:false,is_drag:false,helper:false,scroll_spd:10,init_x:0,init_y:0,threshold:5,user_data:{},drag_start:function(h,j,l){b.vakata.dnd.is_drag&&b.vakata.drag_stop({});try{h.currentTarget.unselectable="on";h.currentTarget.onselectstart=function(){return false};if(h.currentTarget.style)h.currentTarget.style.MozUserSelect="none"}catch(k){}b.vakata.dnd.init_x=h.pageX;b.vakata.dnd.init_y=h.pageY;b.vakata.dnd.user_data=
84
+ j;b.vakata.dnd.is_down=true;b.vakata.dnd.helper=b("<div id='vakata-dragged'>").html(l).css("opacity","0.75");b(document).bind("mousemove",b.vakata.dnd.drag);b(document).bind("mouseup",b.vakata.dnd.drag_stop);return false},drag:function(h){if(b.vakata.dnd.is_down){if(!b.vakata.dnd.is_drag)if(Math.abs(h.pageX-b.vakata.dnd.init_x)>5||Math.abs(h.pageY-b.vakata.dnd.init_y)>5){b.vakata.dnd.helper.appendTo("body");b.vakata.dnd.is_drag=true;b(document).triggerHandler("drag_start.vakata",{event:h,data:b.vakata.dnd.user_data})}else return;
85
+ if(h.type==="mousemove"){var j=b(document),l=j.scrollTop();j=j.scrollLeft();if(h.pageY-l<20){if(i&&c==="down"){clearInterval(i);i=false}if(!i){c="up";i=setInterval(function(){b(document).scrollTop(b(document).scrollTop()-b.vakata.dnd.scroll_spd)},150)}}else if(i&&c==="up"){clearInterval(i);i=false}if(b(window).height()-(h.pageY-l)<20){if(i&&c==="up"){clearInterval(i);i=false}if(!i){c="down";i=setInterval(function(){b(document).scrollTop(b(document).scrollTop()+b.vakata.dnd.scroll_spd)},150)}}else if(i&&
86
+ c==="down"){clearInterval(i);i=false}if(h.pageX-j<20){if(f&&g==="right"){clearInterval(f);f=false}if(!f){g="left";f=setInterval(function(){b(document).scrollLeft(b(document).scrollLeft()-b.vakata.dnd.scroll_spd)},150)}}else if(f&&g==="left"){clearInterval(f);f=false}if(b(window).width()-(h.pageX-j)<20){if(f&&g==="left"){clearInterval(f);f=false}if(!f){g="right";f=setInterval(function(){b(document).scrollLeft(b(document).scrollLeft()+b.vakata.dnd.scroll_spd)},150)}}else if(f&&g==="right"){clearInterval(f);
87
+ f=false}}b.vakata.dnd.helper.css({left:h.pageX+5+"px",top:h.pageY+10+"px"});b(document).triggerHandler("drag.vakata",{event:h,data:b.vakata.dnd.user_data})}},drag_stop:function(h){b(document).unbind("mousemove",b.vakata.dnd.drag);b(document).unbind("mouseup",b.vakata.dnd.drag_stop);b(document).triggerHandler("drag_stop.vakata",{event:h,data:b.vakata.dnd.user_data});b.vakata.dnd.helper.remove();b.vakata.dnd.init_x=0;b.vakata.dnd.init_y=0;b.vakata.dnd.user_data={};b.vakata.dnd.is_down=false;b.vakata.dnd.is_drag=
88
+ false}};b(function(){b.vakata.css.add_sheet({str:"#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } "})});b.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:false,after:false,inside:false,before:false,off:false,prepared:false,w:0,to1:false,to2:false,cof:false,cw:false,ch:false,i1:false,i2:false};this.get_container().bind("mouseenter.jstree",b.proxy(function(){if(b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree&&
89
+ this.data.themes){e.attr("class","jstree-"+this.data.themes.theme);b.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}},this)).bind("mouseleave.jstree",b.proxy(function(){if(b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree){this.data.dnd.i1&&clearInterval(this.data.dnd.i1);this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("mousemove.jstree",b.proxy(function(j){if(b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree){var l=this.get_container()[0];if(j.pageX+
90
+ 24>this.data.dnd.cof.left+this.data.dnd.cw){this.data.dnd.i1&&clearInterval(this.data.dnd.i1);this.data.dnd.i1=setInterval(b.proxy(function(){this.scrollLeft+=b.vakata.dnd.scroll_spd},l),100)}else if(j.pageX-24<this.data.dnd.cof.left){this.data.dnd.i1&&clearInterval(this.data.dnd.i1);this.data.dnd.i1=setInterval(b.proxy(function(){this.scrollLeft-=b.vakata.dnd.scroll_spd},l),100)}else this.data.dnd.i1&&clearInterval(this.data.dnd.i1);if(j.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch){this.data.dnd.i2&&
91
+ clearInterval(this.data.dnd.i2);this.data.dnd.i2=setInterval(b.proxy(function(){this.scrollTop+=b.vakata.dnd.scroll_spd},l),100)}else if(j.pageY-24<this.data.dnd.cof.top){this.data.dnd.i2&&clearInterval(this.data.dnd.i2);this.data.dnd.i2=setInterval(b.proxy(function(){this.scrollTop-=b.vakata.dnd.scroll_spd},l),100)}else this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).delegate("a","mousedown.jstree",b.proxy(function(j){if(j.which===1){this.start_drag(j.currentTarget,j);return false}},this)).delegate("a",
92
+ "mouseenter.jstree",b.proxy(function(j){b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree&&this.dnd_enter(j.currentTarget)},this)).delegate("a","mousemove.jstree",b.proxy(function(j){if(b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree){if(typeof this.data.dnd.off.top==="undefined")this.data.dnd.off=b(j.target).offset();this.data.dnd.w=(j.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height;if(this.data.dnd.w<0)this.data.dnd.w+=this.data.core.li_height;this.dnd_show()}},this)).delegate("a",
93
+ "mouseleave.jstree",b.proxy(function(j){if(b.vakata.dnd.is_drag&&b.vakata.dnd.user_data.jstree){this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;b.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");e.hide();if(d&&d[0]===j.target.parentNode){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);this.data.dnd.to1=false}if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);this.data.dnd.to2=false}}}},this)).delegate("a","mouseup.jstree",b.proxy(function(j){b.vakata.dnd.is_drag&&
94
+ b.vakata.dnd.user_data.jstree&&this.dnd_finish(j)},this));b(document).bind("drag_stop.vakata",b.proxy(function(){this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;this.data.dnd.off=false;this.data.dnd.prepared=false;this.data.dnd.w=false;this.data.dnd.to1=false;this.data.dnd.to2=false;this.data.dnd.active=false;this.data.dnd.foreign=false;e&&e.css({top:"-2000px"})},this)).bind("drag_start.vakata",b.proxy(function(j,l){if(l.data.jstree){var k=b(l.event.target);k.closest(".jstree").hasClass("jstree-"+
95
+ this.get_index())&&this.dnd_enter(k)}},this));var h=this._get_settings().dnd;h.drag_target&&b(document).delegate(h.drag_target,"mousedown.jstree",b.proxy(function(j){a=j.target;b.vakata.dnd.drag_start(j,{jstree:true,obj:j.target},"<ins class='jstree-icon'></ins>"+b(j.target).text());if(this.data.themes){e.attr("class","jstree-"+this.data.themes.theme);b.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}b.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
96
+ j=this.get_container();this.data.dnd.cof=j.offset();this.data.dnd.cw=parseInt(j.width(),10);this.data.dnd.ch=parseInt(j.height(),10);this.data.dnd.foreign=true;return false},this));h.drop_target&&b(document).delegate(h.drop_target,"mouseenter.jstree",b.proxy(function(j){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:a,r:b(j.target)})&&b.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(h.drop_target,"mouseleave.jstree",b.proxy(function(){this.data.dnd.active&&
97
+ b.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(h.drop_target,"mouseup.jstree",b.proxy(function(j){this.data.dnd.active&&b.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:a,r:b(j.target)})},this))},defaults:{copy_modifier:"ctrl",check_timeout:200,open_timeout:500,drop_target:".jstree-drop",drop_check:function(){return true},drop_finish:b.noop,drag_target:".jstree-draggable",drag_finish:b.noop,drag_check:function(){return{after:false,
98
+ before:false,inside:true}}},_fn:{dnd_prepare:function(){if(d&&d.length){this.data.dnd.off=d.offset();if(this._get_settings().core.rtl)this.data.dnd.off.right=this.data.dnd.off.left+d.width();if(this.data.dnd.foreign){var h=this._get_settings().dnd.drag_check.call(this,{o:a,r:d});this.data.dnd.after=h.after;this.data.dnd.before=h.before;this.data.dnd.inside=h.inside;this.data.dnd.prepared=true;return this.dnd_show()}this.prepare_move(a,d,"before");this.data.dnd.before=this.check_move();this.prepare_move(a,
99
+ d,"after");this.data.dnd.after=this.check_move();if(this._is_loaded(d)){this.prepare_move(a,d,"inside");this.data.dnd.inside=this.check_move()}else this.data.dnd.inside=false;this.data.dnd.prepared=true;return this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var h=["before","inside","after"],j=false,l=this._get_settings().core.rtl;h=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=this.data.core.li_height*2/3?this.data.dnd.w<this.data.core.li_height/
100
+ 2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"];b.each(h,b.proxy(function(k,m){if(this.data.dnd[m]){b.vakata.dnd.helper.children("ins").attr("class","jstree-ok");j=m;return false}},this));j===false&&b.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");h=l?this.data.dnd.off.right-18:this.data.dnd.off.left+10;switch(j){case "before":e.css({left:h+"px",top:this.data.dnd.off.top-6+"px"}).show();break;case "after":e.css({left:h+"px",top:this.data.dnd.off.top+
101
+ this.data.core.li_height-7+"px"}).show();break;case "inside":e.css({left:h+(l?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show();break;default:e.hide();break}return j}},dnd_open:function(){this.data.dnd.to2=false;this.open_node(d,b.proxy(this.dnd_prepare,this),true)},dnd_finish:function(h){if(this.data.dnd.foreign){if(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)this._get_settings().dnd.drag_finish.call(this,{o:a,r:d})}else{this.dnd_prepare();this.move_node(a,
102
+ d,this.dnd_show(),h[this._get_settings().dnd.copy_modifier+"Key"])}d=a=false;e.hide()},dnd_enter:function(h){var j=this._get_settings().dnd;this.data.dnd.prepared=false;d=this._get_node(h);if(j.check_timeout){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1);this.data.dnd.to1=setTimeout(b.proxy(this.dnd_prepare,this),j.check_timeout)}else this.dnd_prepare();if(j.open_timeout){this.data.dnd.to2&&clearTimeout(this.data.dnd.to2);if(d&&d.length&&d.hasClass("jstree-closed"))this.data.dnd.to2=setTimeout(b.proxy(this.dnd_open,
103
+ this),j.open_timeout)}else d&&d.length&&d.hasClass("jstree-closed")&&this.dnd_open()},start_drag:function(h,j){a=this._get_node(h);if(this.data.ui&&this.is_selected(a))a=this._get_node(null,true);b.vakata.dnd.drag_start(j,{jstree:true,obj:a},"<ins class='jstree-icon'></ins>"+(a.length>1?"Multiple selection":this.get_text(a)));if(this.data.themes){e.attr("class","jstree-"+this.data.themes.theme);b.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)}var l=this.get_container();
104
+ this.data.dnd.cof=l.children("ul").offset();this.data.dnd.cw=parseInt(l.width(),10);this.data.dnd.ch=parseInt(l.height(),10);this.data.dnd.active=true}}});b(function(){b.vakata.css.add_sheet({str:"#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; line-height:12px; font-size:1px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:silver; } "});
105
+ e=b("<div>").attr({id:"jstree-marker"}).hide().appendTo("body");b(document).bind("drag_start.vakata",function(h,j){j.data.jstree&&e.show()});b(document).bind("drag_stop.vakata",function(h,j){j.data.jstree&&e.hide()})})})(jQuery);
106
+ (function(b){b.jstree.plugin("checkbox",{__init:function(){this.select_node=this.deselect_node=this.deselect_all=b.noop;this.get_selected=this.get_checked;this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree",b.proxy(function(a,d){this._prepare_checkboxes(d.rslt.obj)},this)).bind("loaded.jstree",b.proxy(function(){this._prepare_checkboxes()},this)).delegate("a","click.jstree",b.proxy(function(a){this._get_node(a.target).hasClass("jstree-checked")?this.uncheck_node(a.target):
107
+ this.check_node(a.target);this.data.ui&&this.save_selected();this.data.cookies&&this.save_cookie("select_node");a.preventDefault()},this))},__destroy:function(){this.get_container().find(".jstree-checkbox").remove()},_fn:{_prepare_checkboxes:function(a){a=!a||a==-1?this.get_container():this._get_node(a);var d,e=this,f;a.each(function(){f=b(this);d=f.is("li")&&f.hasClass("jstree-checked")?"jstree-checked":"jstree-unchecked";f.find("a").not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(d)});
108
+ a.is("li")?this._repair_state(a):a.find("> ul > li").each(function(){e._repair_state(this)})},change_state:function(a,d){a=this._get_node(a);if(d=d===false||d===true?d:a.hasClass("jstree-checked"))a.find("li").andSelf().removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else{a.find("li").andSelf().removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(this.data.ui)this.data.ui.last_selected=a;this.data.checkbox.last_selected=a}a.parentsUntil(".jstree",
109
+ "li").each(function(){var e=b(this);if(d)if(e.children("ul").children(".jstree-checked, .jstree-undetermined").length){e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");return false}else e.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else if(e.children("ul").children(".jstree-unchecked, .jstree-undetermined").length){e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
110
+ return false}else e.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked")});if(this.data.ui)this.data.ui.selected=this.get_checked();this.__callback(a)},check_node:function(a){this.change_state(a,false)},uncheck_node:function(a){this.change_state(a,true)},check_all:function(){var a=this;this.get_container().children("ul").children("li").each(function(){a.check_node(this,false)})},uncheck_all:function(){var a=this;this.get_container().children("ul").children("li").each(function(){a.change_state(this,
111
+ true)})},is_checked:function(a){a=this._get_node(a);return a.length?a.is(".jstree-checked"):false},get_checked:function(a){a=!a||a===-1?this.get_container():this._get_node(a);return a.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(a){a=!a||a===-1?this.get_container():this._get_node(a);return a.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},
112
+ hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(a){a=this._get_node(a);if(a.length){var d=a.find("> ul > .jstree-checked").length,e=a.find("> ul > .jstree-undetermined").length,f=a.find("> ul > li").length;if(f===0)a.hasClass("jstree-undetermined")&&this.check_node(a);else if(d===0&&e===0)this.uncheck_node(a);else d===f?this.check_node(a):a.parentsUntil(".jstree","li").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined")}},
113
+ reselect:function(){if(this.data.ui){var a=this,d=this.data.ui.to_select;d=b.map(b.makeArray(d),function(e){return"#"+e.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/")});this.deselect_all();b.each(d,function(e,f){a.check_node(f)});this.__callback()}}}})})(jQuery);
114
+ (function(b){b.vakata.xslt=function(d,e,f){var i="",c;if(document.recalc){c=document.createElement("xml");i=document.createElement("xml");c.innerHTML=d;i.innerHTML=e;b("body").append(c).append(i);setTimeout(function(g,h,j){return function(){j.call(null,g.transformNode(h.XMLDocument));setTimeout(function(l,k){return function(){jQuery("body").remove(l).remove(k)}}(g,h),200)}}(c,i,f),100);return true}if(typeof window.DOMParser!=="undefined"&&typeof window.XMLHttpRequest!=="undefined"&&typeof window.XSLTProcessor!==
115
+ "undefined"){c=new XSLTProcessor;i=b.isFunction(c.transformDocument)?typeof window.XMLSerializer!=="undefined":true;if(!i)return false;d=(new DOMParser).parseFromString(d,"text/xml");e=(new DOMParser).parseFromString(e,"text/xml");if(b.isFunction(c.transformDocument)){i=document.implementation.createDocument("","",null);c.transformDocument(d,e,i,null);f.call(null,XMLSerializer().serializeToString(i))}else{c.importStylesheet(e);i=c.transformToFragment(d,document);f.call(null,b("<div>").append(i).html())}return true}return false};
116
+ var a={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/">\t<xsl:call-template name="nodes">\t\t<xsl:with-param name="node" select="/root" />\t</xsl:call-template></xsl:template><xsl:template name="nodes">\t<xsl:param name="node" />\t<ul>\t<xsl:for-each select="$node/item">\t\t<xsl:variable name="children" select="count(./item) &gt; 0" />\t\t<li>\t\t\t<xsl:attribute name="class">\t\t\t\t<xsl:if test="position() = last()">jstree-last </xsl:if>\t\t\t\t<xsl:choose>\t\t\t\t\t<xsl:when test="@state = \'open\'">jstree-open </xsl:when>\t\t\t\t\t<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>\t\t\t\t\t<xsl:otherwise>jstree-leaf </xsl:otherwise>\t\t\t\t</xsl:choose>\t\t\t\t<xsl:value-of select="@class" />\t\t\t</xsl:attribute>\t\t\t<xsl:for-each select="@*">\t\t\t\t<xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">\t\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t\t</xsl:if>\t\t\t</xsl:for-each>\t<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>\t\t\t<xsl:for-each select="content/name">\t\t\t\t<a>\t\t\t\t<xsl:attribute name="href">\t\t\t\t\t<xsl:choose>\t\t\t\t\t<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>\t\t\t\t\t<xsl:otherwise>#</xsl:otherwise>\t\t\t\t\t</xsl:choose>\t\t\t\t</xsl:attribute>\t\t\t\t<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>\t\t\t\t<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>\t\t\t\t<xsl:for-each select="@*">\t\t\t\t\t<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">\t\t\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t\t\t</xsl:if>\t\t\t\t</xsl:for-each>\t\t\t\t\t<ins>\t\t\t\t\t\t<xsl:attribute name="class">jstree-icon \t\t\t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>\t\t\t\t\t\t</xsl:attribute>\t\t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>\t\t\t\t\t\t<xsl:text>&#xa0;</xsl:text>\t\t\t\t\t</ins>\t\t\t\t\t<xsl:value-of select="current()" />\t\t\t\t</a>\t\t\t</xsl:for-each>\t\t\t<xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>\t\t</li>\t</xsl:for-each>\t</ul></xsl:template></xsl:stylesheet>',
117
+ flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/">\t<ul>\t<xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">\t\t<xsl:call-template name="nodes">\t\t\t<xsl:with-param name="node" select="." />\t\t\t<xsl:with-param name="is_last" select="number(position() = last())" />\t\t</xsl:call-template>\t</xsl:for-each>\t</ul></xsl:template><xsl:template name="nodes">\t<xsl:param name="node" />\t<xsl:param name="is_last" />\t<xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" />\t<li>\t<xsl:attribute name="class">\t\t<xsl:if test="$is_last = true()">jstree-last </xsl:if>\t\t<xsl:choose>\t\t\t<xsl:when test="@state = \'open\'">jstree-open </xsl:when>\t\t\t<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>\t\t\t<xsl:otherwise>jstree-leaf </xsl:otherwise>\t\t</xsl:choose>\t\t<xsl:value-of select="@class" />\t</xsl:attribute>\t<xsl:for-each select="@*">\t\t<xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t</xsl:if>\t</xsl:for-each>\t<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>\t<xsl:for-each select="content/name">\t\t<a>\t\t<xsl:attribute name="href">\t\t\t<xsl:choose>\t\t\t<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>\t\t\t<xsl:otherwise>#</xsl:otherwise>\t\t\t</xsl:choose>\t\t</xsl:attribute>\t\t<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>\t\t<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>\t\t<xsl:for-each select="@*">\t\t\t<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">\t\t\t\t<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>\t\t\t</xsl:if>\t\t</xsl:for-each>\t\t\t<ins>\t\t\t\t<xsl:attribute name="class">jstree-icon \t\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>\t\t\t\t</xsl:attribute>\t\t\t\t<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>\t\t\t\t<xsl:text>&#xa0;</xsl:text>\t\t\t</ins>\t\t\t<xsl:value-of select="current()" />\t\t</a>\t</xsl:for-each>\t<xsl:if test="$children">\t\t<ul>\t\t<xsl:for-each select="//item[@parent_id=$node/attribute::id]">\t\t\t<xsl:call-template name="nodes">\t\t\t\t<xsl:with-param name="node" select="." />\t\t\t\t<xsl:with-param name="is_last" select="number(position() = last())" />\t\t\t</xsl:call-template>\t\t</xsl:for-each>\t\t</ul>\t</xsl:if>\t</li></xsl:template></xsl:stylesheet>'};
118
+ b.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true},_fn:{load_node:function(d,e,f){var i=this;this.load_node_xml(d,function(){i.__callback({obj:d});e.call(this)},f)},_is_loaded:function(d){var e=this._get_settings().xml_data;d=this._get_node(d);return d==-1||!d||!e.ajax||d.is(".jstree-open, .jstree-leaf")||d.children("ul").children("li").size()>0},load_node_xml:function(d,e,f){var i=this.get_settings().xml_data,c=function(){},g=function(){};
119
+ if((d=this._get_node(d))&&d!==-1)if(d.data("jstree-is-loading"))return;else d.data("jstree-is-loading",true);switch(true){case !i.data&&!i.ajax:throw"Neither data nor ajax settings supplied.";case !!i.data&&!i.ajax||!!i.data&&!!i.ajax&&(!d||d===-1):if(!d||d==-1)this.parse_xml(i.data,b.proxy(function(h){if(h){h=h.replace(/ ?xmlns="[^"]*"/ig,"");if(h.length>10){h=b(h);this.get_container().children("ul").empty().append(h.children());i.clean_node&&this.clean_node(d);e&&e.call(this)}}else if(i.correct_state){this.get_container().children("ul").empty();
120
+ e&&e.call(this)}},this));break;case !i.data&&!!i.ajax||!!i.data&&!!i.ajax&&d&&d!==-1:c=function(h,j,l){var k=this.get_settings().xml_data.ajax.error;k&&k.call(this,h,j,l);if(d!==-1&&d.length){d.children(".jstree-loading").removeClass("jstree-loading");d.data("jstree-is-loading",false);j==="success"&&i.correct_state&&d.removeClass("jstree-open jstree-closed").addClass("jstree-leaf")}else j==="success"&&i.correct_state&&this.get_container().children("ul").empty();f&&f.call(this)};g=function(h,j,l){h=
121
+ l.responseText;var k=this.get_settings().xml_data.ajax.success;if(k)h=k.call(this,h,j,l)||h;if(h=="")return c.call(this,l,j,"");this.parse_xml(h,b.proxy(function(m){if(m){m=m.replace(/ ?xmlns="[^"]*"/ig,"");if(m.length>10){m=b(m);if(d===-1||!d)this.get_container().children("ul").empty().append(m.children());else{d.children(".jstree-loading").removeClass("jstree-loading");d.append(m);d.data("jstree-is-loading",false)}i.clean_node&&this.clean_node(d);e&&e.call(this)}else if(d&&d!==-1){d.children(".jstree-loading").removeClass("jstree-loading");
122
+ d.data("jstree-is-loading",false);if(i.correct_state){d.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");e&&e.call(this)}}else if(i.correct_state){this.get_container().children("ul").empty();e&&e.call(this)}}},this))};i.ajax.context=this;i.ajax.error=c;i.ajax.success=g;if(!i.ajax.dataType)i.ajax.dataType="xml";if(b.isFunction(i.ajax.url))i.ajax.url=i.ajax.url.call(this,d);if(b.isFunction(i.ajax.data))i.ajax.data=i.ajax.data.call(this,d);b.ajax(i.ajax);break}},parse_xml:function(d,
123
+ e){var f=this._get_settings().xml_data;b.vakata.xslt(d,a[f.xsl],e)},get_xml:function(d,e,f,i,c){var g="",h=this._get_settings(),j=this,l,k,m,n,p;d||(d="flat");c||(c=0);e=this._get_node(e);if(!e||e===-1)e=this.get_container().find("> ul > li");f=b.isArray(f)?f:["id","class"];!c&&this.data.types&&b.inArray(h.types.type_attr,f)===-1&&f.push(h.types.type_attr);i=b.isArray(i)?i:[];c||(g+="<root>");e.each(function(){g+="<item";m=b(this);b.each(f,function(o,q){g+=" "+q+'="'+(m.attr(q)||"").replace(/jstree[^ ]*|$/ig,
124
+ "").replace(/^\s+$/ig,"")+'"'});if(m.hasClass("jstree-open"))g+=' state="open"';if(m.hasClass("jstree-closed"))g+=' state="closed"';if(d==="flat")g+=' parent_id="'+c+'"';g+=">";g+="<content>";n=m.children("a");n.each(function(){l=b(this);p=false;g+="<name";b.inArray("languages",h.plugins)!==-1&&b.each(h.languages,function(o,q){if(l.hasClass(q)){g+=' lang="'+q+'"';p=q;return false}});i.length&&b.each(i,function(o,q){g+=" "+q+'="'+(l.attr(q)||"").replace(/jstree[^ ]*|$/ig,"")+'"'});if(l.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,
125
+ "").replace(/^\s+$/ig,"").length)g+=' icon="'+l.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,"").replace(/^\s+$/ig,"")+'"';if(l.children("ins").get(0).style.backgroundImage.length)g+=' icon="'+l.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","")+'"';g+=">";g+="<![CDATA["+j.get_text(l,p)+"]]\>";g+="</name>"});g+="</content>";k=m[0].id;m=m.find("> ul > li");k=m.length?j.get_xml(d,m,f,i,k):"";if(d=="nest")g+=k;g+="</item>";if(d=="flat")g+=k});c||(g+="</root>");
126
+ return g}}})})(jQuery);
127
+ (function(b){b.expr[":"].jstree_contains=function(a,d,e){return(a.textContent||a.innerText||"").toLowerCase().indexOf(e[3].toLowerCase())>=0};b.jstree.plugin("search",{__init:function(){this.data.search.str="";this.data.search.result=b()},defaults:{ajax:false,case_insensitive:false},_fn:{search:function(a,d){if(a!==""){var e=this.get_settings().search,f=this,i=function(){},c=function(){};this.data.search.str=a;if(!d&&e.ajax!==false&&this.get_container().find(".jstree-closed:eq(0)").length>0){this.search.supress_callback=
128
+ true;i=function(){};c=function(g,h,j){var l=this.get_settings().search.ajax.success;if(l)g=l.call(this,g,h,j)||g;this.data.search.to_open=g;this._search_open()};e.ajax.context=this;e.ajax.error=i;e.ajax.success=c;if(b.isFunction(e.ajax.url))e.ajax.url=e.ajax.url.call(this,a);if(b.isFunction(e.ajax.data))e.ajax.data=e.ajax.data.call(this,a);if(!e.ajax.data)e.ajax.data={search_string:a};if(!e.ajax.dataType||/^json/.exec(e.ajax.dataType))e.ajax.dataType="json";b.ajax(e.ajax)}else{this.data.search.result.length&&
129
+ this.clear_search();this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+(e.case_insensitive?"jstree_contains":"contains")+"("+this.data.search.str+")");this.data.search.result.addClass("jstree-search").parents(".jstree-closed").each(function(){f.open_node(this,false,true)});this.__callback({nodes:this.data.search.result,str:a})}}},clear_search:function(){this.data.search.result.removeClass("jstree-search");this.__callback(this.data.search.result);
130
+ this.data.search.result=b()},_search_open:function(){var a=this,d=true,e=[],f=[];if(this.data.search.to_open.length){b.each(this.data.search.to_open,function(i,c){if(c=="#")return true;b(c).length&&b(c).is(".jstree-closed")?e.push(c):f.push(c)});if(e.length){this.data.search.to_open=f;b.each(e,function(i,c){a.open_node(c,function(){a._search_open(true)})});d=false}}d&&this.search(this.data.search.str,true)}}})})(jQuery);
131
+ (function(b){b.vakata.context={cnt:b("<div id='vakata-contextmenu'>"),vis:false,tgt:false,par:false,func:false,data:false,show:function(a,d,e,f,i,c){if(a=b.vakata.context.parse(a)){b.vakata.context.vis=true;b.vakata.context.tgt=d;b.vakata.context.par=c||d||null;b.vakata.context.data=i||null;b.vakata.context.cnt.html(a).css({visibility:"hidden",display:"block",left:0,top:0});i=b.vakata.context.cnt.height();c=b.vakata.context.cnt.width();if(e+c>b(document).width()){e=b(document).width()-(c+5);b.vakata.context.cnt.find("li > ul").addClass("right")}if(f+
132
+ i>b(document).height()){f-=i+d[0].offsetHeight;b.vakata.context.cnt.find("li > ul").addClass("bottom")}b.vakata.context.cnt.css({left:e,top:f}).find("li:has(ul)").bind("mouseenter",function(){var g=b(document).width(),h=b(document).height(),j=b(this).children("ul").show();g!==b(document).width()&&j.toggleClass("right");h!==b(document).height()&&j.toggleClass("bottom")}).bind("mouseleave",function(){b(this).children("ul").hide()}).end().css({visibility:"visible"}).show();b(document).triggerHandler("context_show.vakata")}},
133
+ hide:function(){b.vakata.context.vis=false;b.vakata.context.cnt.attr("class","").hide();b(document).triggerHandler("context_hide.vakata")},parse:function(a,d){if(!a)return false;var e="",f=false,i=true;if(!d)b.vakata.context.func={};e+="<ul>";b.each(a,function(c,g){if(!g)return true;b.vakata.context.func[c]=g.action;if(!i&&g.separator_before)e+="<li class='vakata-separator vakata-separator-before'></li>";i=false;e+="<li class='"+(g._class||"")+(g._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ";
134
+ if(g.icon&&g.icon.indexOf("/")===-1)e+=" class='"+g.icon+"' ";if(g.icon&&g.icon.indexOf("/")!==-1)e+=" style='background:url("+g.icon+") center center no-repeat;' ";e+=">&#160;</ins><a href='#' rel='"+c+"'>";if(g.submenu)e+="<span style='float:right;'>&raquo;</span>";e+=g.label+"</a>";if(g.submenu)if(f=b.vakata.context.parse(g.submenu,true))e+=f;e+="</li>";if(g.separator_after){e+="<li class='vakata-separator vakata-separator-after'></li>";i=true}});e=e.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,
135
+ "");e+="</ul>";return e.length>10?e:false},exec:function(a){if(b.isFunction(b.vakata.context.func[a])){b.vakata.context.func[a].call(b.vakata.context.data,b.vakata.context.par);return true}else return false}};b(function(){b.vakata.css.add_sheet({str:"#vakata-contextmenu { display:none; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } "});
136
+ b.vakata.context.cnt.delegate("a","click",function(a){a.preventDefault()}).delegate("a","mouseup",function(){!b(this).parent().hasClass("jstree-contextmenu-disabled")&&b.vakata.context.exec(b(this).attr("rel"))?b.vakata.context.hide():b(this).blur()}).delegate("a","mouseover",function(){b.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body");b(document).bind("mousedown",function(a){b.vakata.context.vis&&!b.contains(b.vakata.context.cnt[0],a.target)&&b.vakata.context.hide()});
137
+ typeof b.hotkeys!=="undefined"&&b(document).bind("keydown","up",function(a){if(b.vakata.context.vis){var d=b.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();d.length||(d=b.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last());d.addClass("vakata-hover");a.stopImmediatePropagation();a.preventDefault()}}).bind("keydown","down",function(a){if(b.vakata.context.vis){var d=
138
+ b.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();d.length||(d=b.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first());d.addClass("vakata-hover");a.stopImmediatePropagation();a.preventDefault()}}).bind("keydown","right",function(a){if(b.vakata.context.vis){b.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
139
+ a.stopImmediatePropagation();a.preventDefault()}}).bind("keydown","left",function(a){if(b.vakata.context.vis){b.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");a.stopImmediatePropagation();a.preventDefault()}}).bind("keydown","esc",function(a){b.vakata.context.hide();a.preventDefault()}).bind("keydown","space",function(a){b.vakata.context.cnt.find(".vakata-hover").last().children("a").click();a.preventDefault()})});b.jstree.plugin("contextmenu",
140
+ {__init:function(){this.get_container().delegate("a","contextmenu.jstree",b.proxy(function(a){a.preventDefault();this.show_contextmenu(a.currentTarget,a.pageX,a.pageY)},this)).bind("destroy.jstree",b.proxy(function(){this.data.contextmenu&&b.vakata.context.hide()},this));b(document).bind("context_hide.vakata",b.proxy(function(){this.data.contextmenu=false},this))},defaults:{select_node:false,show_at_node:true,items:{create:{separator_before:false,separator_after:true,label:"Create",action:function(a){this.create(a)}},
141
+ rename:{separator_before:false,separator_after:false,label:"Rename",action:function(a){this.rename(a)}},remove:{separator_before:false,icon:false,separator_after:false,label:"Delete",action:function(a){this.remove(a)}},ccp:{separator_before:true,icon:false,separator_after:false,label:"Edit",action:false,submenu:{cut:{separator_before:false,separator_after:false,label:"Cut",action:function(a){this.cut(a)}},copy:{separator_before:false,icon:false,separator_after:false,label:"Copy",action:function(a){this.copy(a)}},
142
+ paste:{separator_before:false,icon:false,separator_after:false,label:"Paste",action:function(a){this.paste(a)}}}}}},_fn:{show_contextmenu:function(a,d,e){a=this._get_node(a);var f=this.get_settings().contextmenu,i=a.children("a:visible:eq(0)"),c=false;if(f.select_node&&this.data.ui&&!this.is_selected(a)){this.deselect_all();this.select_node(a,true)}if(f.show_at_node||typeof d==="undefined"||typeof e==="undefined"){c=i.offset();d=c.left;e=c.top+this.data.core.li_height}if(b.isFunction(f.items))f.items=
143
+ f.items.call(this,a);this.data.contextmenu=true;b.vakata.context.show(f.items,i,d,e,this,a);this.data.themes&&b.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})})(jQuery);
144
+ (function(b){b.jstree.plugin("types",{__init:function(){var a=this._get_settings().types;this.data.types.attach_to=[];this.get_container().bind("init.jstree",b.proxy(function(){var d=a.type_attr,e="",f=this;b.each(a.types,function(i,c){b.each(c,function(g){/^(max_depth|max_children|icon|valid_children)$/.test(g)||f.data.types.attach_to.push(g)});if(!c.icon)return true;if(c.icon.image||c.icon.position){e+=i=="default"?".jstree-"+f.get_index()+" a > .jstree-icon { ":".jstree-"+f.get_index()+" li["+
145
+ d+"="+i+"] > a > .jstree-icon { ";if(c.icon.image)e+=" background-image:url("+c.icon.image+"); ";e+=c.icon.position?" background-position:"+c.icon.position+"; ":" background-position:0 0; ";e+="} "}});e!=""&&b.vakata.css.add_sheet({str:e})},this)).bind("before.jstree",b.proxy(function(d,e){if(b.inArray(e.func,this.data.types.attach_to)!==-1){var f=this._get_settings().types.types,i=this._get_type(e.args[0]);if((f[i]&&typeof f[i][e.func]!=="undefined"||f["default"]&&typeof f["default"][e.func]!=="undefined")&&
146
+ !this._check(e.func,e.args[0])){d.stopImmediatePropagation();return false}}},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_get_type:function(a){a=this._get_node(a);return!a||!a.length?false:a.attr(this._get_settings().types.type_attr)||"default"},set_type:function(a,d){d=this._get_node(d);return!d.length||!a?false:d.attr(this._get_settings().types.type_attr,a)},_check:function(a,d,e){var f=
147
+ false,i=this._get_type(d),c=0,g=this,h=this._get_settings().types;if(d===-1)if(h[a])f=h[a];else return;else{if(i===false)return;if(h.types[i]&&h.types[i][a])f=h.types[i][a];else if(h.types["default"]&&h.types["default"][a])f=h.types["default"][a]}if(b.isFunction(f))f=f.call(this,d);a==="max_depth"&&d!==-1&&e!==false&&h.max_depth!==-2&&f!==0&&this._get_node(d).children("a:eq(0)").parentsUntil(".jstree","li").each(function(j){if(h.max_depth!==-1&&h.max_depth-(j+1)<=0){f=0;return false}c=j===0?f:g._check(a,
148
+ this,false);if(c!==-1&&c-(j+1)<=0){f=0;return false}if(c>=0&&(c-(j+1)<f||f<0))f=c-(j+1);if(h.max_depth>=0&&(h.max_depth-(j+1)<f||f<0))f=h.max_depth-(j+1)});return f},check_move:function(){if(!this.__call_old())return false;var a=this._get_move(),d=a.rt._get_settings().types,e=a.rt._check("max_children",a.cr),f=a.rt._check("max_depth",a.cr),i=a.rt._check("valid_children",a.cr),c=0,g=1;if(i==="none")return false;if(b.isArray(i)&&a.ot&&a.ot._get_type){a.o.each(function(){if(b.inArray(a.ot._get_type(this),
149
+ i)===-1)return g=false});if(g===false)return false}if(d.max_children!==-2&&e!==-1){c=a.cr===-1?this.get_container().children("> ul > li").not(a.o).length:a.cr.children("> ul > li").not(a.o).length;if(c+a.o.length>e)return false}if(d.max_depth!==-2&&f!==-1){g=0;if(f===0)return false;if(typeof a.o.d==="undefined"){for(d=a.o;d.length>0;){d=d.find("> ul > li");g++}a.o.d=g}if(f-a.o.d<0)return false}return true},create_node:function(a,d,e,f,i,c){if(!c&&(i||this._is_loaded(a))){var g=d&&d.match(/^before|after$/i)&&
150
+ a!==-1?this._get_parent(a):this._get_node(a),h=this._get_settings().types,j=this._check("max_children",g),l=this._check("max_depth",g),k=this._check("valid_children",g);e||(e={});if(k==="none")return false;if(b.isArray(k))if(!e.attr||!e.attr[h.type_attr]){if(!e.attr)e.attr={};e.attr[h.type_attr]=k[0]}else if(b.inArray(e.attr[h.type_attr],k)===-1)return false;if(h.max_children!==-2&&j!==-1){g=g===-1?this.get_container().children("> ul > li").length:g.children("> ul > li").length;if(g+1>j)return false}if(h.max_depth!==
151
+ -2&&l!==-1&&l-1<0)return false}return this.__call_old(true,a,d,e,f,i,c)}}})})(jQuery);
152
+ (function(b){b.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return this.nodeType==3}).remove()},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(a,d,e){var f=this;this.load_node_html(a,function(){f.__callback({obj:a});d.call(this)},e)},_is_loaded:function(a){a=this._get_node(a);return a==
153
+ -1||!a||!this._get_settings().html_data.ajax||a.is(".jstree-open, .jstree-leaf")||a.children("ul").children("li").size()>0},load_node_html:function(a,d,e){var f,i=this.get_settings().html_data,c=function(){};f=function(){};if((a=this._get_node(a))&&a!==-1)if(a.data("jstree-is-loading"))return;else a.data("jstree-is-loading",true);switch(true){case !i.data&&!i.ajax:if(!a||a==-1){this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return this.firstChild.tagName!==
154
+ "INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node()}d&&d.call(this);break;case !!i.data&&!i.ajax||!!i.data&&!!i.ajax&&(!a||a===-1):if(!a||a==-1){f=b(i.data);f.is("ul")||(f=b("<ul>").append(f));this.get_container().children("ul").empty().append(f.children()).find("li, a").filter(function(){return this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
155
+ this.clean_node()}d&&d.call(this);break;case !i.data&&!!i.ajax||!!i.data&&!!i.ajax&&a&&a!==-1:a=this._get_node(a);c=function(g,h,j){var l=this.get_settings().html_data.ajax.error;l&&l.call(this,g,h,j);if(a!=-1&&a.length){a.children(".jstree-loading").removeClass("jstree-loading");a.data("jstree-is-loading",false);h==="success"&&i.correct_state&&a.removeClass("jstree-open jstree-closed").addClass("jstree-leaf")}else h==="success"&&i.correct_state&&this.get_container().children("ul").empty();e&&e.call(this)};
156
+ f=function(g,h,j){var l=this.get_settings().html_data.ajax.success;if(l)g=l.call(this,g,h,j)||g;if(g=="")return c.call(this,j,h,"");if(g){g=b(g);g.is("ul")||(g=b("<ul>").append(g));if(a==-1||!a)this.get_container().children("ul").empty().append(g.children()).find("li, a").filter(function(){return this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");else{a.children(".jstree-loading").removeClass("jstree-loading");
157
+ a.append(g).find("li, a").filter(function(){return this.firstChild.tagName!=="INS"}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");a.data("jstree-is-loading",false)}this.clean_node(a);d&&d.call(this)}else if(a&&a!==-1){a.children(".jstree-loading").removeClass("jstree-loading");a.data("jstree-is-loading",false);if(i.correct_state){a.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");d&&d.call(this)}}else if(i.correct_state){this.get_container().children("ul").empty();
158
+ d&&d.call(this)}};i.ajax.context=this;i.ajax.error=c;i.ajax.success=f;if(!i.ajax.dataType)i.ajax.dataType="html";if(b.isFunction(i.ajax.url))i.ajax.url=i.ajax.url.call(this,a);if(b.isFunction(i.ajax.data))i.ajax.data=i.ajax.data.call(this,a);b.ajax(i.ajax);break}}}});b.jstree.defaults.plugins.push("html_data")})(jQuery);
159
+ (function(b){b.jstree.plugin("themeroller",{__init:function(){var a=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").delegate("a","mouseenter.jstree",function(){b(this).addClass(a.item_h)}).delegate("a","mouseleave.jstree",function(){b(this).removeClass(a.item_h)}).bind("open_node.jstree create_node.jstree",b.proxy(function(d,e){this._themeroller(e.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",b.proxy(function(){this._themeroller()},this)).bind("close_node.jstree",
160
+ b.proxy(function(d,e){e.rslt.obj.children("ins").removeClass(a.opened).addClass(a.closed)},this)).bind("select_node.jstree",b.proxy(function(d,e){e.rslt.obj.children("a").addClass(a.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",b.proxy(function(){this.get_container().find("."+a.item_a).removeClass(a.item_a).end().find(".jstree-clicked").addClass(a.item_a)},this)).bind("move_node.jstree",b.proxy(function(d,e){this._themeroller(e.rslt.o)},this))},__destroy:function(){var a=this._get_settings().themeroller,
161
+ d=["ui-icon"];b.each(a,function(e,f){f=f.split(" ");if(f.length)d=d.concat(f)});this.get_container().removeClass("ui-widget-content").find("."+d.join(", .")).removeClass(d.join(" "))},_fn:{_themeroller:function(a){var d=this._get_settings().themeroller;a=!a||a==-1?this.get_container():this._get_node(a).parent();a.find("li.jstree-closed > ins.jstree-icon").removeClass(d.opened).addClass("ui-icon "+d.closed).end().find("li.jstree-open > ins.jstree-icon").removeClass(d.closed).addClass("ui-icon "+d.opened).end().find("a").addClass(d.item).children("ins.jstree-icon").addClass("ui-icon "+
162
+ d.item_icon)}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_icon:"ui-icon-folder-collapsed"}});b(function(){b.vakata.css.add_sheet({str:".jstree .ui-icon { overflow:visible; } .jstree a { padding:0 2px; }"})})})(jQuery);
163
+ (function(b){b.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",b.proxy(function(a,d){var e=[],f=true,i;if(d.func=="move_node")if(d.args[4]===true)if(d.args[0].o&&d.args[0].o.length){d.args[0].o.children("a").each(function(){e.push(b(this).text().replace(/^\s+/g,""))});f=this._check_unique(e,d.args[0].np.find("> ul > li").not(d.args[0].o))}if(d.func=="create_node")if(d.args[4]||this._is_loaded(d.args[0])){f=this._get_node(d.args[0]);if(d.args[1]&&(d.args[1]==="before"||
164
+ d.args[1]==="after")){f=this._get_parent(d.args[0]);if(!f||f===-1)f=this.get_container()}if(typeof d.args[2]==="string")e.push(d.args[2]);else!d.args[2]||!d.args[2].data?e.push(this._get_settings().core.strings.new_node):e.push(d.args[2].data);f=this._check_unique(e,f.find("> ul > li"))}if(d.func=="rename_node"){e.push(d.args[1]);i=this._get_node(d.args[0]);f=this._get_parent(i);if(!f||f===-1)f=this.get_container();f=this._check_unique(e,f.find("> ul > li").not(i))}if(!f){a.stopPropagation();return false}},
165
+ this))},_fn:{_check_unique:function(a,d){var e=[];d.children("a").each(function(){e.push(b(this).text().replace(/^\s+/g,""))});if(!e.length||!a.length)return true;e=e.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");if(e.length+a.length!=e.concat(a).sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",").length)return false;return true},check_move:function(){if(!this.__call_old())return false;
166
+ var a=this._get_move(),d=[];if(a.o&&a.o.length){a.o.children("a").each(function(){d.push(b(this).text().replace(/^\s+/g,""))});return this._check_unique(d,a.np.find("> ul > li").not(a.o))}return true}}})})(jQuery);
167
+ (function(b){b.jstree.plugin("radio",{__init:function(){this.select_node=this.deselect_node=this.deselect_all=b.noop;this.get_selected=this.get_checked;this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree",b.proxy(function(a,d){this._prepare_radios(d.rslt.obj)},this)).bind("loaded.jstree",b.proxy(function(){this._prepare_radios()},this)).delegate("a","click.jstree",b.proxy(function(a){this._get_node(a.target).hasClass("jstree-checked")?this.uncheck_node(a.target):this.check_node(a.target);
168
+ this.data.ui&&this.save_selected();this.data.cookies&&this.save_cookie("select_node");a.preventDefault()},this))},__destroy:function(){this.get_container().find(".jstree-radio").remove()},_fn:{_prepare_radios:function(a){a=!a||a==-1?this.get_container():this._get_node(a);var d,e=this,f;a.each(function(){f=b(this);d=f.is("li")&&f.hasClass("jstree-checked")?"jstree-checked":"jstree-unchecked";f.find("a").not(":has(.jstree-radio)").prepend("<ins class='jstree-radio'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(d)});
169
+ a.is("li")?this._repair_state(a):a.find("> ul > li").each(function(){e._repair_state(this)})},change_state:function(a,d){a=this._get_node(a);if(a.is(".jstree-leaf")){if(d=d===false||d===true?d:a.hasClass("jstree-checked"))a.find("li").andSelf().removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else{a.parent().children(".jstree-checked").removeClass("jstree-checked").addClass("jstree-unchecked");a.find("li").andSelf().removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
170
+ if(this.data.ui)this.data.ui.last_selected=a;this.data.radio.last_selected=a}a.parentsUntil(".jstree","li").each(function(){var e=b(this);if(d)if(e.children("ul").children(".jstree-checked, .jstree-undetermined").length){e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");return false}else e.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");else{e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
171
+ return false}});if(this.data.ui)this.data.ui.selected=this.get_checked();this.__callback(a)}},check_node:function(a){this.change_state(a,false)},uncheck_node:function(a){this.change_state(a,true)},uncheck_all:function(){var a=this;this.get_container().children("ul").children("li").each(function(){a.change_state(this,true)})},is_checked:function(a){a=this._get_node(a);return a.length?a.is(".jstree-checked"):false},get_checked:function(a){a=!a||a===-1?this.get_container():this._get_node(a);return a.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},
172
+ get_unchecked:function(a){a=!a||a===-1?this.get_container():this._get_node(a);return a.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_radios:function(){this.get_container().children("ul").removeClass("jstree-no-radios")},hide_radios:function(){this.get_container().children("ul").addClass("jstree-no-radios")},_repair_state:function(a){a=this._get_node(a);if(a.length){var d=a.find("> ul > .jstree-checked").length,e=a.find("> ul > .jstree-undetermined").length,
173
+ f=a.find("> ul > li").length;if(f===0)a.hasClass("jstree-undetermined")&&this.check_node(a);else if(d===0&&e===0)this.uncheck_node(a);else d===f?this.check_node(a):a.parentsUntil(".jstree","li").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined")}},reselect:function(){if(this.data.ui){var a=this,d=this.data.ui.to_select;d=b.map(b.makeArray(d),function(e){return"#"+e.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/")});this.deselect_all();b.each(d,function(e,
174
+ f){a.check_node(f)});this.__callback()}}}})})(jQuery);
@@ -0,0 +1,209 @@
1
+ // Generated by compass-jquery-plugin/gem-tasks/jstree.rake
2
+
3
+ /*
4
+ * jsTree aero theme 1.0
5
+ * Supported features: dots/no-dots, icons/no-icons, focused, loading
6
+ * Supported plugins: ui (hovered, clicked), checkbox, radio, contextmenu, search
7
+ */
8
+
9
+ .jstree-aero {
10
+ li, ins {
11
+ background-image: image_url("jquery.ui/jstree.aero/d.png");
12
+ background-repeat: no-repeat;
13
+ background-color: transparent; }
14
+ li {
15
+ background-position: -108px 0;
16
+ background-repeat: repeat-y;
17
+ &.jstree-last {
18
+ background: transparent; } }
19
+ .jstree-leaf > ins {
20
+ background-position: -72px 0; }
21
+ .jstree-open > ins {
22
+ background-position: -54px 0; }
23
+ .jstree-closed > ins {
24
+ background-position: -36px 0; }
25
+ .jstree-open > ins:hover {
26
+ background-position: -54px -18px; }
27
+ .jstree-closed > ins:hover {
28
+ background-position: -36px -18px; }
29
+ .jstree-hovered {
30
+ background-image: image_url("jquery.ui/jstree.aero/hovered.png");
31
+ background-repeat: repeat-x;
32
+ border: 1px solid #b8d6fb;
33
+ -moz-border-radius: 4px;
34
+ -webkit-border-radius: 4px;
35
+ border-radius: 4px;
36
+ padding: 0 2px 0 1px; }
37
+ .jstree-clicked {
38
+ background-image: image_url("jquery.ui/jstree.aero/clicked.png");
39
+ background-repeat: repeat-x;
40
+ border: 1px solid #84acdd;
41
+ -moz-border-radius: 4px;
42
+ -webkit-border-radius: 4px;
43
+ border-radius: 4px;
44
+ padding: 0 2px 0 1px; }
45
+ a {
46
+ .jstree-icon {
47
+ background-position: -56px -36px; }
48
+ &.jstree-loading .jstree-icon {
49
+ background: image_url("jquery.ui/jstree.aero/throbber.gif") center center no-repeat !important; } }
50
+ &.jstree-focused {
51
+ background: white; }
52
+ .jstree-no-dots {
53
+ li, .jstree-leaf > ins {
54
+ background: transparent; }
55
+ .jstree-open > ins {
56
+ background-position: -18px 0; }
57
+ .jstree-closed > ins {
58
+ background-position: 0 0; }
59
+ .jstree-open > ins:hover {
60
+ background-position: -18px -18px; }
61
+ .jstree-closed > ins:hover {
62
+ background-position: 0 -18px; } }
63
+ .jstree-no-icons a .jstree-icon {
64
+ display: none; }
65
+ .jstree-search {
66
+ font-style: italic; }
67
+ .jstree-no-icons .jstree-checkbox {
68
+ display: inline-block; }
69
+ .jstree-no-checkboxes .jstree-checkbox {
70
+ display: none !important; }
71
+ .jstree-checked > a > .jstree-checkbox {
72
+ background-position: -38px -37px; }
73
+ .jstree-unchecked > a > .jstree-checkbox {
74
+ background-position: -2px -37px; }
75
+ .jstree-undetermined > a > .jstree-checkbox {
76
+ background-position: -20px -37px; }
77
+ .jstree-checked > a > .jstree-checkbox:hover {
78
+ background-position: -38px -55px; }
79
+ .jstree-unchecked > a > .jstree-checkbox:hover {
80
+ background-position: -2px -55px; }
81
+ .jstree-undetermined > a > .jstree-checkbox:hover {
82
+ background-position: -20px -55px; }
83
+ .jstree-no-icons .jstree-radio {
84
+ display: inline-block; }
85
+ .jstree-no-radios .jstree-radio {
86
+ display: none !important; }
87
+ .jstree-checked > a > .jstree-radio {
88
+ background-position: -38px -73px; }
89
+ .jstree-unchecked > a > .jstree-radio {
90
+ background-position: -2px -73px; }
91
+ .jstree-undetermined > a > .jstree-radio {
92
+ background-position: -20px -73px; }
93
+ .jstree-checked > a > .jstree-radio:hover {
94
+ background-position: -38px -91px; }
95
+ .jstree-unchecked > a > .jstree-radio:hover {
96
+ background-position: -2px -91px; }
97
+ .jstree-undetermined > a > .jstree-radio:hover {
98
+ background-position: -20px -91px; } }
99
+
100
+ #vakata-dragged.jstree-aero {
101
+ ins {
102
+ background: transparent !important; }
103
+ .jstree-ok {
104
+ background: image_url("jquery.ui/jstree.aero/d.png") -56px -71px no-repeat !important; }
105
+ .jstree-invalid {
106
+ background: image_url("jquery.ui/jstree.aero/d.png") -72px -71px no-repeat !important; } }
107
+
108
+ #jstree-marker.jstree-aero {
109
+ background: image_url("jquery.ui/jstree.aero/d.png") -95px -75px no-repeat !important; }
110
+
111
+ .jstree-aero a.jstree-search {
112
+ color: aqua; }
113
+
114
+ #vakata-contextmenu.jstree-aero-context {
115
+ background: #f0f0f0;
116
+ border: 1px solid #979797;
117
+ -moz-box-shadow: 1px 1px 2px #999;
118
+ -webkit-box-shadow: 1px 1px 2px #999;
119
+ box-shadow: 1px 1px 2px #999;
120
+ li ul {
121
+ background: #f0f0f0;
122
+ border: 1px solid #979797;
123
+ -moz-box-shadow: 1px 1px 2px #999;
124
+ -webkit-box-shadow: 1px 1px 2px #999;
125
+ box-shadow: 1px 1px 2px #999; }
126
+ a {
127
+ color: black;
128
+ &:hover {
129
+ padding: 0 5px;
130
+ background: #e8eff7;
131
+ border: 1px solid #aecff7;
132
+ color: black;
133
+ -moz-border-radius: 2px;
134
+ -webkit-border-radius: 2px;
135
+ border-radius: 2px; } }
136
+ .vakata-hover > a {
137
+ padding: 0 5px;
138
+ background: #e8eff7;
139
+ border: 1px solid #aecff7;
140
+ color: black;
141
+ -moz-border-radius: 2px;
142
+ -webkit-border-radius: 2px;
143
+ border-radius: 2px; }
144
+ li {
145
+ &.jstree-contextmenu-disabled a {
146
+ color: silver;
147
+ background: transparent;
148
+ border: 0;
149
+ padding: 1px 4px;
150
+ &:hover {
151
+ color: silver;
152
+ background: transparent;
153
+ border: 0;
154
+ padding: 1px 4px; } }
155
+ &.vakata-separator {
156
+ background: white;
157
+ border-top: 1px solid #e0e0e0;
158
+ margin: 0; }
159
+ ul {
160
+ margin-left: -4px; } } }
161
+
162
+ /* IE6 BEGIN */
163
+
164
+ .jstree-aero {
165
+ li, ins {
166
+ _background-image: image_url("jquery.ui/jstree.aero/d.gif"); } }
167
+
168
+ #vakata-dragged.jstree-aero {
169
+ .jstree-invalid, .jstree-ok {
170
+ _background-image: image_url("jquery.ui/jstree.aero/d.gif"); } }
171
+
172
+ #jstree-marker.jstree-aero {
173
+ _background-image: image_url("jquery.ui/jstree.aero/d.gif"); }
174
+
175
+ .jstree-aero {
176
+ .jstree-leaf ins {
177
+ _background-position: -72px 0; }
178
+ .jstree-open ins {
179
+ _background-position: -54px 0; }
180
+ .jstree-closed ins:hover {
181
+ _background-position: -36px 0; }
182
+ .jstree-open ins:hover {
183
+ _background-position: -54px -18px; }
184
+ .jstree-closed ins {
185
+ _background-position: -36px -18px; }
186
+ a ins.jstree-icon {
187
+ _background-position: -56px -36px; } }
188
+
189
+ #vakata-contextmenu.jstree-aero-context {
190
+ ins {
191
+ _display: none; }
192
+ li {
193
+ _zoom: 1; } }
194
+
195
+ .jstree-aero {
196
+ .jstree-undetermined a .jstree-checkbox {
197
+ _background-position: -20px -37px; }
198
+ .jstree-checked a .jstree-checkbox {
199
+ _background-position: -38px -37px; }
200
+ .jstree-unchecked a .jstree-checkbox {
201
+ _background-position: -2px -37px; }
202
+ .jstree-undetermined a .jstree-radio {
203
+ _background-position: -20px -73px; }
204
+ .jstree-checked a .jstree-radio {
205
+ _background-position: -38px -73px; }
206
+ .jstree-unchecked a .jstree-radio {
207
+ _background-position: -2px -73px; } }
208
+
209
+ /* IE6 END */