Skip to content

Commit

Permalink
Merge pull request #299 from seamuslee001/deprecated_jquery
Browse files Browse the repository at this point in the history
[REF] Remove some deprecated size function calls replaced with length
  • Loading branch information
seamuslee001 authored Jul 17, 2020
2 parents 297fd86 + 09e7df8 commit 7726a82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion jquery/plugins/jquery.tableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $(document).ready(function() {
if (html == ' ') {
html = ' ';
}
if ($(this).children().size() == 0) {
if ($(this).children().length == 0) {
html = '<span>'+ html +'</span>';
}

Expand Down
12 changes: 6 additions & 6 deletions jquery/plugins/jstree/jquery.jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@
obj = this._get_node(obj);
if(obj === -1) { return this.get_container().find("> ul > li:first-child"); }
if(!obj.length) { return false; }
if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; }
if(strict) { return (obj.nextAll("li").length > 0) ? obj.nextAll("li:eq(0)") : false; }

if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); }
else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); }
else if(obj.nextAll("li").length > 0) { return obj.nextAll("li:eq(0)"); }
else { return obj.parentsUntil(".jstree","li").next("li").eq(0); }
},
_get_prev : function (obj, strict) {
Expand Down Expand Up @@ -1976,7 +1976,7 @@
},
get_text : function (obj, lang) {
obj = this._get_node(obj) || this.data.ui.last_selected;
if(!obj.size()) { return false; }
if(!obj.length) { return false; }
var langs = this._get_settings().languages,
s = this._get_settings().core.html_titles;
if($.isArray(langs) && langs.length) {
Expand All @@ -1996,7 +1996,7 @@
},
set_text : function (obj, val, lang) {
obj = this._get_node(obj) || this.data.ui.last_selected;
if(!obj.size()) { return false; }
if(!obj.length) { return false; }
var langs = this._get_settings().languages,
s = this._get_settings().core.html_titles,
tmp;
Expand Down Expand Up @@ -3201,7 +3201,7 @@
_is_loaded : function (obj) {
var s = this._get_settings().xml_data;
obj = this._get_node(obj);
return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0;
},
load_node_xml : function (obj, s_call, e_call) {
var s = this.get_settings().xml_data,
Expand Down Expand Up @@ -4028,7 +4028,7 @@
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); },
_is_loaded : function (obj) {
obj = this._get_node(obj);
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;
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;
},
load_node_html : function (obj, s_call, e_call) {
var d,
Expand Down

0 comments on commit 7726a82

Please sign in to comment.