Lines Matching +defs:e +defs:data

78 			return !!$.data( elem, fullName );
150 // always use the name + a colon as the prefix, e.g., draggable:start
232 var instance = $.data( this, fullName );
269 var instance = $.data( this, fullName );
276 $.data( this, fullName, new object( options, this ) );
313 $.data( element, this.widgetFullName, this );
397 // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
686 _trigger: function( type, event, data ) {
690 data = data || {};
710 this.element.trigger( event, data );
712 callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
1080 left: function( position, data ) {
1081 var within = data.within,
1084 collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1086 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1090 if ( data.collisionWidth > outerWidth ) {
1094 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1105 position.left = withinOffset + outerWidth - data.collisionWidth;
1124 top: function( position, data ) {
1125 var within = data.within,
1127 outerHeight = data.within.height,
1128 collisionPosTop = position.top - data.collisionPosition.marginTop,
1130 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1134 if ( data.collisionHeight > outerHeight ) {
1138 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1149 position.top = withinOffset + outerHeight - data.collisionHeight;
1170 left: function( position, data ) {
1171 var within = data.within,
1175 collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1177 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1178 myOffset = data.my[ 0 ] === "left" ?
1179 -data.elemWidth :
1180 data.my[ 0 ] === "right" ?
1181 data.elemWidth :
1183 atOffset = data.at[ 0 ] === "left" ?
1184 data.targetWidth :
1185 data.at[ 0 ] === "right" ?
1186 -data.targetWidth :
1188 offset = -2 * data.offset[ 0 ],
1193 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1199 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1206 top: function( position, data ) {
1207 var within = data.within,
1211 collisionPosTop = position.top - data.collisionPosition.marginTop,
1213 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1214 top = data.my[ 1 ] === "top",
1216 -data.elemHeight :
1217 data.my[ 1 ] === "bottom" ?
1218 data.elemHeight :
1220 atOffset = data.at[ 1 ] === "top" ?
1221 data.targetHeight :
1222 data.at[ 1 ] === "bottom" ?
1223 -data.targetHeight :
1225 offset = -2 * data.offset[ 1 ],
1229 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1235 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1610 // Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
1612 // Attribute names that should NOT be added to node.data
1616 data: true,
1678 } catch (e) {
1709 verParts = $.map(_trim(dottedVersion).split("."), function (e) {
1710 return parseInt(e, 10);
1714 function (e) {
1715 return parseInt(e, 10);
1907 // Evaluate 'data-NAME' attributes with special treatment for 'data-json'.
1908 var d = $.extend({}, $el.data()),
1916 // <li data-json='...'> is already returned as object (http://api.jquery.com/data/#data-html5)
1951 * @classdesc A FancytreeNode represents the hierarchical data model and operations.
1960 * @property {object} data Contains all extra data that was passed on node creation
1970 * @property {boolean} lazy True if this node is loaded on demand, i.e. on first expansion.
1986 this.data = {};
2006 // node.data += obj.data
2007 if (obj.data) {
2008 $.extend(this.data, obj.data);
2010 // Copy all other attributes to this.data.NAME
2018 // node.data.NAME = obj.NAME
2019 this.data[name] = obj[name];
2290 // copy (most) attributes to node.ATTR or node.data.ATTR
2303 this.data[name] = v;
2630 // When fixing the parents, we trust the sibling status (i.e.
2647 * Update node data. If dict contains 'children', then also replace
2655 // copy all other attributes to this.data.xxx
2660 } else if (name === "data") {
2661 // node.data += dict.data
2662 $.extend(this.data, dict.data);
2667 // node.data.NAME = dict.NAME
2668 this.data[name] = dict[name];
2680 this.data = $.extend(this.data, dict);
2686 this.data = $.extend(this.data, dict);
2714 /** Return the hierarchical child index (1-based, e.g. '3.2.4').
2733 /** Return the parent keys separated by options.keyPathSeparator, e.g. "/id_1/id_17/id_32".
2808 /** Return a string representing the hierachical node path, e.g. "a/b/c".
2868 /** Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).
2927 /** Return true if node is vertically below `otherNode`, i.e. rendered in a subsequent row.
2975 /** Return true if node is a folder, i.e. has the node.folder attribute set.
2988 /** Return true if node is lazy (even if data was already loaded)
3000 /** Return true if children are currently beeing loaded, i.e. a Ajax request is pending.
3033 /** Return true if node is selected, i.e. has a checkmark set (see also FancytreeNode#isActive).
3053 /** Return true if this a top level node, i.e. a direct child of the (invisible) system root node.
3078 // i.e. return false for nodes (but not parents) that are hidden
3136 "lazyLoad event must return source in data.result"
3334 // if( !ftnode.data.isStatusNode() && opts.selectMode==3 && !isInitializing )
3361 * e.g. `$.ui.keyCode.LEFT` = 'left'.
3390 } catch (e) {} // #272
3482 res.done(function (data) {
3734 /**Select this node, i.e. check the checkbox.
3820 if (!$.isEmptyObject(this.data)) {
3821 dict.data = $.extend({}, this.data);
3822 if ($.isEmptyObject(dict.data)) {
3823 delete dict.data;
3912 * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...
3917 var data,
3926 data = {
3933 $.extend(data, extra);
3935 modifyChild({ type: "modifyChild" }, data);
3940 * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...
4098 * @property {string} _id Automatically generated unique tree instance ID, e.g. "1".
4099 * @property {string} _ns Automatically generated unique tree namespace, e.g. ".fancytree-1".
4105 * @property {object|array} columns Recommended place to store shared column meta data. @since 2.27
4106 * @property {object} data Metadata, i.e. properties that may be passed to `source` in addition to a children array.
4112 * @property {FancytreeOptions} options Current options, i.e. default options + options passed to constructor.
4116 * @property {object} types Map for shared type specific meta data, used with node.type attribute. @since 2.27
4149 // allow to init tree.data.foo from <div data-foo=''>
4150 this.data = _getElementDataAsDict(this.$div);
4456 // clipboard = { mode: cmd, data: node };
4461 // data: node.toDict(function(d, n) {
4472 // clipboard.data.moveTo(node, "child");
4473 // clipboard.data.setActive();
4475 // node.addChildren(clipboard.data).setActive();
4491 /** (experimental) Modify existing data model.
4698 * e.g. `$.ui.keyCode.LEFT` = 'left'.
4789 * return node.isSelected() && node.data.yes;
4968 /** Return true if any node is currently beeing loaded, i.e. a Ajax request is pending.
5010 * tree.loadKeyPath("/_3/_23/_26/_27").progress(function(data){
5011 * if(data.status === "loaded") {
5012 * console.log("loaded intermediate node " + data.node);
5013 * }else if(data.status === "ok") {
5022 * return node.data.refKey === key;
5032 * @param {string | string[]} keyPathList one or more key paths (e.g. '/3/2_1/7')
5136 // Traverse and pop path segments (i.e. keys), until we hit a lazy, unloaded node
5223 * was marked 'active' in the source data, and optionally set the keyboard
5242 * @param [source] optional new source (defaults to initial source data)
5249 /**Render tree (i.e. create DOM elements for all top-level nodes).
5334 /* _trigger a widget event with additional tree data. */
5749 * data was rendered.
5853 function (data, textStatus, jqXHR) {
5855 // depending on the response data
5861 typeof data === "string"
5884 // Allow to adjust the received response data in the `postProcess` event.
5890 // => res = <new data>
5898 response: data,
5909 } catch (e) {
5911 error: e,
5912 message: "" + e,
5935 // (otherwise use existing data, which may have been modified in-place)
5936 data = res;
5939 data &&
5940 _hasProp(data, "d") &&
5951 data =
5952 typeof data.d === "string"
5953 ? $.parseJSON(data.d)
5954 : data.d;
5956 resultDfd.resolveWith(this, [data]);
5973 // Now we implement the UI update and add the data to the tree.
5976 .done(function (data) {
5980 if ($.isPlainObject(data)) {
5982 // Copy extra properties to tree.data.foo
5988 _isArray(data.children),
5989 "if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
5991 metaData = data;
5992 children = data.children;
5994 // Copy some attributes to tree.data
6001 // Copy all other attributes to tree.data.NAME
6002 $.extend(tree.data, metaData);
6004 children = data;
6230 * was changed (e.g. after moving this node or adding/removing children)
6235 * <span class='fancytree-node fancytree-expanded fancytree-has-children fancytree-lastsib fancytree-exp-el fancytree-ico-e'>
6254 /* This method must take care of all cases where the current data mode
6255 * (i.e. node hierarchy) does not match the current markup.
6426 // #486: successorLi is set, if we re-rendered (i.e. discarded)
6434 /** Create HTML inside the node's outer `<span>` (i.e. expander, checkbox,
6482 // .. else (i.e. for root level) skip expander/connector alltogether
6505 if (node.data.iconClass !== undefined) {
6516 node.icon = node.data.iconClass;
6639 //$(node.span).html(ares.join("")); // it will cleanup the jQuery data currently associated with SPAN (if any), but it executes more slowly
6751 (node.expanded ? "e" : "c") +
6758 (node.expanded ? "e" : "c") +
6876 * data was retrieved, rendered, and the expand animation finished.
7090 _assert(typeof source !== "boolean", "lazyLoad event must return source in data.result");
7294 } catch (e) {}
7307 function _setStatusNode(data, type) {
7313 $.extend(firstChild, data);
7317 node._setChildren([data]);
7454 // Copy some attributes to tree.data
7485 * @param {object} [source] optional new source (use last data otherwise)
7503 type = $container.data("type") || "html";
7519 // allow to init tree.data.foo from <ul data-foo=''>
7520 this.data = $.extend(
7521 this.data,
7545 "if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
7550 // Copy some attributes to tree.data
7557 // Copy extra properties to tree.data.foo
7558 $.extend(tree.data, metaData);
7562 $.error("Invalid data-type: " + type);
7642 * Note: `key` may reference a nested option, e.g. 'dnd5.scroll'.
7795 nodata: true, // (bool, string, or callback) display message, when no data available
7805 noData: "No data.",
7853 this.source || this.element.data("type") === "json"
7889 // Add a namespace tree.ext.EXTENSION, to hold instance data
8322 /** Make jQuery.position() arguments backwards compatible, i.e. if
8369 * @param {Event} event Mouse event, e.g. click, ...
8416 * @param {Event} event Mouse event, e.g. click, mousemove, ...
8486 widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1.8
8501 * @param {object} nodeObject where to look for the local option property, e.g. `node` or `node.data`
8502 * @param {object} treeOption where to look for the tree option, e.g. `tree.options` or `tree.options.dnd5`
8509 * // Check for node.data.bar, tree,options.qux.bar(), and tree.options.qux.bar:
8510 * $.ui.fancytree.evalOption("bar", node, node.data, tree.options.qux);
8651 $.ui.fancytree.overrideMethod(ctx.options, "createNode", function(event, data) {
8655 data.node.span.draggable = true;
8680 * Parse tree data from HTML <ul> markup
8703 d = { tooltip: null, data: {} };
8710 d.data.href = $liA.attr("href");
8711 d.data.target = $liA.attr("target");
8754 // Add <li data-NAME='...'> as node.data.NAME
8757 // #507: convert data-hidecheckbox (lower case) to hideCheckbox
8766 // #56: Allow to set special node.attributes from data-...
8775 // All other data-... goes to node.data...
8776 $.extend(d.data, allData);
8816 var e = document.createElement("div");
8817 e.innerHTML = s;
8818 return e.childNodes.length === 0
8820 : e.childNodes[0].nodeValue;
8926 node.data.childCounter = count;
9043 node.data.childCounter == null
9045 : +node.data.childCounter;
9233 path = $.map(node.getParentList(false, true), function (e) {
9234 return e.refKey || e.key;
9248 * [ext-clones] Return a list of clone-nodes (i.e. same refKey) or null.
9336 refMap[prevRefKey] = $.map(refList, function (e) {
9337 return e === prevKey ? key : e;
9351 refMap[prevRefKey] = $.map(refList, function (e) {
9352 return e === prevKey ? null : e;
9465 // The default implementation loads initial data
9661 // SESSION_DATA = null, // plain object passed to events as `data`
9857 * the `data` object and apply those settings.
9867 function prepareDropEffectCallback(event, data) {
9868 var tree = data.tree,
9869 dataTransfer = data.dataTransfer;
9872 data.effectAllowed = tree.options.dnd5.effectAllowed;
9873 data.dropEffect = tree.options.dnd5.dropEffectDefault;
9875 data.effectAllowed = REQUESTED_EFFECT_ALLOWED;
9876 data.dropEffect = REQUESTED_DROP_EFFECT;
9878 data.dropEffectSuggested = evalEffectModifiers(
9883 data.isMove = data.dropEffect === "move";
9884 data.files = dataTransfer.files || [];
9908 function applyDropEffectCallback(event, data, allowDrop) {
9909 var tree = data.tree,
9910 dataTransfer = data.dataTransfer;
9914 REQUESTED_EFFECT_ALLOWED !== data.effectAllowed
9919 ": data.effectAllowed changed from " +
9922 data.effectAllowed
9928 data.effectAllowed = "none";
9929 data.dropEffect = "none";
9931 // if (REQUESTED_DROP_EFFECT !== data.dropEffect) {
9935 // "): data.dropEffect changed from previous " +
9938 // data.dropEffect
9942 data.isMove = data.dropEffect === "move";
9943 // data.isMove = data.dropEffectSuggested === "move";
9948 REQUESTED_EFFECT_ALLOWED = data.effectAllowed;
9949 REQUESTED_DROP_EFFECT = data.dropEffect;
9953 // data.tree.info(
9974 // data.tree.warn(
9997 function handleDragOver(event, data) {
9999 if (data.options.dnd5.scroll) {
10000 autoScroll(data.tree, event);
10003 if (!data.node) {
10004 data.tree.warn("Ignored dragover for non-node"); //, event, data);
10013 tree = data.tree,
10016 targetNode = data.node,
10017 sourceNode = data.otherNode,
10056 if (dndOpts.preventVoidMoves && data.dropEffect === "move") {
10085 data.hitMode = hitMode;
10087 prepareDropEffectCallback(event, data);
10088 dndOpts.dragOver(targetNode, data);
10090 applyDropEffectCallback(event, data, allowDrop);
10091 hitMode = data.hitMode;
10154 data = {
10189 SOURCE_NODE_LIST = dndOpts.multiSource(node, data);
10202 // Transfer data is only accessible on dragstart and drop!
10204 // data store list of items representing dragged data can be
10205 // enumerated, but the data itself is unavailable and no new
10206 // data can be added.
10217 "Could not set data (IE only accepts 'text') - " + ex
10238 prepareDropEffectCallback(event, data);
10242 if (dndOpts.dragStart(node, data) === false) {
10248 applyDropEffectCallback(event, data);
10250 // Unless user set `data.useDefaultImage` to false in dragStart,
10254 if (data.useDefaultImage) {
10283 // data.tree.info("drag", SOURCE_NODE)
10284 prepareDropEffectCallback(event, data);
10285 dndOpts.dragDrag(node, data);
10286 applyDropEffectCallback(event, data);
10288 $sourceList.toggleClass(classDragRemove, data.isMove);
10296 prepareDropEffectCallback(event, data);
10300 data.isCancelled = !LAST_HIT_MODE;
10301 dndOpts.dragEnd(node, data, !LAST_HIT_MODE);
10302 // applyDropEffectCallback(event, data);
10322 data = {
10342 // data.isMove = dropEffect === "move";
10386 data.otherNode &&
10387 data.otherNode.tree === node.tree &&
10388 node.parent === data.otherNode.parent
10395 data.otherNode &&
10396 data.otherNode.tree === node.tree &&
10397 node.isDescendantOf(data.otherNode)
10410 prepareDropEffectCallback(event, data);
10411 r = dndOpts.dragEnter(node, data);
10419 applyDropEffectCallback(event, data, allowDrop);
10442 prepareDropEffectCallback(event, data);
10443 LAST_HIT_MODE = handleDragOver(event, data);
10462 dndOpts.dragExpand(node, data) !== false)
10497 dndOpts.dragLeave(node, data);
10528 data.otherNodeData = json;
10540 data.otherNodeData
10552 data.hitMode = LAST_HIT_MODE;
10553 prepareDropEffectCallback(event, data, !LAST_HIT_MODE);
10554 data.isCancelled = !LAST_HIT_MODE;
10559 dndOpts.dragDrop(node, data);
10560 // applyDropEffectCallback(event, data);
10562 // Prevent browser's default drop handling, i.e. open as link, ...
10572 dndOpts.dragEnd(SOURCE_NODE, data);
10635 multiSource: false, // true: Drag multiple (i.e. selected) nodes. Also a callback() is allowed
10637 // dropEffect: "auto", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string.
10651 dragStart: null, // Callback(sourceNode, data), return true, to enable dnd drag
10652 dragDrag: $.noop, // Callback(sourceNode, data)
10653 dragEnd: $.noop, // Callback(sourceNode, data)
10655 dragEnter: null, // Callback(targetNode, data), return true, to enable dnd drop
10656 dragOver: $.noop, // Callback(targetNode, data)
10657 dragExpand: $.noop, // Callback(targetNode, data), return false to prevent autoExpand
10658 dragDrop: $.noop, // Callback(targetNode, data)
10659 dragLeave: $.noop, // Callback(targetNode, data)
10689 function (event, data) {
10692 if (data.node.span) {
10693 data.node.span.draggable = true;
10695 data.node.warn(
10929 // Allow to break (keep editor open), modify input, or re-define data.save
11071 beforeClose: $.noop, // Return false to prevent cancel/save (data.input is available)
11074 edit: $.noop, // Editor was opened (available as data.input)
11076 save: $.noop, // Save data.input.val() or return false to keep editor open
11088 .on("fancytreebeforeupdateviewport", function (event, data) {
11326 // #740: we must not apply the marks to escaped entity names, e.g. `&quot;`
11606 autoApply: true, // Re-apply last filter if lazy data is loaded
11609 fuzzy: false, // Match single characters in order, e.g. 'fb' will match 'FooBar'
11614 nodata: true, // Display a 'no data' status node if result is empty
11688 // if node.span is null (i.e. not rendered)
11767 // (Use tree.options.icon callback to define custom icons based on node data)
11792 // (Use tree.options.icon callback to define custom icons based on node data)
11821 // (Use tree.options.icon callback to define custom icons based on node data)
11846 // (Use tree.options.icon callback to define custom icons based on node data)
11872 // (Use tree.options.icon callback to define custom icons based on node data)
11892 // #871: propsed this, but I am not sure how robust this is, e.g.
11896 // var oldIcon = "fa-" + $span.data("icon");
12335 // beforeSelect: $.noop // Return false to prevent cancel/save (data.input is available)
12477 } catch (e) {
12478 $.ui.fancytree.warn("Could not access window.localStorage", e);
12494 } catch (e) {
12495 $.ui.fancytree.warn("Could not access window.sessionStorage", e);
12581 * [ext-persist] Remove persistence data of the given type(s).
12658 overrideSource: true, // true: cookie takes precedence over `source` data attributes.
12663 /* Generic read/write string data to cookie, sessionStorage or localStorage. */
12683 data = local._data(cookieName),
12684 keyList = data ? data.split(delim) : [],
13587 // Additional classes (e.g. 'ui-corner-all')
13658 } catch (e) {