|
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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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('[type="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 () { |
|
0 commit comments