|
570 | 570 | obj = this._get_node(obj); |
571 | 571 | if(obj === -1) { return this.get_container().find("> ul > li:first-child"); } |
572 | 572 | if(!obj.length) { return false; } |
573 | | - if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; } |
| 573 | + if(strict) { return (obj.nextAll("li").length > 0) ? obj.nextAll("li:eq(0)") : false; } |
574 | 574 |
|
575 | 575 | if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); } |
576 | | - else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); } |
| 576 | + else if(obj.nextAll("li").length > 0) { return obj.nextAll("li:eq(0)"); } |
577 | 577 | else { return obj.parentsUntil(".jstree","li").next("li").eq(0); } |
578 | 578 | }, |
579 | 579 | _get_prev : function (obj, strict) { |
|
1961 | 1961 | }, |
1962 | 1962 | get_text : function (obj, lang) { |
1963 | 1963 | obj = this._get_node(obj) || this.data.ui.last_selected; |
1964 | | - if(!obj.size()) { return false; } |
| 1964 | + if(!obj.length) { return false; } |
1965 | 1965 | var langs = this._get_settings().languages, |
1966 | 1966 | s = this._get_settings().core.html_titles; |
1967 | 1967 | if($.isArray(langs) && langs.length) { |
|
1981 | 1981 | }, |
1982 | 1982 | set_text : function (obj, val, lang) { |
1983 | 1983 | obj = this._get_node(obj) || this.data.ui.last_selected; |
1984 | | - if(!obj.size()) { return false; } |
| 1984 | + if(!obj.length) { return false; } |
1985 | 1985 | var langs = this._get_settings().languages, |
1986 | 1986 | s = this._get_settings().core.html_titles, |
1987 | 1987 | tmp; |
|
2800 | 2800 | var $t = $(this), nm; |
2801 | 2801 | $t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c ); |
2802 | 2802 | if(rc) { |
2803 | | - if(!$t.children(":checkbox").length) { |
| 2803 | + if(!$t.children("[type=checkbox]").length) { |
2804 | 2804 | nm = rcn.call(_this, $t); |
2805 | 2805 | $t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='" + nm[0] + "' name='" + nm[0] + "' value='" + nm[1] + "' />"); |
2806 | 2806 | } |
2807 | 2807 | else { |
2808 | | - $t.children(":checkbox").addClass("jstree-real-checkbox"); |
| 2808 | + $t.children("[type=checkbox]").addClass("jstree-real-checkbox"); |
2809 | 2809 | } |
2810 | 2810 | } |
2811 | 2811 | if(!ts) { |
2812 | 2812 | if(c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) { |
2813 | | - $t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked", true); |
| 2813 | + $t.find("li").andSelf().addClass("jstree-checked").children("[type=checkbox]").prop("checked", true); |
2814 | 2814 | } |
2815 | 2815 | } |
2816 | 2816 | else { |
2817 | 2817 | if($t.hasClass("jstree-checked") || $t.children(':checked').length) { |
2818 | | - $t.addClass("jstree-checked").children(":checkbox").prop("checked", true); |
| 2818 | + $t.addClass("jstree-checked").children("[type=checkbox]").prop("checked", true); |
2819 | 2819 | } |
2820 | 2820 | } |
2821 | 2821 | }); |
|
2832 | 2832 | if(this._get_settings().checkbox.two_state) { |
2833 | 2833 | if(state) { |
2834 | 2834 | obj.removeClass("jstree-checked").addClass("jstree-unchecked"); |
2835 | | - if(rc) { obj.children(":checkbox").prop("checked", false); } |
| 2835 | + if(rc) { obj.children("[type=checkbox]").prop("checked", false); } |
2836 | 2836 | } |
2837 | 2837 | else { |
2838 | 2838 | obj.removeClass("jstree-unchecked").addClass("jstree-checked"); |
2839 | | - if(rc) { obj.children(":checkbox").prop("checked", true); } |
| 2839 | + if(rc) { obj.children("[type=checkbox]").prop("checked", true); } |
2840 | 2840 | } |
2841 | 2841 | } |
2842 | 2842 | else { |
2843 | 2843 | if(state) { |
2844 | 2844 | coll = obj.find("li").andSelf(); |
2845 | 2845 | if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; } |
2846 | 2846 | coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"); |
2847 | | - if(rc) { coll.children(":checkbox").prop("checked", false); } |
| 2847 | + if(rc) { coll.children("[type=checkbox]").prop("checked", false); } |
2848 | 2848 | } |
2849 | 2849 | else { |
2850 | 2850 | coll = obj.find("li").andSelf(); |
2851 | 2851 | if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; } |
2852 | 2852 | coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"); |
2853 | | - if(rc) { coll.children(":checkbox").prop("checked", true); } |
| 2853 | + if(rc) { coll.children("[type=checkbox]").prop("checked", true); } |
2854 | 2854 | if(this.data.ui) { this.data.ui.last_selected = obj; } |
2855 | 2855 | this.data.checkbox.last_selected = obj; |
2856 | 2856 | } |
|
2859 | 2859 | if(state) { |
2860 | 2860 | if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) { |
2861 | 2861 | $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); |
2862 | | - if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } |
| 2862 | + if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children("[type=checkbox]").prop("checked", false); } |
2863 | 2863 | return false; |
2864 | 2864 | } |
2865 | 2865 | else { |
2866 | 2866 | $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"); |
2867 | | - if(rc) { $this.children(":checkbox").prop("checked", false); } |
| 2867 | + if(rc) { $this.children("[type=checkbox]").prop("checked", false); } |
2868 | 2868 | } |
2869 | 2869 | } |
2870 | 2870 | else { |
2871 | 2871 | if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) { |
2872 | 2872 | $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); |
2873 | | - if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } |
| 2873 | + if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children("[type=checkbox]").prop("checked", false); } |
2874 | 2874 | return false; |
2875 | 2875 | } |
2876 | 2876 | else { |
2877 | 2877 | $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"); |
2878 | | - if(rc) { $this.children(":checkbox").prop("checked", true); } |
| 2878 | + if(rc) { $this.children("[type=checkbox]").prop("checked", true); } |
2879 | 2879 | } |
2880 | 2880 | } |
2881 | 2881 | }); |
|
2934 | 2934 | obj = this._get_node(obj); |
2935 | 2935 | if(!obj.length) { return; } |
2936 | 2936 | if(this._get_settings().checkbox.two_state) { |
2937 | | - obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked', true); |
| 2937 | + obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children("[type=checkbox]").prop('checked', true); |
2938 | 2938 | return; |
2939 | 2939 | } |
2940 | 2940 | var rc = this._get_settings().checkbox.real_checkboxes, |
|
2946 | 2946 | else if(a === c) { this.change_state(obj, false); } |
2947 | 2947 | else { |
2948 | 2948 | obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"); |
2949 | | - if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); } |
| 2949 | + if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children("[type=checkbox]").prop("checked", false); } |
2950 | 2950 | } |
2951 | 2951 | }, |
2952 | 2952 | reselect : function () { |
|
3186 | 3186 | _is_loaded : function (obj) { |
3187 | 3187 | var s = this._get_settings().xml_data; |
3188 | 3188 | obj = this._get_node(obj); |
3189 | | - return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0; |
| 3189 | + return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0; |
3190 | 3190 | }, |
3191 | 3191 | load_node_xml : function (obj, s_call, e_call) { |
3192 | 3192 | var s = this.get_settings().xml_data, |
|
4013 | 4013 | load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); }, |
4014 | 4014 | _is_loaded : function (obj) { |
4015 | 4015 | obj = this._get_node(obj); |
4016 | | - return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0; |
| 4016 | + return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0; |
4017 | 4017 | }, |
4018 | 4018 | load_node_html : function (obj, s_call, e_call) { |
4019 | 4019 | var d, |
|
0 commit comments