Lines Matching +full:top +full:- +full:tech

6  * Copyright (c) 2008-2023, Martin Wendt (https://wwWendt.de)
11 * @date 2023-02-01T20:52:50Z
21 define(["jquery", "./jquery.fancytree.ui-deps"], factory);
24 require("./jquery.fancytree.ui-deps");
95 109: "-",
112 173: "-",
116 189: "-",
140 // Top-level Fancytree attributes, that can be set by dict
143 // Top-level FancytreeNode attributes, that can be set by dict
149 // Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
269 * Deep-merge a list of objects (but replace array-type options).
274 * of ext-edit). Also `null` values are copied over and not skipped.
299 // Only deal with non-null/undefined values
306 // Prevent never-ending loop
446 // Evaluate 'data-NAME' attributes with special treatment for 'data-json'.
455 // <li data-json='...'> is already returned as object (http://api.jquery.com/data/#data-html5)
507 * Note: Also non-folders may have children.
692 // #708: Fast path -- don't render every child of root, just the new ones!
700 // Different first child -- recompute classes
704 // Different last child -- recompute classes
773 for (i = this.children.length - 1; i >= 0; i--) {
918 * @deprecated since 2014-02-16. Use resetLazy() instead.
922 "FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."
1036 * Fix selection status, after this node was (de)selected in multi-hier mode.
1054 * Fix selection status for multi-hier mode.
1055 * Only end-nodes are considered to update the descendants branch and parents.
1086 // the selection state of a node is not relevant; we need the end-nodes
1105 // eslint-disable-next-line no-nested-ternary
1112 // This is an end-node: simply report the status
1179 // eslint-disable-next-line no-nested-ternary
1246 /** Return the 0-based child index.
1253 /** Return the hierarchical child index (1-based, e.g. '3.2.4').
1266 s = ("0000000" + s).substr(-digits);
1290 ? this.children[this.children.length - 1]
1293 /** Return node depth. 0: System root node, 1: visible top-level node, 2: first sub-level, ... .
1315 for (i = 0, l = ac.length - 1; i < l; i++) {
1316 // up to length-2, so next(last) = null
1328 // TODO: return null for top-level nodes?
1331 /** Return an array of all parent nodes (top-down).
1383 return ac[i - 1];
1525 return !p || p.children[p.children.length - 1] === this;
1533 /** Return true if node is lazy and loaded. For non-lazy nodes always return true.
1551 /** Return true if node is partially selected (tri-state).
1592 /** Return true if this a top level node, i.e. a direct child of the (invisible) system root node.
1599 /** Return true if node is lazy and not yet loaded. For non-lazy nodes always return false.
1640 * @deprecated since 2014-02-16: use load() instead.
1644 "FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."
1659 // _assert( forceReload || this.isUndefined(), "Pass forceReload=true to re-load a lazy node" );
1706 // Expand bottom-up, so only the top node is animated
1707 for (i = len - 1; i >= 0; i--) {
1829 // Handle cross-tree moves
1832 // _assert(false, "Cross-tree move is not yet implemented.");
1833 this.warn("Cross-tree moveTo is experimental!");
1840 // A collaposed node won't re-render children, so we have to remove it manually
1871 // In multi-hier mode, update the parents selection state
1876 // In multi-hier mode, update the parents selection state
1984 * @param {boolean} [force=false] re-render, even if html markup was already created
2048 * Remove all children, collapse, and set the lazy-flag, so that the lazyLoad
2101 …"scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' inst…
2105 // For ext-table, we choose the nearest parent that has `position: relative`
2122 overflowY = $container.css("overflow-y");
2130 // #922 plain tree in a non-fixed-sized UL scrolls inside its parent
2149 // eslint-disable-next-line one-var
2157 topOfs = opts.scrollOfs.top || 0,
2174 nodeY = $(this.span).offset().top;
2176 topNode && topNode.span ? $(topNode.span).offset().top : 0;
2185 containerOffsetTop = $scrollParent.offset().top;
2187 $(this.span).offset().top - containerOffsetTop + scrollTop; // relative to scroll parent
2189 ? $(topNode.span).offset().top -
2195 $scrollParent.innerHeight() - $scrollParent[0].clientHeight
2197 containerHeight -= horzScrollbarHeight;
2203 newScrollTop = nodeY - topOfs;
2207 scrollTop + containerHeight - bottomOfs
2209 newScrollTop = nodeY + nodeHeight - containerHeight + bottomOfs;
2219 newScrollTop = topNodeY - topOfs;
2220 // this.debug(" scrollIntoView(), TOP newScrollTop=" + newScrollTop);
2249 * The `cell` option requires the ext-table and ext-ariagrid extensions.
2304 …* @param {function} [cmp] custom compare function(a, b) that returns -1, 0, or 1 (defaults to sort…
2321 // eslint-disable-next-line no-nested-ternary
2322 return x === y ? 0 : x > y ? 1 : -1;
2425 while (curClasses.indexOf(" " + className + " ") > -1) {
2434 // this.info("-> toggleClass('" + value + "', " + flag + "): '" + this.extraClasses + "'");
2485 /** Call fn(node) for all child nodes in hierarchical order (depth-first).<br>
2520 * programmers to flood the server with requests ;-)
2565 /** Call fn(node) for all parent nodes, bottom-up, including invisible system root.<br>
2638 * @property {string} _ns Automatically generated unique tree namespace, e.g. ".fancytree-1".
2642 * @property {jQueryObject} $container Outer `<ul>` element (or `<table>` element for ext-table).
2656 * @property {object} viewport See ext-vieport. @since v2.31
2666 … "The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."
2671 … "The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."
2676 "The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."
2681 "The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10)."
2688 // allow to init tree.data.foo from <div data-foo=''>
2693 this._ns = ".fancytree-" + this._id; // append for namespaced events
2704 this.viewport = null; // ext-grid
2711 this.$div.find(">ul.fancytree-container").remove();
2726 id: "ft-id-" + this._id,
2727 class: "ui-fancytree fancytree-container fancytree-plain",
2736 // // See http://www.w3.org/TR/wai-aria-practices/#focus_activedescendant
2737 // // #577: Allow to set tabindex to "0", "-1" and ""
2741 // this.$container.attr("DIR", "RTL").addClass("fancytree-rtl");
2743 // // this.$container.attr("DIR", null).removeClass("fancytree-rtl");
2748 // this.$container.attr("aria-multiselectable", true);
2754 /* Return a context object that can be re-used for _callHook().
2921 * - 'moveUp', 'moveDown'
2922 * - 'indent', 'outdent'
2923 * - 'remove'
2924 * - 'edit', 'addChild', 'addSibling': (reqires ext-edit extension)
2925 * - 'cut', 'copy', 'paste': (use an internal singleton 'clipboard')
2926 * - 'down', 'first', 'last', 'left', 'parent', 'right', 'up': navigate
2983 // Add, edit (requires ext-edit):
3050 "patchList must be an array of length-2-arrays"
3115 /** Temporarily suppress rendering to improve performance on bulk-updates.
3193 * and wrap-around at the end.
3406 /** Return the first top level node if any (not the invisible root node).
3484 // ae && $(ae).closest(".fancytree-container").length
3493 // this.$container.toggleClass("fancytree-treefocus", hasFocus);
3536 * Make sure that a node with a given ID is loaded, by traversing - and
3537 * loading - its parents. This method is meant for lazy hierarchies.
3665 // Collect distinct top-most lazy nodes in a map.
3666 // Note that we can use node.key to de-dupe entries, even if a custom matcher would
3668 // map[node.key] => {node: node, pathList: [list of remaining rest-paths]}
3733 // remainMap contains parent nodes, each with a list of relative sub-paths.
3746 // // matcher is used, because we cannot assume that a single segment-key is unique
3760 /** Re-fire beforeActivate, activate, and (optional) focus events.
3773 this.activeNode = null; // Force re-activating
3788 /**Render tree (i.e. create DOM elements for all top-level nodes).
3828 window.console.time(this + " - " + label);
3838 window.console.timeEnd(this + " - " + label);
3884 /** Call fn(node) for all nodes in hierarchical order (depth-first).
3893 /** Call fn(node) for all nodes in vertical order, top down (or bottom up).<br>
3901 * {start: First top node, reverse: false, includeSelf: true, includeHidden: false}
3956 /*jshint -W083 */
4004 node = children[idx - 1];
4008 // eslint-disable-next-line no-unmodified-loop-condition
4015 node = children[children.length - 1];
4113 // Make sure that clicks stop, otherwise <a href='#'> jumps to the top
4114 // if(event.target.localName === "a" && event.target.className === "fancytree-title"){
4181 // only detect plain ascii alpha-numerics. But we still need
4182 // to ignore modifier-only, whitespace, cursor-keys, etc.
4217 if (stamp - tree.lastQuicksearchTime > 500) {
4238 case "-":
4325 Math.random() * (delay[1] - delay[0]);
4349 // 2020-01-03: refactored.
4353 // So we mock-up a thenable that resolves synchronously:
4426 // - modify `ctx.response` in-place (and leave `ctx.result` undefined)
4428 // - return a replacement in `ctx.result`
4474 // (otherwise use existing data, which may have been modified in-place)
4774 …* <span class='fancytree-node fancytree-expanded fancytree-has-children fancytree-lastsib fanc…
4775 * <span class="fancytree-expander"></span>
4776 * <span class="fancytree-checkbox"></span> // only present in checkbox mode
4777 * <span class="fancytree-icon"></span>
4778 * <a href="#" class="fancytree-title"> Node 1 </a>
4788 * @param {boolean} [force=false] re-render, even if html markup was already created
4796 * - node was not yet rendered:
4798 * - node was rendered: exit fast
4799 * - children have been added
4800 * - children have been removed
4832 // Discard markup on force-mode, or if it is not linked to parent <ul>
4841 // May happen, when a top-level node was dropped over another
4868 node.span.className = "fancytree-node";
4902 // hide top UL, so we can use an animation to show it later
4938 for (i = 0, l = children.length - 1; i < l; i++) {
4965 // #486: successorLi is set, if we re-rendered (i.e. discarded)
5018 " class='fancytree-expander fancytree-expander-fixed'></span>"
5024 "<span " + role + " class='fancytree-expander'></span>"
5032 className = "fancytree-checkbox";
5037 className += " fancytree-radio";
5045 // 2015-11-16
5091 "' class='fancytree-icon'" +
5099 " class='fancytree-custom-icon " +
5110 " class='fancytree-custom-icon " +
5122 " class='fancytree-custom-icon " +
5135 " class='fancytree-icon'" +
5167 "<span class='fancytree-title'" +
5183 ctx.$title = $(">span.fancytree-title", node.span);
5220 // $(">span.fancytree-title", statusElem).attr("tabindex", "0");
5223 // $(">span.fancytree-title", statusElem).removeAttr("tabindex");
5234 $ariaElem.removeAttr("aria-expanded");
5236 $ariaElem.attr("aria-expanded", Boolean(node.expanded));
5273 $ariaElem.attr("aria-selected", true);
5276 $ariaElem.attr("aria-selected", false);
5339 // #1042: don't scroll between mousedown/-up when clicking an embedded link
5472 // Auto-collapse mode: collapse all siblings
5534 // Create required markup, but make sure the top UL is hidden, so we
5550 // The UI toggle() effect works with the ext-wide extension,
5563 // node.debug("fancytree-animating end: " + node.li.className);
5570 // The UI toggle() effect works with the ext-wide extension,
5584 .find(".ui-effects-placeholder")
5592 // node.debug("fancytree-animating end: " + node.li.className);
5691 $(node.span).find(".fancytree-title").focus();
5697 "aria-activedescendant",
5704 // $(node.span).find(".fancytree-title").focus();
5758 // Remember the user's intent, in case down -> up propagation prevents
5794 // multi-hierarchical selection mode
5962 tree.$div.find(">ul.fancytree-container").empty();
5967 /** Widget was created (called only once, even it re-initialized).
5975 this.$div.find(">ul.fancytree-container").remove();
5977 this.$source.removeClass("fancytree-helper-hidden");
5980 /** Widget was (re-)initialized.
5989 // See http://www.w3.org/TR/wai-aria-practices/#focus_activedescendant
5990 // #577: Allow to set tabindex to "0", "-1" and ""
6003 tree.$container.addClass("fancytree-checkbox-auto-hide");
6008 .addClass("fancytree-rtl");
6012 .removeClass("fancytree-rtl");
6017 tree.$container.attr("aria-multiselectable", true);
6046 // but another `<ul class='fancytree-container'>` is appended
6050 .not(".fancytree-container")
6055 "ui-fancytree-source fancytree-helper-hidden"
6058 // allow to init tree.data.foo from <ul data-foo=''>
6101 $.error("Invalid data-type: " + type);
6167 this.$container.toggleClass("fancytree-treefocus", flag);
6208 "fancytree-checkbox-auto-hide",
6220 .removeClass("fancytree-rtl");
6224 .addClass("fancytree-rtl");
6260 tree.render(true, false); // force, not-deep
6337 scrollOfs: { top: 0, bottom: 0 }, property
6352 active: "fancytree-active",
6353 animating: "fancytree-animating",
6354 combinedExpanderPrefix: "fancytree-exp-",
6355 combinedIconPrefix: "fancytree-ico-",
6356 error: "fancytree-error",
6357 expanded: "fancytree-expanded",
6358 focused: "fancytree-focused",
6359 folder: "fancytree-folder",
6360 hasChildren: "fancytree-has-children",
6361 lastsib: "fancytree-lastsib",
6362 lazy: "fancytree-lazy",
6363 loading: "fancytree-loading",
6364 node: "fancytree-node",
6365 partload: "fancytree-partload",
6366 partsel: "fancytree-partsel",
6367 radio: "fancytree-radio",
6368 selected: "fancytree-selected",
6369 statusNodePrefix: "fancytree-statusnode-",
6370 unselectable: "fancytree-unselectable",
6383 "') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html"
6417 // issue #876: we want to replace custom array-options, not merge them
6444 // 2015-11-16
6457 // 2015-11-16
6470 // 2016-04-04
6471 opts.tabindex = opts.tabbable ? "0" : "-1";
6513 // -------------------------------------------------------------------------
6578 "table.fancytree-container > thead"
6593 "span.fancytree-title",
6595 // prevent mouse-drags to select text ranges
6784 // http://jqueryui.com/upgrade-guide/1.9/#deprecated-offset-option-merged-into-my-and-at
6825 // eslint-disable-next-line no-unused-expressions
6829 // eslint-disable-next-line no-unused-expressions
6867 * See http://jqueryui.com/upgrade-guide/1.9/#deprecated-offset-option-merged-into-my-and-at
6881 myParts = /(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(
6884 atParts = /(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(
6918 // See http://jsperf.com/test-for-classname/2
6919 if (/\bfancytree-title\b/.test(tcn)) {
6921 } else if (/\bfancytree-expander\b/.test(tcn)) {
6926 // }else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
6927 } else if (/\bfancytree-checkbox\b/.test(tcn)) {
6929 } else if (/\bfancytree(-custom)?-icon\b/.test(tcn)) {
6931 } else if (/\bfancytree-node\b/.test(tcn)) {
6941 } else if ($target.closest(".fancytree-title").length) {
6944 } else if ($target.closest(".fancytree-checkbox").length) {
6947 } else if ($target.closest(".fancytree-expander").length) {
6989 * $.ui.fancytree.getTree(event); // Get tree for this mouse- or keyboard event
7006 el = $(".fancytree-container").eq(el); // el was an integer: return nth instance
7009 el = $("#ft-id-" + orgEl).eq(0);
7024 el = el.closest(":ui-fancytree");
7025 …widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1…
7114 * This is especially handy for switch-statements in event handlers.
7122 case "-":
7139 // Poor-man's hotkeys. See here for a complete implementation:
7289 // Translate hideCheckbox -> checkbox:false
7293 // Add <li data-NAME='...'> as node.data.NAME
7296 // #507: convert data-hidecheckbox (lower case) to hideCheckbox
7305 // #56: Allow to set special node.attributes from data-...
7314 // All other data-... goes to node.data...