From a82f59a8fad23a63a6fa0288b466dfcaf7cdd5b4 Mon Sep 17 00:00:00 2001 From: "Martin@MBP" Date: Thu, 11 Aug 2016 15:51:38 +0200 Subject: [PATCH] Bumping version to 2.19.0 --- bower.json | 2 +- dist/jquery.fancytree-all.js | 163 +++++++++++++-------- dist/jquery.fancytree-all.min.js | 28 ++-- dist/jquery.fancytree.js | 74 +++++++--- dist/jquery.fancytree.min.js | 8 +- dist/skin-awesome/ui.fancytree.css | 17 ++- dist/skin-awesome/ui.fancytree.less | 1 - dist/skin-awesome/ui.fancytree.min.css | 2 +- dist/skin-awesome/vline.gif | Bin 0 -> 844 bytes dist/skin-bootstrap-n/ui.fancytree.css | 17 ++- dist/skin-bootstrap-n/ui.fancytree.less | 1 - dist/skin-bootstrap-n/ui.fancytree.min.css | 2 +- dist/skin-bootstrap-n/vline.gif | Bin 0 -> 844 bytes dist/skin-bootstrap/ui.fancytree.css | 17 ++- dist/skin-bootstrap/ui.fancytree.less | 1 - dist/skin-bootstrap/ui.fancytree.min.css | 2 +- dist/skin-bootstrap/vline.gif | Bin 0 -> 844 bytes dist/skin-common.less | 48 ++++-- dist/skin-lion/ui.fancytree.css | 26 +++- dist/skin-lion/ui.fancytree.less | 1 - dist/skin-lion/ui.fancytree.min.css | 2 +- dist/skin-lion/vline.gif | Bin 0 -> 844 bytes dist/skin-themeroller/vline.gif | Bin 0 -> 844 bytes dist/skin-vista/ui.fancytree.css | 26 +++- dist/skin-vista/ui.fancytree.less | 1 - dist/skin-vista/ui.fancytree.min.css | 2 +- dist/skin-vista/vline.gif | Bin 0 -> 844 bytes dist/skin-win7/ui.fancytree.css | 26 +++- dist/skin-win7/ui.fancytree.less | 1 - dist/skin-win7/ui.fancytree.min.css | 2 +- dist/skin-win7/vline.gif | Bin 0 -> 844 bytes dist/skin-win8-n/ui.fancytree.css | 26 +++- dist/skin-win8-n/ui.fancytree.less | 1 - dist/skin-win8-n/ui.fancytree.min.css | 2 +- dist/skin-win8-n/vline.gif | Bin 0 -> 844 bytes dist/skin-win8-xxl/ui.fancytree.css | 26 +++- dist/skin-win8-xxl/ui.fancytree.less | 1 - dist/skin-win8-xxl/ui.fancytree.min.css | 2 +- dist/skin-win8-xxl/vline.gif | Bin 0 -> 844 bytes dist/skin-win8/icons.gif | Bin 5492 -> 5521 bytes dist/skin-win8/ui.fancytree.css | 26 +++- dist/skin-win8/ui.fancytree.less | 2 - dist/skin-win8/ui.fancytree.min.css | 2 +- dist/skin-win8/vline.gif | Bin 0 -> 852 bytes dist/skin-xp/ui.fancytree.css | 41 ++++-- dist/skin-xp/ui.fancytree.less | 20 ++- dist/skin-xp/ui.fancytree.min.css | 2 +- dist/src/jquery.fancytree.childcounter.js | 6 +- dist/src/jquery.fancytree.clones.js | 6 +- dist/src/jquery.fancytree.columnview.js | 6 +- dist/src/jquery.fancytree.debug.js | 8 +- dist/src/jquery.fancytree.dnd.js | 6 +- dist/src/jquery.fancytree.edit.js | 13 +- dist/src/jquery.fancytree.filter.js | 6 +- dist/src/jquery.fancytree.glyph.js | 18 ++- dist/src/jquery.fancytree.gridnav.js | 6 +- dist/src/jquery.fancytree.js | 74 +++++++--- dist/src/jquery.fancytree.menu.js | 4 +- dist/src/jquery.fancytree.persist.js | 6 +- dist/src/jquery.fancytree.table.js | 10 +- dist/src/jquery.fancytree.themeroller.js | 6 +- dist/src/jquery.fancytree.wide.js | 6 +- package.json | 2 +- src/jquery.fancytree.glyph.js | 4 +- 64 files changed, 535 insertions(+), 273 deletions(-) create mode 100644 dist/skin-awesome/vline.gif create mode 100644 dist/skin-bootstrap-n/vline.gif create mode 100644 dist/skin-bootstrap/vline.gif create mode 100644 dist/skin-lion/vline.gif create mode 100644 dist/skin-themeroller/vline.gif create mode 100644 dist/skin-vista/vline.gif create mode 100644 dist/skin-win7/vline.gif create mode 100644 dist/skin-win8-n/vline.gif create mode 100644 dist/skin-win8-xxl/vline.gif create mode 100644 dist/skin-win8/vline.gif diff --git a/bower.json b/bower.json index f6cd6f9c..54ef8449 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "jquery.fancytree", "description": "Fancytree is a JavaScript tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop, and lazy loading.", - "version": "2.18.1-0", + "version": "2.19.0", "main": [ "dist/jquery.fancytree-all.js" ], diff --git a/dist/jquery.fancytree-all.js b/dist/jquery.fancytree-all.js index f0128c3e..a21c0c68 100644 --- a/dist/jquery.fancytree-all.js +++ b/dist/jquery.fancytree-all.js @@ -7,8 +7,8 @@ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ /** Core Fancytree module. @@ -626,9 +626,6 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{ var fn = includeSelf ? "nodeRemoveMarkup" : "nodeRemoveChildMarkup"; this.tree._callHook(fn, this); }, - - // TODO: expand(flag) - /**Find all nodes that match condition (excluding self). * * @param {string | function(node)} match title string to search for, or a @@ -1144,13 +1141,14 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{ return this.load(discard); }, /** - * Load all children of a lazy node if neccessary. The *expanded* state is maintained. - * @param {boolean} [forceReload=false] Pass true to discard any existing nodes before. + * Load all children of a lazy node if neccessary. The expanded state is maintained. + * @param {boolean} [forceReload=false] Pass true to discard any existing nodes before. Otherwise this method does nothing if the node was already loaded. * @returns {$.Promise} */ load: function(forceReload) { var res, source, - that = this; + that = this, + wasExpanded = this.isExpanded(); _assert( this.isLazy(), "load() requires a lazy node" ); // _assert( forceReload || this.isUndefined(), "Pass forceReload=true to re-load a lazy node" ); @@ -1168,10 +1166,15 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{ } _assert(typeof source !== "boolean", "lazyLoad event must return source in data.result"); res = this.tree._callHook("nodeLoadChildren", this, source); - if( this.expanded ) { + if( wasExpanded ) { + this.expanded = true; res.always(function(){ that.render(); }); + } else { + res.always(function(){ + that.renderStatus(); // fix expander icon to 'loaded' + }); } return res; }, @@ -1386,7 +1389,8 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{ // Navigate to node function _goto(n){ if( n ){ - try { n.makeVisible(); } catch(e) {} // #272 + // setFocus/setActive will scroll later (if autoScroll is specified) + try { n.makeVisible({scrollIntoView: false}); } catch(e) {} // #272 // Node may still be hidden by a filter if( ! $(n.span).is(":visible") ) { n.debug("Navigate: skipping hidden node"); @@ -2034,6 +2038,8 @@ function Fancytree(widget) { this.activeNode = null; this.focusNode = null; this._hasFocus = null; + this._enableUpdate = true; + // this._dirtyRoots = null; this.lastSelectedNode = null; this.systemFocusElement = null; this.lastQuicksearchTerm = ""; @@ -2248,8 +2254,29 @@ Fancytree.prototype = /** @lends Fancytree# */{ }, // TODO: disable() // TODO: enable() - // TODO: enableUpdate() - + /** Temporarily suppress rendering to improve performance on bulk-updates. + * + * @param {boolean} flag + * @returns {boolean} previous status + * @since 2.19 + */ + enableUpdate: function(flag) { + flag = ( flag !== false ); + /* jshint -W018 */ // Confusing use of '!' + if ( !!this._enableUpdate === !!flag ) { + return flag; + } + /* jshint +W018 */ + this._enableUpdate = flag; + if ( flag ) { + this.debug("enableUpdate(true): redraw ", this._dirtyRoots); + this.render(); + } else { + // this._dirtyRoots = null; + this.debug("enableUpdate(false)..."); + } + return !flag; // return previous value + }, /**Find all nodes that matches condition. * * @param {string | function(node)} match title string to search for, or a @@ -3214,6 +3241,10 @@ $.extend(Fancytree.prototype, successorLi = null; // FT.debug("nodeRender(" + !!force + ", " + !!deep + ")", node.toString()); + if( tree._enableUpdate === false ) { + // tree.debug("no render", tree._enableUpdate); + return; + } if( ! isRootNode && ! parent.ul ) { // Calling node.collapse on a deep, unrendered node return; @@ -3365,7 +3396,7 @@ $.extend(Fancytree.prototype, if(title !== undefined){ node.title = title; } - if(!node.span){ + if ( !node.span || tree._enableUpdate === false ) { // Silently bail out if node was not rendered yet, assuming // node.render() will be called as the node becomes visible return; @@ -3488,7 +3519,7 @@ $.extend(Fancytree.prototype, cnList = [], statusElem = node[tree.statusClassPropName]; - if( !statusElem ){ + if( !statusElem || tree._enableUpdate === false ){ // if this function is called for an unrendered node, ignore it (will be updated on nect render anyway) return; } @@ -3819,10 +3850,13 @@ $.extend(Fancytree.prototype, // ctx.node.debug("nodeSetFocus(" + flag + ")"); var ctx2, tree = ctx.tree, - node = ctx.node; + node = ctx.node, + // et = ctx.originalEvent && ctx.originalEvent.type, + isInput = ctx.originalEvent ? $(ctx.originalEvent.target).is(":input") : false; flag = (flag !== false); + // (node || tree).debug("nodeSetFocus(" + flag + "), event: " + et + ", isInput: "+ isInput); // Blur previous node if any if(tree.focusNode){ if(tree.focusNode === node && flag){ @@ -3843,7 +3877,9 @@ $.extend(Fancytree.prototype, node.makeVisible({scrollIntoView: false}); tree.focusNode = node; if( tree.options.titlesTabbable ) { - $(node.span).find(".fancytree-title").focus(); + if( !isInput ) { // #621 + $(node.span).find(".fancytree-title").focus(); + } } else { // We cannot set KB focus to a node, so use the tree container // #563, #570: IE scrolls on every call to .focus(), if the container @@ -4310,6 +4346,7 @@ $.widget("ui.fancytree", case "source": callDefault = false; this.tree._callHook("treeLoad", this.tree, value); + rerender = true; break; } this.tree.debug("set option " + key + "=" + value + " <" + typeof(value) + ">"); @@ -4364,7 +4401,8 @@ $.widget("ui.fancytree", // tree.treeOnFocusInOut.call(tree, event); if(node){ // For example clicking into an that is part of a node - tree._callHook("nodeSetFocus", node, flag); + tree._callHook("nodeSetFocus", tree._makeHookContext(node, event), flag); + // tree._callHook("nodeSetFocus", node, flag); }else{ tree._callHook("treeSetFocus", tree, flag); } @@ -4484,7 +4522,7 @@ $.extend($.ui.fancytree, /** @lends Fancytree_Static# */ { /** @type {string} */ - version: "2.18.0", // Set to semver by 'grunt release' + version: "2.19.0", // Set to semver by 'grunt release' /** @type {string} */ buildType: "production", // Set to 'production' by 'grunt build' /** @type {int} */ @@ -4865,8 +4903,8 @@ $.extend($.ui.fancytree, * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ // To keep the global namespace clean, we wrap everything in a closure @@ -4968,7 +5006,7 @@ $.ui.fancytree.registerExtension({ // Every extension must be registered by a unique name. name: "childcounter", // Version information should be compliant with [semver](http://semver.org) - version: "1.0.0", + version: "2.19.0", // Extension specific options and their defaults. // This options will be available as `tree.options.childcounter.hideExpanded` @@ -5064,8 +5102,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -5397,7 +5435,7 @@ $.ui.fancytree._FancytreeClass.prototype.changeRefKey = function(oldRefKey, newR */ $.ui.fancytree.registerExtension({ name: "clones", - version: "0.0.3", + version: "2.19.0", // Default options for this extension. options: { highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers @@ -5530,8 +5568,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -5768,7 +5806,7 @@ function _initDragAndDrop(tree) { $.ui.fancytree.registerExtension({ name: "dnd", - version: "0.3.0", + version: "2.19.0", // Default options for this extension. options: { // Make tree nodes accept draggables @@ -6099,8 +6137,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -6211,14 +6249,13 @@ $.ui.fancytree._FancytreeNodeClass.prototype.editEnd = function(applyChanges, _e $title = $(".fancytree-title", node.span), $input = $title.find("input.fancytree-edit-input"); - // eventData.isNew = $(node[tree.statusClassPropName]).hasClass("fancytree-edit-new"); - if( instOpts.trim ) { $input.val($.trim($input.val())); } newVal = $input.val(); - // eventData.dirty = $input.hasClass("fancytree-edit-dirty") || ; + eventData.dirty = ( newVal !== node.title ); + eventData.originalEvent = _event; // Find out, if saving is required if( applyChanges === false ) { @@ -6337,13 +6374,13 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isEditing = function(){ */ $.ui.fancytree.registerExtension({ name: "edit", - version: "0.2.0", + version: "2.19.0", // Default options for this extension. options: { adjustWidthOfs: 4, // null: don't adjust input size to content allowEmpty: false, // Prevent empty input inputCss: {minWidth: "3em"}, - triggerCancel: ["esc", "tab", "click"], + // triggerCancel: ["esc", "tab", "click"], // triggerStart: ["f2", "dblclick", "shift+click", "mac+enter"], triggerStart: ["f2", "shift+click", "mac+enter"], trim: true, // Trim whitespace before save @@ -6409,8 +6446,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -6671,7 +6708,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isMatched = function(){ */ $.ui.fancytree.registerExtension({ name: "filter", - version: "0.7.0", + version: "2.19.0", // Default options for this extension. options: { autoApply: true, // Re-apply last filter if lazy data is loaded @@ -6756,8 +6793,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -6774,7 +6811,7 @@ function _getIcon(opts, type){ $.ui.fancytree.registerExtension({ name: "glyph", - version: "0.4.0", + version: "2.19.0", // Default options for this extension. options: { map: { @@ -6826,7 +6863,7 @@ $.ui.fancytree.registerExtension({ if( span ){ // if( node.isLoading() ){ // icon = "loading"; - if( node.expanded ){ + if( node.expanded && node.hasChildren() ){ icon = "expanderOpen"; }else if( node.isUndefined() ){ icon = "expanderLazy"; @@ -6855,7 +6892,7 @@ $.ui.fancytree.registerExtension({ if( node.statusNodeType ){ icon = _getIcon(opts, node.statusNodeType); // loading, error }else if( node.folder ){ - icon = node.expanded ? _getIcon(opts, "folderOpen") : _getIcon(opts, "folder"); + icon = node.expanded && node.hasChildren() ? _getIcon(opts, "folderOpen") : _getIcon(opts, "folder"); }else{ icon = node.expanded ? _getIcon(opts, "docOpen") : _getIcon(opts, "doc"); } @@ -6873,11 +6910,15 @@ $.ui.fancytree.registerExtension({ if( status === "error" || status === "loading" || status === "nodata" ){ if(node.parent){ span = $("span.fancytree-expander", node.span).get(0); - span.className = "fancytree-expander " + _getIcon(opts, status); + if( span ) { + span.className = "fancytree-expander " + _getIcon(opts, status); + } }else{ // span = $(".fancytree-statusnode-" + status, node[this.nodeContainerAttrName]) .find("span.fancytree-icon").get(0); - span.className = "fancytree-icon " + _getIcon(opts, status); + if( span ) { + span.className = "fancytree-icon " + _getIcon(opts, status); + } } } return res; @@ -6896,8 +6937,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -7002,7 +7043,7 @@ function findNeighbourTd($target, keyCode){ */ $.ui.fancytree.registerExtension({ name: "gridnav", - version: "0.0.1", + version: "2.19.0", // Default options for this extension. options: { autofocusInput: false, // Focus first embedded input if node gets activated @@ -7098,8 +7139,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -7238,7 +7279,7 @@ $.ui.fancytree._FancytreeClass.prototype.getPersistData = function(){ */ $.ui.fancytree.registerExtension({ name: "persist", - version: "0.3.0", + version: "2.19.0", // Default options for this extension. options: { cookieDelimiter: "~", @@ -7484,8 +7525,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -7559,7 +7600,7 @@ function findPrevRowNode(node){ $.ui.fancytree.registerExtension({ name: "table", - version: "0.3.0", + version: "2.19.0", // Default options for this extension. options: { checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx) @@ -7689,6 +7730,10 @@ $.ui.fancytree.registerExtension({ opts = ctx.options, isRootNode = !node.parent; + if( tree._enableUpdate === false ) { + // $.ui.fancytree.debug("*** nodeRender _enableUpdate: false"); + return; + } if( !_recursive ){ ctx.hasCollapsedParents = node.parent && !node.parent.expanded; } @@ -7922,8 +7967,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -7935,7 +7980,7 @@ $.ui.fancytree.registerExtension({ */ $.ui.fancytree.registerExtension({ name: "themeroller", - version: "0.0.1", + version: "2.19.0", // Default options for this extension. options: { activeClass: "ui-state-active", @@ -7998,8 +8043,8 @@ $.ui.fancytree.registerExtension({ * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * - * @version 2.18.0 - * @date 2016-05-02T19:34 + * @version 2.19.0 + * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { @@ -8097,7 +8142,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, measureUnit) { */ $.ui.fancytree.registerExtension({ name: "wide", - version: "0.0.3", + version: "2.19.0", // Default options for this extension. options: { iconWidth: null, // Adjust this if @fancy-icon-width != "16px" diff --git a/dist/jquery.fancytree-all.min.js b/dist/jquery.fancytree-all.min.js index 161ff877..4a472f2b 100644 --- a/dist/jquery.fancytree-all.min.js +++ b/dist/jquery.fancytree-all.min.js @@ -1,4 +1,4 @@ -/*! jQuery Fancytree Plugin - 2.18.0 - 2016-05-02T19:34 +/*! jQuery Fancytree Plugin - 2.19.0 - 2016-08-11T15:51 * https://github.com/mar10/fancytree * Copyright (c) 2016 Martin Wendt; Licensed MIT */ (function( factory ) { @@ -9,39 +9,39 @@ } }(function( $ ) { -!function(a,b,c,d){"use strict";function e(b,c){b||(c=c?": "+c:"",a.error("Fancytree assertion failed"+c))}function f(a,c){var d,e,f=b.console?b.console[a]:null;if(f)try{f.apply(b.console,c)}catch(g){for(e="",d=0;dh;return!0}function i(a,b,c,d,e){var f=function(){var c=b[a],f=d[a],g=b.ext[e],h=function(){return c.apply(b,arguments)},i=function(a){return c.apply(b,a)};return function(){var a=b._local,c=b._super,d=b._superApply;try{return b._local=g,b._super=h,b._superApply=i,f.apply(b,arguments)}finally{b._local=a,b._super=c,b._superApply=d}}}();return f}function j(b,c,d,e){for(var f in d)"function"==typeof d[f]?"function"==typeof b[f]?b[f]=i(f,b,c,d,e):"_"===f.charAt(0)?b.ext[e][f]=i(f,b,c,d,e):a.error("Could not override tree."+f+". Use prefix '_' to create tree."+e+"._"+f):"options"!==f&&(b.ext[e][f]=d[f])}function k(b,c){return b===d?a.Deferred(function(){this.resolve()}).promise():a.Deferred(function(){this.resolveWith(b,c)}).promise()}function l(b,c){return b===d?a.Deferred(function(){this.reject()}).promise():a.Deferred(function(){this.rejectWith(b,c)}).promise()}function m(a,b){return function(){a.resolveWith(b)}}function n(b){var c=a.extend({},b.data()),d=c.json;return delete c.fancytree,delete c.uiFancytree,d&&(delete c.json,c=a.extend(c,d)),c}function o(a){return(""+a).replace(x,function(a){return z[a]})}function p(a){return a=a.toLowerCase(),function(b){return b.title.toLowerCase().indexOf(a)>=0}}function q(a){var b=new RegExp("^"+a,"i");return function(a){return b.test(a.title)}}function r(b,c){var d,f,g,h;for(this.parent=b,this.tree=b.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},d=0,f=F.length;f>d;d++)g=F[d],this[g]=c[g];c.data&&a.extend(this.data,c.data);for(g in c)G[g]||a.isFunction(c[g])||I[g]||(this.data[g]=c[g]);null==this.key?this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),e(this.key,"defaultKey() must return a unique key")):this.key="_"+v._nextNodeKey++:this.key=""+this.key,c.active&&(e(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),c.selected&&(this.tree.lastSelectedNode=this),h=c.children,h?h.length?this._setChildren(h):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function s(b){this.widget=b,this.$div=b.element,this.options=b.options,this.options&&(a.isFunction(this.options.lazyload)&&!a.isFunction(this.options.lazyLoad)&&(this.options.lazyLoad=function(){return v.warn("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),b.options.lazyload.apply(this,arguments)}),a.isFunction(this.options.loaderror)&&a.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),this.options.fx!==d&&v.warn("The 'fx' options was replaced by 'toggleEffect' since 2014-11-30.")),this.ext={},this.data=n(this.$div),this._id=a.ui.fancytree._nextId++,this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var c,e={tree:this};this.rootNode=new r(e,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,c=a("