Lines Matching +defs:data +defs:value
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,
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
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;
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);
1527 /** Return true if node is lazy (even if data was already loaded)
1675 "lazyLoad event must return source in data.result"
1873 // if( !ftnode.data.isStatusNode() && opts.selectMode==3 && !isInitializing )
2021 res.done(function (data) {
2359 if (!$.isEmptyObject(this.data)) {
2360 dict.data = $.extend({}, this.data);
2361 if ($.isEmptyObject(dict.data)) {
2362 delete dict.data;
2399 toggleClass: function (value, flag) {
2403 classNames = value.match(rnotwhite) || [],
2409 // this.info("toggleClass('" + value + "', " + flag + ")", curClasses);
2412 $(statusElem).toggleClass(value, flag);
2434 // this.info("-> toggleClass('" + value + "', " + flag + "): '" + this.extraClasses + "'");
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', ...
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.
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);
2814 _setExpiringValue: function (key, value, ms) {
2816 value: value,
2823 return entry.value;
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.
3135 return !flag; // return previous value
3328 * return node.isSelected() && node.data.yes;
3367 value: this.activeNode.key,
3377 value: node.key,
3420 * Return current option value.
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;
3762 * was marked 'active' in the source data, and optionally set the keyboard
3781 * @param [source] optional new source (defaults to initial source data)
3813 * Set current option value.
3816 * @param {any} new value
3818 setOption: function (optionName, value) {
3819 return this.widget.option(optionName, value);
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,
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;
4793 /* This method must take care of all cases where the current data mode
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
5415 * data was retrieved, rendered, and the expand animation finished.
5629 _assert(typeof source !== "boolean", "lazyLoad event must return source in data.result");
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);
6182 * In this case `value`contains the complete, modified `dnd5` option hash.
6184 * if( value.scroll !== tree.options.dnd5.scroll ) {...}
6188 * @param {any} value option value
6190 treeSetOption: function (ctx, key, value) {
6209 !!value
6217 if (value === false) {
6230 tree._callHook("treeLoad", tree, value);
6238 value +
6240 typeof value +
6246 this.widget._super.call(this.widget, key, value);
6252 value
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
6494 _setOption: function (key, value) {
6499 value
7025 widget = el.data("ui-fancytree") || el.data("fancytree"); // the latter is required by jQuery <= 1.8
7028 /** Return an option value that has a default, but may be overridden by a
7035 * Else if `tree.options.<optionName>` is a value, use that.
7040 * @param {object} nodeObject where to look for the local option property, e.g. `node` or `node.data`
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);