Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Remove some deprecated size function calls replaced with length #299

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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