Lines Matching refs:tree

237 		return !!(x.tree && x.statusNodeType !== undefined);
334 function _makeVirtualFunction(methodName, tree, base, extension, extName) { argument
342 var prevFunc = tree[methodName], // org. tree method or prev. proxy
344 _local = tree.ext[extName],
346 return prevFunc.apply(tree, arguments);
349 return prevFunc.apply(tree, args);
354 var prevLocal = tree._local,
355 prevSuper = tree._super,
356 prevSuperApply = tree._superApply;
359 tree._local = _local;
360 tree._super = _super;
361 tree._superApply = _superApply;
362 return baseFunc.apply(tree, arguments);
364 tree._local = prevLocal;
365 tree._super = prevSuper;
366 tree._superApply = prevSuperApply;
376 function _subclassObject(tree, base, extension, extName) { argument
380 if (typeof tree[attrName] === "function") {
382 tree[attrName] = _makeVirtualFunction(
384 tree,
391 tree.ext[extName][attrName] = _makeVirtualFunction(
393 tree,
411 tree.ext[extName][attrName] = extension[attrName];
519 this.tree = parent.tree;
553 (this.tree.options.copyFunctionsToData ||
565 if (this.tree.options.defaultKey) {
566 this.key = "" + this.tree.options.defaultKey(this);
580 this.tree.activeNode === null,
583 this.tree.activeNode = this;
587 this.tree.lastSelectedNode = this;
605 this.tree._callHook("treeRegisterNode", this.tree, true, this);
643 this.tree._callHook(
645 this.tree,
711 if (this.tree.options.selectMode === 3) {
784 title: this.tree.options.strings.moreData,
813 return this.tree.applyCommand(cmd, this, opts);
873 return this.tree._callHook("nodeCollapseSiblings", this);
912 if (this.tree.options.debugLevel >= 4) {
932 this.tree._callHook(fn, this);
939 if (this.tree.options.debugLevel >= 1) {
986 return this.tree.findRelatedNode(this, where, includeHidden);
991 opts = this.tree.options,
1060 var opts = this.tree.options;
1281 var sep = this.tree.options.keyPathSeparator;
1448 return this.tree.hasFocus() && this.tree.focusNode === this;
1455 if (this.tree.options.debugLevel >= 3) {
1464 return this.tree.activeNode === this;
1486 if (!otherNode || otherNode.tree !== this.tree) {
1570 return this.tree.rootNode === this;
1597 return this.tree.rootNode === this.parent;
1613 hasFilter = this.tree.enableFilter,
1668 source = this.tree._triggerNodeEvent("lazyLoad", this);
1677 res = this.tree._callHook("nodeLoadChildren", this, source);
1748 tree = this.tree,
1830 if (tree !== targetNode.tree) {
1836 n.tree = targetNode.tree;
1844 tree._callHook("treeStructureChanged", tree, "moveTo");
1950 return this.tree._callHook("nodeRemoveChild", this, childNode);
1958 return this.tree._callHook("nodeRemoveChildren", this);
1988 return this.tree._callHook("nodeRender", this, force, deep);
1995 return this.tree._callHook("nodeRenderTitle", this);
2001 return this.tree._callHook("nodeRenderStatus", this);
2020 res = this.tree._callHook("nodeLoadChildren", this, source);
2064 if (this.tree.timer) {
2065 clearTimeout(this.tree.timer);
2066 this.tree.debug("clearTimeout(%o)", this.tree.timer);
2068 this.tree.timer = null;
2075 this.tree.timer = setTimeout(function () {
2076 self.tree.debug("setTimeout: trigger expand");
2081 this.tree.timer = setTimeout(function () {
2082 self.tree.debug("setTimeout: trigger activate");
2114 scrollOfs: this.tree.options.scrollOfs,
2115 scrollParent: this.tree.options.scrollParent,
2121 $container = this.tree.$container,
2125 if (this.tree.tbody) {
2256 return this.tree._callHook("nodeSetActive", this, flag, opts);
2264 return this.tree._callHook("nodeSetExpanded", this, flag, opts);
2271 return this.tree._callHook("nodeSetFocus", this, flag);
2279 return this.tree._callHook("nodeSetSelected", this, flag, opts);
2287 return this.tree._callHook(
2406 statusElem = this[this.tree.statusClassPropName],
2439 return this.tree._callHook("nodeToggleExpanded", this);
2443 return this.tree._callHook("nodeToggleSelected", this);
2457 modifyChild = this.tree.options.modifyChild;
2467 tree: this.tree, property
2618 if (this.tree.options.debugLevel >= 2) {
2714 var fakeParent = { tree: this }, property
2761 var ctx, tree;
2768 } else if (obj.tree) {
2770 tree = obj.tree;
2773 tree: tree, property
2774 widget: tree.widget,
2775 options: tree.widget.options,
2777 typeInfo: tree.types[obj.type] || {},
2783 tree: obj, property
3310 this.tree.warn("Unknown relation '" + where + "'.");
4176 tree = ctx.tree,
4217 if (stamp - tree.lastQuicksearchTime > 500) {
4218 tree.lastQuicksearchTerm = "";
4220 tree.lastQuicksearchTime = stamp;
4221 tree.lastQuicksearchTerm += key;
4223 matchNode = tree.findNextNode(
4224 tree.lastQuicksearchTerm,
4225 tree.getActiveNode()
4236 tree.nodeSetExpanded(ctx, true);
4239 tree.nodeSetExpanded(ctx, false);
4243 tree._triggerNodeEvent("clickPaging", ctx, event);
4248 tree.nodeToggleSelected(ctx);
4250 tree.nodeSetActive(ctx, true);
4254 tree.nodeSetActive(ctx, true);
4296 tree = ctx.tree,
4304 source = source.call(tree, { type: "source" }, ctx);
4378 tree.debugTime(tag);
4379 tree.nodeSetStatus(ctx, "loading");
4432 res = tree._triggerNodeEvent(
4443 tree.warn(
4461 errorObj = tree._makeHookContext(
4485 tree.warn(
4499 var errorObj = tree._makeHookContext(node, null, {
4516 tree.nodeSetStatus(ctx, "ok");
4536 tree[attr] = metaData[attr];
4541 $.extend(tree.data, metaData);
4551 if (tree.options.nodata && children.length === 0) {
4552 if (_isFunction(tree.options.nodata)) {
4553 noDataRes = tree.options.nodata.call(
4554 tree,
4559 tree.options.nodata === true &&
4562 noDataRes = tree.options.strings.noData;
4564 typeof tree.options.nodata === "string" &&
4567 noDataRes = tree.options.nodata;
4574 tree._triggerNodeEvent("loadChildren", node);
4597 ctxErr = tree._makeHookContext(node, null, {
4613 tree._triggerNodeEvent(
4619 tree.nodeSetStatus(
4630 tree.debugTimeEnd(tag);
4713 tree = ctx.tree,
4736 tree._callHook("treeRegisterNode", tree, false, n);
4810 tree = ctx.tree,
4820 if (tree._enableUpdate === false) {
4880 tree,
4888 opts.renderNode.call(tree, { type: "renderNode" }, ctx);
4912 node.tree.$div.append(node.ul);
4991 tree = ctx.tree,
5000 if (!node.span || tree._enableUpdate === false) {
5146 tree,
5186 tree,
5199 tree = ctx.tree,
5207 statusElem = node[tree.statusClassPropName];
5209 if (!statusElem || tree._enableUpdate === false) {
5218 if (tree.activeNode === node) {
5226 if (tree.focusNode === node) {
5324 tree = ctx.tree,
5329 isActive = node === tree.activeNode;
5361 if (tree.activeNode) {
5363 tree.activeNode !== node,
5366 subCtx = $.extend({}, ctx, { node: tree.activeNode });
5367 tree.nodeSetActive(subCtx, false);
5369 tree.activeNode === null,
5380 tree.activeNode = node;
5381 tree.nodeRenderStatus(ctx);
5383 tree.nodeSetFocus(ctx);
5386 tree._triggerNodeEvent(
5394 tree.activeNode === node,
5397 tree.activeNode = null;
5400 ctx.tree._triggerNodeEvent(
5426 tree = ctx.tree,
5499 tree._enableUpdate
5506 ctx.tree._triggerNodeEvent(
5514 ctx.tree._triggerNodeEvent(
5529 tree._callHook(
5536 tree._callHook("nodeRender", ctx, false, false, true);
5656 tree = ctx.tree,
5658 opts = tree.options,
5668 if (tree.focusNode) {
5669 if (tree.focusNode === node && flag) {
5673 ctx2 = $.extend({}, ctx, { node: tree.focusNode });
5674 tree.focusNode = null;
5687 tree.focusNode = node;
5696 $(tree.$container).attr(
5709 document.activeElement === tree.$container.get(0) ||
5710 $(document.activeElement, tree.$container).length >= 1;
5717 $(tree.$container).focus();
5742 tree = ctx.tree,
5784 if (tree.lastSelectedNode) {
5785 tree.lastSelectedNode.setSelected(false);
5806 tree.lastSelectedNode = flag ? node : null;
5808 tree._triggerNodeEvent("select", ctx);
5821 tree = ctx.tree;
5839 tree._callHook(
5854 tree._callHook("nodeRenderTitle", firstChild);
5857 tree._callHook(
5863 tree.render();
5880 tree.options.strings.loading +
5897 tree.options.strings.loadError +
5912 title: message || tree.options.strings.noData,
5959 var tree = ctx.tree;
5960 tree.activeNode = null;
5961 tree.focusNode = null;
5962 tree.$div.find(">ul.fancytree-container").empty();
5964 tree.rootNode.children = null;
5965 tree._callHook("treeStructureChanged", ctx, "clear");
5984 var tree = ctx.tree,
5985 opts = tree.options;
5991 tree.$container.attr("tabindex", opts.tabindex);
5996 tree.info("Move option " + attr + " to tree");
5997 tree[attr] = opts[attr];
6003 tree.$container.addClass("fancytree-checkbox-auto-hide");
6006 tree.$container
6010 tree.$container
6015 tree.$container.attr("role", "tree");
6017 tree.$container.attr("aria-multiselectable", true);
6030 tree = ctx.tree,
6036 if (tree.rootNode.children) {
6092 tree[attr] = metaData[attr];
6097 $.extend(tree.data, metaData);
6110 tree._triggerTreeEvent("preInit", null);
6115 tree._callHook(
6120 tree.render();
6122 tree.rootNode.fixSelection3FromEndNodes();
6124 if (tree.activeNode && tree.options.activeVisible) {
6125 tree.activeNode.makeVisible();
6127 tree._triggerTreeEvent("init", null, { status: true });
6130 tree.render();
6131 tree._triggerTreeEvent("init", null, { status: false });
6141 ctx.tree._callHook(
6191 var tree = ctx.tree,
6207 tree.$container.toggleClass(
6218 tree.$container
6222 tree.$container
6230 tree._callHook("treeLoad", tree, value);
6234 tree.debug(
6257 tree._callHook("treeCreate", tree);
6260 tree.render(true, false); // force, not-deep
6377 var tree = this.tree;
6379 if (tree && tree.options.debugLevel >= 3) {
6380 tree.warn(
6389 this.tree = new Fancytree(this);
6401 base = this.tree;
6418 this.tree.options[extName] = _simpleDeepMerge(
6421 this.tree.options[extName]
6430 this.tree.ext[extName] === undefined,
6436 this.tree.ext[extName] = {};
6438 _subclassObject(this.tree, base, extension, extName);
6446 this.tree.warn(
6463 this.tree.warn(
6472 this.tree.warn(
6479 this.tree._callHook("treeCreate", this.tree);
6486 this.tree._callHook("treeInit", this.tree);
6495 return this.tree._callHook(
6497 this.tree,
6506 this.tree._callHook("treeDestroy", this.tree);
6517 var ns = this.tree._ns;
6519 this.tree.$container.off(ns);
6526 tree = this.tree,
6527 ns = tree._ns;
6535 tree.$container
6550 if (tree._getExpiringValue("focusin")) {
6552 tree.debug("Ignored double focusin.");
6555 tree._setExpiringValue("focusin", true, 50);
6559 node = tree._getExpiringValue("mouseDownNode");
6561 tree.debug(
6569 tree._callHook(
6571 tree._makeHookContext(node, event),
6576 tree.tbody &&
6582 tree.debug(
6587 tree._callHook("treeSetFocus", tree, flag);
6608 node = tree.focusNode, // node may be null
6609 ctx = tree._makeHookContext(node || tree, event),
6610 prevPhase = tree.phase;
6613 tree.phase = "userEvent";
6617 res = tree._triggerNodeEvent(
6623 res = tree._triggerTreeEvent("keydown", event);
6628 res = tree._callHook("nodeKeydown", ctx);
6632 tree.phase = prevPhase;
6641 tree._lastMousedownNode = et ? et.node : null;
6644 tree._setExpiringValue(
6646 tree._lastMousedownNode
6656 tree = self.tree,
6657 prevPhase = tree.phase;
6663 ctx = tree._makeHookContext(node, event);
6666 tree.phase = "userEvent";
6672 tree._triggerNodeEvent(
6679 return tree._triggerNodeEvent(
6685 : tree._callHook("nodeClick", ctx);
6688 return tree._triggerNodeEvent(
6694 : tree._callHook("nodeDblclick", ctx);
6697 tree.phase = prevPhase;
6707 return this.tree.activeNode;
6716 return this.tree.getNodeByKey(key);
6724 return this.tree.rootNode;
6732 return this.tree;
6914 tree,
6938 tree = res.node && res.node.tree;
6939 (tree || FT).debug("Ignoring click on outer UL.");
7026 return widget ? widget.tree : null;
7062 tree = node.tree,
7069 tree: tree, property
7070 widget: tree.widget,
7071 options: tree.widget.options,
7072 typeInfo: tree.types[node.type] || {},
7074 res = treeOpt.call(tree, { type: optionName }, ctx);
7440 var tree = this,
7441 treeOptions = tree.options;
7443 return tree.getSelectedNodes(topOnly).length;
7461 extOpts = node.tree.options.childcounter,
7492 var tree = this.tree;
7540 var tree = this;
7558 var tree = this, // same as ctx.tree,
7603 var tree = ctx.tree,
7608 tree.nodeRenderTitle(ctx);
7796 tree = this.tree,
7797 refList = tree.refMap[this.refKey] || null,
7798 keyMap = tree.keyMap;
7828 refList = (refKey && this.tree.refMap[refKey]) || null;
7849 var tree = this.tree,
7852 keyMap = tree.keyMap,
7853 refMap = tree.refMap,
7992 ctx.tree.refMap = {};
7993 ctx.tree.keyMap = {};
8006 ctx.tree.refMap = {};
8007 ctx.tree.keyMap = {};
8013 tree = ctx.tree,
8014 keyMap = tree.keyMap,
8015 refMap = tree.refMap,
8037 tree.error(msg);
8101 $span = $(node[ctx.tree.statusClassPropName]);
8112 scpn = ctx.tree.statusClassPropName,
8208 return sourceNode.tree.ext.dnd._onDragEvent(
8229 dndOpts = sourceNode && sourceNode.tree.options.dnd;
8253 ctx = sourceNode.tree._makeHookContext(sourceNode, event, {
8259 dndOpts.updateHelper.call(sourceNode.tree, sourceNode, ctx);
8264 prevTargetNode.tree.ext.dnd._onDragEvent(
8274 if (!targetNode.tree.options.dnd.dragDrop) {
8278 targetNode.tree.ext.dnd._onDragEvent(
8288 targetNode.tree.ext.dnd._onDragEvent(
8296 targetNode.tree.ext.dnd._onDragEvent(
8324 targetNode.tree.ext.dnd._onDragEvent(
8333 targetNode.tree.ext.dnd._onDragEvent(
8343 sourceNode.tree.ext.dnd._onDragEvent(
8361 function _initDragAndDrop(tree) { argument
8362 var dnd = tree.options.dnd || null,
8363 glyph = tree.options.glyph || null;
8371 tree.widget.element.draggable(
8376 appendTo: tree.$container,
8401 opts = sourceNode.tree.options.dnd;
8430 sourceNode.tree,
8434 tree: sourceNode.tree, property
8449 tree.options.dnd.draggable
8455 tree.widget.element.droppable(
8482 tree.options.dnd.droppable
8521 var tree = ctx.tree;
8524 if (tree.options.dnd.dragStart) {
8525 tree.$container.on("mousedown", function (event) {
8546 _initDragAndDrop(tree);
8709 ctx.tree.nodeContainerAttrName
9091 function autoScroll(tree, event) { argument
9095 dndOpts = tree.options.dnd5,
9096 sp = tree.$scrollParent[0],
9102 spOfs = tree.$scrollParent.offset();
9107 tree.$scrollParent.innerHeight() -
9136 tree.debug("autoScroll: " + scrolled + "px");
9147 function evalEffectModifiers(tree, event, effectDefault) { argument
9177 tree.info(
9203 var tree = data.tree,
9207 data.effectAllowed = tree.options.dnd5.effectAllowed;
9208 data.dropEffect = tree.options.dnd5.dropEffectDefault;
9214 tree,
9216 tree.options.dnd5.dropEffectDefault
9244 var tree = data.tree,
9251 tree.warn(
9262 tree.info("applyDropEffectCallback: allowDrop === false");
9335 autoScroll(data.tree, event);
9339 data.tree.warn("Ignored dragover for non-node"); //, event, data);
9348 tree = data.tree,
9349 options = tree.options,
9358 tree.debug("Ignored dragover, since dragenter returned false.");
9367 tree.warn("event.pageY is undefined: see issue #1013.");
9484 tree = this,
9485 dndOpts = tree.options.dnd5,
9490 tree: tree, property
9492 options: tree.options,
9494 widget: tree.widget,
9508 tree.info("Ignored dragstart on a non-node.");
9519 SOURCE_NODE_LIST = tree.getSelectedNodes();
9543 nodeData.treeId = node.tree._id;
9551 tree.warn(
9651 tree = this,
9652 dndOpts = tree.options.dnd5,
9658 tree: tree, property
9660 options: tree.options,
9662 widget: tree.widget,
9687 tree.debug(
9714 (!SOURCE_NODE || SOURCE_NODE.tree !== node.tree)
9722 data.otherNode.tree === node.tree &&
9731 data.otherNode.tree === node.tree &&
9759 tree.debug(
9810 tree.debug(
9841 tree.info(
9853 tree.info(
9870 tree.debug(
9892 orgSourceTree = SOURCE_NODE && SOURCE_NODE.tree;
9903 if (orgSourceTree === tree) {
9904 tree.debug(
9909 tree.warn(
9999 tree = ctx.tree,
10071 tree.$container.on(
10073 onDragEvent.bind(tree)
10079 tree.$container.on(
10081 onDropEvent.bind(tree)
10138 tree = this.tree,
10139 local = tree.ext.edit,
10140 instOpts = tree.options.edit,
10144 tree: tree, property
10145 options: tree.options,
10146 isNew: $(node[tree.statusClassPropName]).hasClass(
10169 tree.widget._unbind();
10187 value: tree.options.escapeTitles
10237 tree = this.tree,
10238 local = tree.ext.edit,
10240 instOpts = tree.options.edit,
10286 tree.options.escapeTitles ? newVal : escapeHtml(newVal)
10303 tree.widget._bind();
10310 tree.$container.get(0).focus({ preventScroll: true });
10330 tree = this.tree,
10356 $(newNode[tree.statusClassPropName])
10361 $(newNode[tree.statusClassPropName]).addClass("fancytree-edit-new");
10362 self.tree.ext.edit.relatedNode = self;
10385 return this.tree.ext.edit
10386 ? this.tree.ext.edit.currentNode === this
10416 var tree = ctx.tree;
10423 var editNode = tree.isEditing();
10928 return !(this.tree.enableFilter && !this.match);
10951 var tree = ctx.tree;
10955 tree.enableFilter &&
10956 tree.lastFilterArgs &&
10959 tree._applyFilterImpl.apply(tree, tree.lastFilterArgs);
10981 tree = ctx.tree,
10984 $span = $(node[tree.statusClassPropName]),
10990 if (!$span.length || !tree.enableFilter) {
11266 var tree = ctx.tree,
11276 tree.warn("ext-glyph: missing `preset` option.");
11279 tree.$container.addClass("fancytree-ext-glyph");
11549 ctx2 = ctx.tree._makeHookContext(node, event);
11550 ctx.tree._callHook("nodeSetActive", ctx2, true);
11572 ctx.tree.$container.attr("tabindex", "-1");
11679 tree = ctx.tree,
11681 activeNode = tree.getActiveNode() || tree.getFirstChild(),
11692 tree.selectAll(false);
11700 tree.visitRows(
11722 var tree = ctx.tree,
11730 tree.selectAll(false);
11732 tree.getActiveNode().setSelected();
11737 tree.getActiveNode().setSelected();
11850 function _loadLazyNodes(tree, local, keyList, mode, dfd) { argument
11856 expandOpts = tree.options.persist.expandOpts,
11865 node = tree.getNodeByKey(key);
11869 tree.debug(
11878 tree.debug("_loadLazyNodes: " + node + " already loaded.");
11883 tree.debug("_loadLazyNodes: " + node + " was not yet found.");
11891 _loadLazyNodes(tree, local, missingKeyList, mode, dfd);
11894 tree.warn(
12027 var tree = ctx.tree,
12037 instOpts.cookiePrefix || "fancytree-" + tree._id + "-";
12065 tree.$div.on("fancytreeinit", function (event) {
12067 tree._triggerTreeEvent("beforeRestore", null, {}) === false
12089 tree,
12106 node = tree.getNodeByKey(keyList[i]);
12129 if (tree.options.selectMode === 3) {
12130 tree.visit(function (n) {
12142 (opts.persist.overrideSource || !tree.activeNode)
12144 node = tree.getNodeByKey(cookie);
12157 node = tree.getNodeByKey(prevFocus);
12160 if (tree.options.titlesTabbable) {
12163 $(tree.$container).focus();
12168 tree._triggerTreeEvent("restore", null, {});
12220 tree = ctx.tree,
12228 if (tree.options.selectMode === 3) {
12232 selNodes = $.map(tree.getSelectedNodes(true), function (n) {
12357 tree = ctx.tree,
12360 $table = tree.widget.element;
12364 tree.warn(
12394 tree.tbody = $tbody[0];
12398 tree.columnCount = $("thead >tr", $table)
12405 if (tree.columnCount && n !== tree.columnCount) {
12406 tree.warn(
12408 tree.columnCount +
12413 tree.columnCount = n;
12419 tree.columnCount >= 1,
12423 for (i = 0; i < tree.columnCount; i++) {
12434 tree.rowFragment = document.createDocumentFragment();
12435 tree.rowFragment.appendChild($row.get(0));
12450 tree.statusClassPropName = "tr";
12451 tree.ariaPropName = "tr";
12455 tree.$container = $table;
12460 $(tree.rootNode.ul).remove();
12461 tree.rootNode.ul = null;
12468 tree.$container
12502 tree = ctx.tree,
12507 if (tree._enableUpdate === false) {
12538 newRow = tree.rowFragment.firstChild.cloneNode(true);
12559 insertFirstChild(tree.tbody, newRow); // #675
12575 opts.createNode.call(tree, { type: "createNode" }, ctx);
12582 opts.renderNode.call(tree, { type: "renderNode" }, ctx);
12599 firstTr = tree.tbody.firstChild;
12614 tree.tbody.insertBefore(n.tr, nextTr);
12628 tree = ctx.tree,
12657 tree,
12665 .prop("colspan", tree.columnCount)
12672 opts.renderColumns.call(tree, { type: "renderColumns" }, ctx);
12728 ctx.tree._triggerNodeEvent(
12737 ctx.tree._triggerNodeEvent(
12746 ctx.tree._triggerNodeEvent(
13086 ).appendTo(ctx.tree.$container),