mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-28 16:56:34 +01:00 
			
		
		
		
	revert fancytree upgrade which caused some issues (tree duplication)
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| /*! jQuery Fancytree Plugin - 2.35.0 - 2020-03-27T22:41:58Z | /*! jQuery Fancytree Plugin - 2.34.0 - 2019-12-26T14:16:19Z | ||||||
|   * https://github.com/mar10/fancytree |   * https://github.com/mar10/fancytree | ||||||
|   * Copyright (c) 2020 Martin Wendt; Licensed MIT |   * Copyright (c) 2019 Martin Wendt; Licensed MIT | ||||||
|  */ |  */ | ||||||
| /*! jQuery UI - v1.12.1 - 2018-05-20 | /*! jQuery UI - v1.12.1 - 2018-05-20 | ||||||
| * http://jqueryui.com | * http://jqueryui.com | ||||||
| @@ -1361,12 +1361,12 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Tree view control with support for lazy loading and much more. |  * Tree view control with support for lazy loading and much more. | ||||||
|  * https://github.com/mar10/fancytree/ |  * https://github.com/mar10/fancytree/ | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /** Core Fancytree module. | /** Core Fancytree module. | ||||||
| @@ -1405,7 +1405,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		REX_HTML = /[&<>"'/]/g, // Escape those characters | 		REX_HTML = /[&<>"'/]/g, // Escape those characters | ||||||
| 		REX_TOOLTIP = /[<>"'/]/g, // Don't escape `&` in tooltips | 		REX_TOOLTIP = /[<>"'/]/g, // Don't escape `&` in tooltips | ||||||
| 		RECURSIVE_REQUEST_ERROR = "$recursive_request", | 		RECURSIVE_REQUEST_ERROR = "$recursive_request", | ||||||
| 		INVALID_REQUEST_TARGET_ERROR = "$request_target_invalid", | 		// CLIPBOARD = null, | ||||||
| 		ENTITY_MAP = { | 		ENTITY_MAP = { | ||||||
| 			"&": "&", | 			"&": "&", | ||||||
| 			"<": "<", | 			"<": "<", | ||||||
| @@ -2206,7 +2206,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		 * | 		 * | ||||||
| 		 * @param {FancytreeNode} node source node | 		 * @param {FancytreeNode} node source node | ||||||
| 		 * @param {string} [mode=child] 'before' | 'after' | 'child' | 		 * @param {string} [mode=child] 'before' | 'after' | 'child' | ||||||
| 		 * @param {Function} [map] callback function(NodeData, FancytreeNode) that could modify the new node | 		 * @param {Function} [map] callback function(NodeData) that could modify the new node | ||||||
| 		 * @returns {FancytreeNode} new | 		 * @returns {FancytreeNode} new | ||||||
| 		 */ | 		 */ | ||||||
| 		copyTo: function(node, mode, map) { | 		copyTo: function(node, mode, map) { | ||||||
| @@ -2970,9 +2970,10 @@ var uniqueId = $.fn.extend( { | |||||||
| 		 * @deprecated since 2014-02-16: use load() instead. | 		 * @deprecated since 2014-02-16: use load() instead. | ||||||
| 		 */ | 		 */ | ||||||
| 		lazyLoad: function(discard) { | 		lazyLoad: function(discard) { | ||||||
| 			$.error( | 			this.warn( | ||||||
| 				"FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead." | 				"FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead." | ||||||
| 			); | 			); | ||||||
|  | 			return this.load(discard); | ||||||
| 		}, | 		}, | ||||||
| 		/** | 		/** | ||||||
| 		 * Load all children of a lazy node if neccessary. The <i>expanded</i> state is maintained. | 		 * Load all children of a lazy node if neccessary. The <i>expanded</i> state is maintained. | ||||||
| @@ -3495,9 +3496,9 @@ var uniqueId = $.fn.extend( { | |||||||
|  |  | ||||||
| 			// this.debug("scrollIntoView(), scrollTop=" + scrollTop, opts.scrollOfs); | 			// this.debug("scrollIntoView(), scrollTop=" + scrollTop, opts.scrollOfs); | ||||||
| 			// _assert($(this.span).is(":visible"), "scrollIntoView node is invisible"); // otherwise we cannot calc offsets | 			// _assert($(this.span).is(":visible"), "scrollIntoView node is invisible"); // otherwise we cannot calc offsets | ||||||
| 			if (this.isRootNode() || !this.isVisible()) { | 			if (!this.isVisible()) { | ||||||
| 				// We cannot calc offsets for hidden elements | 				// We cannot calc offsets for hidden elements | ||||||
| 				this.info("scrollIntoView(): node is invisible."); | 				this.warn("scrollIntoView(): node is invisible."); | ||||||
| 				return _getResolvedPromise(); | 				return _getResolvedPromise(); | ||||||
| 			} | 			} | ||||||
| 			if (isParentWindow) { | 			if (isParentWindow) { | ||||||
| @@ -3609,7 +3610,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 			return this.tree._callHook("nodeSetSelected", this, flag, opts); | 			return this.tree._callHook("nodeSetSelected", this, flag, opts); | ||||||
| 		}, | 		}, | ||||||
| 		/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'. | 		/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'. | ||||||
| 		 * @param {string} status 'error'|'loading'|'nodata'|'ok' | 		 * @param {string} status 'error'|'empty'|'ok' | ||||||
| 		 * @param {string} [message] | 		 * @param {string} [message] | ||||||
| 		 * @param {string} [details] | 		 * @param {string} [details] | ||||||
| 		 */ | 		 */ | ||||||
| @@ -3670,7 +3671,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		 * | 		 * | ||||||
| 		 * @param {boolean} [recursive=false] include child nodes | 		 * @param {boolean} [recursive=false] include child nodes | ||||||
| 		 * @param {function} [callback] callback(dict, node) is called for every node, in order to allow modifications. | 		 * @param {function} [callback] callback(dict, node) is called for every node, in order to allow modifications. | ||||||
| 		 *     Return `false` to ignore this node or `"skip"` to include this node without its children. | 		 *     Return `false` to ignore this node or "skip" to include this node without its children. | ||||||
| 		 * @returns {NodeData} | 		 * @returns {NodeData} | ||||||
| 		 */ | 		 */ | ||||||
| 		toDict: function(recursive, callback) { | 		toDict: function(recursive, callback) { | ||||||
| @@ -3702,7 +3703,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			if (recursive) { | 			if (recursive) { | ||||||
| 				if ($.isArray(this.children)) { | 				if (this.hasChildren()) { | ||||||
| 					dict.children = []; | 					dict.children = []; | ||||||
| 					for (i = 0, l = this.children.length; i < l; i++) { | 					for (i = 0, l = this.children.length; i < l; i++) { | ||||||
| 						node = this.children[i]; | 						node = this.children[i]; | ||||||
| @@ -4327,8 +4328,8 @@ var uniqueId = $.fn.extend( { | |||||||
| 				// case "copy": | 				// case "copy": | ||||||
| 				// 	clipboard = { | 				// 	clipboard = { | ||||||
| 				// 		mode: cmd, | 				// 		mode: cmd, | ||||||
| 				// 		data: node.toDict(function(d, n) { | 				// 		data: node.toDict(function(n) { | ||||||
| 				// 			delete d.key; | 				// 			delete n.key; | ||||||
| 				// 		}), | 				// 		}), | ||||||
| 				// 	}; | 				// 	}; | ||||||
| 				// 	break; | 				// 	break; | ||||||
| @@ -5612,16 +5613,12 @@ var uniqueId = $.fn.extend( { | |||||||
| 			nodeLoadChildren: function(ctx, source) { | 			nodeLoadChildren: function(ctx, source) { | ||||||
| 				var ajax, | 				var ajax, | ||||||
| 					delay, | 					delay, | ||||||
| 					ajaxDfd = null, | 					dfd, | ||||||
| 					resultDfd, | 					res, | ||||||
| 					isAsync = true, |  | ||||||
| 					tree = ctx.tree, | 					tree = ctx.tree, | ||||||
| 					node = ctx.node, | 					node = ctx.node, | ||||||
| 					nodePrevParent = node.parent, |  | ||||||
| 					tag = "nodeLoadChildren", |  | ||||||
| 					requestId = Date.now(); | 					requestId = Date.now(); | ||||||
|  |  | ||||||
| 				// `source` is a callback: use the returned result instead: |  | ||||||
| 				if ($.isFunction(source)) { | 				if ($.isFunction(source)) { | ||||||
| 					source = source.call(tree, { type: "source" }, ctx); | 					source = source.call(tree, { type: "source" }, ctx); | ||||||
| 					_assert( | 					_assert( | ||||||
| @@ -5629,15 +5626,23 @@ var uniqueId = $.fn.extend( { | |||||||
| 						"source callback must not return another function" | 						"source callback must not return another function" | ||||||
| 					); | 					); | ||||||
| 				} | 				} | ||||||
| 				// `source` is already a promise: | 				if (source.url) { | ||||||
| 				if ($.isFunction(source.then)) { | 					if (node._requestId) { | ||||||
| 					// _assert($.isFunction(source.always), "Expected jQuery?"); | 						node.warn( | ||||||
| 					ajaxDfd = source; | 							"Recursive load request #" + | ||||||
| 				} else if (source.url) { | 								requestId + | ||||||
|  | 								" while #" + | ||||||
|  | 								node._requestId + | ||||||
|  | 								" is pending." | ||||||
|  | 						); | ||||||
|  | 						// } else { | ||||||
|  | 						// 	node.debug("Send load request #" + requestId); | ||||||
|  | 					} | ||||||
| 					// `source` is an Ajax options object | 					// `source` is an Ajax options object | ||||||
| 					ajax = $.extend({}, ctx.options.ajax, source); | 					ajax = $.extend({}, ctx.options.ajax, source); | ||||||
|  | 					node._requestId = requestId; | ||||||
| 					if (ajax.debugDelay) { | 					if (ajax.debugDelay) { | ||||||
| 						// Simulate a slow server | 						// simulate a slow server | ||||||
| 						delay = ajax.debugDelay; | 						delay = ajax.debugDelay; | ||||||
| 						delete ajax.debugDelay; // remove debug option | 						delete ajax.debugDelay; // remove debug option | ||||||
| 						if ($.isArray(delay)) { | 						if ($.isArray(delay)) { | ||||||
| @@ -5651,74 +5656,30 @@ var uniqueId = $.fn.extend( { | |||||||
| 								Math.round(delay) + | 								Math.round(delay) + | ||||||
| 								" ms ..." | 								" ms ..." | ||||||
| 						); | 						); | ||||||
| 						ajaxDfd = $.Deferred(function(ajaxDfd) { | 						dfd = $.Deferred(function(dfd) { | ||||||
| 							setTimeout(function() { | 							setTimeout(function() { | ||||||
| 								$.ajax(ajax) | 								$.ajax(ajax) | ||||||
| 									.done(function() { | 									.done(function() { | ||||||
| 										ajaxDfd.resolveWith(this, arguments); | 										dfd.resolveWith(this, arguments); | ||||||
| 									}) | 									}) | ||||||
| 									.fail(function() { | 									.fail(function() { | ||||||
| 										ajaxDfd.rejectWith(this, arguments); | 										dfd.rejectWith(this, arguments); | ||||||
| 									}); | 									}); | ||||||
| 							}, delay); | 							}, delay); | ||||||
| 						}); | 						}); | ||||||
| 					} else { | 					} else { | ||||||
| 						ajaxDfd = $.ajax(ajax); | 						dfd = $.ajax(ajax); | ||||||
| 					} | 					} | ||||||
| 				} else if ($.isPlainObject(source) || $.isArray(source)) { |  | ||||||
| 					// `source` is already a constant dict or list, but we convert |  | ||||||
| 					// to a thenable for unified processing. |  | ||||||
| 					// 2020-01-03: refactored. |  | ||||||
| 					// `ajaxDfd = $.when(source)` would do the trick, but the returned |  | ||||||
| 					// promise will resolve async, which broke some tests and |  | ||||||
| 					// would probably also break current implementations out there. |  | ||||||
| 					// So we mock-up a thenable that resolves synchronously: |  | ||||||
| 					ajaxDfd = { |  | ||||||
| 						then: function(resolve, reject) { |  | ||||||
| 							resolve(source, null, null); |  | ||||||
| 						}, |  | ||||||
| 					}; |  | ||||||
| 					isAsync = false; |  | ||||||
| 				} else { |  | ||||||
| 					$.error("Invalid source type: " + source); |  | ||||||
| 				} |  | ||||||
|  |  | ||||||
| 				// Check for overlapping requests | 					// Defer the deferred: we want to be able to reject, even if ajax | ||||||
| 				if (node._requestId) { | 					// resolved ok. | ||||||
| 					node.warn( | 					source = new $.Deferred(); | ||||||
| 						"Recursive load request #" + | 					dfd.done(function(data, textStatus, jqXHR) { | ||||||
| 							requestId + |  | ||||||
| 							" while #" + |  | ||||||
| 							node._requestId + |  | ||||||
| 							" is pending." |  | ||||||
| 					); |  | ||||||
| 					node._requestId = requestId; |  | ||||||
| 					// 	node.debug("Send load request #" + requestId); |  | ||||||
| 				} |  | ||||||
|  |  | ||||||
| 				if (isAsync) { |  | ||||||
| 					tree.debugTime(tag); |  | ||||||
| 					tree.nodeSetStatus(ctx, "loading"); |  | ||||||
| 				} |  | ||||||
|  |  | ||||||
| 				// The async Ajax request has now started... |  | ||||||
| 				// Defer the deferred: |  | ||||||
| 				// we want to be able to reject invalid responses, even if |  | ||||||
| 				// the raw HTTP Ajax XHR resolved as Ok. |  | ||||||
| 				// We use the ajaxDfd.then() syntax here, which is compatible with |  | ||||||
| 				// jQuery and ECMA6. |  | ||||||
| 				// However resultDfd is a jQuery deferred, which is currently the |  | ||||||
| 				// expected result type of nodeLoadChildren() |  | ||||||
| 				resultDfd = new $.Deferred(); |  | ||||||
| 				ajaxDfd.then( |  | ||||||
| 					function(data, textStatus, jqXHR) { |  | ||||||
| 						// ajaxDfd was resolved, but we reject or resolve resultDfd |  | ||||||
| 						// depending on the response data |  | ||||||
| 						var errorObj, res; | 						var errorObj, res; | ||||||
|  |  | ||||||
| 						if ( | 						if ( | ||||||
| 							(source.dataType === "json" || | 							(this.dataType === "json" || | ||||||
| 								source.dataType === "jsonp") && | 								this.dataType === "jsonp") && | ||||||
| 							typeof data === "string" | 							typeof data === "string" | ||||||
| 						) { | 						) { | ||||||
| 							$.error( | 							$.error( | ||||||
| @@ -5729,28 +5690,21 @@ var uniqueId = $.fn.extend( { | |||||||
| 							// The expected request time stamp is later than `requestId` | 							// The expected request time stamp is later than `requestId` | ||||||
| 							// (which was kept as as closure variable to this handler function) | 							// (which was kept as as closure variable to this handler function) | ||||||
| 							// node.warn("Ignored load response for obsolete request #" + requestId + " (expected #" + node._requestId + ")"); | 							// node.warn("Ignored load response for obsolete request #" + requestId + " (expected #" + node._requestId + ")"); | ||||||
| 							resultDfd.rejectWith(this, [ | 							source.rejectWith(this, [RECURSIVE_REQUEST_ERROR]); | ||||||
| 								RECURSIVE_REQUEST_ERROR, |  | ||||||
| 							]); |  | ||||||
| 							return; | 							return; | ||||||
| 							// } else { | 							// } else { | ||||||
| 							// 	node.debug("Response returned for load request #" + requestId); | 							// 	node.debug("Response returned for load request #" + requestId); | ||||||
| 						} | 						} | ||||||
| 						if (node.parent === null && nodePrevParent !== null) { | 						// postProcess is similar to the standard ajax dataFilter hook, | ||||||
| 							resultDfd.rejectWith(this, [ | 						// but it is also called for JSONP | ||||||
| 								INVALID_REQUEST_TARGET_ERROR, |  | ||||||
| 							]); |  | ||||||
| 							return; |  | ||||||
| 						} |  | ||||||
| 						// Allow to adjust the received response data in the `postProcess` event. |  | ||||||
| 						if (ctx.options.postProcess) { | 						if (ctx.options.postProcess) { | ||||||
| 							// The handler may either |  | ||||||
| 							//   - modify `ctx.response` in-place (and leave `ctx.result` undefined) |  | ||||||
| 							//     => res = undefined |  | ||||||
| 							//   - return a replacement in `ctx.result` |  | ||||||
| 							//     => res = <new data> |  | ||||||
| 							//   If res contains an `error` property, an error status is displayed |  | ||||||
| 							try { | 							try { | ||||||
|  | 								// The handler may either | ||||||
|  | 								//   - modify `ctx.response` in-place (and leave `ctx.result` undefined) | ||||||
|  | 								//     => res = undefined | ||||||
|  | 								//   - return a replacement in `ctx.result` | ||||||
|  | 								//     => res = <new data> | ||||||
|  | 								// If res contains an `error` property, an error status is displayed | ||||||
| 								res = tree._triggerNodeEvent( | 								res = tree._triggerNodeEvent( | ||||||
| 									"postProcess", | 									"postProcess", | ||||||
| 									ctx, | 									ctx, | ||||||
| @@ -5758,7 +5712,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 									{ | 									{ | ||||||
| 										response: data, | 										response: data, | ||||||
| 										error: null, | 										error: null, | ||||||
| 										dataType: source.dataType, | 										dataType: this.dataType, | ||||||
| 									} | 									} | ||||||
| 								); | 								); | ||||||
| 							} catch (e) { | 							} catch (e) { | ||||||
| @@ -5769,8 +5723,6 @@ var uniqueId = $.fn.extend( { | |||||||
| 								}; | 								}; | ||||||
| 							} | 							} | ||||||
| 							if (res.error) { | 							if (res.error) { | ||||||
| 								// Either postProcess failed with an exception, or the returned |  | ||||||
| 								// result object has an 'error' property attached: |  | ||||||
| 								errorObj = $.isPlainObject(res.error) | 								errorObj = $.isPlainObject(res.error) | ||||||
| 									? res.error | 									? res.error | ||||||
| 									: { message: res.error }; | 									: { message: res.error }; | ||||||
| @@ -5779,7 +5731,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 									null, | 									null, | ||||||
| 									errorObj | 									errorObj | ||||||
| 								); | 								); | ||||||
| 								resultDfd.rejectWith(this, [errorObj]); | 								source.rejectWith(this, [errorObj]); | ||||||
| 								return; | 								return; | ||||||
| 							} | 							} | ||||||
| 							if ( | 							if ( | ||||||
| @@ -5797,158 +5749,175 @@ var uniqueId = $.fn.extend( { | |||||||
| 							ctx.options.enableAspx | 							ctx.options.enableAspx | ||||||
| 						) { | 						) { | ||||||
| 							// Process ASPX WebMethod JSON object inside "d" property | 							// Process ASPX WebMethod JSON object inside "d" property | ||||||
| 							// (only if no postProcess event was defined) |  | ||||||
| 							if (ctx.options.enableAspx === 42) { |  | ||||||
| 								tree.warn( |  | ||||||
| 									"The default for enableAspx will change to `false` in the fututure. " + |  | ||||||
| 										"Pass `enableAspx: true` or implement postProcess to silence this warning." |  | ||||||
| 								); |  | ||||||
| 							} |  | ||||||
| 							data = | 							data = | ||||||
| 								typeof data.d === "string" | 								typeof data.d === "string" | ||||||
| 									? $.parseJSON(data.d) | 									? $.parseJSON(data.d) | ||||||
| 									: data.d; | 									: data.d; | ||||||
| 						} | 						} | ||||||
| 						resultDfd.resolveWith(this, [data]); | 						source.resolveWith(this, [data]); | ||||||
| 					}, | 					}).fail(function(jqXHR, textStatus, errorThrown) { | ||||||
| 					function(jqXHR, textStatus, errorThrown) { |  | ||||||
| 						// ajaxDfd was rejected, so we reject resultDfd as well |  | ||||||
| 						var errorObj = tree._makeHookContext(node, null, { | 						var errorObj = tree._makeHookContext(node, null, { | ||||||
| 							error: jqXHR, | 							error: jqXHR, | ||||||
| 							args: Array.prototype.slice.call(arguments), | 							args: Array.prototype.slice.call(arguments), | ||||||
| 							message: errorThrown, | 							message: errorThrown, | ||||||
| 							details: jqXHR.status + ": " + errorThrown, | 							details: jqXHR.status + ": " + errorThrown, | ||||||
| 						}); | 						}); | ||||||
| 						resultDfd.rejectWith(this, [errorObj]); | 						source.rejectWith(this, [errorObj]); | ||||||
| 					} |  | ||||||
| 				); |  | ||||||
|  |  | ||||||
| 				// The async Ajax request has now started. |  | ||||||
| 				// resultDfd will be resolved/rejected after the response arrived, |  | ||||||
| 				// was postProcessed, and checked. |  | ||||||
| 				// Now we implement the UI update and add the data to the tree. |  | ||||||
| 				// We also return this promise to the caller. |  | ||||||
| 				resultDfd |  | ||||||
| 					.done(function(data) { |  | ||||||
| 						tree.nodeSetStatus(ctx, "ok"); |  | ||||||
| 						var children, metaData, noDataRes; |  | ||||||
|  |  | ||||||
| 						if ($.isPlainObject(data)) { |  | ||||||
| 							// We got {foo: 'abc', children: [...]} |  | ||||||
| 							// Copy extra properties to tree.data.foo |  | ||||||
| 							_assert( |  | ||||||
| 								node.isRootNode(), |  | ||||||
| 								"source may only be an object for root nodes (expecting an array of child objects otherwise)" |  | ||||||
| 							); |  | ||||||
| 							_assert( |  | ||||||
| 								$.isArray(data.children), |  | ||||||
| 								"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')" |  | ||||||
| 							); |  | ||||||
| 							metaData = data; |  | ||||||
| 							children = data.children; |  | ||||||
| 							delete metaData.children; |  | ||||||
| 							// Copy some attributes to tree.data |  | ||||||
| 							$.each(TREE_ATTRS, function(i, attr) { |  | ||||||
| 								if (metaData[attr] !== undefined) { |  | ||||||
| 									tree[attr] = metaData[attr]; |  | ||||||
| 									delete metaData[attr]; |  | ||||||
| 								} |  | ||||||
| 							}); |  | ||||||
| 							// Copy all other attributes to tree.data.NAME |  | ||||||
| 							$.extend(tree.data, metaData); |  | ||||||
| 						} else { |  | ||||||
| 							children = data; |  | ||||||
| 						} |  | ||||||
| 						_assert( |  | ||||||
| 							$.isArray(children), |  | ||||||
| 							"expected array of children" |  | ||||||
| 						); |  | ||||||
| 						node._setChildren(children); |  | ||||||
|  |  | ||||||
| 						if (tree.options.nodata && children.length === 0) { |  | ||||||
| 							if ($.isFunction(tree.options.nodata)) { |  | ||||||
| 								noDataRes = tree.options.nodata.call( |  | ||||||
| 									tree, |  | ||||||
| 									{ type: "nodata" }, |  | ||||||
| 									ctx |  | ||||||
| 								); |  | ||||||
| 							} else if ( |  | ||||||
| 								tree.options.nodata === true && |  | ||||||
| 								node.isRootNode() |  | ||||||
| 							) { |  | ||||||
| 								noDataRes = tree.options.strings.noData; |  | ||||||
| 							} else if ( |  | ||||||
| 								typeof tree.options.nodata === "string" && |  | ||||||
| 								node.isRootNode() |  | ||||||
| 							) { |  | ||||||
| 								noDataRes = tree.options.nodata; |  | ||||||
| 							} |  | ||||||
| 							if (noDataRes) { |  | ||||||
| 								node.setStatus("nodata", noDataRes); |  | ||||||
| 							} |  | ||||||
| 						} |  | ||||||
| 						// trigger fancytreeloadchildren |  | ||||||
| 						tree._triggerNodeEvent("loadChildren", node); |  | ||||||
| 					}) |  | ||||||
| 					.fail(function(error) { |  | ||||||
| 						var ctxErr; |  | ||||||
|  |  | ||||||
| 						if (error === RECURSIVE_REQUEST_ERROR) { |  | ||||||
| 							node.warn( |  | ||||||
| 								"Ignored response for obsolete load request #" + |  | ||||||
| 									requestId + |  | ||||||
| 									" (expected #" + |  | ||||||
| 									node._requestId + |  | ||||||
| 									")" |  | ||||||
| 							); |  | ||||||
| 							return; |  | ||||||
| 						} else if (error === INVALID_REQUEST_TARGET_ERROR) { |  | ||||||
| 							node.warn( |  | ||||||
| 								"Lazy parent node was removed while loading: discarding response." |  | ||||||
| 							); |  | ||||||
| 							return; |  | ||||||
| 						} else if (error.node && error.error && error.message) { |  | ||||||
| 							// error is already a context object |  | ||||||
| 							ctxErr = error; |  | ||||||
| 						} else { |  | ||||||
| 							ctxErr = tree._makeHookContext(node, null, { |  | ||||||
| 								error: error, // it can be jqXHR or any custom error |  | ||||||
| 								args: Array.prototype.slice.call(arguments), |  | ||||||
| 								message: error |  | ||||||
| 									? error.message || error.toString() |  | ||||||
| 									: "", |  | ||||||
| 							}); |  | ||||||
| 							if (ctxErr.message === "[object Object]") { |  | ||||||
| 								ctxErr.message = ""; |  | ||||||
| 							} |  | ||||||
| 						} |  | ||||||
| 						node.warn( |  | ||||||
| 							"Load children failed (" + ctxErr.message + ")", |  | ||||||
| 							ctxErr |  | ||||||
| 						); |  | ||||||
| 						if ( |  | ||||||
| 							tree._triggerNodeEvent( |  | ||||||
| 								"loadError", |  | ||||||
| 								ctxErr, |  | ||||||
| 								null |  | ||||||
| 							) !== false |  | ||||||
| 						) { |  | ||||||
| 							tree.nodeSetStatus( |  | ||||||
| 								ctx, |  | ||||||
| 								"error", |  | ||||||
| 								ctxErr.message, |  | ||||||
| 								ctxErr.details |  | ||||||
| 							); |  | ||||||
| 						} |  | ||||||
| 					}) |  | ||||||
| 					.always(function() { |  | ||||||
| 						node._requestId = null; |  | ||||||
| 						if (isAsync) { |  | ||||||
| 							tree.debugTimeEnd(tag); |  | ||||||
| 						} |  | ||||||
| 					}); | 					}); | ||||||
|  | 				} | ||||||
|  | 				// #383: accept and convert ECMAScript 6 Promise | ||||||
|  | 				if ($.isFunction(source.then) && $.isFunction(source.catch)) { | ||||||
|  | 					dfd = source; | ||||||
|  | 					source = new $.Deferred(); | ||||||
|  | 					dfd.then( | ||||||
|  | 						function(value) { | ||||||
|  | 							source.resolve(value); | ||||||
|  | 						}, | ||||||
|  | 						function(reason) { | ||||||
|  | 							source.reject(reason); | ||||||
|  | 						} | ||||||
|  | 					); | ||||||
|  | 				} | ||||||
|  | 				if ($.isFunction(source.promise)) { | ||||||
|  | 					// `source` is a deferred, i.e. ajax request | ||||||
|  | 					// _assert(!node.isLoading(), "recursive load"); | ||||||
|  | 					tree.nodeSetStatus(ctx, "loading"); | ||||||
|  |  | ||||||
| 				return resultDfd.promise(); | 					source | ||||||
|  | 						.done(function(children) { | ||||||
|  | 							tree.nodeSetStatus(ctx, "ok"); | ||||||
|  | 							node._requestId = null; | ||||||
|  | 						}) | ||||||
|  | 						.fail(function(error) { | ||||||
|  | 							var ctxErr; | ||||||
|  |  | ||||||
|  | 							if (error === RECURSIVE_REQUEST_ERROR) { | ||||||
|  | 								node.warn( | ||||||
|  | 									"Ignored response for obsolete load request #" + | ||||||
|  | 										requestId + | ||||||
|  | 										" (expected #" + | ||||||
|  | 										node._requestId + | ||||||
|  | 										")" | ||||||
|  | 								); | ||||||
|  | 								return; | ||||||
|  | 							} else if ( | ||||||
|  | 								error.node && | ||||||
|  | 								error.error && | ||||||
|  | 								error.message | ||||||
|  | 							) { | ||||||
|  | 								// error is already a context object | ||||||
|  | 								ctxErr = error; | ||||||
|  | 							} else { | ||||||
|  | 								ctxErr = tree._makeHookContext(node, null, { | ||||||
|  | 									error: error, // it can be jqXHR or any custom error | ||||||
|  | 									args: Array.prototype.slice.call(arguments), | ||||||
|  | 									message: error | ||||||
|  | 										? error.message || error.toString() | ||||||
|  | 										: "", | ||||||
|  | 								}); | ||||||
|  | 								if (ctxErr.message === "[object Object]") { | ||||||
|  | 									ctxErr.message = ""; | ||||||
|  | 								} | ||||||
|  | 							} | ||||||
|  | 							node.warn( | ||||||
|  | 								"Load children failed (" + ctxErr.message + ")", | ||||||
|  | 								ctxErr | ||||||
|  | 							); | ||||||
|  | 							if ( | ||||||
|  | 								tree._triggerNodeEvent( | ||||||
|  | 									"loadError", | ||||||
|  | 									ctxErr, | ||||||
|  | 									null | ||||||
|  | 								) !== false | ||||||
|  | 							) { | ||||||
|  | 								tree.nodeSetStatus( | ||||||
|  | 									ctx, | ||||||
|  | 									"error", | ||||||
|  | 									ctxErr.message, | ||||||
|  | 									ctxErr.details | ||||||
|  | 								); | ||||||
|  | 							} | ||||||
|  | 						}); | ||||||
|  | 				} else { | ||||||
|  | 					if (ctx.options.postProcess) { | ||||||
|  | 						// #792: Call postProcess for non-deferred source | ||||||
|  | 						res = tree._triggerNodeEvent( | ||||||
|  | 							"postProcess", | ||||||
|  | 							ctx, | ||||||
|  | 							ctx.originalEvent, | ||||||
|  | 							{ | ||||||
|  | 								response: source, | ||||||
|  | 								error: null, | ||||||
|  | 								dataType: typeof source, | ||||||
|  | 							} | ||||||
|  | 						); | ||||||
|  |  | ||||||
|  | 						if ( | ||||||
|  | 							$.isArray(res) || | ||||||
|  | 							($.isPlainObject(res) && $.isArray(res.children)) | ||||||
|  | 						) { | ||||||
|  | 							// Use `ctx.result` if valid | ||||||
|  | 							// (otherwise use existing data, which may have been modified in-place) | ||||||
|  | 							source = res; | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 				// $.when(source) resolves also for non-deferreds | ||||||
|  | 				return $.when(source).done(function(children) { | ||||||
|  | 					var metaData, noDataRes; | ||||||
|  |  | ||||||
|  | 					if ($.isPlainObject(children)) { | ||||||
|  | 						// We got {foo: 'abc', children: [...]} | ||||||
|  | 						// Copy extra properties to tree.data.foo | ||||||
|  | 						_assert( | ||||||
|  | 							node.isRootNode(), | ||||||
|  | 							"source may only be an object for root nodes (expecting an array of child objects otherwise)" | ||||||
|  | 						); | ||||||
|  | 						_assert( | ||||||
|  | 							$.isArray(children.children), | ||||||
|  | 							"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')" | ||||||
|  | 						); | ||||||
|  | 						metaData = children; | ||||||
|  | 						children = children.children; | ||||||
|  | 						delete metaData.children; | ||||||
|  | 						// Copy some attributes to tree.data | ||||||
|  | 						$.each(TREE_ATTRS, function(i, attr) { | ||||||
|  | 							if (metaData[attr] !== undefined) { | ||||||
|  | 								tree[attr] = metaData[attr]; | ||||||
|  | 								delete metaData[attr]; | ||||||
|  | 							} | ||||||
|  | 						}); | ||||||
|  | 						// Copy all other attributes to tree.data.NAME | ||||||
|  | 						$.extend(tree.data, metaData); | ||||||
|  | 					} | ||||||
|  | 					_assert($.isArray(children), "expected array of children"); | ||||||
|  | 					node._setChildren(children); | ||||||
|  |  | ||||||
|  | 					if (tree.options.nodata && children.length === 0) { | ||||||
|  | 						if ($.isFunction(tree.options.nodata)) { | ||||||
|  | 							noDataRes = tree.options.nodata.call( | ||||||
|  | 								tree, | ||||||
|  | 								{ type: "nodata" }, | ||||||
|  | 								ctx | ||||||
|  | 							); | ||||||
|  | 						} else if ( | ||||||
|  | 							tree.options.nodata === true && | ||||||
|  | 							node.isRootNode() | ||||||
|  | 						) { | ||||||
|  | 							noDataRes = tree.options.strings.nodata; | ||||||
|  | 						} else if ( | ||||||
|  | 							typeof tree.options.nodata === "string" && | ||||||
|  | 							node.isRootNode() | ||||||
|  | 						) { | ||||||
|  | 							noDataRes = tree.options.nodata; | ||||||
|  | 						} | ||||||
|  | 						if (noDataRes) { | ||||||
|  | 							node.setStatus("nodata", noDataRes); | ||||||
|  | 						} | ||||||
|  | 					} | ||||||
|  | 					// trigger fancytreeloadchildren | ||||||
|  | 					tree._triggerNodeEvent("loadChildren", node); | ||||||
|  | 				}); | ||||||
| 			}, | 			}, | ||||||
| 			/** [Not Implemented]  */ | 			/** [Not Implemented]  */ | ||||||
| 			nodeLoadKeyPath: function(ctx, keyPathList) { | 			nodeLoadKeyPath: function(ctx, keyPathList) { | ||||||
| @@ -7622,7 +7591,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 				clickFolderMode: 4, | 				clickFolderMode: 4, | ||||||
| 				debugLevel: null, // 0..4 (null: use global setting $.ui.fancytree.debugLevel) | 				debugLevel: null, // 0..4 (null: use global setting $.ui.fancytree.debugLevel) | ||||||
| 				disabled: false, // TODO: required anymore? | 				disabled: false, // TODO: required anymore? | ||||||
| 				enableAspx: 42, // TODO: this is truethy, but distinguishable from true: default will change to false in the future | 				enableAspx: true, | ||||||
| 				escapeTitles: false, | 				escapeTitles: false, | ||||||
| 				extensions: [], | 				extensions: [], | ||||||
| 				// fx: { height: "toggle", duration: 200 }, | 				// fx: { height: "toggle", duration: 200 }, | ||||||
| @@ -8059,7 +8028,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		{ | 		{ | ||||||
| 			/** Version number `"MAJOR.MINOR.PATCH"` | 			/** Version number `"MAJOR.MINOR.PATCH"` | ||||||
| 			 * @type {string} */ | 			 * @type {string} */ | ||||||
| 			version: "2.35.0", // Set to semver by 'grunt release' | 			version: "2.34.0", // Set to semver by 'grunt release' | ||||||
| 			/** @type {string} | 			/** @type {string} | ||||||
| 			 * @description `"production" for release builds` */ | 			 * @description `"production" for release builds` */ | ||||||
| 			buildType: "production", // Set to 'production' by 'grunt build' | 			buildType: "production", // Set to 'production' by 'grunt build' | ||||||
| @@ -8689,13 +8658,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Add a child counter bubble to tree nodes. |  * Add a child counter bubble to tree nodes. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| // To keep the global namespace clean, we wrap everything in a closure. | // To keep the global namespace clean, we wrap everything in a closure. | ||||||
| @@ -8776,7 +8745,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		} else { | 		} else { | ||||||
| 			$badge.remove(); | 			$badge.remove(); | ||||||
| 		} | 		} | ||||||
| 		if (extOpts.deep && !node.isTopLevel() && !node.isRootNode()) { | 		if (extOpts.deep && !node.isTopLevel() && !node.isRoot()) { | ||||||
| 			node.parent.updateCounters(); | 			node.parent.updateCounters(); | ||||||
| 		} | 		} | ||||||
| 	}; | 	}; | ||||||
| @@ -8814,7 +8783,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		// Every extension must be registered by a unique name. | 		// Every extension must be registered by a unique name. | ||||||
| 		name: "childcounter", | 		name: "childcounter", | ||||||
| 		// Version information should be compliant with [semver](http://semver.org) | 		// Version information should be compliant with [semver](http://semver.org) | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
|  |  | ||||||
| 		// Extension specific options and their defaults. | 		// Extension specific options and their defaults. | ||||||
| 		// This options will be available as `tree.options.childcounter.hideExpanded` | 		// This options will be available as `tree.options.childcounter.hideExpanded` | ||||||
| @@ -8920,13 +8889,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Support faster lookup of nodes by key and shared ref-ids. |  * Support faster lookup of nodes by key and shared ref-ids. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -9284,7 +9253,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "clones", | 		name: "clones", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers | 			highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers | ||||||
| @@ -9441,13 +9410,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Drag-and-drop support (native HTML5). |  * Drag-and-drop support (native HTML5). | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /* | /* | ||||||
| @@ -10232,10 +10201,6 @@ var uniqueId = $.fn.extend( { | |||||||
| 					node.debug("Reject dropping below own ancestor."); | 					node.debug("Reject dropping below own ancestor."); | ||||||
| 					DRAG_ENTER_RESPONSE = false; | 					DRAG_ENTER_RESPONSE = false; | ||||||
| 					break; | 					break; | ||||||
| 				} else if (dndOpts.preventLazyParents && !node.isLoaded()) { |  | ||||||
| 					node.warn("Drop over unloaded target node prevented."); |  | ||||||
| 					DRAG_ENTER_RESPONSE = false; |  | ||||||
| 					break; |  | ||||||
| 				} | 				} | ||||||
| 				$dropMarker.show(); | 				$dropMarker.show(); | ||||||
|  |  | ||||||
| @@ -10244,7 +10209,6 @@ var uniqueId = $.fn.extend( { | |||||||
| 				r = dndOpts.dragEnter(node, data); | 				r = dndOpts.dragEnter(node, data); | ||||||
|  |  | ||||||
| 				res = normalizeDragEnterResponse(r); | 				res = normalizeDragEnterResponse(r); | ||||||
| 				// alert("res:" + JSON.stringify(res)) |  | ||||||
| 				DRAG_ENTER_RESPONSE = res; | 				DRAG_ENTER_RESPONSE = res; | ||||||
|  |  | ||||||
| 				allowDrop = res && (res.over || res.before || res.after); | 				allowDrop = res && (res.over || res.before || res.after); | ||||||
| @@ -10290,7 +10254,6 @@ var uniqueId = $.fn.extend( { | |||||||
| 					} else if ( | 					} else if ( | ||||||
| 						dndOpts.autoExpandMS && | 						dndOpts.autoExpandMS && | ||||||
| 						Date.now() - DRAG_OVER_STAMP > dndOpts.autoExpandMS && | 						Date.now() - DRAG_OVER_STAMP > dndOpts.autoExpandMS && | ||||||
| 						!node.isLoading() && |  | ||||||
| 						(!dndOpts.dragExpand || | 						(!dndOpts.dragExpand || | ||||||
| 							dndOpts.dragExpand(node, data) !== false) | 							dndOpts.dragExpand(node, data) !== false) | ||||||
| 					) { | 					) { | ||||||
| @@ -10457,7 +10420,7 @@ var uniqueId = $.fn.extend( { | |||||||
|  |  | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "dnd5", | 		name: "dnd5", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering | 			autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering | ||||||
| @@ -10468,7 +10431,6 @@ var uniqueId = $.fn.extend( { | |||||||
| 			// dropEffect: "auto", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string. | 			// dropEffect: "auto", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string. | ||||||
| 			dropEffectDefault: "move", // Default dropEffect ('copy', 'link', or 'move') when no modifier is pressed (overide in dragDrag, dragOver). | 			dropEffectDefault: "move", // Default dropEffect ('copy', 'link', or 'move') when no modifier is pressed (overide in dragDrag, dragOver). | ||||||
| 			preventForeignNodes: false, // Prevent dropping nodes from different Fancytrees | 			preventForeignNodes: false, // Prevent dropping nodes from different Fancytrees | ||||||
| 			preventLazyParents: true, // Prevent dropping items on unloaded lazy Fancytree nodes |  | ||||||
| 			preventNonNodes: false, // Prevent dropping items other than Fancytree nodes | 			preventNonNodes: false, // Prevent dropping items other than Fancytree nodes | ||||||
| 			preventRecursion: true, // Prevent dropping nodes on own descendants | 			preventRecursion: true, // Prevent dropping nodes on own descendants | ||||||
| 			preventSameParent: false, // Prevent dropping nodes under same direct parent | 			preventSameParent: false, // Prevent dropping nodes under same direct parent | ||||||
| @@ -10586,13 +10548,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Make node titles editable. |  * Make node titles editable. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -10794,7 +10756,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 		// Re-enable mouse and keyboard handling | 		// Re-enable mouse and keyboard handling | ||||||
| 		tree.widget._bind(); | 		tree.widget._bind(); | ||||||
|  |  | ||||||
| 		if (node && local.lastDraggableAttrValue) { | 		if (local.lastDraggableAttrValue) { | ||||||
| 			node.span.draggable = true; | 			node.span.draggable = true; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| @@ -10884,7 +10846,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "edit", | 		name: "edit", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			adjustWidthOfs: 4, // null: don't adjust input size to content | 			adjustWidthOfs: 4, // null: don't adjust input size to content | ||||||
| @@ -10990,13 +10952,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Remove or highlight tree nodes, based on a filter. |  * Remove or highlight tree nodes, based on a filter. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -11334,7 +11296,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "filter", | 		name: "filter", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			autoApply: true, // Re-apply last filter if lazy data is loaded | 			autoApply: true, // Re-apply last filter if lazy data is loaded | ||||||
| @@ -11449,13 +11411,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Use glyph-fonts, ligature-fonts, or SVG icons instead of icon sprites. |  * Use glyph-fonts, ligature-fonts, or SVG icons instead of icon sprites. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -11638,7 +11600,7 @@ var uniqueId = $.fn.extend( { | |||||||
|  |  | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "glyph", | 		name: "glyph", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			preset: null, // 'awesome3', 'awesome4', 'bootstrap3', 'material' | 			preset: null, // 'awesome3', 'awesome4', 'bootstrap3', 'material' | ||||||
| @@ -11672,7 +11634,7 @@ var uniqueId = $.fn.extend( { | |||||||
|  |  | ||||||
| 			res = this._super(ctx); | 			res = this._super(ctx); | ||||||
|  |  | ||||||
| 			if (node.isRootNode()) { | 			if (node.isRoot()) { | ||||||
| 				return res; | 				return res; | ||||||
| 			} | 			} | ||||||
| 			span = $span.children("span.fancytree-expander").get(0); | 			span = $span.children("span.fancytree-expander").get(0); | ||||||
| @@ -11787,13 +11749,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Support keyboard navigation for trees with embedded input controls. |  * Support keyboard navigation for trees with embedded input controls. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -11910,7 +11872,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "gridnav", | 		name: "gridnav", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			autofocusInput: false, // Focus first embedded input if node gets activated | 			autofocusInput: false, // Focus first embedded input if node gets activated | ||||||
| @@ -12012,13 +11974,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Allow multiple selection of nodes  by mouse or keyboard. |  * Allow multiple selection of nodes  by mouse or keyboard. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -12047,7 +12009,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "multi", | 		name: "multi", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			allowNoSelect: false, // | 			allowNoSelect: false, // | ||||||
| @@ -12144,13 +12106,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * |  * | ||||||
|  * @depends: js-cookie or jquery-cookie |  * @depends: js-cookie or jquery-cookie | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -12350,7 +12312,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "persist", | 		name: "persist", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			cookieDelimiter: "~", | 			cookieDelimiter: "~", | ||||||
| @@ -12638,13 +12600,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Render tree as table (aka 'tree grid', 'table tree'). |  * Render tree as table (aka 'tree grid', 'table tree'). | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -12727,7 +12689,7 @@ var uniqueId = $.fn.extend( { | |||||||
|  |  | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "table", | 		name: "table", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx) | 			checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx) | ||||||
| @@ -13188,13 +13150,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * |  * | ||||||
|  * @see http://jqueryui.com/themeroller/ |  * @see http://jqueryui.com/themeroller/ | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -13217,7 +13179,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "themeroller", | 		name: "themeroller", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			activeClass: "ui-state-active", // Class added to active node | 			activeClass: "ui-state-active", // Class added to active node | ||||||
| @@ -13308,13 +13270,13 @@ var uniqueId = $.fn.extend( { | |||||||
|  * Support for 100% wide selection bars. |  * Support for 100% wide selection bars. | ||||||
|  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) |  * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * |  * | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| (function(factory) { | (function(factory) { | ||||||
| @@ -13444,7 +13406,7 @@ var uniqueId = $.fn.extend( { | |||||||
| 	 */ | 	 */ | ||||||
| 	$.ui.fancytree.registerExtension({ | 	$.ui.fancytree.registerExtension({ | ||||||
| 		name: "wide", | 		name: "wide", | ||||||
| 		version: "2.35.0", | 		version: "2.34.0", | ||||||
| 		// Default options for this extension. | 		// Default options for this extension. | ||||||
| 		options: { | 		options: { | ||||||
| 			iconWidth: null, // Adjust this if @fancy-icon-width != "16px" | 			iconWidth: null, // Adjust this if @fancy-icon-width != "16px" | ||||||
|   | |||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -9,12 +9,12 @@ | |||||||
|  * |  * | ||||||
|  * This section is automatically generated from the `skin-common.less` template. |  * This section is automatically generated from the `skin-common.less` template. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de) |  * Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de) | ||||||
|  * Released under the MIT license |  * Released under the MIT license | ||||||
|  * https://github.com/mar10/fancytree/wiki/LicenseInfo |  * https://github.com/mar10/fancytree/wiki/LicenseInfo | ||||||
|  * |  * | ||||||
|  * @version 2.35.0 |  * @version 2.34.0 | ||||||
|  * @date 2020-03-27T22:41:58Z |  * @date 2019-12-26T14:16:19Z | ||||||
| ******************************************************************************/ | ******************************************************************************/ | ||||||
| /*------------------------------------------------------------------------------ | /*------------------------------------------------------------------------------ | ||||||
|  * Helpers |  * Helpers | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user