ACC SHELL

Path : /www/hosting/oltv.cz/_/admin/script/
File Upload :
Current File : /www/hosting/oltv.cz/_/admin/script/jquery.checkboxtree.min.js

/*
 * jQuery CheckboxTree
 *
 * @author Valerio Galano <v.galano@daredevel.it>
 *
 * @see http://checkboxtree.daredevel.it
 *
 * @version 0.5.2
 */
$.widget("daredevel.checkboxTree",{_allDescendantChecked:function(a){return(a.find("li input:checkbox:not(:checked)").length==0)},_create:function(){var a=this;if(this.options.collapsable){this.options.collapseAnchor=(this.options.collapseImage.length>0)?'<img src="'+this.options.collapseImage+'" />':"";this.options.expandAnchor=(this.options.expandImage.length>0)?'<img src="'+this.options.expandImage+'" />':"";this.options.leafAnchor=(this.options.leafImage.length>0)?'<img src="'+this.options.leafImage+'" />':"";this.element.find("li:not(:has(ul))").each(function(){$(this).prepend($("<span />"));a._markAsLeaf($(this))});this.element.find("li:has(ul):has(input:checkbox:checked)").each(function(){$(this).prepend($("<span />"));a.options.initializeChecked=="collapsed"?a.collapse($(this)):a.expand($(this))});this.element.find("li:has(ul):not(:has(input:checkbox:checked))").each(function(){$(this).prepend($("<span />"));a.options.initializeUnchecked=="collapsed"?a.collapse($(this)):a.expand($(this))});this.element.find("li span").live("click",function(){var b=$(this).parents("li:first");if(b.hasClass("collapsed")){a.expand(b)}else{if(b.hasClass("expanded")){a.collapse(b)}}});$(this.options.collapseAllElement).bind("click",function(){a.collapseAll()});$(this.options.expandAllElement).bind("click",function(){a.expandAll()});if(this.options.onUncheck.node=="collapse"){this.element.find("input:checkbox:not(:checked)").live("click",function(){a.collapse($(this).parents("li:first"))})}else{if(this.options.onUncheck.node=="expand"){this.element.find("input:checkbox:not(:checked)").live("click",function(){a.expand($(this).parents("li:first"))})}}if(this.options.onCheck.node=="collapse"){this.element.find("input:checkbox:checked").live("click",function(){a.collapse($(this).parents("li:first"))})}else{if(this.options.onCheck.node=="expand"){this.element.find("input:checkbox:checked").live("click",function(){a.expand($(this).parents("li:first"))})}}}this.element.find("input:checkbox:not(:checked)").live("click",function(){var b=$(this).parents("li:first");a.uncheck(b)});this.element.find("input:checkbox:checked").live("click",function(){var b=$(this).parents("li:first");a.check(b)});this.element.addClass("ui-widget-daredevel-checkboxTree");this.element.addClass("ui-widget ui-widget-content")},_checkAncestors:function(a){a.parentsUntil(".ui-widget").filter("li").find("input:checkbox:first:not(:checked)").attr("checked",true).change()},_checkDescendants:function(a){a.find("li input:checkbox:not(:checked)").attr("checked",true).change()},_checkOthers:function(a){a.addClass("exclude");a.parents("li").addClass("exclude");a.find("li").addClass("exclude");$(this.element).find("li").each(function(){if(!$(this).hasClass("exclude")){$(this).find("input:checkbox:first:not(:checked)").attr("checked",true).change()}});$(this.element).find("li").removeClass("exclude")},_destroy:function(){this.element.removeClass(this.options.cssClass);$.Widget.prototype.destroy.call(this)},_isRoot:function(a){var b=a.parentsUntil(".ui-widget-daredevel-checkboxTree");return 0==b.length},_markAsCollapsed:function(a){if(this.options.expandAnchor.length>0){a.children("span").html(this.options.expandAnchor)}else{if(this.options.collapseUiIcon.length>0){a.children("span").removeClass(this.options.expandUiIcon).addClass("ui-icon "+this.options.collapseUiIcon)}}a.removeClass("expanded").addClass("collapsed")},_markAsExpanded:function(a){if(this.options.collapseAnchor.length>0){a.children("span").html(this.options.collapseAnchor)}else{if(this.options.expandUiIcon.length>0){a.children("span").removeClass(this.options.collapseUiIcon).addClass("ui-icon "+this.options.expandUiIcon)}}a.removeClass("collapsed").addClass("expanded")},_markAsLeaf:function(a){if(this.options.leafAnchor.length>0){a.children("span").html(this.options.leafAnchor)}else{if(this.options.leafUiIcon.length>0){a.children("span").addClass("ui-icon "+this.options.leafUiIcon)}}a.addClass("leaf")},_parentNode:function(a){return a.parents("li:first")},_uncheckAncestors:function(a){a.parentsUntil(".ui-widget").filter("li").find("input:checkbox:first:checked").attr("checked",false).change()},_uncheckDescendants:function(a){a.find("li input:checkbox:checked").attr("checked",false).change()},_uncheckOthers:function(a){a.addClass("exclude");a.parents("li").addClass("exclude");a.find("li").addClass("exclude");$(this.element).find("li").each(function(){if(!$(this).hasClass("exclude")){$(this).find("input:checkbox:first:checked").attr("checked",false).change()}});$(this.element).find("li").removeClass("exclude")},check:function(a){a.find("input:checkbox:first:not(:checked)").attr("checked",true).change();if(this.options.onCheck.others=="check"){this._checkOthers(a)}else{if(this.options.onCheck.others=="uncheck"){this._uncheckOthers(a)}}if(this.options.onCheck.descendants=="check"){this._checkDescendants(a)}else{if(this.options.onCheck.descendants=="uncheck"){this._uncheckDescendants(a)}}if(this.options.onCheck.ancestors=="check"){this._checkAncestors(a)}else{if(this.options.onCheck.ancestors=="uncheck"){this._uncheckAncestors(a)}else{if(this.options.onCheck.ancestors=="checkIfFull"){if(!this._isRoot(a)&&this._allDescendantChecked(this._parentNode(a))){this.check(this._parentNode(a))}}}}},checkAll:function(){$(this.element).find("input:checkbox:not(:checked)").attr("checked",true).change()},collapse:function(a){if(a.hasClass("collapsed")||(a.hasClass("leaf"))){return}var b=this;a.children("ul").hide(this.options.collapseEffect,{},this.options.collapseDuration);setTimeout(function(){b._markAsCollapsed(a,b.options)},b.options.collapseDuration);b._trigger("collapse",a)},collapseAll:function(){var a=this;$(this.element).find("li.expanded").each(function(){a.collapse($(this))})},expand:function(a){if(a.hasClass("expanded")||(a.hasClass("leaf"))){return}var b=this;a.children("ul").show(b.options.expandEffect,{},b.options.expandDuration);setTimeout(function(){b._markAsExpanded(a,b.options)},b.options.expandDuration);b._trigger("expand",a)},expandAll:function(){var a=this;$(this.element).find("li.collapsed").each(function(){a.expand($(this))})},uncheck:function(a){a.find("input:checkbox:first:checked").attr("checked",false).change();if(this.options.onUncheck.others=="check"){this._checkOthers(a)}else{if(this.options.onUncheck.others=="uncheck"){this._uncheckOthers(a)}}if(this.options.onUncheck.descendants=="check"){this._checkDescendants(a)}else{if(this.options.onUncheck.descendants=="uncheck"){this._uncheckDescendants(a)}}if(this.options.onUncheck.ancestors=="check"){this._checkAncestors(a)}else{if(this.options.onUncheck.ancestors=="uncheck"){this._uncheckAncestors(a)}}},uncheckAll:function(){$(this.element).find("input:checkbox:checked").attr("checked",false).change()},options:{collapsable:true,collapseAllElement:"",collapseDuration:500,collapseEffect:"blind",collapseImage:"",collapseUiIcon:"ui-icon-triangle-1-e",expandAllElement:"",expandDuration:500,expandEffect:"blind",expandImage:"",expandUiIcon:"ui-icon-triangle-1-se",initializeChecked:"expanded",initializeUnchecked:"expanded",leafImage:"",leafUiIcon:"",onCheck:{ancestors:"",descendants:"",node:"",others:""},onUncheck:{ancestors:"",descendants:"",node:"",others:""}}});

ACC SHELL 2018