Lines Matching +defs:e +defs:data

149 		// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
151 // Attribute names that should NOT be added to node.data
155 data: true,
217 } catch (e) {
248 verParts = $.map(_trim(dottedVersion).split("."), function (e) {
249 return parseInt(e, 10);
253 function (e) {
254 return parseInt(e, 10);
446 // Evaluate 'data-NAME' attributes with special treatment for 'data-json'.
447 var d = $.extend({}, $el.data()),
455 // <li data-json='...'> is already returned as object (http://api.jquery.com/data/#data-html5)
490 * @classdesc A FancytreeNode represents the hierarchical data model and operations.
499 * @property {object} data Contains all extra data that was passed on node creation
509 * @property {boolean} lazy True if this node is loaded on demand, i.e. on first expansion.
525 this.data = {};
545 // node.data += obj.data
546 if (obj.data) {
547 $.extend(this.data, obj.data);
549 // Copy all other attributes to this.data.NAME
557 // node.data.NAME = obj.NAME
558 this.data[name] = obj[name];
829 // copy (most) attributes to node.ATTR or node.data.ATTR
842 this.data[name] = v;
1169 // When fixing the parents, we trust the sibling status (i.e.
1186 * Update node data. If dict contains 'children', then also replace
1194 // copy all other attributes to this.data.xxx
1199 } else if (name === "data") {
1200 // node.data += dict.data
1201 $.extend(this.data, dict.data);
1206 // node.data.NAME = dict.NAME
1207 this.data[name] = dict[name];
1219 this.data = $.extend(this.data, dict);
1225 this.data = $.extend(this.data, dict);
1253 /** Return the hierarchical child index (1-based, e.g. '3.2.4').
1272 /** Return the parent keys separated by options.keyPathSeparator, e.g. "/id_1/id_17/id_32".
1347 /** Return a string representing the hierachical node path, e.g. "a/b/c".
1407 /** Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).
1466 /** Return true if node is vertically below `otherNode`, i.e. rendered in a subsequent row.
1514 /** Return true if node is a folder, i.e. has the node.folder attribute set.
1527 /** Return true if node is lazy (even if data was already loaded)
1539 /** Return true if children are currently beeing loaded, i.e. a Ajax request is pending.
1572 /** Return true if node is selected, i.e. has a checkmark set (see also FancytreeNode#isActive).
1592 /** Return true if this a top level node, i.e. a direct child of the (invisible) system root node.
1617 // i.e. return false for nodes (but not parents) that are hidden
1675 "lazyLoad event must return source in data.result"
1873 // if( !ftnode.data.isStatusNode() && opts.selectMode==3 && !isInitializing )
1900 * e.g. `$.ui.keyCode.LEFT` = 'left'.
1929 } catch (e) {} // #272
2021 res.done(function (data) {
2273 /**Select this node, i.e. check the checkbox.
2359 if (!$.isEmptyObject(this.data)) {
2360 dict.data = $.extend({}, this.data);
2361 if ($.isEmptyObject(dict.data)) {
2362 delete dict.data;
2451 * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...
2456 var data,
2465 data = {
2472 $.extend(data, extra);
2474 modifyChild({ type: "modifyChild" }, data);
2479 * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...
2637 * @property {string} _id Automatically generated unique tree instance ID, e.g. "1".
2638 * @property {string} _ns Automatically generated unique tree namespace, e.g. ".fancytree-1".
2644 * @property {object|array} columns Recommended place to store shared column meta data. @since 2.27
2645 * @property {object} data Metadata, i.e. properties that may be passed to `source` in addition to a children array.
2651 * @property {FancytreeOptions} options Current options, i.e. default options + options passed to constructor.
2655 * @property {object} types Map for shared type specific meta data, used with node.type attribute. @since 2.27
2688 // allow to init tree.data.foo from <div data-foo=''>
2689 this.data = _getElementDataAsDict(this.$div);
2995 // clipboard = { mode: cmd, data: node };
3000 // data: node.toDict(function(d, n) {
3011 // clipboard.data.moveTo(node, "child");
3012 // clipboard.data.setActive();
3014 // node.addChildren(clipboard.data).setActive();
3030 /** (experimental) Modify existing data model.
3237 * e.g. `$.ui.keyCode.LEFT` = 'left'.
3328 * return node.isSelected() && node.data.yes;
3507 /** Return true if any node is currently beeing loaded, i.e. a Ajax request is pending.
3549 * tree.loadKeyPath("/_3/_23/_26/_27").progress(function(data){
3550 * if(data.status === "loaded") {
3551 * console.log("loaded intermediate node " + data.node);
3552 * }else if(data.status === "ok") {
3561 * return node.data.refKey === key;
3571 * @param {string | string[]} keyPathList one or more key paths (e.g. '/3/2_1/7')
3675 // Traverse and pop path segments (i.e. keys), until we hit a lazy, unloaded node
3762 * was marked 'active' in the source data, and optionally set the keyboard
3781 * @param [source] optional new source (defaults to initial source data)
3788 /**Render tree (i.e. create DOM elements for all top-level nodes).
3873 /* _trigger a widget event with additional tree data. */
4288 * data was rendered.
4392 function (data, textStatus, jqXHR) {
4394 // depending on the response data
4400 typeof data === "string"
4423 // Allow to adjust the received response data in the `postProcess` event.
4429 // => res = <new data>
4437 response: data,
4448 } catch (e) {
4450 error: e,
4451 message: "" + e,
4474 // (otherwise use existing data, which may have been modified in-place)
4475 data = res;
4478 data &&
4479 _hasProp(data, "d") &&
4490 data =
4491 typeof data.d === "string"
4492 ? $.parseJSON(data.d)
4493 : data.d;
4495 resultDfd.resolveWith(this, [data]);
4512 // Now we implement the UI update and add the data to the tree.
4515 .done(function (data) {
4519 if ($.isPlainObject(data)) {
4521 // Copy extra properties to tree.data.foo
4527 _isArray(data.children),
4528 "if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
4530 metaData = data;
4531 children = data.children;
4533 // Copy some attributes to tree.data
4540 // Copy all other attributes to tree.data.NAME
4541 $.extend(tree.data, metaData);
4543 children = data;
4769 * was changed (e.g. after moving this node or adding/removing children)
4774 * <span class='fancytree-node fancytree-expanded fancytree-has-children fancytree-lastsib fancytree-exp-el fancytree-ico-e'>
4793 /* This method must take care of all cases where the current data mode
4794 * (i.e. node hierarchy) does not match the current markup.
4965 // #486: successorLi is set, if we re-rendered (i.e. discarded)
4973 /** Create HTML inside the node's outer `<span>` (i.e. expander, checkbox,
5021 // .. else (i.e. for root level) skip expander/connector alltogether
5044 if (node.data.iconClass !== undefined) {
5055 node.icon = node.data.iconClass;
5178 //$(node.span).html(ares.join("")); // it will cleanup the jQuery data currently associated with SPAN (if any), but it executes more slowly
5290 (node.expanded ? "e" : "c") +
5297 (node.expanded ? "e" : "c") +
5415 * data was retrieved, rendered, and the expand animation finished.
5629 _assert(typeof source !== "boolean", "lazyLoad event must return source in data.result");
5833 } catch (e) {}
5846 function _setStatusNode(data, type) {
5852 $.extend(firstChild, data);
5856 node._setChildren([data]);
5993 // Copy some attributes to tree.data
6024 * @param {object} [source] optional new source (use last data otherwise)
6042 type = $container.data("type") || "html";
6058 // allow to init tree.data.foo from <ul data-foo=''>
6059 this.data = $.extend(
6060 this.data,
6084 "if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
6089 // Copy some attributes to tree.data
6096 // Copy extra properties to tree.data.foo
6097 $.extend(tree.data, metaData);
6101 $.error("Invalid data-type: " + type);
6181 * Note: `key` may reference a nested option, e.g. 'dnd5.scroll'.
6334 nodata: true, // (bool, string, or callback) display message, when no data available
6344 noData: "No data.",
6392 this.source || this.element.data("type") === "json"
6428 // Add a namespace tree.ext.EXTENSION, to hold instance data
6861 /** Make jQuery.position() arguments backwards compatible, i.e. if
6908 * @param {Event} event Mouse event, e.g. click, ...
6955 * @param {Event} event Mouse event, e.g. click, mousemove, ...
7025 widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1.8
7040 * @param {object} nodeObject where to look for the local option property, e.g. `node` or `node.data`
7041 * @param {object} treeOption where to look for the tree option, e.g. `tree.options` or `tree.options.dnd5`
7048 * // Check for node.data.bar, tree,options.qux.bar(), and tree.options.qux.bar:
7049 * $.ui.fancytree.evalOption("bar", node, node.data, tree.options.qux);
7190 $.ui.fancytree.overrideMethod(ctx.options, "createNode", function(event, data) {
7194 data.node.span.draggable = true;
7219 * Parse tree data from HTML <ul> markup
7242 d = { tooltip: null, data: {} };
7249 d.data.href = $liA.attr("href");
7250 d.data.target = $liA.attr("target");
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...
7315 $.extend(d.data, allData);
7355 var e = document.createElement("div");
7356 e.innerHTML = s;
7357 return e.childNodes.length === 0
7359 : e.childNodes[0].nodeValue;
7464 node.data.childCounter = count;
7581 node.data.childCounter == null
7583 : +node.data.childCounter;
7770 path = $.map(node.getParentList(false, true), function (e) {
7771 return e.refKey || e.key;
7785 * [ext-clones] Return a list of clone-nodes (i.e. same refKey) or null.
7873 refMap[prevRefKey] = $.map(refList, function (e) {
7874 return e === prevKey ? key : e;
7888 refMap[prevRefKey] = $.map(refList, function (e) {
7889 return e === prevKey ? null : e;
8002 // The default implementation loads initial data
8198 $(this).data("ui-draggable") ||
8199 $(this).data("draggable"),
8200 sourceNode = ui.helper.data("ftSourceNode") || null;
8224 $(this).data("ui-draggable") ||
8225 $(this).data("draggable"),
8226 sourceNode = ui.helper.data("ftSourceNode") || null,
8227 prevTargetNode = ui.helper.data("ftTargetNode") || null,
8250 ui.helper.data("ftTargetNode", targetNode);
8312 $(this).data("ui-draggable") ||
8313 $(this).data("draggable"),
8314 sourceNode = ui.helper.data("ftSourceNode") || null,
8315 targetNode = ui.helper.data("ftTargetNode") || null,
8415 $helper.data("ftSourceNode", sourceNode);
8427 // Allow to modify the helper, e.g. to add multi-node-drag feedback
8445 var sourceNode = ui.helper.data("ftSourceNode");
8508 dragStart: null, // Callback(sourceNode, data), return true, to enable dnd
8509 dragStop: null, // Callback(sourceNode, data)
8510 initHelper: null, // Callback(sourceNode, data)
8511 updateHelper: null, // Callback(sourceNode, data)
8513 dragEnter: null, // Callback(targetNode, data)
8514 dragOver: null, // Callback(targetNode, data)
8515 dragExpand: null, // Callback(targetNode, data), return false to prevent autoExpand
8516 dragDrop: null, // Callback(targetNode, data)
8517 dragLeave: null, // Callback(targetNode, data)
8768 ui.helper.data("enterResponse", res);
8773 enterResponse = ui.helper.data("enterResponse");
8851 ui.helper.data("hitMode", hitMode);
8883 hitMode = ui.helper.data("hitMode");
8893 ui.helper.data("enterResponse", null);
8894 ui.helper.data("hitMode", null);
8996 // SESSION_DATA = null, // plain object passed to events as `data`
9192 * the `data` object and apply those settings.
9202 function prepareDropEffectCallback(event, data) {
9203 var tree = data.tree,
9204 dataTransfer = data.dataTransfer;
9207 data.effectAllowed = tree.options.dnd5.effectAllowed;
9208 data.dropEffect = tree.options.dnd5.dropEffectDefault;
9210 data.effectAllowed = REQUESTED_EFFECT_ALLOWED;
9211 data.dropEffect = REQUESTED_DROP_EFFECT;
9213 data.dropEffectSuggested = evalEffectModifiers(
9218 data.isMove = data.dropEffect === "move";
9219 data.files = dataTransfer.files || [];
9243 function applyDropEffectCallback(event, data, allowDrop) {
9244 var tree = data.tree,
9245 dataTransfer = data.dataTransfer;
9249 REQUESTED_EFFECT_ALLOWED !== data.effectAllowed
9254 ": data.effectAllowed changed from " +
9257 data.effectAllowed
9263 data.effectAllowed = "none";
9264 data.dropEffect = "none";
9266 // if (REQUESTED_DROP_EFFECT !== data.dropEffect) {
9270 // "): data.dropEffect changed from previous " +
9273 // data.dropEffect
9277 data.isMove = data.dropEffect === "move";
9278 // data.isMove = data.dropEffectSuggested === "move";
9283 REQUESTED_EFFECT_ALLOWED = data.effectAllowed;
9284 REQUESTED_DROP_EFFECT = data.dropEffect;
9288 // data.tree.info(
9309 // data.tree.warn(
9332 function handleDragOver(event, data) {
9334 if (data.options.dnd5.scroll) {
9335 autoScroll(data.tree, event);
9338 if (!data.node) {
9339 data.tree.warn("Ignored dragover for non-node"); //, event, data);
9348 tree = data.tree,
9351 targetNode = data.node,
9352 sourceNode = data.otherNode,
9391 if (dndOpts.preventVoidMoves && data.dropEffect === "move") {
9420 data.hitMode = hitMode;
9422 prepareDropEffectCallback(event, data);
9423 dndOpts.dragOver(targetNode, data);
9425 applyDropEffectCallback(event, data, allowDrop);
9426 hitMode = data.hitMode;
9489 data = {
9524 SOURCE_NODE_LIST = dndOpts.multiSource(node, data);
9537 // Transfer data is only accessible on dragstart and drop!
9539 // data store list of items representing dragged data can be
9540 // enumerated, but the data itself is unavailable and no new
9541 // data can be added.
9552 "Could not set data (IE only accepts 'text') - " + ex
9573 prepareDropEffectCallback(event, data);
9577 if (dndOpts.dragStart(node, data) === false) {
9583 applyDropEffectCallback(event, data);
9585 // Unless user set `data.useDefaultImage` to false in dragStart,
9589 if (data.useDefaultImage) {
9618 // data.tree.info("drag", SOURCE_NODE)
9619 prepareDropEffectCallback(event, data);
9620 dndOpts.dragDrag(node, data);
9621 applyDropEffectCallback(event, data);
9623 $sourceList.toggleClass(classDragRemove, data.isMove);
9631 prepareDropEffectCallback(event, data);
9635 data.isCancelled = !LAST_HIT_MODE;
9636 dndOpts.dragEnd(node, data, !LAST_HIT_MODE);
9637 // applyDropEffectCallback(event, data);
9657 data = {
9677 // data.isMove = dropEffect === "move";
9721 data.otherNode &&
9722 data.otherNode.tree === node.tree &&
9723 node.parent === data.otherNode.parent
9730 data.otherNode &&
9731 data.otherNode.tree === node.tree &&
9732 node.isDescendantOf(data.otherNode)
9745 prepareDropEffectCallback(event, data);
9746 r = dndOpts.dragEnter(node, data);
9754 applyDropEffectCallback(event, data, allowDrop);
9777 prepareDropEffectCallback(event, data);
9778 LAST_HIT_MODE = handleDragOver(event, data);
9797 dndOpts.dragExpand(node, data) !== false)
9832 dndOpts.dragLeave(node, data);
9863 data.otherNodeData = json;
9875 data.otherNodeData
9887 data.hitMode = LAST_HIT_MODE;
9888 prepareDropEffectCallback(event, data, !LAST_HIT_MODE);
9889 data.isCancelled = !LAST_HIT_MODE;
9894 dndOpts.dragDrop(node, data);
9895 // applyDropEffectCallback(event, data);
9897 // Prevent browser's default drop handling, i.e. open as link, ...
9907 dndOpts.dragEnd(SOURCE_NODE, data);
9970 multiSource: false, // true: Drag multiple (i.e. selected) nodes. Also a callback() is allowed
9972 // dropEffect: "auto", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string.
9986 dragStart: null, // Callback(sourceNode, data), return true, to enable dnd drag
9987 dragDrag: $.noop, // Callback(sourceNode, data)
9988 dragEnd: $.noop, // Callback(sourceNode, data)
9990 dragEnter: null, // Callback(targetNode, data), return true, to enable dnd drop
9991 dragOver: $.noop, // Callback(targetNode, data)
9992 dragExpand: $.noop, // Callback(targetNode, data), return false to prevent autoExpand
9993 dragDrop: $.noop, // Callback(targetNode, data)
9994 dragLeave: $.noop, // Callback(targetNode, data)
10024 function (event, data) {
10027 if (data.node.span) {
10028 data.node.span.draggable = true;
10030 data.node.warn(
10263 // Allow to break (keep editor open), modify input, or re-define data.save
10405 beforeClose: $.noop, // Return false to prevent cancel/save (data.input is available)
10408 edit: $.noop, // Editor was opened (available as data.input)
10410 save: $.noop, // Save data.input.val() or return false to keep editor open
10422 .on("fancytreebeforeupdateviewport", function (event, data) {
10659 // #740: we must not apply the marks to escaped entity names, e.g. `&quot;`
10939 autoApply: true, // Re-apply last filter if lazy data is loaded
10942 fuzzy: false, // Match single characters in order, e.g. 'fb' will match 'FooBar'
10947 nodata: true, // Display a 'no data' status node if result is empty
11021 // if node.span is null (i.e. not rendered)
11099 // (Use tree.options.icon callback to define custom icons based on node data)
11124 // (Use tree.options.icon callback to define custom icons based on node data)
11153 // (Use tree.options.icon callback to define custom icons based on node data)
11178 // (Use tree.options.icon callback to define custom icons based on node data)
11204 // (Use tree.options.icon callback to define custom icons based on node data)
11224 // #871: propsed this, but I am not sure how robust this is, e.g.
11228 // var oldIcon = "fa-" + $span.data("icon");
11665 // beforeSelect: $.noop // Return false to prevent cancel/save (data.input is available)
11806 } catch (e) {
11807 $.ui.fancytree.warn("Could not access window.localStorage", e);
11823 } catch (e) {
11824 $.ui.fancytree.warn("Could not access window.sessionStorage", e);
11910 * [ext-persist] Remove persistence data of the given type(s).
11987 overrideSource: true, // true: cookie takes precedence over `source` data attributes.
11992 /* Generic read/write string data to cookie, sessionStorage or localStorage. */
12012 data = local._data(cookieName),
12013 keyList = data ? data.split(delim) : [],
12914 // Additional classes (e.g. 'ui-corner-all')
12984 } catch (e) {