Lines Matching +defs:n +defs:key
145 "checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(
497 * @property {string} key Node id (must be unique inside the tree)
521 this.li = null; // <li id='key' ftnode=this> tag
562 // Fix missing key
563 if (this.key == null) {
566 this.key = "" + this.tree.options.defaultKey(this);
567 _assert(this.key, "defaultKey() must return a unique key");
569 this.key = "_" + FT._nextNodeKey++;
572 this.key = "" + this.key; // Convert to string (#217)
603 // Add to key/ref map (except for root node)
610 /* Return the direct child FancytreeNode with a given key, index. */
619 if (cl[i].key === ptr) {
653 * @param {FancytreeNode | string | Integer} [insertBefore] child node (or key or index of such).
769 var i, n;
774 n = this.children[i];
775 if (n.statusNodeType === "paging") {
776 this.removeChild(n);
823 // patch [key, null] means 'remove'
894 n;
898 n = cl.length;
900 for (i = 0, l = n; i < l; i++) {
901 n += cl[i].countChildren();
904 return n;
953 this.visit(function (n) {
954 if (match(n)) {
955 res.push(n);
970 this.visit(function (n) {
971 if (match(n)) {
972 res = n;
1283 return sep + this.getPath(!excludeSelf, "key", sep);
1363 this.visitParents(function (n) {
1364 if (n.parent) {
1365 val = isFunc ? part(n) : n[part];
1612 n,
1616 // TODO: check $(n.span).is(":visible")
1625 n = parents[i];
1627 if (!n.expanded) {
1631 // if (hasFilter && !n.match && !n.subMatchCount) {
1729 * This is the default. To be compatble with the D'n'd
1834 this.visit(function (n) {
1836 n.tree = targetNode.tree;
2446 return "FancytreeNode@" + this.key + "[title='" + this.title + "']";
2447 // return "<FancytreeNode(#" + this.key + ", '" + this.title + "')>";
2600 n,
2604 n = ac[i];
2605 if (includeSelf || n !== this) {
2606 if (fn(n) === false) {
2718 key: "root_" + this._id,
2814 _setExpiringValue: function (key, value, ms) {
2815 this._tempCache[key] = {
2820 _getExpiringValue: function (key) {
2821 var entry = this._tempCache[key];
2825 delete this._tempCache[key];
2891 /** Activate node with a given key and fire focus and activate events.
2895 * Pass key = false, to deactivate the current node only.
2896 * @param {string} key
2900 activateKey: function (key, opts) {
2901 var node = this.getNodeByKey(key);
3000 // data: node.toDict(function(d, n) {
3001 // delete d.key;
3032 * @param {Array} patchList array of [key, NodePatch] arrays
3040 key,
3052 key = p2[0];
3054 node = key === null ? this.rootNode : this.getNodeByKey(key);
3060 this.warn("could not find node with key '" + key + "'");
3210 function _checkNode(n) {
3211 // console.log("_check " + n)
3212 if (match(n)) {
3213 res = n;
3215 if (res || n === startNode) {
3256 this.visit(function (n) {
3257 if (n.isVisible()) {
3258 res = n;
3265 this.visit(function (n) {
3267 if (n.isVisible()) {
3268 res = n;
3292 function (n) {
3293 res = n;
3302 function (n) {
3303 res = n;
3367 value: this.activeNode.key,
3377 value: node.key,
3430 * Return node with a given key or null if not found.
3432 * @param {string} key
3436 getNodeByKey: function (key, searchRoot) {
3442 el = document.getElementById(this.options.idPrefix + key);
3450 key = "" + key; // Convert to string (#1005)
3452 if (node.key === key) {
3514 this.rootNode.visit(function (n) {
3516 if (n._isLoading || n._requestId) {
3540 * // Resolve using node.key:
3560 * matchKey: function(node, key){
3561 * return node.data.refKey === key;
3571 * @param {string | string[]} keyPathList one or more key paths (e.g. '/3/2_1/7')
3573 * Pass an object to define custom key matchers for the path segments: {callback: function, matchKey: function}.
3600 opts.matchKey = function (node, key) {
3601 return node.key === key;
3635 key,
3645 function __findChild(parent, key) {
3646 // console.log("__findChild", key, parent);
3653 if (opts.matchKey(cl[i], key)) {
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]}
3678 key = segList.shift();
3679 node = __findChild(tmpParent, key);
3682 "loadKeyPath: key not found: " +
3683 key +
3688 opts.callback(this, key, "error");
3698 key = node.key; //target.segList.join(sep);
3699 if (remainMap[key]) {
3700 remainMap[key].pathSegList.push(segList);
3702 remainMap[key] = {
3739 // key = remain.segList.shift();
3740 // node = __findChild(remain.parent, key);
3746 // // matcher is used, because we cannot assume that a single segment-key is unique
3748 // self.error("loadKeyPath: error loading child by key '" + key + "' (parent: " + target.parent + ")", target);
3749 // // node = self.getNodeByKey(key);
3804 // TODO: selectKey: function(key, select)
3957 res = node.visit(function (n) {
3958 if (checkFilter && !n.match && !n.subMatchCount) {
3961 if (fn(n) === false) {
3964 if (!includeHidden && n.children && !n.expanded) {
4179 // #909: Use event.key, to get unicode characters.
4180 // We can't use `/\w/.test(key)`, because that would
4183 key = event.key || String.fromCharCode(which),
4198 // FT.debug( "eventToString(): " + FT.eventToString(event) + ", key='" + key + "', isAlnum: " + isAlnum );
4221 tree.lastQuicksearchTerm += key;
4681 childNode.visit(function (n) {
4682 n.parent = null;
4703 node.visit(function (n) {
4704 n.li = n.ul = null;
4734 node.visit(function (n) {
4735 n.parent = null;
4736 tree._callHook("treeRegisterNode", tree, false, n);
4864 if (node.key && opts.generateIds) {
4865 node.li.id = opts.idPrefix + node.key;
5285 cn.combinedExpanderPrefix + "n" + (isLastSib ? "l" : "")
5702 // "ftal_" + opts.idPrefix + node.key);
5798 node.visitSiblings(function (n) {
5799 n._changeSelectStatusAttrs(flag && n === node);
6181 * Note: `key` may reference a nested option, e.g. 'dnd5.scroll'.
6187 * @param {string} key option name
6190 treeSetOption: function (ctx, key, value) {
6196 switch (key) {
6236 key +
6246 this.widget._super.call(this.widget, key, value);
6251 key,
6494 _setOption: function (key, value) {
6498 key,
6710 * @param {string} key
6714 getNodeByKey: function (key) {
6716 return this.tree.getNodeByKey(key);
7287 d.key = tmp;