Merge pull request #5100 from open-sausages/pulls/fix-uploadfield-undeclared-var

Fix undeclared variable in UploadField.js
This commit is contained in:
Damian Mooyman 2016-02-26 15:08:36 +13:00
commit adf356a6a5
3 changed files with 60 additions and 79 deletions

View File

@ -16,4 +16,4 @@ o.splice(a--,1);break}return o},has:function(e){var t=H(e);return this.filter(fu
});var i=this[0],n=i&&i.ownerDocument;return n?i===n.body?H.offset.bodyOffset(i):wt(i,n,n.documentElement):null},H.offset={bodyOffset:function(e){var t=e.offsetTop,i=e.offsetLeft;return H.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(H.css(e,"marginTop"))||0,i+=parseFloat(H.css(e,"marginLeft"))||0),{top:t,left:i}},setOffset:function(e,t,i){var n=H.css(e,"position");"static"===n&&(e.style.position="relative");var s,a,r=H(e),o=r.offset(),l=H.css(e,"top"),h=H.css(e,"left"),c=("absolute"===n||"fixed"===n)&&H.inArray("auto",[l,h])>-1,d={},u={};c?(u=r.position(),s=u.top,a=u.left):(s=parseFloat(l)||0,a=parseFloat(h)||0),H.isFunction(t)&&(t=t.call(e,i,o)),null!=t.top&&(d.top=t.top-o.top+s),null!=t.left&&(d.left=t.left-o.left+a),"using"in t?t.using.call(e,d):r.css(d)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),i=this.offset(),n=jt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return i.top-=parseFloat(H.css(e,"marginTop"))||0,i.left-=parseFloat(H.css(e,"marginLeft"))||0,n.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,n.left+=parseFloat(H.css(t[0],"borderLeftWidth"))||0,{top:i.top-n.top,left:i.left-n.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||N.body;e&&!jt.test(e.nodeName)&&"static"===H.css(e,"position");)e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var n=/Y/.test(i);H.fn[e]=function(s){return H.access(this,function(e,s,a){var r=E(e);return a===t?r?i in r?r[i]:H.support.boxModel&&r.document.documentElement[s]||r.document.body[s]:e[s]:void(r?r.scrollTo(n?H(r).scrollLeft():a,n?a:H(r).scrollTop()):e[s]=a)},e,s,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,i){var n="client"+e,s="scroll"+e,a="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,i,"padding")):this[i]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,i,e?"margin":"border")):this[i]():null},H.fn[i]=function(e){return H.access(this,function(e,i,r){var o,l,h,c;return H.isWindow(e)?(o=e.document,l=o.documentElement[n],H.support.boxModel&&l||o.body&&o.body[n]||l):9===e.nodeType?(o=e.documentElement,o[n]>=o[s]?o[n]:Math.max(e.body[s],o[s],e.body[a],o[a])):r===t?(h=H.css(e,i),c=parseFloat(h),H.isNumeric(c)?c:h):void H(e).css(i,r)},i,e,arguments.length,null)}}),e.jQuery=e.$=H,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})}(window)},{}],26:[function(require,module,exports){var JSON=JSON||{};!function(){function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var i,n,s,a,r,o=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,r=[],"[object Array]"===Object.prototype.toString.apply(l)){for(a=l.length,i=0;a>i;i+=1)r[i]=str(i,l)||"null";return s=0===r.length?"[]":gap?"[\n"+gap+r.join(",\n"+gap)+"\n"+o+"]":"["+r.join(",")+"]",gap=o,s}if(rep&&"object"==typeof rep)for(a=rep.length,i=0;a>i;i+=1)n=rep[i],"string"==typeof n&&(s=str(n,l),s&&r.push(quote(n)+(gap?": ":":")+s));else for(n in l)Object.hasOwnProperty.call(l,n)&&(s=str(n,l),s&&r.push(quote(n)+(gap?": ":":")+s));return s=0===r.length?"{}":gap?"{\n"+gap+r.join(",\n"+gap)+"\n"+o+"}":"{"+r.join(",")+"}",gap=o,s}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,i){var n;if(gap="",indent="","number"==typeof i)for(n=0;i>n;n+=1)indent+=" ";else"string"==typeof i&&(indent=i);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var i,n,s=e[t];if(s&&"object"==typeof s)for(i in s)Object.hasOwnProperty.call(s,i)&&(n=walk(s,i),void 0!==n?s[i]=n:delete s[i]);return reviver.call(e,t,s)}var j;if(cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],27:[function(e,t,i){"use strict";!function(){if(!jQuery||!jQuery.jstree){var e=!1,t=!1,i=!1;!function(n){n.vakata={},n.vakata.css={get_css:function(e,t,i){e=e.toLowerCase();var n=i.cssRules||i.rules,s=0;do{if(n.length&&s>n.length+5)return!1;if(n[s].selectorText&&n[s].selectorText.toLowerCase()==e)return t===!0?(i.removeRule&&i.removeRule(s),i.deleteRule&&i.deleteRule(s),!0):n[s]}while(n[++s]);return!1},add_css:function(e,t){return n.jstree.css.get_css(e,!1,t)?!1:(t.insertRule?t.insertRule(e+" { }",0):t.addRule(e,null,0),n.vakata.css.get_css(e))},remove_css:function(e,t){return n.vakata.css.get_css(e,!0,t)},add_sheet:function(e){}};var s=[],a=-1,r={},o={};n.fn.jstree=function(e){var t="string"==typeof e,i=Array.prototype.slice.call(arguments,1),a=this;if(t){if("_"==e.substring(0,1))return a;this.each(function(){var t=s[n.data(this,"jstree_instance_id")],r=t&&n.isFunction(t[e])?t[e].apply(t,i):t;return"undefined"!=typeof r&&(0===e.indexOf("is_")||r!==!0&&r!==!1)?(a=r,!1):void 0})}else this.each(function(){var t=n.data(this,"jstree_instance_id"),a=[],o=e?n.extend({},!0,e):{},l=n(this),h=!1,c=[];a=a.concat(i),l.data("jstree")&&a.push(l.data("jstree")),o=a.length?n.extend.apply(null,[!0,o].concat(a)):o,"undefined"!=typeof t&&s[t]&&s[t].destroy(),t=parseInt(s.push({}),10)-1,n.data(this,"jstree_instance_id",t),o.plugins=n.isArray(o.plugins)?o.plugins:n.jstree.defaults.plugins.slice(),o.plugins.unshift("core"),o.plugins=o.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(","),h=n.extend(!0,{},n.jstree.defaults,o),h.plugins=o.plugins,n.each(r,function(e,t){-1===n.inArray(e,h.plugins)?(h[e]=null,delete h[e]):c.push(e)}),h.plugins=c,s[t]=new n.jstree._instance(t,n(this).addClass("jstree jstree-"+t),h),n.each(s[t]._get_settings().plugins,function(e,i){s[t].data[i]={}}),n.each(s[t]._get_settings().plugins,function(e,i){r[i]&&r[i].__init.apply(s[t])}),setTimeout(function(){s[t]&&s[t].init()},0)});return a},n.jstree={defaults:{plugins:[]},_focused:function(){return s[a]||null},_reference:function(e){if(s[e])return s[e];var t=n(e);return t.length||"string"!=typeof e||(t=n("#"+e)),t.length?s[t.closest(".jstree").data("jstree_instance_id")]||null:null},_instance:function(e,t,i){this.data={core:{}},this.get_settings=function(){return n.extend(!0,{},i)},this._get_settings=function(){return i},this.get_index=function(){return e},this.get_container=function(){return t},this.get_container_ul=function(){return t.children("ul:eq(0)")},this._set_settings=function(e){i=n.extend(!0,{},i,e)}},_fn:{},plugin:function(e,t){t=n.extend({},{__init:n.noop,__destroy:n.noop,_fn:{},defaults:!1},t),r[e]=t,n.jstree.defaults[e]=t.defaults,n.each(t._fn,function(t,i){i.plugin=e,i.old=n.jstree._fn[t],n.jstree._fn[t]=function(){var e,s=i,a=Array.prototype.slice.call(arguments),r=new n.Event("before.jstree"),o=!1;if(this.data.core.locked!==!0||"unlock"===t||"is_locked"===t){do{if(s&&s.plugin&&-1!==n.inArray(s.plugin,this._get_settings().plugins))break;s=s.old}while(s);if(s){if(0===t.indexOf("_"))e=s.apply(this,a);else{if(e=this.get_container().triggerHandler(r,{func:t,inst:this,args:a,plugin:s.plugin}),e===!1)return;"undefined"!=typeof e&&(a=e),e=s.apply(n.extend({},this,{__callback:function(e){this.get_container().triggerHandler(t+".jstree",{inst:this,args:a,rslt:e,rlbk:o})},__rollback:function(){return o=this.get_rollback()},__call_old:function(e){return s.old.apply(this,e?Array.prototype.slice.call(arguments,1):a)}}),a)}return e}}},n.jstree._fn[t].old=i.old,n.jstree._fn[t].plugin=e})},rollback:function(e){e&&(n.isArray(e)||(e=[e]),n.each(e,function(e,t){s[t.i].set_rollback(t.h,t.d)}))}},n.jstree._fn=n.jstree._instance.prototype={},n(function(){var s=navigator.userAgent.toLowerCase(),a=(s.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],r=".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; min-width: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; } ";if(/msie/.test(s)&&6==parseInt(a,10)){e=!0;try{document.execCommand("BackgroundImageCache",!1,!0)}catch(o){}r+=".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; } "}/msie/.test(s)&&7==parseInt(a,10)&&(t=!0,r+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } "),!/compatible/.test(s)&&/mozilla/.test(s)&&parseFloat(a,10)<1.9&&(i=!0,r+=".jstree ins { display:-moz-inline-box; } .jstree li { line-height:12px; } .jstree a { display:-moz-inline-box; } .jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } "),n.vakata.css.add_sheet({str:r,title:"jstree"})}),n.jstree.plugin("core",{__init:function(){this.data.core.locked=!1,this.data.core.to_open=this.get_settings().core.initially_open,this.data.core.to_load=this.get_settings().core.initially_load},defaults:{html_titles:!1,animation:500,initially_open:[],initially_load:[],open_parents:!0,notify_plugins:!0,rtl:!1,load_open:!1,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus(),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_string("loading")+"</a></li></ul>"),this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18,this.get_container().delegate("li > ins","click.jstree",n.proxy(function(e){var t=n(e.target);this.toggle_node(t)},this)).bind("mousedown.jstree",n.proxy(function(){this.set_focus()},this)).bind("dblclick.jstree",function(e){var t;if(document.selection&&document.selection.empty)document.selection.empty();else if(window.getSelection){t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(i){}}}),this._get_settings().core.notify_plugins&&this.get_container().bind("load_node.jstree",n.proxy(function(e,t){var i=this._get_node(t.rslt.obj),s=this;-1===i&&(i=this.get_container_ul()),i.length&&i.find("li").each(function(){var e=n(this);e.data("jstree")&&n.each(e.data("jstree"),function(t,i){s.data[t]&&n.isFunction(s["_"+t+"_notify"])&&s["_"+t+"_notify"].call(s,e,i)})})},this)),this._get_settings().core.load_open&&this.get_container().bind("load_node.jstree",n.proxy(function(e,t){var i=this._get_node(t.rslt.obj),s=this;-1===i&&(i=this.get_container_ul()),i.length&&i.find("li.jstree-open:not(:has(ul))").each(function(){s.load_node(this,n.noop,n.noop)})},this)),this.__callback(),this.load_node(-1,function(){this.loaded(),this.reload_nodes()})},destroy:function(){var e,t=this.get_index(),i=this._get_settings(),o=this;if(n.each(i.plugins,function(e,t){try{r[t].__destroy.apply(o)}catch(i){}}),this.__callback(),this.is_focused())for(e in s)if(s.hasOwnProperty(e)&&e!=t){s[e].set_focus();break}t===a&&(a=-1),this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree_instance_id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),n(document).unbind(".jstree-"+t).undelegate(".jstree-"+t),s[t]=null,delete s[t]},_core_notify:function(e,t){t.opened&&this.open_node(e,!1,!0)},lock:function(){this.data.core.locked=!0,this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7"),this.__callback({})},unlock:function(){this.data.core.locked=!1,this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1"),this.__callback({})},is_locked:function(){return this.data.core.locked},save_opened:function(){var e=this;this.data.core.to_open=[],this.get_container_ul().find("li.jstree-open").each(function(){this.id&&e.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(e.data.core.to_open)},save_loaded:function(){},reload_nodes:function(e){var t=this,i=!0,s=[],a=[];e||(this.data.core.reopen=!1,this.data.core.refreshing=!0,this.data.core.to_open=n.map(n.makeArray(this.data.core.to_open),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_load=n.map(n.makeArray(this.data.core.to_load),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_open.length&&(this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open))),this.data.core.to_load.length&&(n.each(this.data.core.to_load,function(e,t){return"#"==t?!0:void(n(t).length?s.push(t):a.push(t))}),s.length&&(this.data.core.to_load=a,n.each(s,function(e,n){t._is_loaded(n)||(t.load_node(n,function(){t.reload_nodes(!0)},function(){t.reload_nodes(!0)}),i=!1)}))),this.data.core.to_open.length&&n.each(this.data.core.to_open,function(e,i){t.open_node(i,!1,!0)}),i&&(this.data.core.reopen&&clearTimeout(this.data.core.reopen),this.data.core.reopen=setTimeout(function(){t.__callback({},t)},50),this.data.core.refreshing=!1,this.reopen())},reopen:function(){var e=this;this.data.core.to_open.length&&n.each(this.data.core.to_open,function(t,i){e.open_node(i,!1,!0)}),this.__callback({})},refresh:function(e,t,i){var n=this;this.save_opened(),e||(e=-1),e=this._get_node(e),e||(e=-1),-1!==e?e.children("UL").remove():this.get_container_ul().empty(),this.load_node(e,function(){n.__callback({obj:e}),n.reload_nodes(),t&&t.call(this)},i)},loaded:function(){this.__callback()},set_focus:function(){if(!this.is_focused()){var e=n.jstree._focused();e&&e.unset_focus(),this.get_container().addClass("jstree-focused"),a=this.get_index(),this.__callback()}},is_focused:function(){return a==this.get_index()},unset_focus:function(){this.is_focused()&&(this.get_container().removeClass("jstree-focused"),a=-1),this.__callback()},_get_node:function(e){var t=n(e,this.get_container());return t.is(".jstree")||-1==e?-1:(t=t.closest("li",this.get_container()),t.length?t:!1)},_get_next:function(e,t){return e=this._get_node(e),-1===e?this.get_container().find("> ul > li:first-child"):e.length?t?e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):!1:e.hasClass("jstree-open")?e.find("li:eq(0)"):e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):e.parentsUntil(".jstree","li").next("li").eq(0):!1},_get_prev:function(e,t){if(e=this._get_node(e),-1===e)return this.get_container().find("> ul > li:last-child");if(!e.length)return!1;if(t)return e.prevAll("li").length>0?e.prevAll("li:eq(0)"):!1;if(e.prev("li").length){for(e=e.prev("li").eq(0);e.hasClass("jstree-open");)e=e.children("ul:eq(0)").children("li:last");return e}var i=e.parentsUntil(".jstree","li:eq(0)");return i.length?i:!1},_get_parent:function(e){if(e=this._get_node(e),-1==e||!e.length)return!1;var t=e.parentsUntil(".jstree","li:eq(0)");return t.length?t:-1},_get_children:function(e){return e=this._get_node(e),-1===e?this.get_container().children("ul:eq(0)").children("li"):e.length?e.children("ul:eq(0)").children("li"):!1},get_path:function(e,t){var i=[],n=this;return e=this._get_node(e),-1!==e&&e&&e.length?(e.parentsUntil(".jstree","li").each(function(){i.push(t?this.id:n.get_text(this))}),i.reverse(),i.push(t?e.attr("id"):this.get_text(e)),i):!1},_get_string:function(e){return this._get_settings().core.strings[e]||e},is_open:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-open")},is_closed:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-closed")},is_leaf:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-leaf")},correct_state:function(e){return e=this._get_node(e),e&&-1!==e?(e.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(),void this.__callback({obj:e})):!1},open_node:function(t,i,n){if(t=this._get_node(t),!t.length)return!1;if(!t.hasClass("jstree-closed"))return i&&i.call(),!1;var s=n||e?0:this._get_settings().core.animation,a=this;this._is_loaded(t)?(this._get_settings().core.open_parents&&t.parentsUntil(".jstree",".jstree-closed").each(function(){a.open_node(this,!1,!0)}),s&&t.children("ul").css("display","none"),t.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"),s?t.children("ul").stop(!0,!0).slideDown(s,function(){this.style.display="",a.after_open(t)}):a.after_open(t),this.__callback({obj:t}),i&&i.call()):(t.children("a").addClass("jstree-loading"),this.load_node(t,function(){a.open_node(t,i,n)},i))},after_open:function(e){this.__callback({obj:e})},close_node:function(t,i){t=this._get_node(t);var n=i||e?0:this._get_settings().core.animation,s=this;return t.length&&t.hasClass("jstree-open")?(n&&t.children("ul").attr("style","display:block !important"),t.removeClass("jstree-open").addClass("jstree-closed"),n?t.children("ul").stop(!0,!0).slideUp(n,function(){this.style.display="",s.after_close(t)}):s.after_close(t),void this.__callback({obj:t})):!1},after_close:function(e){this.__callback({obj:e})},toggle_node:function(e){return e=this._get_node(e),e.hasClass("jstree-closed")?this.open_node(e):e.hasClass("jstree-open")?this.close_node(e):void 0},open_all:function(e,t,i){e=e?this._get_node(e):-1,e&&-1!==e||(e=this.get_container_ul()),i?e=e.find("li.jstree-closed"):(i=e,e=e.is(".jstree-closed")?e.find("li.jstree-closed").andSelf():e.find("li.jstree-closed"));var n=this;e.each(function(){var e=this;n._is_loaded(this)?n.open_node(this,!1,!t):n.open_node(this,function(){n.open_all(e,t,i)},!t)}),0===i.find("li.jstree-closed").length&&this.__callback({obj:i})},close_all:function(e,t){var i=this;e=e?this._get_node(e):this.get_container(),e&&-1!==e||(e=this.get_container_ul()),e.find("li.jstree-open").andSelf().each(function(){i.close_node(this,!t)}),this.__callback({obj:e})},clean_node:function(e){e=e&&-1!=e?n(e):this.get_container_ul(),e=e.is("li")?e.find("li").andSelf():e.find("li"),e.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"),e.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(),this.__callback({obj:e})},get_rollback:function(){return this.__callback(),{i:this.get_index(),h:this.get_container().children("ul").clone(!0),d:this.data}},set_rollback:function(e,t){this.get_container().empty().append(e),this.data=t,this.__callback()},load_node:function(e,t,i){this.__callback({obj:e})},_is_loaded:function(e){return!0},create_node:function(e,t,i,s,a){e=this._get_node(e),t="undefined"==typeof t?"last":t;var r,o=n("<li />"),l=this._get_settings().core;if(-1!==e&&!e.length)return!1;if(!a&&!this._is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,i,s,!0)}),!1;switch(this.__rollback(),"string"==typeof i&&(i={data:i}),i||(i={}),i.attr&&o.attr(i.attr),i.metadata&&o.data(i.metadata),i.state&&o.addClass("jstree-"+i.state),i.data||(i.data=this._get_string("new_node")),n.isArray(i.data)||(r=i.data,i.data=[],i.data.push(r)),n.each(i.data,function(e,t){r=n("<a />"),n.isFunction(t)&&(t=t.call(this,i)),"string"==typeof t?r.attr("href","#")[l.html_titles?"html":"text"](t):(t.attr||(t.attr={}),t.attr.href||(t.attr.href="#"),r.attr(t.attr)[l.html_titles?"html":"text"](t.title),t.language&&r.addClass(t.language)),r.prepend("<ins class='jstree-icon'>&#160;</ins>"),!t.icon&&i.icon&&(t.icon=i.icon),t.icon&&(-1===t.icon.indexOf("/")?r.children("ins").addClass(t.icon):r.children("ins").css("background","url('"+t.icon+"') center center no-repeat")),o.append(r)}),o.prepend("<ins class='jstree-icon'>&#160;</ins>"),-1===e&&(e=this.get_container(),"before"===t&&(t="first"),"after"===t&&(t="last")),t){case"before":e.before(o),r=this._get_parent(e);break;case"after":e.after(o),r=this._get_parent(e);break;case"inside":case"first":e.children("ul").length||e.append("<ul />"),e.children("ul").prepend(o),r=e;break;case"last":e.children("ul").length||e.append("<ul />"),e.children("ul").append(o),r=e;break;default:e.children("ul").length||e.append("<ul />"),t||(t=0),r=e.children("ul").children("li").eq(t),r.length?r.before(o):e.children("ul").append(o),r=e}return(-1===r||r.get(0)===this.get_container().get(0))&&(r=-1),this.clean_node(r),this.__callback({obj:o,parent:r}),s&&s.call(this,o),o},get_text:function(e){if(e=this._get_node(e),!e.length)return!1;var t=this._get_settings().core.html_titles;return e=e.children("a:eq(0)"),t?(e=e.clone(),e.children("INS").remove(),e.html()):(e=e.contents().filter(function(){return 3==this.nodeType})[0],e?e.nodeValue:"")},set_text:function(e,t){if(e=this._get_node(e),!e.length)return!1;if(e=e.children("a:eq(0)"),this._get_settings().core.html_titles){var i=e.children("INS").clone();return e.html(t).prepend(i),this.__callback({obj:e,name:t}),!0}return e=e.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:e,name:t}),e.nodeValue=t},rename_node:function(e,t){e=this._get_node(e),this.__rollback(),e&&e.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))&&this.__callback({obj:e,name:t})},delete_node:function(e){if(e=this._get_node(e),!e.length)return!1;this.__rollback();var t=this._get_parent(e),i=n([]),s=this;return e.each(function(){i=i.add(s._get_prev(this))}),e=e.detach(),-1!==t&&0===t.find("> ul > li").length&&t.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"),this.clean_node(t),this.__callback({obj:e,prev:i,parent:t}),e},prepare_move:function(e,t,i,s,a){var r={};if(r.ot=n.jstree._reference(e)||this,r.o=r.ot._get_node(e),r.r=-1===t?-1:this._get_node(t),r.p="undefined"==typeof i||i===!1?"last":i,!a&&o.o&&o.o[0]===r.o[0]&&o.r[0]===r.r[0]&&o.p===r.p)return this.__callback(o),void(s&&s.call(this,o));if(r.ot=n.jstree._reference(r.o)||this,r.rt=n.jstree._reference(r.r)||this,-1!==r.r&&r.r){if(!/^(before|after)$/.test(r.p)&&!this._is_loaded(r.r))return this.load_node(r.r,function(){this.prepare_move(e,t,i,s,!0)});switch(r.p){case"before":r.cp=r.r.index(),r.cr=r.rt._get_parent(r.r);break;case"after":r.cp=r.r.index()+1,r.cr=r.rt._get_parent(r.r);break;case"inside":case"first":r.cp=0,r.cr=r.r;break;case"last":r.cp=r.r.find(" > ul > li").length,r.cr=r.r;break;default:r.cp=r.p,r.cr=r.r}}else switch(r.cr=-1,r.p){case"first":case"before":case"inside":r.cp=0;break;case"after":case"last":r.cp=r.rt.get_container().find(" > ul > li").length;break;default:r.cp=r.p}r.np=-1==r.cr?r.rt.get_container():r.cr,r.op=r.ot._get_parent(r.o),r.cop=r.o.index(),-1===r.op&&(r.op=r.ot?r.ot.get_container():this.get_container()),!/^(before|after)$/.test(r.p)&&r.op&&r.np&&r.op[0]===r.np[0]&&r.o.index()<r.cp&&r.cp++,r.or=r.np.find(" > ul > li:nth-child("+(r.cp+1)+")"),o=r,this.__callback(o),s&&s.call(this,o)},check_move:function(){var e=o,t=!0,i=-1===e.r?this.get_container():e.r;if(!e||!e.o||e.or[0]===e.o[0])return!1;if(!e.cy){if(e.op&&e.np&&e.op[0]===e.np[0]&&e.cp-1===e.o.index())return!1;e.o.each(function(){return-1!==i.parentsUntil(".jstree","li").andSelf().index(this)?(t=!1,!1):void 0})}return t},move_node:function(e,t,i,s,a,r){if(!a)return this.prepare_move(e,t,i,function(e){this.move_node(e,!1,!1,s,!0,r)});if(s&&(o.cy=!0),!r&&!this.check_move())return!1;this.__rollback();var l=!1;s?(l=e.o.clone(!0),l.find("*[id]").andSelf().each(function(){this.id&&(this.id="copy_"+this.id)})):l=e.o,e.or.length?e.or.before(l):(e.np.children("ul").length||n("<ul />").appendTo(e.np),e.np.children("ul:eq(0)").append(l));try{e.ot.clean_node(e.op),e.rt.clean_node(e.np),e.op.find("> ul > li").length||e.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(h){}return s&&(o.cy=!0,o.oc=l),this.__callback(o),o},_get_move:function(){return o}}})}(jQuery),function(e){var t,i,n;e(function(){/msie/.test(navigator.userAgent.toLowerCase())?(i=e('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),n=e('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),t=i.width()-n.width(),i.add(n).remove()):(i=e("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200}),t=100-i.width(),i.parent().remove())}),e.jstree.plugin("ui",{__init:function(){this.data.ui.selected=e(),this.data.ui.last_selected=!1,this.data.ui.hovered=null,this.data.ui.to_select=this.get_settings().ui.initially_select,this.get_container().delegate("a","click.jstree",e.proxy(function(t){t.preventDefault(),t.currentTarget.blur(),e(t.currentTarget).hasClass("jstree-loading")||this.select_node(t.currentTarget,!0,t)},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.hover_node(t.target)},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.dehover_node(t.target)},this)).bind("reopen.jstree",e.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",e.proxy(function(){this.dehover_node(),this.save_selected()},this)).bind("set_rollback.jstree",e.proxy(function(){this.reselect()},this)).bind("close_node.jstree",e.proxy(function(t,i){var n=this._get_settings().ui,s=this._get_node(i.rslt.obj),a=s&&s.length?s.children("ul").find("a.jstree-clicked"):e(),r=this;n.selected_parent_close!==!1&&a.length&&a.each(function(){r.deselect_node(this),"select_parent"===n.selected_parent_close&&r.select_node(s)})},this)).bind("delete_node.jstree",e.proxy(function(e,t){var i=this._get_settings().ui.select_prev_on_delete,n=this._get_node(t.rslt.obj),s=n&&n.length?n.find("a.jstree-clicked"):[],a=this;s.each(function(){a.deselect_node(this)}),i&&s.length&&t.rslt.prev.each(function(){return this.parentNode?(a.select_node(this),!1):void 0})},this)).bind("move_node.jstree",e.proxy(function(e,t){t.rslt.cy&&t.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:!0,select_prev_on_delete:!0,disable_selecting_children:!1,initially_select:[]},_fn:{_get_node:function(t,i){if("undefined"==typeof t||null===t)return i?this.data.ui.selected:this.data.ui.last_selected;var n=e(t,this.get_container());return n.is(".jstree")||-1==t?-1:(n=n.closest("li",this.get_container()),n.length?n:!1)},_ui_notify:function(e,t){t.selected&&this.select_node(e,!1)},save_selected:function(){var e=this;this.data.ui.to_select=[],this.data.ui.selected.each(function(){this.id&&e.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(this.data.ui.to_select)},reselect:function(){var t=this,i=this.data.ui.to_select;i=e.map(e.makeArray(i),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),e.each(i,function(e,i){i&&"#"!==i&&t.select_node(i)}),this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode}),this.__callback()},refresh:function(e){return this.save_selected(),this.__call_old()},hover_node:function(e){return e=this._get_node(e),e.length?(e.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent(),this._fix_scroll(e),void this.__callback({obj:e})):!1},dehover_node:function(){var e,t=this.data.ui.hovered;return t&&t.length?(e=t.children("a").removeClass("jstree-hovered").parent(),this.data.ui.hovered[0]===e[0]&&(this.data.ui.hovered=null),void this.__callback({obj:t})):!1},select_node:function(e,t,i){if(e=this._get_node(e),-1==e||!e||!e.length)return!1;var n=this._get_settings().ui,s="on"==n.select_multiple_modifier||n.select_multiple_modifier!==!1&&i&&i[n.select_multiple_modifier+"Key"],a=n.select_range_modifier!==!1&&i&&i[n.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==e[0]&&this.data.ui.last_selected.parent()[0]===e.parent()[0],r=this.is_selected(e),o=!0,l=this;if(t){if(n.disable_selecting_children&&s&&(e.parentsUntil(".jstree","li").children("a.jstree-clicked").length||e.children("ul").find("a.jstree-clicked:eq(0)").length))return!1;switch(o=!1,!0){case a:this.data.ui.last_selected.addClass("jstree-last-selected"),e=e[e.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf(),-1==n.select_limit||e.length<n.select_limit?(this.data.ui.last_selected.removeClass("jstree-last-selected"),this.data.ui.selected.each(function(){this!==l.data.ui.last_selected[0]&&l.deselect_node(this)}),r=!1,o=!0):o=!1;break;case r&&!s:this.deselect_all(),r=!1,o=!0;break;case!r&&!s:(-1==n.select_limit||n.select_limit>0)&&(this.deselect_all(),o=!0);break;case r&&s:this.deselect_node(e);break;case!r&&s:(-1==n.select_limit||this.data.ui.selected.length+1<=n.select_limit)&&(o=!0)}}o&&!r&&(a||(this.data.ui.last_selected=e),e.children("a").addClass("jstree-clicked"),n.selected_parent_open&&e.parents(".jstree-closed").each(function(){l.open_node(this,!1,!0)}),this.data.ui.selected=this.data.ui.selected.add(e),this._fix_scroll(e.eq(0)),this.__callback({obj:e,e:i}))},_fix_scroll:function(e){
var i,n=this.get_container()[0];if(n.scrollHeight>n.offsetHeight){if(e=this._get_node(e),!e||-1===e||!e.length||!e.is(":visible"))return;i=e.offset().top-this.get_container().offset().top,0>i&&(n.scrollTop=n.scrollTop+i-1),i+this.data.core.li_height+(n.scrollWidth>n.offsetWidth?t:0)>n.offsetHeight&&(n.scrollTop=n.scrollTop+(i-n.offsetHeight+this.data.core.li_height+1+(n.scrollWidth>n.offsetWidth?t:0)))}},deselect_node:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)&&(e.children("a").removeClass("jstree-clicked"),this.data.ui.selected=this.data.ui.selected.not(e),this.data.ui.last_selected.get(0)===e.get(0)&&(this.data.ui.last_selected=this.data.ui.selected.eq(0)),this.__callback({obj:e}))):!1},toggle_select:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)?this.deselect_node(e):this.select_node(e)):!1},is_selected:function(e){return this.data.ui.selected.index(this._get_node(e))>=0},get_selected:function(t){return t?e(t).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(t){var i=t?e(t).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();i.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=e([]),this.data.ui.last_selected=!1,this.__callback({obj:i})}}}),e.jstree.defaults.plugins.push("ui")}(jQuery),function(e){e.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",e.proxy(function(e,t){if(this._get_settings().crrm.move.open_onmove){var i=this;t.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){i.open_node(this,!1,!0)})}},this))},defaults:{input_width_limit:200,move:{always_copy:!1,open_onmove:!0,default_position:"last",check_move:function(e){return!0}}},_fn:{_show_input:function(t,i){t=this._get_node(t);var n=this._get_settings().core.rtl,s=this._get_settings().crrm.input_width_limit,a=t.children("ins").width(),r=t.find("> a:visible > ins").width()*t.find("> a:visible > ins").length,o=this.get_text(t),l=e("<div />",{css:{position:"absolute",top:"-200px",left:n?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),h=t.css("position","relative").append(e("<input />",{value:o,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:n?"auto":a+r+4+"px",right:n?a+r+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:e.proxy(function(){var e=t.children(".jstree-rename-input"),n=e.val();""===n&&(n=o),l.remove(),e.remove(),this.set_text(t,o),this.rename_node(t,n),i.call(this,t,n,o),t.css("position","")},this),keyup:function(e){var t=e.keyCode||e.which;return 27==t?(this.value=o,void this.blur()):13==t?void this.blur():void h.width(Math.min(l.text("pW"+this.value).width(),s))},keypress:function(e){var t=e.keyCode||e.which;return 13==t?!1:void 0}})).children(".jstree-rename-input");this.set_text(t,""),l.css({fontFamily:h.css("fontFamily")||"",fontSize:h.css("fontSize")||"",fontWeight:h.css("fontWeight")||"",fontStyle:h.css("fontStyle")||"",fontStretch:h.css("fontStretch")||"",fontVariant:h.css("fontVariant")||"",letterSpacing:h.css("letterSpacing")||"",wordSpacing:h.css("wordSpacing")||""}),h.width(Math.min(l.text("pW"+h[0].value).width(),s))[0].select()},rename:function(e){e=this._get_node(e),this.__rollback();var t=this.__callback;this._show_input(e,function(e,i,n){t.call(this,{obj:e,new_name:i,old_name:n})})},create:function(t,i,n,s,a){var r,o=this;return t=this._get_node(t),t||(t=-1),this.__rollback(),r=this.create_node(t,i,n,function(t){var i=this._get_parent(t),n=e(t).index();s&&s.call(this,t),i.length&&i.hasClass("jstree-closed")&&this.open_node(i,!1,!0),a?o.__callback({obj:t,name:this.get_text(t),parent:i,position:n}):this._show_input(t,function(e,t,s){o.__callback({obj:e,name:t,parent:i,position:n})})})},remove:function(e){e=this._get_node(e,!0);var t=this._get_parent(e),i=this._get_prev(e);this.__rollback(),e=this.delete_node(e),e!==!1&&this.__callback({obj:e,prev:i,parent:t})},check_move:function(){if(!this.__call_old())return!1;var e=this._get_settings().crrm.move;return e.check_move.call(this,this._get_move())?!0:!1},move_node:function(e,t,i,n,s,a){var r=this._get_settings().crrm.move;return s?((r.always_copy===!0||"multitree"===r.always_copy&&e.rt.get_index()!==e.ot.get_index())&&(n=!0),void this.__call_old(!0,e,t,i,n,!0,a)):("undefined"==typeof i&&(i=r.default_position),"inside"!==i||r.default_position.match(/^(before|after)$/)||(i=r.default_position),this.__call_old(!0,e,t,i,n,!1,a))},cut:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.cp_nodes=!1,this.data.crrm.ct_nodes=e,void this.__callback({obj:e})):!1},copy:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.ct_nodes=!1,this.data.crrm.cp_nodes=e,void this.__callback({obj:e})):!1},paste:function(e){if(e=this._get_node(e),!e||!e.length)return!1;var t=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;return this.data.crrm.ct_nodes||this.data.crrm.cp_nodes?(this.data.crrm.ct_nodes&&(this.move_node(this.data.crrm.ct_nodes,e),this.data.crrm.ct_nodes=!1),this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,e,!1,!0),void this.__callback({obj:e,nodes:t})):!1}}})}(jQuery),function(e){var t=[];e.jstree._themes=!1,e.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",e.proxy(function(){var e=this._get_settings().themes;this.data.themes.dots=e.dots,this.data.themes.icons=e.icons,this.set_theme(e.theme,e.url)},this)).bind("loaded.jstree",e.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:!1,dots:!0,icons:!0},_fn:{set_theme:function(i,n){return i?(n||(n=e.jstree._themes+i+"/style.css"),-1==e.inArray(n,t)&&(e.vakata.css.add_sheet({url:n}),t.push(n)),this.data.themes.theme!=i&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=i),this.get_container().addClass("jstree-"+i),this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons(),void this.__callback()):!1},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=!0,this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=!1,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=!0,this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=!1,this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}}),e(function(){e.jstree._themes===!1&&e("script").each(function(){return this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)?(e.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),e.jstree._themes===!1&&(e.jstree._themes="themes/")}),e.jstree.defaults.plugins.push("themes")}(jQuery),function(e){function t(t,i){var n,s=e.jstree._focused();return s&&s.data&&s.data.hotkeys&&s.data.hotkeys.enabled&&(n=s._get_settings().hotkeys[t])?n.call(s,i):void 0}var i=[];e.jstree.plugin("hotkeys",{__init:function(){if("undefined"==typeof e.hotkeys)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";e.each(this._get_settings().hotkeys,function(n,s){s!==!1&&-1==e.inArray(n,i)&&(e(document).bind("keydown",n,function(e){return t(n,e)}),i.push(n))}),this.get_container().bind("lock.jstree",e.proxy(function(){this.data.hotkeys.enabled&&(this.data.hotkeys.enabled=!1,this.data.hotkeys.revert=!0)},this)).bind("unlock.jstree",e.proxy(function(){this.data.hotkeys.revert&&(this.data.hotkeys.enabled=!0)},this)),this.enable_hotkeys()},defaults:{up:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"ctrl+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"shift+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},down:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"ctrl+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"shift+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},left:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"ctrl+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"shift+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},right:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"ctrl+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"shift+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},space:function(){return this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click(),!1},"ctrl+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},"shift+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},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=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}})}(jQuery),function(e){e.jstree.plugin("json_data",{__init:function(){var e=this._get_settings().json_data;e.progressive_unload&&this.get_container().bind("after_close.jstree",function(e,t){t.rslt.obj.children("ul").remove()})},defaults:{data:!1,ajax:!1,correct_state:!0,progressive_render:!1,progressive_unload:!1},_fn:{load_node:function(e,t,i){var n=this;this.load_node_json(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){var i=this._get_settings().json_data;return t=this._get_node(t),-1==t||!t||!i.ajax&&!i.progressive_render&&!e.isFunction(i.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").length>0},refresh:function(t){t=this._get_node(t);var i=this._get_settings().json_data;return t&&-1!==t&&i.progressive_unload&&(e.isFunction(i.data)||i.ajax)&&t.removeData("jstree_children"),this.__call_old()},load_node_json:function(t,i,n){var s,a=this.get_settings().json_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t&&(a.progressive_render||a.progressive_unload)&&!t.is(".jstree-open, .jstree-leaf")&&0===t.children("ul").children("li").length&&t.data("jstree_children"))return s=this._parse_json(t.data("jstree_children"),t),s&&(t.append(s),a.progressive_unload||t.removeData("jstree_children")),this.clean_node(t),void(i&&i.call(this));if(t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!a.data&&!a.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(e){e=this._parse_json(e,t),e?(-1!==t&&t?(t.append(e).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(e.children()),this.clean_node(t),i&&i.call(this)):(-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&this.correct_state(t)):a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=this._parse_json(a.data,t),s?(this.get_container().children("ul").empty().append(s.children()),this.clean_node()):a.correct_state&&this.get_container().children("ul").empty()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:r=function(e,i,s){var r=this.get_settings().json_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().json_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")||!e.isArray(n)&&!e.isPlainObject(n)?r.call(this,o,s,""):(n=this._parse_json(n,t),void(n?(-1!==t&&t?(t.append(n).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),this.clean_node(t),i&&i.call(this)):-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,a.ajax.dataType||(a.ajax.dataType="json"),e.isFunction(a.ajax.url)&&(a.ajax.url=a.ajax.url.call(this,t)),e.isFunction(a.ajax.data)&&(a.ajax.data=a.ajax.data.call(this,t)),e.ajax(a.ajax)}},_parse_json:function(t,i,n){var s,a,r,o,l,h=!1,c=this._get_settings(),d=c.json_data,u=c.core.html_titles;if(!t)return h;if(d.progressive_unload&&i&&-1!==i&&i.data("jstree_children",h),e.isArray(t)){if(h=e(),!t.length)return!1;for(a=0,r=t.length;r>a;a++)s=this._parse_json(t[a],i,!0),s.length&&(h=h.add(s))}else{if("string"==typeof t&&(t={data:t}),!t.data&&""!==t.data)return h;h=e("<li />"),t.attr&&h.attr(t.attr),t.metadata&&h.data(t.metadata),t.state&&h.addClass("jstree-"+t.state),e.isArray(t.data)||(s=t.data,t.data=[],t.data.push(s)),e.each(t.data,function(i,n){s=e("<a />"),e.isFunction(n)&&(n=n.call(this,t)),"string"==typeof n?s.attr("href","#")[u?"html":"text"](n):(n.attr||(n.attr={}),n.attr.href||(n.attr.href="#"),s.attr(n.attr)[u?"html":"text"](n.title),n.language&&s.addClass(n.language)),s.prepend("<ins class='jstree-icon'>&#160;</ins>"),!n.icon&&t.icon&&(n.icon=t.icon),n.icon&&(-1===n.icon.indexOf("/")?s.children("ins").addClass(n.icon):s.children("ins").css("background","url('"+n.icon+"') center center no-repeat")),h.append(s)}),h.prepend("<ins class='jstree-icon'>&#160;</ins>"),t.children&&(d.progressive_render&&"open"!==t.state?h.addClass("jstree-closed").data("jstree_children",t.children):(d.progressive_unload&&h.data("jstree_children",t.children),e.isArray(t.children)&&t.children.length&&(s=this._parse_json(t.children,i,!0),s.length&&(l=e("<ul />"),l.append(s),h.append(l)))))}return n||(o=e("<ul />"),o.append(h),h=o),h},get_json:function(t,i,n,s){var a,r,o,l,h,c,d=[],u=this._get_settings(),p=this;return t=this._get_node(t),t&&-1!==t||(t=this.get_container().find("> ul > li")),i=e.isArray(i)?i:["id","class"],!s&&this.data.types&&i.push(u.types.type_attr),n=e.isArray(n)?n:[],t.each(function(){o=e(this),a={data:[]},i.length&&(a.attr={}),e.each(i,function(e,t){r=o.attr(t),r&&r.length&&r.replace(/jstree[^ ]*/gi,"").length&&(a.attr[t]=(" "+r).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))}),o.hasClass("jstree-open")&&(a.state="open"),o.hasClass("jstree-closed")&&(a.state="closed"),o.data()&&(a.metadata=o.data()),l=o.children("a"),l.each(function(){h=e(this),n.length||-1!==e.inArray("languages",u.plugins)||h.children("ins").get(0).style.backgroundImage.length||h.children("ins").get(0).className&&h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").length?(c=!1,-1!==e.inArray("languages",u.plugins)&&e.isArray(u.languages)&&u.languages.length&&e.each(u.languages,function(e,t){return h.hasClass(t)?(c=t,!1):void 0}),r={attr:{},title:p.get_text(h,c)},e.each(n,function(e,t){r.attr[t]=(" "+(h.attr(t)||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")}),-1!==e.inArray("languages",u.plugins)&&e.isArray(u.languages)&&u.languages.length&&e.each(u.languages,function(e,t){return h.hasClass(t)?(r.language=t,!0):void 0}),h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(r.icon=h.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")),h.children("ins").get(0).style.backgroundImage.length&&(r.icon=h.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""))):r=p.get_text(h),l.length>1?a.data.push(r):a.data=r}),o=o.find("> ul > li"),o.length&&(a.children=p.get_json(o,i,n,!0)),d.push(a)}),d}}})}(jQuery),function(e){var t=!1;e.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(i){var n=this._get_settings().languages,s=!1,a=".jstree-"+this.get_index()+" a";if(!e.isArray(n)||0===n.length)return!1;if(-1==e.inArray(i,n)){if(!n[i])return!1;i=n[i]}return i==this.data.languages.current_language?!0:(s=e.vakata.css.get_css(a+"."+this.data.languages.current_language,!1,t),s!==!1&&(s.style.display="none"),s=e.vakata.css.get_css(a+"."+i,!1,t),s!==!1&&(s.style.display=""),this.data.languages.current_language=i,this.__callback(i),!0)},get_lang:function(){return this.data.languages.current_language},_get_string:function(t,i){var n=this._get_settings().languages,s=this._get_settings().core.strings;return e.isArray(n)&&n.length&&(i=i&&-1!=e.inArray(i,n)?i:this.data.languages.current_language),s[i]&&s[i][t]?s[i][t]:s[t]?s[t]:t},get_text:function(t,i){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var n=this._get_settings().languages,s=this._get_settings().core.html_titles;return e.isArray(n)&&n.length?(i=i&&-1!=e.inArray(i,n)?i:this.data.languages.current_language,t=t.children("a."+i)):t=t.children("a:eq(0)"),s?(t=t.clone(),t.children("INS").remove(),t.html()):(t=t.contents().filter(function(){return 3==this.nodeType})[0],t.nodeValue)},set_text:function(t,i,n){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var s,a=this._get_settings().languages,r=this._get_settings().core.html_titles;return e.isArray(a)&&a.length?(n=n&&-1!=e.inArray(n,a)?n:this.data.languages.current_language,t=t.children("a."+n)):t=t.children("a:eq(0)"),r?(s=t.children("INS").clone(),t.html(i).prepend(s),this.__callback({obj:t,name:i,lang:n}),!0):(t=t.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:t,name:i,lang:n}),t.nodeValue=i)},_load_css:function(){var i,n=this._get_settings().languages,s="/* languages css */",a=".jstree-"+this.get_index()+" a";if(e.isArray(n)&&n.length){for(this.data.languages.current_language=n[0],i=0;i<n.length;i++)s+=a+"."+n[i]+" {",n[i]!=this.data.languages.current_language&&(s+=" display:none; "),s+=" } ";t=e.vakata.css.add_sheet({str:s,title:"jstree-languages"})}},create_node:function(t,i,n,s){var a=this.__call_old(!0,t,i,n,function(t){var i,n=this._get_settings().languages,a=t.children("a");if(e.isArray(n)&&n.length){for(i=0;i<n.length;i++)a.is("."+n[i])||t.append(a.eq(0).clone().removeClass(n.join(" ")).addClass(n[i]));a.not("."+n.join(", .")).remove()}s&&s.call(this,t)});return a}}})}(jQuery),function(e){e.jstree.plugin("cookies",{__init:function(){if("undefined"==typeof e.cookie)throw"jsTree cookie: jQuery cookie plugin not included.";var t,i=this._get_settings().cookies;i.save_loaded&&(t=e.cookie(i.save_loaded),t&&t.length&&(this.data.core.to_load=t.split(","))),i.save_opened&&(t=e.cookie(i.save_opened),t&&t.length&&(this.data.core.to_open=t.split(","))),i.save_selected&&(t=e.cookie(i.save_selected),t&&t.length&&this.data.ui&&(this.data.ui.to_select=t.split(","))),this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",e.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",e.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:!0,cookie_options:{}},_fn:{save_cookie:function(t){if(!this.data.core.refreshing){var i=this._get_settings().cookies;if(!t)return i.save_loaded&&(this.save_loaded(),e.cookie(i.save_loaded,this.data.core.to_load.join(","),i.cookie_options)),i.save_opened&&(this.save_opened(),e.cookie(i.save_opened,this.data.core.to_open.join(","),i.cookie_options)),void(i.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(i.save_selected,this.data.ui.to_select.join(","),i.cookie_options)));switch(t){case"open_node":case"close_node":i.save_opened&&(this.save_opened(),e.cookie(i.save_opened,this.data.core.to_open.join(","),i.cookie_options)),i.save_loaded&&(this.save_loaded(),e.cookie(i.save_loaded,this.data.core.to_load.join(","),i.cookie_options));break;case"select_node":case"deselect_node":i.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(i.save_selected,this.data.ui.to_select.join(","),i.cookie_options))}}}}})}(jQuery),function(e){e.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",e.proxy(function(e,t){var i=this._get_node(t.rslt.obj);i=-1===i?this.get_container().children("ul"):i.children("ul"),this.sort(i)},this)).bind("rename_node.jstree create_node.jstree create.jstree",e.proxy(function(e,t){this.sort(t.rslt.obj.parent())},this)).bind("move_node.jstree",e.proxy(function(e,t){var i=-1==t.rslt.np?this.get_container():t.rslt.np;this.sort(i.children("ul"))},this))},defaults:function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},_fn:{sort:function(t){var i=this._get_settings().sort,n=this;t.append(e.makeArray(t.children("li")).sort(e.proxy(i,n))),t.find("> li > ul").each(function(){n.sort(e(this))}),this.clean_node(t)}}})}(jQuery),function(e){var t=!1,i=!1,n=!1,s=!1,a=!1,r=!1,o=!1,l=!1,h=!1;e.vakata.dnd={is_down:!1,is_drag:!1,helper:!1,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(t,i,n){e.vakata.dnd.is_drag&&e.vakata.drag_stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.MozUserSelect="none")}catch(s){}return e.vakata.dnd.init_x=t.pageX,e.vakata.dnd.init_y=t.pageY,e.vakata.dnd.user_data=i,e.vakata.dnd.is_down=!0,e.vakata.dnd.helper=e("<div id='vakata-dragged' />").html(n),e(document).bind("mousemove",e.vakata.dnd.drag),e(document).bind("mouseup",e.vakata.dnd.drag_stop),!1},drag:function(t){if(e.vakata.dnd.is_down){if(!e.vakata.dnd.is_drag){if(!(Math.abs(t.pageX-e.vakata.dnd.init_x)>5||Math.abs(t.pageY-e.vakata.dnd.init_y)>5))return;e.vakata.dnd.helper.appendTo("body"),e.vakata.dnd.is_drag=!0,e(document).triggerHandler("drag_start.vakata",{event:t,data:e.vakata.dnd.user_data})}if("mousemove"===t.type){var i=e(document),n=i.scrollTop(),s=i.scrollLeft();t.pageY-n<20?(r&&"down"===o&&(clearInterval(r),r=!1),r||(o="up",r=setInterval(function(){e(document).scrollTop(e(document).scrollTop()-e.vakata.dnd.scroll_spd)},150))):r&&"up"===o&&(clearInterval(r),r=!1),e(window).height()-(t.pageY-n)<20?(r&&"up"===o&&(clearInterval(r),r=!1),r||(o="down",r=setInterval(function(){e(document).scrollTop(e(document).scrollTop()+e.vakata.dnd.scroll_spd)},150))):r&&"down"===o&&(clearInterval(r),r=!1),t.pageX-s<20?(a&&"right"===l&&(clearInterval(a),a=!1),a||(l="left",a=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()-e.vakata.dnd.scroll_spd)},150))):a&&"left"===l&&(clearInterval(a),a=!1),e(window).width()-(t.pageX-s)<20?(a&&"left"===l&&(clearInterval(a),a=!1),a||(l="right",a=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()+e.vakata.dnd.scroll_spd)},150))):a&&"right"===l&&(clearInterval(a),a=!1)}e.vakata.dnd.helper.css({left:t.pageX+e.vakata.dnd.helper_left+"px",top:t.pageY+e.vakata.dnd.helper_top+"px"}),e(document).triggerHandler("drag.vakata",{event:t,data:e.vakata.dnd.user_data})}},drag_stop:function(t){a&&clearInterval(a),r&&clearInterval(r),e(document).unbind("mousemove",e.vakata.dnd.drag),e(document).unbind("mouseup",e.vakata.dnd.drag_stop),e(document).triggerHandler("drag_stop.vakata",{event:t,data:e.vakata.dnd.user_data}),e.vakata.dnd.helper.remove(),e.vakata.dnd.init_x=0,e.vakata.dnd.init_y=0,e.vakata.dnd.user_data={},e.vakata.dnd.is_down=!1,e.vakata.dnd.is_drag=!1}},e(function(){var t="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";e.vakata.css.add_sheet({str:t,title:"vakata"})}),e.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:!1,after:!1,inside:!1,before:!1,off:!1,prepared:!1,w:0,to1:!1,to2:!1,cof:!1,cw:!1,ch:!1,i1:!1,i2:!1,mto:!1},this.get_container().bind("mouseenter.jstree",e.proxy(function(i){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.themes&&(n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),i.currentTarget===i.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==i.target)){var a,r=e.jstree._reference(i.target);r.data.dnd.foreign?(a=r._get_settings().dnd.drag_check.call(this,{o:t,r:r.get_container(),is_root:!0}),(a===!0||a.inside===!0||a.before===!0||a.after===!0)&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")):(r.prepare_move(t,r.get_container(),"last"),r.check_move()&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"))}},this)).bind("mouseup.jstree",e.proxy(function(i){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&i.currentTarget===i.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==i.target){var n,s=e.jstree._reference(i.currentTarget);s.data.dnd.foreign?(n=s._get_settings().dnd.drag_check.call(this,{o:t,r:s.get_container(),is_root:!0}),(n===!0||n.inside===!0||n.before===!0||n.after===!0)&&s._get_settings().dnd.drag_finish.call(this,{o:t,r:s.get_container(),is_root:!0})):s.move_node(t,s.get_container(),"last",i[s._get_settings().dnd.copy_modifier+"Key"])}},this)).bind("mouseleave.jstree",e.proxy(function(t){return t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id?!1:void(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")))},this)).bind("mousemove.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){var i=this.get_container()[0];t.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft+=e.vakata.dnd.scroll_spd},i),100)):t.pageX-24<this.data.dnd.cof.left?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft-=e.vakata.dnd.scroll_spd},i),100)):this.data.dnd.i1&&clearInterval(this.data.dnd.i1),t.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop+=e.vakata.dnd.scroll_spd},i),100)):t.pageY-24<this.data.dnd.cof.top?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop-=e.vakata.dnd.scroll_spd},i),100)):this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("scroll.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&n&&s&&(n.hide(),s.hide())},this)).delegate("a","mousedown.jstree",e.proxy(function(e){return 1===e.which?(this.start_drag(e.currentTarget,e),!1):void 0},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_enter(t.currentTarget)},this)).delegate("a","mousemove.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(i&&i.length&&i.children("a")[0]===t.currentTarget||this.dnd_enter(t.currentTarget),"undefined"==typeof this.data.dnd.off.top&&(this.data.dnd.off=e(t.target).offset()),this.data.dnd.w=(t.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height,this.data.dnd.w<0&&(this.data.dnd.w+=this.data.core.li_height),this.dnd_show())},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){if(t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id)return!1;n&&n.hide(),s&&s.hide(),this.data.dnd.mto=setTimeout(function(e){return function(){e.dnd_leave(t)}}(this),0)}},this)).delegate("a, #jstree-marker-line","mouseup.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_finish(t)},this)),e(document).bind("drag_stop.vakata",e.proxy(function(){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,this.data.dnd.off=!1,this.data.dnd.prepared=!1,this.data.dnd.w=!1,this.data.dnd.to1=!1,this.data.dnd.to2=!1,this.data.dnd.i1=!1,this.data.dnd.i2=!1,this.data.dnd.active=!1,this.data.dnd.foreign=!1,n&&n.css({top:"-2000px"}),s&&s.css({top:"-2000px"})},this)).bind("drag_start.vakata",e.proxy(function(t,i){if(i.data.jstree){var n=e(i.event.target);n.closest(".jstree").hasClass("jstree-"+this.get_index())&&this.dnd_enter(n)}},this));var a=this._get_settings().dnd;a.drag_target&&e(document).delegate(a.drag_target,"mousedown.jstree-"+this.get_index(),e.proxy(function(i){t=i.target,e.vakata.dnd.drag_start(i,{jstree:!0,obj:i.target},"<ins class='jstree-icon'></ins>"+e(i.target).text()),this.data.themes&&(n&&n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var a=this.get_container();this.data.dnd.cof=a.offset(),this.data.dnd.cw=parseInt(a.width(),10),this.data.dnd.ch=parseInt(a.height(),10),this.data.dnd.foreign=!0,i.preventDefault()},this)),a.drop_target&&e(document).delegate(a.drop_target,"mouseenter.jstree-"+this.get_index(),e.proxy(function(i){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:t,r:e(i.target),e:i})&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(a.drop_target,"mouseleave.jstree-"+this.get_index(),e.proxy(function(t){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(a.drop_target+", #jstree-marker-line","mouseup.jstree-"+this.get_index(),e.proxy(function(i){
this.data.dnd.active&&e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:t,r:e(i.target),e:i})},this))},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(e){return!0},drop_finish:e.noop,drag_target:".jstree-draggable",drag_finish:e.noop,drag_check:function(e){return{after:!1,before:!1,inside:!0}}},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("drag_start.vakata").unbind("drag_stop.vakata"),t=!1},_fn:{dnd_prepare:function(){if(i&&i.length){if(this.data.dnd.off=i.offset(),this._get_settings().core.rtl&&(this.data.dnd.off.right=this.data.dnd.off.left+i.width()),this.data.dnd.foreign){var e=this._get_settings().dnd.drag_check.call(this,{o:t,r:i});return this.data.dnd.after=e.after,this.data.dnd.before=e.before,this.data.dnd.inside=e.inside,this.data.dnd.prepared=!0,this.dnd_show()}return this.prepare_move(t,i,"before"),this.data.dnd.before=this.check_move(),this.prepare_move(t,i,"after"),this.data.dnd.after=this.check_move(),this._is_loaded(i)?(this.prepare_move(t,i,"inside"),this.data.dnd.inside=this.check_move()):this.data.dnd.inside=!1,this.data.dnd.prepared=!0,this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var t,i=["before","inside","after"],a=!1,r=this._get_settings().core.rtl;switch(i=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=2*this.data.core.li_height/3?this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"],e.each(i,e.proxy(function(t,i){return this.data.dnd[i]?(e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"),a=i,!1):void 0},this)),a===!1&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),t=r?this.data.dnd.off.right-18:this.data.dnd.off.left+10,a){case"before":n.css({left:t+"px",top:this.data.dnd.off.top-6+"px"}).show(),s&&s.css({left:t+8+"px",top:this.data.dnd.off.top-1+"px"}).show();break;case"after":n.css({left:t+"px",top:this.data.dnd.off.top+this.data.core.li_height-6+"px"}).show(),s&&s.css({left:t+8+"px",top:this.data.dnd.off.top+this.data.core.li_height-1+"px"}).show();break;case"inside":n.css({left:t+(r?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show(),s&&s.hide();break;default:n.hide(),s&&s.hide()}return h=a,a}},dnd_open:function(){this.data.dnd.to2=!1,this.open_node(i,e.proxy(this.dnd_prepare,this),!0)},dnd_finish:function(e){this.data.dnd.foreign?(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)&&this._get_settings().dnd.drag_finish.call(this,{o:t,r:i,p:h}):(this.dnd_prepare(),this.move_node(t,i,h,e[this._get_settings().dnd.copy_modifier+"Key"])),t=!1,i=!1,n.hide(),s&&s.hide()},dnd_enter:function(t){this.data.dnd.mto&&(clearTimeout(this.data.dnd.mto),this.data.dnd.mto=!1);var n=this._get_settings().dnd;this.data.dnd.prepared=!1,i=this._get_node(t),n.check_timeout?(this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to1=setTimeout(e.proxy(this.dnd_prepare,this),n.check_timeout)):this.dnd_prepare(),n.open_timeout?(this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),i&&i.length&&i.hasClass("jstree-closed")&&(this.data.dnd.to2=setTimeout(e.proxy(this.dnd_open,this),n.open_timeout))):i&&i.length&&i.hasClass("jstree-closed")&&this.dnd_open()},dnd_leave:function(t){this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),n.hide(),s&&s.hide(),i&&i[0]===t.target.parentNode&&(this.data.dnd.to1&&(clearTimeout(this.data.dnd.to1),this.data.dnd.to1=!1),this.data.dnd.to2&&(clearTimeout(this.data.dnd.to2),this.data.dnd.to2=!1))},start_drag:function(i,a){t=this._get_node(i),this.data.ui&&this.is_selected(t)&&(t=this._get_node(null,!0));var r=t.length>1?this._get_string("multiple_selection"):this.get_text(t),o=this.get_container();this._get_settings().core.html_titles||(r=r.replace(/</gi,"&lt;").replace(/>/gi,"&gt;")),e.vakata.dnd.drag_start(a,{jstree:!0,obj:t},"<ins class='jstree-icon'></ins>"+r),this.data.themes&&(n&&n.attr("class","jstree-"+this.data.themes.theme),s&&s.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),this.data.dnd.cof=o.offset(),this.data.dnd.cw=parseInt(o.width(),10),this.data.dnd.ch=parseInt(o.height(),10),this.data.dnd.active=!0}}}),e(function(){var t="#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; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";e.vakata.css.add_sheet({str:t,title:"jstree"}),n=e("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;").bind("mouseleave mouseenter",function(e){return n.hide(),s.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1}).appendTo("body"),s=e("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){return i&&i.length?(i.children("a").trigger(e),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).bind("mouseleave",function(t){var a=e(t.relatedTarget);return(a.is(".jstree")||0===a.closest(".jstree").length)&&i&&i.length?(i.children("a").trigger(t),n.hide(),s.hide(),t.preventDefault(),t.stopImmediatePropagation(),!1):void 0}).appendTo("body"),e(document).bind("drag_start.vakata",function(e,t){t.data.jstree&&(n.show(),s&&s.show())}),e(document).bind("drag_stop.vakata",function(e,t){t.data.jstree&&(n.hide(),s&&s.hide())})})}(jQuery),function(e){e.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui,this.data.ui&&this.data.checkbox.noui&&(this.select_node=this.deselect_node=this.deselect_all=e.noop,this.get_selected=this.get_checked),this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",e.proxy(function(e,t){this._prepare_checkboxes(t.rslt.obj)},this)).bind("loaded.jstree",e.proxy(function(e){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",e.proxy(function(e){return e.preventDefault(),this._get_node(e.target).hasClass("jstree-checked")?this.uncheck_node(e.target):this.check_node(e.target),this.data.ui&&this.data.checkbox.noui?(this.save_selected(),void(this.data.cookies&&this.save_cookie("select_node"))):(e.stopImmediatePropagation(),!1)},this))},defaults:{override_ui:!1,two_state:!1,real_checkboxes:!1,checked_parent_open:!0,real_checkboxes_names:function(e){return["check_"+(e[0].id||Math.ceil(1e4*Math.random())),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(e,t){t.checked&&this.check_node(e,!1)},_prepare_checkboxes:function(t){if(t=t&&-1!=t?this._get_node(t):this.get_container().find("> ul > li"),t!==!1){var i,n,s=this,a=this._get_settings().checkbox.two_state,r=this._get_settings().checkbox.real_checkboxes,o=this._get_settings().checkbox.real_checkboxes_names;t.each(function(){n=e(this),i=n.is("li")&&(n.hasClass("jstree-checked")||r&&n.children(":checked").length)?"jstree-checked":"jstree-unchecked",n.find("li").andSelf().each(function(){var t,n=e(this);n.children("a"+(s.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(a?"jstree-unchecked":i),r&&(n.children(":checkbox").length?n.children(":checkbox").addClass("jstree-real-checkbox"):(t=o.call(s,n),n.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+t[0]+"' name='"+t[0]+"' value='"+t[1]+"' />"))),a?(n.hasClass("jstree-checked")||n.children(":checked").length)&&n.addClass("jstree-checked").children(":checkbox").prop("checked",!0):("jstree-checked"===i||n.hasClass("jstree-checked")||n.children(":checked").length)&&n.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",!0)})}),a||t.find(".jstree-checked").parent().parent().each(function(){s._repair_state(this)})}},change_state:function(t,i){t=this._get_node(t);var n=!1,s=this._get_settings().checkbox.real_checkboxes;if(!t||-1===t)return!1;if(i=i===!1||i===!0?i:t.hasClass("jstree-checked"),this._get_settings().checkbox.two_state)i?(t.removeClass("jstree-checked").addClass("jstree-unchecked"),s&&t.children(":checkbox").prop("checked",!1)):(t.removeClass("jstree-unchecked").addClass("jstree-checked"),s&&t.children(":checkbox").prop("checked",!0));else{if(i){if(n=t.find("li").andSelf(),!n.filter(".jstree-checked, .jstree-undetermined").length)return!1;n.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),s&&n.children(":checkbox").prop("checked",!1)}else{if(n=t.find("li").andSelf(),!n.filter(".jstree-unchecked, .jstree-undetermined").length)return!1;n.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),s&&n.children(":checkbox").prop("checked",!0),this.data.ui&&(this.data.ui.last_selected=t),this.data.checkbox.last_selected=t}t.parentsUntil(".jstree","li").each(function(){var t=e(this);if(i){if(t.children("ul").children("li.jstree-checked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),s&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),s&&t.children(":checkbox").prop("checked",!1)}else{if(t.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),s&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),s&&t.children(":checkbox").prop("checked",!0)}})}return this.data.ui&&this.data.checkbox.noui&&(this.data.ui.selected=this.get_checked()),this.__callback(t),!0},check_node:function(e){if(this.change_state(e,!1)){if(e=this._get_node(e),this._get_settings().checkbox.checked_parent_open){var t=this;e.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}this.__callback({obj:e})}},uncheck_node:function(e){this.change_state(e,!0)&&this.__callback({obj:this._get_node(e)})},check_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!1)}),this.__callback()},uncheck_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!0)}),this.__callback()},is_checked:function(e){return e=this._get_node(e),e.length?e.is(".jstree-checked"):!1},get_checked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-checked"):e.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-unchecked"):e.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(e){if(e=this._get_node(e),e.length){if(this._get_settings().checkbox.two_state)return void e.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!0);var t=this._get_settings().checkbox.real_checkboxes,i=e.find("> ul > .jstree-checked").length,n=e.find("> ul > .jstree-undetermined").length,s=e.find("> ul > li").length;0===s?e.hasClass("jstree-undetermined")&&this.change_state(e,!1):0===i&&0===n?this.change_state(e,!0):i===s?this.change_state(e,!1):(e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),t&&e.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1))}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var t=this,i=this.data.ui.to_select;i=e.map(e.makeArray(i),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.deselect_all(),e.each(i,function(e,i){t.check_node(i)}),this.__callback()}else this.__call_old()},save_loaded:function(){var e=this;this.data.core.to_load=[],this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&e.data.core.to_load.push("#"+this.id)})}}}),e(function(){var t=".jstree .jstree-real-checkbox { display:none; } ";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.vakata.xslt=function(t,i,n){var s,a,r,o,l="";return document.recalc?(s=document.createElement("xml"),a=document.createElement("xml"),s.innerHTML=t,a.innerHTML=i,e("body").append(s).append(a),setTimeout(function(t,i,n){return function(){n.call(null,t.transformNode(i.XMLDocument)),setTimeout(function(t,i){return function(){e(t).remove(),e(i).remove()}}(t,i),200)}}(s,a,n),100),!0):("undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"==typeof window.XSLTProcessor&&(t=(new DOMParser).parseFromString(t,"text/xml"),i=(new DOMParser).parseFromString(i,"text/xml")),"undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"!=typeof window.XSLTProcessor?(r=new XSLTProcessor,(o=e.isFunction(r.transformDocument)?"undefined"!=typeof window.XMLSerializer:!0)?(t=(new DOMParser).parseFromString(t,"text/xml"),i=(new DOMParser).parseFromString(i,"text/xml"),e.isFunction(r.transformDocument)?(l=document.implementation.createDocument("","",null),r.transformDocument(t,i,l,null),n.call(null,(new XMLSerializer).serializeToString(l)),!0):(r.importStylesheet(i),l=r.transformToFragment(t,document),n.call(null,e("<div />").append(l).html()),!0)):!1):!1)};var t={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="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <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> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </ul></xsl:template></xsl:stylesheet>',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="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <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> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'},i=function(e){return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")};e.jstree.plugin("xml_data",{defaults:{data:!1,ajax:!1,xsl:"flat",clean_node:!1,correct_state:!0,get_skip_empty:!1,get_include_preamble:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_xml(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){var i=this._get_settings().xml_data;return t=this._get_node(t),-1==t||!t||!i.ajax&&!e.isFunction(i.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_xml:function(t,i,n){var s=this.get_settings().xml_data,a=function(){},r=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!s.data&&!s.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(s.data):s.data.call(this,t,e.proxy(function(n){this.parse_xml(n,e.proxy(function(n){n&&(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10?(n=e(n),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},this))},this));break;case!!s.data&&!s.ajax||!!s.data&&!!s.ajax&&(!t||-1===t):t&&-1!=t||this.parse_xml(s.data,e.proxy(function(n){n?(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10&&(n=e(n),this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!s.data&&!!s.ajax||!!s.data&&!!s.ajax&&t&&-1!==t:a=function(e,i,a){var r=this.get_settings().xml_data.ajax.error;r&&r.call(this,e,i,a),-1!==t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&s.correct_state&&this.correct_state(t)):"success"===i&&s.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},r=function(n,r,o){n=o.responseText;var l=this.get_settings().xml_data.ajax.success;return l&&(n=l.call(this,n,r,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?a.call(this,o,r,""):void this.parse_xml(n,e.proxy(function(n){n&&(n=n.replace(/ ?xmlns="[^"]*"/gi,""),n.length>10?(n=e(n),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()),s.clean_node&&this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),s.correct_state&&(this.correct_state(t),i&&i.call(this))):s.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},this))},s.ajax.context=this,s.ajax.error=a,s.ajax.success=r,s.ajax.dataType||(s.ajax.dataType="xml"),e.isFunction(s.ajax.url)&&(s.ajax.url=s.ajax.url.call(this,t)),e.isFunction(s.ajax.data)&&(s.ajax.data=s.ajax.data.call(this,t)),e.ajax(s.ajax)}},parse_xml:function(i,n){var s=this._get_settings().xml_data;e.vakata.xslt(i,t[s.xsl],n)},get_xml:function(t,n,s,a,r){var o,l,h,c,d,u="",p=this._get_settings(),f=this;return t||(t="flat"),r||(r=0),n=this._get_node(n),n&&-1!==n||(n=this.get_container().find("> ul > li")),s=e.isArray(s)?s:["id","class"],!r&&this.data.types&&-1===e.inArray(p.types.type_attr,s)&&s.push(p.types.type_attr),a=e.isArray(a)?a:[],r||(p.xml_data.get_include_preamble&&(u+='<?xml version="1.0" encoding="UTF-8"?>'),u+="<root>"),n.each(function(){u+="<item",h=e(this),e.each(s,function(e,t){var n=h.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof n||(u+=" "+t+'="'+i((" "+(n||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),h.hasClass("jstree-open")&&(u+=' state="open"'),h.hasClass("jstree-closed")&&(u+=' state="closed"'),"flat"===t&&(u+=' parent_id="'+i(r)+'"'),u+=">",u+="<content>",c=h.children("a"),c.each(function(){o=e(this),d=!1,u+="<name",-1!==e.inArray("languages",p.plugins)&&e.each(p.languages,function(e,t){return o.hasClass(t)?(u+=' lang="'+i(t)+'"',d=t,!1):void 0}),a.length&&e.each(a,function(e,t){var n=o.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof n||(u+=" "+t+'="'+i((" "+n||"").replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),o.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(u+=' icon="'+i(o.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"'),o.children("ins").get(0).style.backgroundImage.length&&(u+=' icon="'+i(o.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/gi,"").replace(/"/gi,""))+'"'),u+=">",u+="<![CDATA["+f.get_text(o,d)+"]]>",u+="</name>"}),u+="</content>",l=h[0].id||!0,h=h.find("> ul > li"),l=h.length?f.get_xml(t,h,s,a,l):"","nest"==t&&(u+=l),u+="</item>","flat"==t&&(u+=l)}),r||(u+="</root>"),u}}})}(jQuery),function(e){e.expr[":"].jstree_contains=function(e,t,i){return(e.textContent||e.innerText||"").toLowerCase().indexOf(i[3].toLowerCase())>=0},e.expr[":"].jstree_title_contains=function(e,t,i){return(e.getAttribute("title")||"").toLowerCase().indexOf(i[3].toLowerCase())>=0},e.jstree.plugin("search",{__init:function(){this.data.search.str="",this.data.search.result=e(),this._get_settings().search.show_only_matches&&this.get_container().bind("search.jstree",function(t,i){e(this).children("ul").find("li").hide().removeClass("jstree-last"),i.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){e(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){e(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})},defaults:{ajax:!1,search_method:"jstree_contains",show_only_matches:!1},_fn:{search:function(t,i){if(""===e.trim(t))return void this.clear_search();var n=this.get_settings().search,s=this,a=function(){},r=function(){};return this.data.search.str=t,!i&&n.ajax!==!1&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0?(this.search.supress_callback=!0,a=function(){},r=function(e,t,i){var n=this.get_settings().search.ajax.success;n&&(e=n.call(this,e,t,i)||e),this.data.search.to_open=e,this._search_open()},n.ajax.context=this,n.ajax.error=a,n.ajax.success=r,e.isFunction(n.ajax.url)&&(n.ajax.url=n.ajax.url.call(this,t)),e.isFunction(n.ajax.data)&&(n.ajax.data=n.ajax.data.call(this,t)),n.ajax.data||(n.ajax.data={search_string:t}),(!n.ajax.dataType||/^json/.exec(n.ajax.dataType))&&(n.ajax.dataType="json"),void e.ajax(n.ajax)):(this.data.search.result.length&&this.clear_search(),this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+n.search_method+"("+this.data.search.str+")"),this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){s.open_node(this,!1,!0)}),void this.__callback({nodes:this.data.search.result,str:t}))},clear_search:function(t){this.data.search.result.removeClass("jstree-search"),this.__callback(this.data.search.result),this.data.search.result=e()},_search_open:function(t){var i=this,n=!0,s=[],a=[];this.data.search.to_open.length&&(e.each(this.data.search.to_open,function(t,i){return"#"==i?!0:void(e(i).length&&e(i).is(".jstree-closed")?s.push(i):a.push(i))}),s.length&&(this.data.search.to_open=a,e.each(s,function(e,t){i.open_node(t,function(){i._search_open(!0)})}),n=!1)),n&&this.search(this.data.search.str,!0)}}})}(jQuery),function(e){e.vakata.context={hide_on_mouseleave:!1,cnt:e("<div id='vakata-contextmenu' />"),vis:!1,tgt:!1,par:!1,func:!1,data:!1,rtl:!1,show:function(t,i,n,s,a,r,o){e.vakata.context.rtl=!!o;var l,h,c=e.vakata.context.parse(t);c&&(e.vakata.context.vis=!0,e.vakata.context.tgt=i,e.vakata.context.par=r||i||null,e.vakata.context.data=a||null,e.vakata.context.cnt.html(c).css({visibility:"hidden",display:"block",left:0,top:0}),e.vakata.context.hide_on_mouseleave&&e.vakata.context.cnt.one("mouseleave",function(t){e.vakata.context.hide()}),l=e.vakata.context.cnt.height(),h=e.vakata.context.cnt.width(),n+h>e(document).width()&&(n=e(document).width()-(h+5),e.vakata.context.cnt.find("li > ul").addClass("right")),s+l>e(document).height()&&(s-=l+i[0].offsetHeight,e.vakata.context.cnt.find("li > ul").addClass("bottom")),e.vakata.context.cnt.css({left:n,top:s}).find("li:has(ul)").bind("mouseenter",function(t){var i=e(document).width(),n=e(document).height(),s=e(this).children("ul").show();i!==e(document).width()&&s.toggleClass("right"),n!==e(document).height()&&s.toggleClass("bottom")}).bind("mouseleave",function(t){e(this).children("ul").hide()}).end().css({visibility:"visible"}).show(),e(document).triggerHandler("context_show.vakata"))},hide:function(){e.vakata.context.vis=!1,e.vakata.context.cnt.attr("class","").css({visibility:"hidden"}),e(document).triggerHandler("context_hide.vakata")},parse:function(t,i){if(!t)return!1;var n="",s=!1,a=!0;return i||(e.vakata.context.func={}),n+="<ul>",e.each(t,function(t,i){return i?(e.vakata.context.func[t]=i.action,!a&&i.separator_before&&(n+="<li class='vakata-separator vakata-separator-before'></li>"),a=!1,n+="<li class='"+(i._class||"")+(i._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ",i.icon&&-1===i.icon.indexOf("/")&&(n+=" class='"+i.icon+"' "),i.icon&&-1!==i.icon.indexOf("/")&&(n+=" style='background:url("+i.icon+") center center no-repeat;' "),n+=">&#160;</ins><a href='#' rel='"+t+"'>",i.submenu&&(n+="<span style='float:"+(e.vakata.context.rtl?"left":"right")+";'>&raquo;</span>"),n+=i.label+"</a>",i.submenu&&(s=e.vakata.context.parse(i.submenu,!0),s&&(n+=s)),n+="</li>",void(i.separator_after&&(n+="<li class='vakata-separator vakata-separator-after'></li>",a=!0))):!0}),n=n.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,""),n+="</ul>",e(document).triggerHandler("context_parse.vakata"),n.length>10?n:!1},exec:function(t){return e.isFunction(e.vakata.context.func[t])?(e.vakata.context.func[t].call(e.vakata.context.data,e.vakata.context.par),!0):!1}},e(function(){var t="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; 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; } ";
e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,i,n){t=this._get_node(t);var s=this.get_settings().contextmenu,a=t.children("a:visible:eq(0)"),r=!1,o=!1;s.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(s.show_at_node||"undefined"==typeof i||"undefined"==typeof n)&&(r=a.offset(),i=r.left,n=r.top+this.data.core.li_height),o=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:s.items,e.isFunction(o)&&(o=o.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(o,a,i,n,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var i=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=i.types,n=i.type_attr,s="",a=this;t.each(e,function(e,i){return t.each(i,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||a.data.types.attach_to.push(e)}),i.icon?void((i.icon.image||i.icon.position)&&(s+="default"==e?".jstree-"+a.get_index()+" a > .jstree-icon { ":".jstree-"+a.get_index()+" li["+n+'="'+e+'"] > a > .jstree-icon { ',i.icon.image&&(s+=" background-image:url("+i.icon.image+"); "),s+=i.icon.position?" background-position:"+i.icon.position+"; ":" background-position:0 0; ",s+="} ")):!0}),""!==s&&t.vakata.css.add_sheet({str:s,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,i){var n,s,a=this._get_settings().types.use_data?this._get_node(i.args[0]):!1,r=a&&-1!==a&&a.length?a.data("jstree"):!1;if(r&&r.types&&r.types[i.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(i.func,this.data.types.attach_to)){if(!i.args[0]||!i.args[0].tagName&&!i.args[0].jquery)return;if(n=this._get_settings().types.types,s=this._get_type(i.args[0]),(n[s]&&"undefined"!=typeof n[s][i.func]||n["default"]&&"undefined"!=typeof n["default"][i.func])&&this._check(i.func,i.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,i){var n=i&&i.rslt&&i.rslt.obj&&-1!==i.rslt.obj?this._get_node(i.rslt.obj).parent():this.get_container_ul(),s=!1,a=this._get_settings().types;t.each(a.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(s="default"===e?n.find("li > a > .jstree-icon"):n.find("li["+a.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&s.css("backgroundImage","url("+t.icon.image+")"),s.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var i=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return i&&this.__callback({obj:t,type:e}),i},_check:function(e,i,n){i=this._get_node(i);var s=!1,a=this._get_type(i),r=0,o=this,l=this._get_settings().types,h=!1;if(-1===i){if(!l[e])return;s=l[e]}else{if(a===!1)return;h=l.use_data?i.data("jstree"):!1,h&&h.types&&"undefined"!=typeof h.types[e]?s=h.types[e]:l.types[a]&&"undefined"!=typeof l.types[a][e]?s=l.types[a][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(s=l.types["default"][e])}return t.isFunction(s)&&(s=s.call(this,i)),"max_depth"===e&&-1!==i&&n!==!1&&-2!==l.max_depth&&0!==s&&i.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(s=0,!1):(r=0===t?s:o._check(e,this,!1),-1!==r&&0>=r-(t+1)?(s=0,!1):(r>=0&&(s>r-(t+1)||0>s)&&(s=r-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<s||0>s)&&(s=l.max_depth-(t+1)))))}),s},check_move:function(){if(!this.__call_old())return!1;var e,i=this._get_move(),n=i.rt._get_settings().types,s=i.rt._check("max_children",i.cr),a=i.rt._check("max_depth",i.cr),r=i.rt._check("valid_children",i.cr),o=0,l=1;if("none"===r)return!1;if(t.isArray(r)&&i.ot&&i.ot._get_type&&(i.o.each(function(){return-1===t.inArray(i.ot._get_type(this),r)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==n.max_children&&-1!==s&&(o=-1===i.cr?this.get_container().find("> ul > li").not(i.o).length:i.cr.find("> ul > li").not(i.o).length,o+i.o.length>s))return!1;if(-2!==n.max_depth&&-1!==a){if(l=0,0===a)return!1;if("undefined"==typeof i.o.d){for(e=i.o;e.length>0;)e=e.find("> ul > li"),l++;i.o.d=l}if(a-i.o.d<0)return!1}return!0},create_node:function(e,i,n,s,a,r){if(!r&&(a||this._is_loaded(e))){var o,l="string"==typeof i&&i.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),h=this._get_settings().types,c=this._check("max_children",l),d=this._check("max_depth",l),u=this._check("valid_children",l);if("string"==typeof n&&(n={data:n}),n||(n={}),"none"===u)return!1;if(t.isArray(u))if(n.attr&&n.attr[h.type_attr]){if(-1===t.inArray(n.attr[h.type_attr],u))return!1}else n.attr||(n.attr={}),n.attr[h.type_attr]=u[0];if(-2!==h.max_children&&-1!==c&&(o=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,o+1>c))return!1;if(-2!==h.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,i,n,s,a,r)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_html(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,i,n){var s,a=this.get_settings().html_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(n){n&&""!==n&&n.toString&&""!==n.toString().replace(/^[\s\n]+$/,"")?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!a.data&&!a.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=e(a.data),s.is("ul")||(s=e("<ul />").append(s)),this.get_container().children("ul").empty().append(s.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:t=this._get_node(t),r=function(e,i,s){var r=this.get_settings().html_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().html_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?r.call(this,o,s,""):void(n?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,a.ajax.dataType||(a.ajax.dataType="html"),e.isFunction(a.ajax.url)&&(a.ajax.url=a.ajax.url.call(this,t)),e.isFunction(a.ajax.data)&&(a.ajax.data=a.ajax.data.call(this,t)),e.ajax(a.ajax)}}}}),e.jstree.defaults.plugins.push("html_data")}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(i){e(i.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,i){i.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_h).not(i.rslt.obj).removeClass(t.item_h),i.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,i=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(i=i.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+i.join(", .")).removeClass(i.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-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_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,i){var n,s,a=[],r=!0;return"move_node"==i.func&&i.args[4]===!0&&i.args[0].o&&i.args[0].o.length&&(i.args[0].o.children("a").each(function(){a.push(e(this).text().replace(/^\s+/g,""))}),r=this._check_unique(a,i.args[0].np.find("> ul > li").not(i.args[0].o),"move_node")),"create_node"==i.func&&(i.args[4]||this._is_loaded(i.args[0]))&&(n=this._get_node(i.args[0]),!i.args[1]||"before"!==i.args[1]&&"after"!==i.args[1]||(n=this._get_parent(i.args[0]),n&&-1!==n||(n=this.get_container())),"string"==typeof i.args[2]?a.push(i.args[2]):i.args[2]&&i.args[2].data?a.push(i.args[2].data):a.push(this._get_string("new_node")),r=this._check_unique(a,n.find("> ul > li"),"create_node")),"rename_node"==i.func&&(a.push(i.args[1]),s=this._get_node(i.args[0]),n=this._get_parent(s),n&&-1!==n||(n=this.get_container()),r=this._check_unique(a,n.find("> ul > li").not(s),"rename_node")),r?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,i,n){var s=[],a=!0;return i.children("a").each(function(){s.push(e(this).text().replace(/^\s+/g,""))}),s.length&&t.length?(e.each(t,function(t,i){return-1!==e.inArray(i,s)?(a=!1,!1):void 0}),a||this._get_settings().unique.error_callback.call(null,t,i,n),a):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),i=[];return t.o&&t.o.length?(t.o.children("a").each(function(){i.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(i,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(n){n.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",n.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",n.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",n.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",n.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",n.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((n(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",n.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var i=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");i.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=n(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",n.proxy(function(e){return e.stopImmediatePropagation(),n(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",n.proxy(function(e){n(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&n.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){n(this).find("li").andSelf().each(function(){var e=n(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),i=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==i&&(this.data.wholerow.last_html=i,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),n(function(){var s=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";i&&(s+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(s+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),n.vakata.css.add_sheet({str:s,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],i=function(t,i){var n=!0;return t=t||{},i=[].concat(i),e.each(i,function(i,s){return e.isFunction(t[s])?void 0:(n=!1,!1)}),n};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,s){var a=-1==n?this._get_settings().model.object:n.data("jstree_model");return i(a,t)?void(this._get_settings().model.async?a.getChildren(e.proxy(function(e){this.model_done(e,s)},this)):this.model_done(a.getChildren(),s)):s.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,i){var n=[],s=this._get_settings(),a=this;e.isArray(t)||(t=[t]),e.each(t,function(t,i){var r=i.getProps()||{};r.attr=i.getAttr()||{},i.getChildrenCount()&&(r.state="closed"),r.data=i.getName(),e.isArray(r.data)||(r.data=[r.data]),a.data.types&&e.isFunction(i.getType)&&(r.attr[s.types.type_attr]=i.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=i,n.push(r)}),i.call(null,n)}}})}(jQuery)}}()},{}],i18n:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function e(){n(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return s(e,[{key:"setLocale",value:function(e){this.currentLocale=e}},{key:"getLocale",value:function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}},{key:"_t",value:function(e,t,i,n){var s=this.getLocale().replace(/_[\w]+/i,""),a=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[s]&&this.lang[s][e]?this.lang[s][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[a]&&this.lang[a][e]?this.lang[a][e]:t?t:""}},{key:"addDictionary",value:function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var i in t)this.lang[e][i]=t[i]}},{key:"getDictionary",value:function(e){return this.lang[e]}},{key:"stripStr",value:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},{key:"stripStrML",value:function(e){for(var t=e.split("\n"),i=0;i<t.length;i+=1)t[i]=stripStr(t[i]);return stripStr(t.join(" "))}},{key:"sprintf",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;t>n;n++)i[n-1]=arguments[n];if(0===i.length)return e;var s=new RegExp("(.?)(%s)","g"),a=0;return e.replace(s,function(e,t,n,s,r){return"%"===t?e:t+i[a+=1]})}},{key:"inject",value:function(e,t){var i=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(i,function(e,i,n,s){return t[i]?t[i]:e})}},{key:"detectLocale",value:function(){var t,i;if(t=jQuery("body").attr("lang"),!t)for(var n=document.getElementsByTagName("meta"),s=0;s<n.length;s++)n[s].attributes["http-equiv"]&&"content-language"==n[s].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=n[s].attributes.content.nodeValue);t||(t=this.defaultLocale);var a=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var r in e.lang)if(r.substr(0,2).toLowerCase()==t.toLowerCase()){i=r;break}}else a&&(i=a[1].toLowerCase()+"_"+a[2].toUpperCase());return i}},{key:"addEvent",value:function(e,t,i,n){return e.addEventListener?(e.addEventListener(t,i,n),!0):e.attachEvent?e.attachEvent("on"+t,i):void console.log("Handler could not be attached")}}]),e}(),r=new a;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=r,i["default"]=r},{}],jQuery:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window.jQuery?window.jQuery:null;i["default"]=n},{}]},{},[1]);
e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var i=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();i.length||(i=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),i.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,i,n){t=this._get_node(t);var s=this.get_settings().contextmenu,a=t.children("a:visible:eq(0)"),r=!1,o=!1;s.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(s.show_at_node||"undefined"==typeof i||"undefined"==typeof n)&&(r=a.offset(),i=r.left,n=r.top+this.data.core.li_height),o=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:s.items,e.isFunction(o)&&(o=o.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(o,a,i,n,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var i=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=i.types,n=i.type_attr,s="",a=this;t.each(e,function(e,i){return t.each(i,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||a.data.types.attach_to.push(e)}),i.icon?void((i.icon.image||i.icon.position)&&(s+="default"==e?".jstree-"+a.get_index()+" a > .jstree-icon { ":".jstree-"+a.get_index()+" li["+n+'="'+e+'"] > a > .jstree-icon { ',i.icon.image&&(s+=" background-image:url("+i.icon.image+"); "),s+=i.icon.position?" background-position:"+i.icon.position+"; ":" background-position:0 0; ",s+="} ")):!0}),""!==s&&t.vakata.css.add_sheet({str:s,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,i){var n,s,a=this._get_settings().types.use_data?this._get_node(i.args[0]):!1,r=a&&-1!==a&&a.length?a.data("jstree"):!1;if(r&&r.types&&r.types[i.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(i.func,this.data.types.attach_to)){if(!i.args[0]||!i.args[0].tagName&&!i.args[0].jquery)return;if(n=this._get_settings().types.types,s=this._get_type(i.args[0]),(n[s]&&"undefined"!=typeof n[s][i.func]||n["default"]&&"undefined"!=typeof n["default"][i.func])&&this._check(i.func,i.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,i){var n=i&&i.rslt&&i.rslt.obj&&-1!==i.rslt.obj?this._get_node(i.rslt.obj).parent():this.get_container_ul(),s=!1,a=this._get_settings().types;t.each(a.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(s="default"===e?n.find("li > a > .jstree-icon"):n.find("li["+a.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&s.css("backgroundImage","url("+t.icon.image+")"),s.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var i=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return i&&this.__callback({obj:t,type:e}),i},_check:function(e,i,n){i=this._get_node(i);var s=!1,a=this._get_type(i),r=0,o=this,l=this._get_settings().types,h=!1;if(-1===i){if(!l[e])return;s=l[e]}else{if(a===!1)return;h=l.use_data?i.data("jstree"):!1,h&&h.types&&"undefined"!=typeof h.types[e]?s=h.types[e]:l.types[a]&&"undefined"!=typeof l.types[a][e]?s=l.types[a][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(s=l.types["default"][e])}return t.isFunction(s)&&(s=s.call(this,i)),"max_depth"===e&&-1!==i&&n!==!1&&-2!==l.max_depth&&0!==s&&i.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(s=0,!1):(r=0===t?s:o._check(e,this,!1),-1!==r&&0>=r-(t+1)?(s=0,!1):(r>=0&&(s>r-(t+1)||0>s)&&(s=r-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<s||0>s)&&(s=l.max_depth-(t+1)))))}),s},check_move:function(){if(!this.__call_old())return!1;var e,i=this._get_move(),n=i.rt._get_settings().types,s=i.rt._check("max_children",i.cr),a=i.rt._check("max_depth",i.cr),r=i.rt._check("valid_children",i.cr),o=0,l=1;if("none"===r)return!1;if(t.isArray(r)&&i.ot&&i.ot._get_type&&(i.o.each(function(){return-1===t.inArray(i.ot._get_type(this),r)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==n.max_children&&-1!==s&&(o=-1===i.cr?this.get_container().find("> ul > li").not(i.o).length:i.cr.find("> ul > li").not(i.o).length,o+i.o.length>s))return!1;if(-2!==n.max_depth&&-1!==a){if(l=0,0===a)return!1;if("undefined"==typeof i.o.d){for(e=i.o;e.length>0;)e=e.find("> ul > li"),l++;i.o.d=l}if(a-i.o.d<0)return!1}return!0},create_node:function(e,i,n,s,a,r){if(!r&&(a||this._is_loaded(e))){var o,l="string"==typeof i&&i.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),h=this._get_settings().types,c=this._check("max_children",l),d=this._check("max_depth",l),u=this._check("valid_children",l);if("string"==typeof n&&(n={data:n}),n||(n={}),"none"===u)return!1;if(t.isArray(u))if(n.attr&&n.attr[h.type_attr]){if(-1===t.inArray(n.attr[h.type_attr],u))return!1}else n.attr||(n.attr={}),n.attr[h.type_attr]=u[0];if(-2!==h.max_children&&-1!==c&&(o=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,o+1>c))return!1;if(-2!==h.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,i,n,s,a,r)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,i){var n=this;this.load_node_html(e,function(){n.__callback({obj:n._get_node(e)}),t.call(this)},i)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,i,n){var s,a=this.get_settings().html_data,r=function(){},o=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(a.data):a.data.call(this,t,e.proxy(function(n){n&&""!==n&&n.toString&&""!==n.toString().replace(/^[\s\n]+$/,"")?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!a.data&&!a.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!!a.data&&!a.ajax||!!a.data&&!!a.ajax&&(!t||-1===t):t&&-1!=t||(s=e(a.data),s.is("ul")||(s=e("<ul />").append(s)),this.get_container().children("ul").empty().append(s.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),i&&i.call(this);break;case!a.data&&!!a.ajax||!!a.data&&!!a.ajax&&t&&-1!==t:t=this._get_node(t),r=function(e,i,s){var r=this.get_settings().html_data.ajax.error;r&&r.call(this,e,i,s),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===i&&a.correct_state&&this.correct_state(t)):"success"===i&&a.correct_state&&this.get_container().children("ul").empty(),n&&n.call(this)},o=function(n,s,o){var l=this.get_settings().html_data.ajax.success;return l&&(n=l.call(this,n,s,o)||n),""===n||n&&n.toString&&""===n.toString().replace(/^[\s\n]+$/,"")?r.call(this,o,s,""):void(n?(n=e(n),n.is("ul")||(n=e("<ul />").append(n)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(n).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(n.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),i&&i.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),a.correct_state&&(this.correct_state(t),i&&i.call(this))):a.correct_state&&(this.get_container().children("ul").empty(),i&&i.call(this)))},a.ajax.context=this,a.ajax.error=r,a.ajax.success=o,a.ajax.dataType||(a.ajax.dataType="html"),e.isFunction(a.ajax.url)&&(a.ajax.url=a.ajax.url.call(this,t)),e.isFunction(a.ajax.data)&&(a.ajax.data=a.ajax.data.call(this,t)),e.ajax(a.ajax)}}}}),e.jstree.defaults.plugins.push("html_data")}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(i){e(i.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,i){i.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,i){i.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,i){this.get_container().find("a."+t.item_h).not(i.rslt.obj).removeClass(t.item_h),i.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,i=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(i=i.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+i.join(", .")).removeClass(i.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-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_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,i){var n,s,a=[],r=!0;return"move_node"==i.func&&i.args[4]===!0&&i.args[0].o&&i.args[0].o.length&&(i.args[0].o.children("a").each(function(){a.push(e(this).text().replace(/^\s+/g,""))}),r=this._check_unique(a,i.args[0].np.find("> ul > li").not(i.args[0].o),"move_node")),"create_node"==i.func&&(i.args[4]||this._is_loaded(i.args[0]))&&(n=this._get_node(i.args[0]),!i.args[1]||"before"!==i.args[1]&&"after"!==i.args[1]||(n=this._get_parent(i.args[0]),n&&-1!==n||(n=this.get_container())),"string"==typeof i.args[2]?a.push(i.args[2]):i.args[2]&&i.args[2].data?a.push(i.args[2].data):a.push(this._get_string("new_node")),r=this._check_unique(a,n.find("> ul > li"),"create_node")),"rename_node"==i.func&&(a.push(i.args[1]),s=this._get_node(i.args[0]),n=this._get_parent(s),n&&-1!==n||(n=this.get_container()),r=this._check_unique(a,n.find("> ul > li").not(s),"rename_node")),r?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,i,n){var s=[],a=!0;return i.children("a").each(function(){s.push(e(this).text().replace(/^\s+/g,""))}),s.length&&t.length?(e.each(t,function(t,i){return-1!==e.inArray(i,s)?(a=!1,!1):void 0}),a||this._get_settings().unique.error_callback.call(null,t,i,n),a):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),i=[];return t.o&&t.o.length?(t.o.children("a").each(function(){i.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(i,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(n){n.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",n.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",n.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",n.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",n.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",n.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((n(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",n.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var i=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");i.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=n(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",n.proxy(function(e){return e.stopImmediatePropagation(),n(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",n.proxy(function(e){n(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&n.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){n(this).find("li").andSelf().each(function(){var e=n(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),i=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==i&&(this.data.wholerow.last_html=i,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),n(function(){var s=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";i&&(s+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(s+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),n.vakata.css.add_sheet({str:s,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],i=function(t,i){var n=!0;return t=t||{},i=[].concat(i),e.each(i,function(i,s){return e.isFunction(t[s])?void 0:(n=!1,!1)}),n};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(n,s){var a=-1==n?this._get_settings().model.object:n.data("jstree_model");return i(a,t)?void(this._get_settings().model.async?a.getChildren(e.proxy(function(e){this.model_done(e,s)},this)):this.model_done(a.getChildren(),s)):s.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,i){var n=[],s=this._get_settings(),a=this;e.isArray(t)||(t=[t]),e.each(t,function(t,i){var r=i.getProps()||{};r.attr=i.getAttr()||{},i.getChildrenCount()&&(r.state="closed"),r.data=i.getName(),e.isArray(r.data)||(r.data=[r.data]),a.data.types&&e.isFunction(i.getType)&&(r.attr[s.types.type_attr]=i.getType()),r.attr.id&&s.model.id_prefix&&(r.attr.id=s.model.id_prefix+r.attr.id),r.metadata||(r.metadata={}),r.metadata.jstree_model=i,n.push(r)}),i.call(null,n)}}})}(jQuery)}}()},{}],i18n:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),a=function(){function e(){n(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return s(e,[{key:"setLocale",value:function(e){this.currentLocale=e}},{key:"getLocale",value:function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}},{key:"_t",value:function(e,t,i,n){var s=this.getLocale().replace(/_[\w]+/i,""),a=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[s]&&this.lang[s][e]?this.lang[s][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[a]&&this.lang[a][e]?this.lang[a][e]:t?t:""}},{key:"addDictionary",value:function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var i in t)this.lang[e][i]=t[i]}},{key:"getDictionary",value:function(e){return this.lang[e]}},{key:"stripStr",value:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},{key:"stripStrML",value:function(e){for(var t=e.split("\n"),i=0;i<t.length;i+=1)t[i]=stripStr(t[i]);return stripStr(t.join(" "))}},{key:"sprintf",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;t>n;n++)i[n-1]=arguments[n];if(0===i.length)return e;var s=new RegExp("(.?)(%s)","g"),a=0;return e.replace(s,function(e,t,n,s,r){return"%"===t?e:t+i[a+=1]})}},{key:"inject",value:function(e,t){var i=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(i,function(e,i,n,s){return t[i]?t[i]:e})}},{key:"detectLocale",value:function(){var t,i;if(t=jQuery("body").attr("lang"),!t)for(var n=document.getElementsByTagName("meta"),s=0;s<n.length;s++)n[s].attributes["http-equiv"]&&"content-language"==n[s].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=n[s].attributes.content.nodeValue);t||(t=this.defaultLocale);var a=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var r in e.lang)if(r.substr(0,2).toLowerCase()==t.toLowerCase()){i=r;break}}else a&&(i=a[1].toLowerCase()+"_"+a[2].toUpperCase());return i}},{key:"addEvent",value:function(e,t,i,n){return e.addEventListener?(e.addEventListener(t,i,n),!0):e.attachEvent?e.attachEvent("on"+t,i):void console.log("Handler could not be attached")}}]),e}(),r=new a;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=r,i["default"]=r},{}],jQuery:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window.jQuery?window.jQuery:null;i["default"]=n},{}]},{},[1]);

View File

@ -31,25 +31,19 @@
},
_enableFileInputButton: function _enableFileInputButton() {
_jQuery2.default.blueimpUI.fileupload.prototype._enableFileInputButton.call(this);
this.element.find('.ss-uploadfield-addfile').show();
},
_disableFileInputButton: function _disableFileInputButton() {
_jQuery2.default.blueimpUI.fileupload.prototype._disableFileInputButton.call(this);
this.element.find('.ss-uploadfield-addfile').hide();
},
_onAdd: function _onAdd(e, data) {
var result = _jQuery2.default.blueimpUI.fileupload.prototype._onAdd.call(this, e, data);
var firstNewFile = this._files.find('.ss-uploadfield-item').slice(data.files.length * -1).first();
var top = '+=' + (firstNewFile.position().top - parseInt(firstNewFile.css('marginTop'), 10) || 0 - parseInt(firstNewFile.css('borderTopWidth'), 10) || 0);
firstNewFile.offsetParent().animate({
scrollTop: top
}, 1000);
var fSize = 0;
firstNewFile.offsetParent().animate({ scrollTop: top }, 1000);
var fSize = 0;
for (var i = 0; i < data.files.length; i++) {
if (typeof data.files[i].size === 'number') {
fSize = fSize + data.files[i].size;
@ -57,7 +51,6 @@
}
(0, _jQuery2.default)('.fileOverview .uploadStatus .details .total').text(data.files.length);
if (typeof fSize === 'number' && fSize > 0) {
fSize = this._formatFileSize(fSize);
(0, _jQuery2.default)('.fileOverview .uploadStatus .details .fileSize').text(fSize);
@ -84,11 +77,8 @@
_onSend: function _onSend(e, data) {
var that = this;
var config = this.options;
if (config.overwriteWarning && config.replaceFile) {
_jQuery2.default.get(config['urlFileExists'], {
'filename': data.files[0].name
}, function (response, status, xhr) {
_jQuery2.default.get(config['urlFileExists'], { 'filename': data.files[0].name }, function (response, status, xhr) {
if (response.exists) {
data.context.find('.ss-uploadfield-item-status').text(config.errorMessages.overwriteWarning).addClass('ui-state-warning-text');
data.context.find('.ss-uploadfield-item-progress').hide();
@ -137,11 +127,10 @@
files = data.files,
replaceFileID = data.replaceFileID,
valid = true;
var replacedElement = null;
var replacedElement = null;
if (replaceFileID) {
replacedElement = (0, _jQuery2.default)(".ss-uploadfield-item[data-fileid='" + replaceFileID + "']");
if (replacedElement.length === 0) {
replacedElement = null;
} else {
@ -151,31 +140,32 @@
_jQuery2.default.each(files, function (index, file) {
self._adjustMaxNumberOfFiles(-1);
error = self._validate([file]);
valid = error && valid;
valid = self._validate([file]) && valid;
});
data.isAdjusted = true;
data.files.valid = data.isValidated = valid;
data.context = this._renderDownload(files);
data.context = this._renderDownload(files);
if (replacedElement) {
replacedElement.replaceWith(data.context);
} else {
data.context.appendTo(this._files);
}
data.context.data('data', data);
this._reflow = this._transition && data.context[0].offsetWidth;
data.context.addClass('in');
}
});
_jQuery2.default.entwine('ss', function ($) {
$('div.ss-upload').entwine({
Config: null,
onmatch: function onmatch() {
if (this.is('.readonly,.disabled')) {
return;
}
@ -183,17 +173,21 @@
var $fileInput = this.find('.ss-uploadfield-fromcomputer-fileinput'),
$dropZone = $('.ss-uploadfield-dropzone'),
config = $fileInput.data('config');
$dropZone.on('dragover', function (e) {
e.preventDefault();
});
$dropZone.on('dragenter', function (e) {
$dropZone.addClass('hover active');
});
$dropZone.on('dragleave', function (e) {
if (e.target === $dropZone[0]) {
$dropZone.removeClass('hover active');
}
});
$dropZone.on('drop', function (e) {
$dropZone.removeClass('hover active');
@ -201,18 +195,14 @@
return false;
}
});
this.setConfig(config);
this.fileupload($.extend(true, {
formData: function formData(form) {
var idVal = $(form).find(':input[name=ID]').val();
var data = [{
name: 'SecurityID',
value: $(form).find(':input[name=SecurityID]').val()
}];
if (idVal) data.push({
name: 'ID',
value: idVal
});
var data = [{ name: 'SecurityID', value: $(form).find(':input[name=SecurityID]').val() }];
if (idVal) data.push({ name: 'ID', value: idVal });
return data;
},
errorMessages: {
@ -252,9 +242,7 @@
acceptFileTypes: new RegExp(config.acceptFileTypes, 'i')
}));
if (this.data('fileupload')._isXHRUpload({
multipart: true
})) {
if (this.data('fileupload')._isXHRUpload({ multipart: true })) {
$('.ss-uploadfield-item-uploador').hide().show();
}
@ -262,7 +250,6 @@
},
onunmatch: function onunmatch() {
$('.ss-uploadfield-dropzone').off('dragover dragenter dragleave drop');
this._super();
},
openSelectDialog: function openSelectDialog(uploadedFile) {
@ -271,26 +258,27 @@
dialogId = 'ss-uploadfield-dialog-' + this.attr('id'),
dialog = jQuery('#' + dialogId);
if (!dialog.length) dialog = jQuery('<div class="ss-uploadfield-dialog" id="' + dialogId + '" />');
var iframeUrl = config['urlSelectDialog'];
var uploadedFileId = null;
if (uploadedFile && uploadedFile.attr('data-fileid') > 0) {
uploadedFileId = uploadedFile.attr('data-fileid');
}
dialog.ssdialog({
iframeUrl: iframeUrl,
height: 550
});
dialog.ssdialog({ iframeUrl: iframeUrl, height: 550 });
dialog.find('iframe').bind('load', function (e) {
var contents = $(this).contents(),
gridField = contents.find('.ss-gridfield');
contents.find('table.ss-gridfield').css('margin-top', 0);
contents.find('input[name=action_doAttach]').unbind('click.openSelectDialog').bind('click.openSelectDialog', function () {
var ids = $.map(gridField.find('.ss-gridfield-item.ui-selected'), function (el) {
return $(el).data('id');
});
if (ids && ids.length) self.attachFiles(ids, uploadedFileId);
dialog.ssdialog('close');
return false;
});
@ -302,20 +290,21 @@
config = this.getConfig(),
indicator = $('<div class="loader" />'),
target = uploadedFileId ? this.find(".ss-uploadfield-item[data-fileid='" + uploadedFileId + "']") : this.find('.ss-uploadfield-addfile');
target.children().hide();
target.append(indicator);
$.ajax({
type: "POST",
url: config['urlAttach'],
data: {
'ids': ids
},
data: { 'ids': ids },
complete: function complete(xhr, status) {
target.children().show();
indicator.remove();
},
success: function success(data, status, xhr) {
if (!data || $.isEmptyObject(data)) return;
self.fileupload('attach', {
files: data,
options: self.fileupload('option'),
@ -327,18 +316,17 @@
});
$('div.ss-upload *').entwine({
getUploadField: function getUploadField() {
return this.parents('div.ss-upload:first');
}
});
$('div.ss-upload .ss-uploadfield-files .ss-uploadfield-item').entwine({
onadd: function onadd() {
this._super();
this.closest('.ss-upload').find('.ss-uploadfield-addfile').addClass('borderTop');
},
onremove: function onremove() {
$('.ss-uploadfield-files:not(:has(.ss-uploadfield-item))').closest('.ss-upload').find('.ss-uploadfield-addfile').removeClass('borderTop');
this._super();
}
});
@ -356,6 +344,7 @@
return false;
}
});
$('div.ss-upload .ss-uploadfield-item-remove:not(.ui-state-disabled), .ss-uploadfield-item-delete:not(.ui-state-disabled)').entwine({
onclick: function onclick(e) {
var field = this.closest('div.ss-upload'),
@ -385,9 +374,7 @@
}
if (fileupload) {
fileupload._trigger('destroy', e, {
context: item
});
fileupload._trigger('destroy', e, { context: item });
}
}
@ -395,8 +382,10 @@
return false;
}
});
$('div.ss-upload .ss-uploadfield-item-edit-all').entwine({
onclick: function onclick(e) {
if ($(this).hasClass('opened')) {
$('.ss-uploadfield-item .ss-uploadfield-item-edit .toggle-details-icon.opened').each(function (i) {
$(this).closest('.ss-uploadfield-item-edit').click();
@ -429,16 +418,17 @@
if (iframe.attr('src') == 'about:blank') {
iframe.attr('src', iframe.data('src'));
iframe.parent().addClass('loading');
disabled = this.siblings();
disabled.addClass('ui-state-disabled');
disabled.attr('disabled', 'disabled');
iframe.on('load', function () {
iframe.parent().removeClass('loading');
if (iframe.data('src')) {
self._prepareIframe(iframe, editform, itemInfo);
iframe.data('src', '');
}
});
@ -451,6 +441,7 @@
},
_prepareIframe: function _prepareIframe(iframe, editform, itemInfo) {
var disabled;
iframe.contents().ready(function () {
var iframe_jQuery = iframe.get(0).contentWindow.jQuery;
iframe_jQuery(iframe_jQuery.find(':input')).bind('change', function (e) {
@ -460,25 +451,25 @@
});
if (editform.hasClass('loading')) {} else {
if (this.hasClass('ss-uploadfield-item-edit')) {
disabled = this.siblings();
} else {
disabled = this.find('ss-uploadfield-item-edit').siblings();
}
if (this.hasClass('ss-uploadfield-item-edit')) {
disabled = this.siblings();
} else {
disabled = this.find('ss-uploadfield-item-edit').siblings();
}
editform.parent('.ss-uploadfield-item').removeClass('ui-state-warning');
editform.toggleEditForm();
editform.parent('.ss-uploadfield-item').removeClass('ui-state-warning');
editform.toggleEditForm();
if (itemInfo.find('.toggle-details-icon').hasClass('opened')) {
disabled.addClass('ui-state-disabled');
disabled.attr('disabled', 'disabled');
} else {
disabled.removeClass('ui-state-disabled');
disabled.removeAttr('disabled');
if (itemInfo.find('.toggle-details-icon').hasClass('opened')) {
disabled.addClass('ui-state-disabled');
disabled.attr('disabled', 'disabled');
} else {
disabled.removeClass('ui-state-disabled');
disabled.removeAttr('disabled');
}
}
}
}
});
$('div.ss-upload .ss-uploadfield-item-editform').entwine({
fitHeight: function fitHeight() {
var iframe = this.find('iframe'),
@ -486,23 +477,20 @@
bodyH = contents.find('form').outerHeight(true),
iframeH = bodyH + (iframe.outerHeight(true) - iframe.height()),
containerH = iframeH + (this.outerHeight(true) - this.height());
if (!$.browser.msie && $.browser.version.slice(0, 3) != "8.0") {
contents.find('body').css({
'height': bodyH
});
contents.find('body').css({ 'height': bodyH });
}
iframe.height(iframeH);
this.animate({
height: containerH
}, 500);
this.animate({ height: containerH }, 500);
},
toggleEditForm: function toggleEditForm() {
var itemInfo = this.prev('.ss-uploadfield-item-info'),
status = itemInfo.find('.ss-uploadfield-item-status');
var iframe = this.find('iframe').contents(),
saved = iframe.find('#Form_EditForm_error');
var text = "";
if (this.height() === 0) {
@ -514,18 +502,14 @@
iframe.find('#Form_EditForm_action_doEdit').click(function () {
itemInfo.find('label .name').text(iframe.find('#Name input').val());
});
if ($('div.ss-upload .ss-uploadfield-files .ss-uploadfield-item-actions .toggle-details-icon:not(.opened)').index() < 0) {
$('div.ss-upload .ss-uploadfield-item-edit-all').addClass('opened').find('.toggle-details-icon').addClass('opened');
}
} else {
this.animate({
height: 0
}, 500);
this.animate({ height: 0 }, 500);
this.removeClass('opened');
itemInfo.find('.toggle-details-icon').removeClass('opened');
$('div.ss-upload .ss-uploadfield-item-edit-all').removeClass('opened').find('.toggle-details-icon').removeClass('opened');
if (!this.hasClass('edited')) {
text = _i18n2.default._t('UploadField.NOCHANGES', 'No Changes');
status.addClass('ui-state-success-text');
@ -540,10 +524,8 @@
status.addClass('ui-state-warning-text');
}
}
saved.removeClass('good').hide();
}
status.attr('title', text).text(text);
}
});

View File

@ -136,8 +136,7 @@ $.widget('blueimpUIX.fileupload', $.blueimpUI.fileupload, {
// Validate each file
$.each(files, function (index, file) {
self._adjustMaxNumberOfFiles(-1);
error = self._validate([file]);
valid = error && valid;
valid = self._validate([file]) && valid;
});
data.isAdjusted = true;
data.files.valid = data.isValidated = valid;