Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
vakata committed Sep 3, 2024
1 parent 7ec154d commit 38460e1
Show file tree
Hide file tree
Showing 5 changed files with 369 additions and 1,039 deletions.
100 changes: 51 additions & 49 deletions dist/jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -4582,58 +4582,60 @@
"lineHeight" : (this._data.core.li_height) + "px",
"width" : "150px" // will be set a bit further down
},
"blur" : function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var i = s.children(".jstree-rename-input"),
v = i.val(),
f = this.settings.core.force_text,
nv;
if(v === "") { v = t; }
h1.remove();
s.replaceWith(a);
s.remove();
t = f ? t : $('<div></div>').append($.parseHTML(t)).html();
obj = this.get_node(obj);
this.set_text(obj, t);
nv = !!this.rename_node(obj, f ? $('<div></div>').text(v).text() : $('<div></div>').append($.parseHTML(v)).html());
if(!nv) {
this.set_text(obj, t); // move this up? and fix #483
}
this._data.core.focused = tmp.id;
setTimeout(function () {
var node = this.get_node(tmp.id, true);
if(node.length) {
this._data.core.focused = tmp.id;
node.children('.jstree-anchor').trigger('focus');
}
}.bind(this), 0);
if(callback) {
callback.call(this, tmp, nv, cancel, v);
}
h2 = null;
}.bind(this),
"keydown" : function (e) {
var key = e.which;
if(key === 27) {
cancel = true;
this.value = t;
}
if(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) {
"on" : {
"blur" : function (e) {
e.stopImmediatePropagation();
}
if(key === 27 || key === 13) {
e.preventDefault();
this.blur();
var i = s.children(".jstree-rename-input"),
v = i.val(),
f = this.settings.core.force_text,
nv;
if(v === "") { v = t; }
h1.remove();
s.replaceWith(a);
s.remove();
t = f ? t : $('<div></div>').append($.parseHTML(t)).html();
obj = this.get_node(obj);
this.set_text(obj, t);
nv = !!this.rename_node(obj, f ? $('<div></div>').text(v).text() : $('<div></div>').append($.parseHTML(v)).html());
if(!nv) {
this.set_text(obj, t); // move this up? and fix #483
}
this._data.core.focused = tmp.id;
setTimeout(function () {
var node = this.get_node(tmp.id, true);
if(node.length) {
this._data.core.focused = tmp.id;
node.children('.jstree-anchor').trigger('focus');
}
}.bind(this), 0);
if(callback) {
callback.call(this, tmp, nv, cancel, v);
}
h2 = null;
}.bind(this),
"keydown" : function (e) {
var key = e.which;
if(key === 27) {
cancel = true;
this.value = t;
}
if(key === 27 || key === 13 || key === 37 || key === 38 || key === 39 || key === 40 || key === 32) {
e.stopImmediatePropagation();
}
if(key === 27 || key === 13) {
e.preventDefault();
this.blur();
}
},
"click" : function (e) { e.stopImmediatePropagation(); },
"mousedown" : function (e) { e.stopImmediatePropagation(); },
"keyup" : function (e) {
h2.width(Math.min(h1.text("pW" + this.value).width(),w));
},
"keypress" : function(e) {
if(e.which === 13) { return false; }
}
},
"click" : function (e) { e.stopImmediatePropagation(); },
"mousedown" : function (e) { e.stopImmediatePropagation(); },
"keyup" : function (e) {
h2.width(Math.min(h1.text("pW" + this.value).width(),w));
},
"keypress" : function(e) {
if(e.which === 13) { return false; }
}
});
fn = {
Expand Down
4 changes: 2 additions & 2 deletions dist/jstree.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ module.exports = function(grunt) {
dest: 'dist/<%= pkg.name %>.min.js'
}
},
qunit: {
files: ['test/unit/**/*.html']
},
jshint: {
options: {
'curly' : true,
Expand Down Expand Up @@ -170,7 +167,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-text-replace');
Expand Down
Loading

0 comments on commit 38460e1

Please sign in to comment.