content/plugins/wdtree/tree.js

(开头部分) 27KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
  * @description {Class} wdTree
  * This is the main class of wdTree.法法师法
  */
(function ($) {
    $.fn.swapClass = function (c1, c2) {
        return this.removeClass(c1).addClass(c2);
    };
    $.fn.switchClass = function (c1, c2) {
        if (this.hasClass(c1)) {
            return this.swapClass(c1, c2);
        }
        else {
            return this.swapClass(c2, c1);
        }
    };
    $.fn.treeview = function (settings) {
        var dfop =
            {
                method: "GET",
                datatype: "json",
                /**
                 * @description {Config} url  
                 * {String} Url for child nodes retrieving. 
                 */
                url: false,
                param: null,
                /**
                 * @description {Config} cbiconpath  
                 * {String} Checkbox image path.
                 */
                cbiconpath: "/content/plugins/wdtree/images/icons/",
                icons: ["checkbox_0.png", "checkbox_1.png", "checkbox_2.png"],
                /**
                 * @description {Config} showcheck  
                 * {Boolean} Whether to show check box or not. 
                 */
                showcheck: false,
                /**
	 	             * @description {Event} oncheckboxclick:function(tree, item, status)
	 	             * Fired when check box is clicked on.
	 	             * @param {Object} tree This tree object. 
	 	             * @param {Object} item Node item clicked on.
	 	             * @param {Number} status 1 for checked, 0 for unchecked.	 	             
	               */
                oncheckboxclick: false,
                /**
	 	             * @description {Event} onnodeclick:function(tree, item)
	 	             * Fired when a node is clicked on.
	 	             * @param {Object} tree This tree object. 
	 	             * @param {Object} item Ndde item clicked on.
	               */
                onnodeclick: false,
                /**
                 * @description {Config} cascadecheck  
                 * {Boolean} Whether node being seleted leads to parent/sub node being selected.  
                 */
                cascadecheck: true,
                /**
                 * @description {Config} data  
后面还有 616 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。