Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*!
* jquery.tree.struts2.js
*
* Integration of trees with struts 2
*
* Requires use of jquery.struts2.js
*
* Copyright (c) 2010 Johannes Geppert http://www.jgeppert.com
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
(function(a){a.struts2_jquery_tree={handler:{show_checkboxes:"_s2j_show_checkboxes",hide_checkboxes:"_s2j_hide_checkboxes",check_all:"_s2j_check_all",uncheck_all:"_s2j_uncheck_all"},tree:function(c,e){var b=this,d=null;if(!b.loadAtOnce){b.require("js/base/jquery.cookie"+b.minSuffix+".js")}b.require("js/jstree/jquery.hotkeys"+b.minSuffix+".js");b.require("js/jstree/jquery.jstree"+b.minSuffix+".js");e.plugins=[];if(e.treetheme){e.plugins.push("themes");e.themes={};e.themes.theme=e.treetheme;if(!a.scriptPath){d=""}else{d=a.scriptPath}e.themes.dots=e.dots;e.themes.icons=e.icons;e.themes.url=d+"js/jstree/themes/"+e.treetheme+"/style.css"}else{e.plugins.push("themeroller")}if(e.contextmenu){e.plugins.push("crrm");e.plugins.push("contextmenu")}if(e.types){e.plugins.push("types")}if(e.checkbox){e.plugins.push("ui");e.plugins.push("checkbox");e.checkbox={override_ui:true,real_checkboxes:true,real_checkboxes_names:function(f){return[e.name,f.attr?f.attr("id"):0]}};if(e.two_state){e.checkbox.two_state=true}c.bind("loaded.jstree",function(f,g){c.find("li").each(function(h){if(a(this).data("checked")==true){c.jstree("check_node",a(this))}})})}if(e.checkAllTopics){b.subscribeTopics(c,e.checkAllTopics,b.handler.check_all,e)}if(e.uncheckAllTopics){b.subscribeTopics(c,e.uncheckAllTopics,b.handler.uncheck_all,e)}if(e.checkShowTopics){b.subscribeTopics(c,e.checkShowTopics,b.handler.show_checkboxes,e)}if(e.checkHideTopics){b.subscribeTopics(c,e.checkHideTopics,b.handler.hide_checkboxes,e)}if(e.url){e.json_data={};e.json_data.ajax={};e.json_data.ajax.url=e.url;e.json_data.ajax.data=function(f){return{id:f.attr?f.attr("id"):0}};if(e.onsuc){e.json_data.ajax.complete=function(h,f,g){a.each(e.onsuc.split(","),function(k,j){var l={};l.data=h;l.status=f;l.request=g;b.publishTopic(c,j,l);b.publishTopic(c,e.onalw,l)})}}if(e.oncom){e.json_data.ajax.complete=function(g,f){a.each(e.oncom.split(","),function(h,j){var k={};k.request=g;k.status=f;b.publishTopic(c,j,k);b.publishTopic(c,e.onalw,k)})}}if(e.onerr){e.json_data.ajax.error=function(h,f,g){a.each(e.onerr.split(","),function(k,j){var l={};l.request=h;l.status=f;l.error=g;b.publishTopic(c,j,l);b.publishTopic(c,e.onalw,l)})}}e.plugins.push("json_data")}else{e.plugins.push("html_data")}if(e.onclick||(e.url&&e.nodeHref)){e.plugins.push("ui");c.bind("select_node.jstree",function(g,i){var h={},f;h.data=i;h.event=g;b.publishTopic(c,e.onclick,h);if(e.url&&e.nodeHref){f=b.addParam(e.nodeHref,e.nodeHrefParamName+"="+i.rslt.obj.attr("id"));if(e.nodeTargets){a.each(e.nodeTargets.split(","),function(j,k){a(b.escId(k)).load(f)})}else{window.location.href=f}}})}if(e.openload){c.bind("loaded.jstree",function(f,g){c.jstree("open_all")})}if(e.openrefresh){c.bind("refresh.jstree",function(f,g){c.jstree("open_all")})}if(e.animation){e.plugins.push("core");e.core={};e.core.animation=e.animation}c.jstree(e)},treeitem:function(c,d){var b=this;b.anchor(c,d)}};a.subscribeHandler(a.struts2_jquery_tree.handler.show_checkboxes,function(b,c){a(this).jstree("show_checkboxes")});a.subscribeHandler(a.struts2_jquery_tree.handler.hide_checkboxes,function(b,c){a(this).jstree("hide_checkboxes")});a.subscribeHandler(a.struts2_jquery_tree.handler.check_all,function(b,c){a(this).jstree("check_all")});a.subscribeHandler(a.struts2_jquery_tree.handler.uncheck_all,function(b,c){a(this).jstree("uncheck_all")});a.extend(true,a.struts2_jquery_tree,a.struts2_jquery);a.struts2_jquery_tree.debugPrefix="[struts2_jquery_tree] "})(jQuery);