Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jstree

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jstree - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

2

bower.json
{
"name": "jstree",
"version": "3.2.0",
"version": "3.2.1",
"main" : [

@@ -5,0 +5,0 @@ "./dist/jstree.js",

@@ -5,3 +5,3 @@ {

"description": "jsTree is jquery plugin, that provides interactive trees.",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",

@@ -8,0 +8,0 @@ "keywords": [

@@ -5,3 +5,3 @@ {

"description": "Tree view for jQuery",
"version": "3.2.0",
"version": "3.2.1",
"homepage": "http://jstree.com",

@@ -8,0 +8,0 @@ "keywords": [

@@ -5,3 +5,3 @@ {

"description": "jQuery tree plugin",
"version": "3.2.0",
"version": "3.2.1",
"homepage": "http://jstree.com",

@@ -8,0 +8,0 @@ "main": "./dist/jstree.js",

@@ -293,3 +293,3 @@ /**

i, j, c, tmp, t = this.settings.checkbox.tie_selection;
while(p && p.id !== $.jstree.root) {
while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {
c = 0;

@@ -299,3 +299,3 @@ for(i = 0, j = p.children.length; i < j; i++) {

}
if(c === j) {
if(j > 0 && c === j) {
p.state[ t ? 'selected' : 'checked' ] = true;

@@ -323,3 +323,3 @@ this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);

p = this.get_node(old_par);
while(p && p.id !== $.jstree.root) {
while(p && p.id !== $.jstree.root && !p.state[ t ? 'selected' : 'checked' ]) {
c = 0;

@@ -329,3 +329,3 @@ for(i = 0, j = p.children.length; i < j; i++) {

}
if(c === j) {
if(j > 0 && c === j) {
p.state[ t ? 'selected' : 'checked' ] = true;

@@ -332,0 +332,0 @@ this._data[ t ? 'core' : 'checkbox' ].selected.push(p.id);

@@ -78,3 +78,3 @@ /**

"label" : "Rename",
/*
/*!
"shortcut" : 113,

@@ -211,3 +211,3 @@ "shortcut_label" : 'F2',

/*
/*!
if(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) {

@@ -214,0 +214,0 @@ var el = null, tm = null;

@@ -111,3 +111,3 @@ /**

p = $.vakata.array_remove_item($.vakata.array_unique(p), $.jstree.root);
this._data.search.hdn = this.hide_all();
this._data.search.hdn = this.hide_all(true);
this.show_node(p);

@@ -203,3 +203,7 @@ }

p = $.vakata.array_unique(p);
this._search_open(p);
for(i = 0, j = p.length; i < j; i++) {
if(p[i] !== $.jstree.root && m[p[i]] && this.open_node(p[i], null, 0) === true) {
this._data.search.opn.push(p[i]);
}
}
if(!append) {

@@ -257,22 +261,2 @@ this._data.search.dom = $(this.element[0].querySelectorAll('#' + $.map(r, function (v) { return "0123456789".indexOf(v[0]) !== -1 ? '\\3' + v[0] + ' ' + v.substr(1).replace($.jstree.idregex,'\\$&') : v.replace($.jstree.idregex,'\\$&'); }).join(', #')));

};
/**
* opens nodes that need to be opened to reveal the search results. Used only internally.
* @private
* @name _search_open(d)
* @param {Array} d an array of node IDs
* @plugin search
*/
this._search_open = function (d) {
var t = this;
$.each(d.concat([]), function (i, v) {
if(v === $.jstree.root) { return true; }
try { v = $('#' + v.replace($.jstree.idregex,'\\$&'), t.element); } catch(ignore) { }
if(v && v.length) {
if(t.is_closed(v)) {
t._data.search.opn.push(v[0].id);
t.open_node(v, function () { t._search_open(d); }, 0);
}
}
});
};

@@ -279,0 +263,0 @@ this.redraw_node = function(obj, deep, callback, force_render) {

@@ -349,1 +349,51 @@ /* global jQuery */

*/
// untested sample plugin to keep all nodes in the DOM
(function ($, undefined) {
"use strict";
$.jstree.plugins.dom = function (options, parent) {
this.redraw_node = function (node, deep, is_callback, force_render) {
return parent.redraw_node.call(this, node, deep, is_callback, true);
};
this.close_node = function (obj, animation) {
var t1, t2, t, d;
if($.isArray(obj)) {
obj = obj.slice();
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
this.close_node(obj[t1], animation);
}
return true;
}
obj = this.get_node(obj);
if(!obj || obj.id === $.jstree.root) {
return false;
}
if(this.is_closed(obj)) {
return false;
}
animation = animation === undefined ? this.settings.core.animation : animation;
t = this;
d = this.get_node(obj, true);
if(d.length) {
if(!animation) {
d[0].className = d[0].className.replace('jstree-open', 'jstree-closed');
d.attr("aria-expanded", false);
}
else {
d
.children(".jstree-children").attr("style","display:block !important").end()
.removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded", false)
.children(".jstree-children").stop(true, true).slideUp(animation, function () {
this.style.display = "";
t.trigger("after_close", { "node" : obj });
});
}
}
obj.state.opened = false;
this.trigger('close_node',{ "node" : obj });
if(!animation || !d.length) {
this.trigger("after_close", { "node" : obj });
}
};
};
})(jQuery);

@@ -1,2 +0,1 @@

return $.fn.jstree;
}));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc