fancytree upgrade

This commit is contained in:
azivner 2017-08-16 22:06:14 -04:00
parent 1e2c5ed130
commit d775947daa
47 changed files with 909 additions and 582 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
/** Core Fancytree module.
@ -53,10 +53,11 @@ var i, attr,
221: "]", 222: "'"},
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
// Boolean attributes that can be set with equivalent class names in the LI tags
CLASS_ATTRS = "active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),
// Note: v2.23: checkbox and hideCheckbox are *not* in this list
CLASS_ATTRS = "active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),
CLASS_ATTR_MAP = {},
// Top-level Fancytree node attributes, that can be set by dict
NODE_ATTRS = "expanded extraClasses folder hideCheckbox icon key lazy refKey selected statusNodeType title tooltip unselectable".split(" "),
NODE_ATTRS = "checkbox expanded extraClasses folder icon key lazy radiogroup refKey selected statusNodeType title tooltip unselectable unselectableIgnore unselectableStatus".split(" "),
NODE_ATTR_MAP = {},
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
NODE_ATTR_LOWERCASE_MAP = {},
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
name = NODE_ATTRS[i];
this[name] = obj[name];
}
// unselectableIgnore and unselectableStatus imply unselectable
if( this.unselectableIgnore != null || this.unselectableStatus != null ) {
this.unselectable = true;
}
if( obj.hideCheckbox ) {
$.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'");
}
// node.data += obj.data
if(obj.data){
$.extend(this.data, obj.data);
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
this.tree.lastSelectedNode = this;
}
// TODO: handle obj.focus = true
// Create child nodes
cl = obj.children;
if( cl ){
@ -689,9 +698,15 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
return res;
},
/* Apply selection state (internal use only) */
_changeSelectStatusAttrs: function (state) {
var changed = false;
_changeSelectStatusAttrs: function(state) {
var changed = false,
opts = this.tree.options,
unselectable = FT.evalOption("unselectable", this, this, opts, false),
unselectableStatus = FT.evalOption("unselectableStatus", this, this, opts, undefined);
if( unselectable && unselectableStatus != null ) {
state = unselectableStatus;
}
switch(state){
case false:
changed = ( this.selected || this.partsel );
@ -721,7 +736,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Fix selection status, after this node was (de)selected in multi-hier mode.
* This includes (de)selecting all children.
*/
fixSelection3AfterClick: function() {
fixSelection3AfterClick: function(callOpts) {
var flag = this.isSelected();
// this.debug("fixSelection3AfterClick()");
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
this.visit(function(node){
node._changeSelectStatusAttrs(flag);
});
this.fixSelection3FromEndNodes();
this.fixSelection3FromEndNodes(callOpts);
},
/**
* Fix selection status for multi-hier mode.
@ -737,14 +752,16 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Should be called after this node has loaded new children or after
* children have been modified using the API.
*/
fixSelection3FromEndNodes: function() {
fixSelection3FromEndNodes: function(callOpts) {
var opts = this.tree.options;
// this.debug("fixSelection3FromEndNodes()");
_assert(this.tree.options.selectMode === 3, "expected selectMode 3");
_assert(opts.selectMode === 3, "expected selectMode 3");
// Visit all end nodes and adjust their parent's `selected` and `partsel`
// attributes. Return selection state true, false, or undefined.
function _walk(node){
var i, l, child, s, state, allSelected,someSelected,
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
children = node.children;
if( children && children.length ){
@ -756,18 +773,22 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
child = children[i];
// the selection state of a node is not relevant; we need the end-nodes
s = _walk(child);
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
// if( !child.unselectableIgnore ) {
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
}else{
// This is an end-node: simply report the status
// state = ( node.unselectable ) ? undefined : !!node.selected;
state = !!node.selected;
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
state = ( unselState == null ) ? !!node.selected : !!unselState;
}
node._changeSelectStatusAttrs(state);
return state;
@ -776,20 +797,25 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// Update parent's state
this.visitParents(function(node){
var i, l, child, state,
var i, l, child, state, unselIgnore, unselState,
children = node.children,
allSelected = true,
someSelected = false;
for( i=0, l=children.length; i<l; i++ ){
child = children[i];
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( child.selected || child.partsel ) {
someSelected = true;
}
if( !child.unselectable && !child.selected ) {
allSelected = false;
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
unselState = FT.evalOption("unselectableStatus", child, child, opts, undefined);
state = ( unselState == null ) ? !!child.selected : !!unselState;
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( state || child.partsel ) {
someSelected = true;
}
if( !state ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
isRoot: function() {
return this.isRootNode();
},
/** Return true if node is partially selected (tri-state).
* @returns {boolean}
* @since 2.23
*/
isPartsel: function() {
return !this.selected && !!this.partsel;
},
/** (experimental) Return true if this is partially loaded.
* @returns {boolean}
* @since 2.15
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
},
/**Select this node, i.e. check the checkbox.
* @param {boolean} [flag=true] pass false to deselect
* @param {object} [opts] additional options. Defaults to {noEvents: false, p
* propagateDown: null, propagateUp: null, callback: null }
*/
setSelected: function(flag){
return this.tree._callHook("nodeSetSelected", this, flag);
setSelected: function(flag, opts){
return this.tree._callHook("nodeSetSelected", this, flag, opts);
},
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
* @param {string} status 'error'|'empty'|'ok'
@ -1910,11 +1945,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// this.info("-> toggleClass('" + value + "', " + flag + "): '" + this.extraClasses + "'");
return wasAdded;
},
/** Flip expanded status. */
/** Flip expanded status. */
toggleExpanded: function(){
return this.tree._callHook("nodeToggleExpanded", this);
},
/** Flip selection status. */
/** Flip selection status. */
toggleSelected: function(){
return this.tree._callHook("nodeToggleSelected", this);
},
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
}
return true;
},
/** Call fn(node) for all sibling nodes.<br>
* Stop iteration, if fn() returns false.<br>
* Return false if iteration was stopped.
*
* @param {function} fn the callback function.
* Return false to stop iteration.
* @param {boolean} [includeSelf=false]
* @returns {boolean}
*/
visitSiblings: function(fn, includeSelf) {
var i, l, n,
ac = this.parent.children;
for (i=0, l=ac.length; i<l; i++) {
n = ac[i];
if ( includeSelf || n !== this ){
if( fn(n) === false ) {
return false;
}
}
}
return true;
},
/** Write warning to browser console (prepending node info)
*
* @param {*} msg string or object or array of such
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
*/
nodeRenderTitle: function(ctx, title) {
// set node connector images, links and text
var icon, nodeTitle, role, tabindex, tooltip,
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
node = ctx.node,
tree = ctx.tree,
opts = ctx.options,
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
ares.push("<span " + role + " class='fancytree-expander'></span>");
}
// Checkbox mode
if( opts.checkbox && node.hideCheckbox !== true && !node.isStatusNode() ) {
checkbox = FT.evalOption("checkbox", node, node, opts, false);
if( checkbox && !node.isStatusNode() ) {
role = aria ? " role='checkbox'" : "";
ares.push("<span " + role + " class='fancytree-checkbox'></span>");
className = "fancytree-checkbox";
if( checkbox === "radio" || (node.parent && node.parent.radiogroup) ) {
className += " fancytree-radio";
}
ares.push("<span " + role + " class='" + className + "'></span>");
}
// Folder or doctype icon
if( node.data.iconClass !== undefined ) { // 2015-11-16
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
}
if ( !nodeTitle ) {
if( node.tooltip ) {
tooltip = node.tooltip;
} else if ( opts.tooltip ) {
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
tooltip = FT.evalOption("tooltip", node, node, opts, null);
if( tooltip === true ) {
tooltip = node.title;
}
// if( node.tooltip ) {
// tooltip = node.tooltip;
// } else if ( opts.tooltip ) {
// tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
// }
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
if( node.partsel ){
cnList.push(cn.partsel);
}
if( node.unselectable ){
if( FT.evalOption("unselectable", node, node, opts, false) ){
cnList.push(cn.unselectable);
}
if( node._isLoading ){
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
*
* @param {EventData} ctx
* @param {boolean} [flag=true]
* @param {object} [opts] additional options. Defaults to {noEvents: false,
* propagateDown: null, propagateUp: null,
* callback: null,
* }
* @returns {boolean} previous status
*/
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
callOpts = callOpts || {};
var node = ctx.node,
tree = ctx.tree,
opts = ctx.options;
opts = ctx.options,
noEvents = (callOpts.noEvents === true);
// flag defaults to true
flag = (flag !== false);
// node.debug("nodeSetSelected(" + flag + ")", ctx);
if( node.unselectable){
// Cannot (de)select unselectable nodes directly (only by propagation or
// by setting the `.selected` property)
if( FT.evalOption("unselectable", node, node, opts, false) ){
return;
}
// TODO: !!node.expanded is nicer, but doesn't pass jshint
// https://github.com/jshint/jshint/issues/455
// if( !!node.expanded === !!flag){
if((node.selected && flag) || (!node.selected && !flag)){
return !!node.selected;
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
return !!node.selected;
// Remember the user's intent, in case down -> up propagation prevents
// applying it to node.selected
node._lastSelectIntent = flag;
// Nothing to do?
/*jshint -W018 */ // Confusing use of '!'
if( !!node.selected === flag ){
if( opts.selectMode === 3 && node.partsel && !flag ){
// If propagation prevented selecting this node last time, we still
// want to allow to apply setSelected(false) now
}else{
return flag;
}
}
/*jshint +W018 */
if( !noEvents &&
this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ) {
return !!node.selected;
}
if(flag && opts.selectMode === 1){
// single selection mode
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
if(tree.lastSelectedNode){
tree.lastSelectedNode.setSelected(false);
}
}else if(opts.selectMode === 3){
// multi.hier selection mode
node.selected = flag;
// this._fixSelectionState(node);
node.fixSelection3AfterClick();
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
// multi-hierarchical selection mode
node.selected = flag;
node.fixSelection3AfterClick(callOpts);
}else if(node.parent.radiogroup){
node.visitSiblings(function(n){
n._changeSelectStatusAttrs(flag && n === node);
}, true);
}else{
// default: selectMode: 2, multi selection mode
node.selected = flag;
}
node.selected = flag;
this.nodeRenderStatus(ctx);
tree.lastSelectedNode = flag ? node : null;
tree._triggerNodeEvent("select", ctx);
if( !noEvents ) {
tree._triggerNodeEvent("select", ctx);
}
},
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
*
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
* @param {EventData} ctx
*/
nodeToggleSelected: function(ctx) {
return this.nodeSetSelected(ctx, !ctx.node.selected);
var node = ctx.node,
flag = !node.selected;
// In selectMode: 3 this node may be unselected+partsel, even if
// setSelected(true) was called before, due to `unselectable` children.
// In this case, we now toggle as `setSelected(false)`
if( node.partsel && !node.selected && node._lastSelectIntent === true ) {
flag = false;
node.selected = true; // so it is not considered 'nothing to do'
}
node._lastSelectIntent = flag;
return this.nodeSetSelected(ctx, flag);
},
/** Remove all nodes.
* @param {EventData} ctx
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
dataType: "json" // Expect json format and pass json object to callbacks.
}, //
aria: false,
aria: true,
autoActivate: true,
autoCollapse: false,
autoScroll: false,
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
focused: "fancytree-focused",
partload: "fancytree-partload",
partsel: "fancytree-partsel",
radio: "fancytree-radio",
// radiogroup: "fancytree-radiogroup",
unselectable: "fancytree-unselectable",
lastsib: "fancytree-lastsib",
loading: "fancytree-loading",
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
/** @lends Fancytree_Static# */
{
/** @type {string} */
version: "2.22.5", // Set to semver by 'grunt release'
version: "2.23.0", // Set to semver by 'grunt release'
/** @type {string} */
buildType: "production", // Set to 'production' by 'grunt build'
/** @type {int} */
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
res.type = "title";
}else if( /\bfancytree-expander\b/.test(tcn) ){
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
}else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
// }else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
}else if( /\bfancytree-checkbox\b/.test(tcn) ){
res.type = "checkbox";
}else if( /\bfancytree-icon\b/.test(tcn) ){
res.type = "icon";
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
if( tmp ){
d.key = tmp;
}
// Translate hideCheckbox -> checkbox:false
if( $li.attr("hideCheckbox") ){
d.checkbox = false;
}
// Add <li data-NAME='...'> as node.data.NAME
allData = _getElementDataAsDict($li);
if( allData && !$.isEmptyObject(allData) ) {
@ -5148,8 +5266,8 @@ $.extend($.ui.fancytree,
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
// To keep the global namespace clean, we wrap everything in a closure
@ -5251,7 +5369,7 @@ $.ui.fancytree.registerExtension({
// Every extension must be registered by a unique name.
name: "childcounter",
// Version information should be compliant with [semver](http://semver.org)
version: "2.22.5",
version: "2.23.0",
// Extension specific options and their defaults.
// This options will be available as `tree.options.childcounter.hideExpanded`
@ -5349,8 +5467,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -5682,7 +5800,7 @@ $.ui.fancytree._FancytreeClass.prototype.changeRefKey = function(oldRefKey, newR
*/
$.ui.fancytree.registerExtension({
name: "clones",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
@ -5815,8 +5933,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -6053,7 +6171,7 @@ function _initDragAndDrop(tree) {
$.ui.fancytree.registerExtension({
name: "dnd",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
// Make tree nodes accept draggables
@ -6388,8 +6506,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
@ -6642,7 +6760,7 @@ function handleDragOver(event, data) {
$.ui.fancytree.registerExtension({
name: "dnd5",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
@ -6969,8 +7087,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -7213,7 +7331,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isEditing = function(){
*/
$.ui.fancytree.registerExtension({
name: "edit",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
adjustWidthOfs: 4, // null: don't adjust input size to content
@ -7285,8 +7403,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -7549,7 +7667,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isMatched = function(){
*/
$.ui.fancytree.registerExtension({
name: "filter",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autoApply: true, // Re-apply last filter if lazy data is loaded
@ -7639,8 +7757,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -7657,7 +7775,7 @@ function _getIcon(opts, type){
$.ui.fancytree.registerExtension({
name: "glyph",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
map: {
@ -7783,8 +7901,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -7890,7 +8008,7 @@ function findNeighbourTd($target, keyCode){
*/
$.ui.fancytree.registerExtension({
name: "gridnav",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autofocusInput: false, // Focus first embedded input if node gets activated
@ -7989,8 +8107,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -8130,7 +8248,7 @@ $.ui.fancytree._FancytreeClass.prototype.getPersistData = function(){
*/
$.ui.fancytree.registerExtension({
name: "persist",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
cookieDelimiter: "~",
@ -8337,7 +8455,7 @@ $.ui.fancytree.registerExtension({
}
return res;
},
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
var res, selNodes,
tree = ctx.tree,
node = ctx.node,
@ -8369,7 +8487,7 @@ $.ui.fancytree.registerExtension({
/*!
* jquery.fancytree.table.js
*
* Render tree as table (aka 'treegrid', 'tabletree').
* Render tree as table (aka 'tree grid', 'table tree').
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2017, Martin Wendt (http://wwWendt.de)
@ -8377,8 +8495,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -8456,7 +8574,7 @@ function findPrevRowNode(node){
$.ui.fancytree.registerExtension({
name: "table",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
@ -8826,8 +8944,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -8839,7 +8957,7 @@ $.ui.fancytree.registerExtension({
*/
$.ui.fancytree.registerExtension({
name: "themeroller",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
activeClass: "ui-state-active", // Class added to active node
@ -8922,8 +9040,8 @@ $.ui.fancytree.registerExtension({
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -9023,7 +9141,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, labelOfs, measure
*/
$.ui.fancytree.registerExtension({
name: "wide",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
/** Core Fancytree module.
@ -53,10 +53,11 @@ var i, attr,
221: "]", 222: "'"},
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
// Boolean attributes that can be set with equivalent class names in the LI tags
CLASS_ATTRS = "active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),
// Note: v2.23: checkbox and hideCheckbox are *not* in this list
CLASS_ATTRS = "active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),
CLASS_ATTR_MAP = {},
// Top-level Fancytree node attributes, that can be set by dict
NODE_ATTRS = "expanded extraClasses folder hideCheckbox icon key lazy refKey selected statusNodeType title tooltip unselectable".split(" "),
NODE_ATTRS = "checkbox expanded extraClasses folder icon key lazy radiogroup refKey selected statusNodeType title tooltip unselectable unselectableIgnore unselectableStatus".split(" "),
NODE_ATTR_MAP = {},
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
NODE_ATTR_LOWERCASE_MAP = {},
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
name = NODE_ATTRS[i];
this[name] = obj[name];
}
// unselectableIgnore and unselectableStatus imply unselectable
if( this.unselectableIgnore != null || this.unselectableStatus != null ) {
this.unselectable = true;
}
if( obj.hideCheckbox ) {
$.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'");
}
// node.data += obj.data
if(obj.data){
$.extend(this.data, obj.data);
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
this.tree.lastSelectedNode = this;
}
// TODO: handle obj.focus = true
// Create child nodes
cl = obj.children;
if( cl ){
@ -689,9 +698,15 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
return res;
},
/* Apply selection state (internal use only) */
_changeSelectStatusAttrs: function (state) {
var changed = false;
_changeSelectStatusAttrs: function(state) {
var changed = false,
opts = this.tree.options,
unselectable = FT.evalOption("unselectable", this, this, opts, false),
unselectableStatus = FT.evalOption("unselectableStatus", this, this, opts, undefined);
if( unselectable && unselectableStatus != null ) {
state = unselectableStatus;
}
switch(state){
case false:
changed = ( this.selected || this.partsel );
@ -721,7 +736,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Fix selection status, after this node was (de)selected in multi-hier mode.
* This includes (de)selecting all children.
*/
fixSelection3AfterClick: function() {
fixSelection3AfterClick: function(callOpts) {
var flag = this.isSelected();
// this.debug("fixSelection3AfterClick()");
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
this.visit(function(node){
node._changeSelectStatusAttrs(flag);
});
this.fixSelection3FromEndNodes();
this.fixSelection3FromEndNodes(callOpts);
},
/**
* Fix selection status for multi-hier mode.
@ -737,14 +752,16 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Should be called after this node has loaded new children or after
* children have been modified using the API.
*/
fixSelection3FromEndNodes: function() {
fixSelection3FromEndNodes: function(callOpts) {
var opts = this.tree.options;
// this.debug("fixSelection3FromEndNodes()");
_assert(this.tree.options.selectMode === 3, "expected selectMode 3");
_assert(opts.selectMode === 3, "expected selectMode 3");
// Visit all end nodes and adjust their parent's `selected` and `partsel`
// attributes. Return selection state true, false, or undefined.
function _walk(node){
var i, l, child, s, state, allSelected,someSelected,
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
children = node.children;
if( children && children.length ){
@ -756,18 +773,22 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
child = children[i];
// the selection state of a node is not relevant; we need the end-nodes
s = _walk(child);
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
// if( !child.unselectableIgnore ) {
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
}else{
// This is an end-node: simply report the status
// state = ( node.unselectable ) ? undefined : !!node.selected;
state = !!node.selected;
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
state = ( unselState == null ) ? !!node.selected : !!unselState;
}
node._changeSelectStatusAttrs(state);
return state;
@ -776,20 +797,25 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// Update parent's state
this.visitParents(function(node){
var i, l, child, state,
var i, l, child, state, unselIgnore, unselState,
children = node.children,
allSelected = true,
someSelected = false;
for( i=0, l=children.length; i<l; i++ ){
child = children[i];
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( child.selected || child.partsel ) {
someSelected = true;
}
if( !child.unselectable && !child.selected ) {
allSelected = false;
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
unselState = FT.evalOption("unselectableStatus", child, child, opts, undefined);
state = ( unselState == null ) ? !!child.selected : !!unselState;
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( state || child.partsel ) {
someSelected = true;
}
if( !state ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
isRoot: function() {
return this.isRootNode();
},
/** Return true if node is partially selected (tri-state).
* @returns {boolean}
* @since 2.23
*/
isPartsel: function() {
return !this.selected && !!this.partsel;
},
/** (experimental) Return true if this is partially loaded.
* @returns {boolean}
* @since 2.15
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
},
/**Select this node, i.e. check the checkbox.
* @param {boolean} [flag=true] pass false to deselect
* @param {object} [opts] additional options. Defaults to {noEvents: false, p
* propagateDown: null, propagateUp: null, callback: null }
*/
setSelected: function(flag){
return this.tree._callHook("nodeSetSelected", this, flag);
setSelected: function(flag, opts){
return this.tree._callHook("nodeSetSelected", this, flag, opts);
},
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
* @param {string} status 'error'|'empty'|'ok'
@ -1910,11 +1945,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// this.info("-> toggleClass('" + value + "', " + flag + "): '" + this.extraClasses + "'");
return wasAdded;
},
/** Flip expanded status. */
/** Flip expanded status. */
toggleExpanded: function(){
return this.tree._callHook("nodeToggleExpanded", this);
},
/** Flip selection status. */
/** Flip selection status. */
toggleSelected: function(){
return this.tree._callHook("nodeToggleSelected", this);
},
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
}
return true;
},
/** Call fn(node) for all sibling nodes.<br>
* Stop iteration, if fn() returns false.<br>
* Return false if iteration was stopped.
*
* @param {function} fn the callback function.
* Return false to stop iteration.
* @param {boolean} [includeSelf=false]
* @returns {boolean}
*/
visitSiblings: function(fn, includeSelf) {
var i, l, n,
ac = this.parent.children;
for (i=0, l=ac.length; i<l; i++) {
n = ac[i];
if ( includeSelf || n !== this ){
if( fn(n) === false ) {
return false;
}
}
}
return true;
},
/** Write warning to browser console (prepending node info)
*
* @param {*} msg string or object or array of such
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
*/
nodeRenderTitle: function(ctx, title) {
// set node connector images, links and text
var icon, nodeTitle, role, tabindex, tooltip,
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
node = ctx.node,
tree = ctx.tree,
opts = ctx.options,
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
ares.push("<span " + role + " class='fancytree-expander'></span>");
}
// Checkbox mode
if( opts.checkbox && node.hideCheckbox !== true && !node.isStatusNode() ) {
checkbox = FT.evalOption("checkbox", node, node, opts, false);
if( checkbox && !node.isStatusNode() ) {
role = aria ? " role='checkbox'" : "";
ares.push("<span " + role + " class='fancytree-checkbox'></span>");
className = "fancytree-checkbox";
if( checkbox === "radio" || (node.parent && node.parent.radiogroup) ) {
className += " fancytree-radio";
}
ares.push("<span " + role + " class='" + className + "'></span>");
}
// Folder or doctype icon
if( node.data.iconClass !== undefined ) { // 2015-11-16
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
}
if ( !nodeTitle ) {
if( node.tooltip ) {
tooltip = node.tooltip;
} else if ( opts.tooltip ) {
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
tooltip = FT.evalOption("tooltip", node, node, opts, null);
if( tooltip === true ) {
tooltip = node.title;
}
// if( node.tooltip ) {
// tooltip = node.tooltip;
// } else if ( opts.tooltip ) {
// tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
// }
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
if( node.partsel ){
cnList.push(cn.partsel);
}
if( node.unselectable ){
if( FT.evalOption("unselectable", node, node, opts, false) ){
cnList.push(cn.unselectable);
}
if( node._isLoading ){
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
*
* @param {EventData} ctx
* @param {boolean} [flag=true]
* @param {object} [opts] additional options. Defaults to {noEvents: false,
* propagateDown: null, propagateUp: null,
* callback: null,
* }
* @returns {boolean} previous status
*/
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
callOpts = callOpts || {};
var node = ctx.node,
tree = ctx.tree,
opts = ctx.options;
opts = ctx.options,
noEvents = (callOpts.noEvents === true);
// flag defaults to true
flag = (flag !== false);
// node.debug("nodeSetSelected(" + flag + ")", ctx);
if( node.unselectable){
// Cannot (de)select unselectable nodes directly (only by propagation or
// by setting the `.selected` property)
if( FT.evalOption("unselectable", node, node, opts, false) ){
return;
}
// TODO: !!node.expanded is nicer, but doesn't pass jshint
// https://github.com/jshint/jshint/issues/455
// if( !!node.expanded === !!flag){
if((node.selected && flag) || (!node.selected && !flag)){
return !!node.selected;
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
return !!node.selected;
// Remember the user's intent, in case down -> up propagation prevents
// applying it to node.selected
node._lastSelectIntent = flag;
// Nothing to do?
/*jshint -W018 */ // Confusing use of '!'
if( !!node.selected === flag ){
if( opts.selectMode === 3 && node.partsel && !flag ){
// If propagation prevented selecting this node last time, we still
// want to allow to apply setSelected(false) now
}else{
return flag;
}
}
/*jshint +W018 */
if( !noEvents &&
this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ) {
return !!node.selected;
}
if(flag && opts.selectMode === 1){
// single selection mode
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
if(tree.lastSelectedNode){
tree.lastSelectedNode.setSelected(false);
}
}else if(opts.selectMode === 3){
// multi.hier selection mode
node.selected = flag;
// this._fixSelectionState(node);
node.fixSelection3AfterClick();
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
// multi-hierarchical selection mode
node.selected = flag;
node.fixSelection3AfterClick(callOpts);
}else if(node.parent.radiogroup){
node.visitSiblings(function(n){
n._changeSelectStatusAttrs(flag && n === node);
}, true);
}else{
// default: selectMode: 2, multi selection mode
node.selected = flag;
}
node.selected = flag;
this.nodeRenderStatus(ctx);
tree.lastSelectedNode = flag ? node : null;
tree._triggerNodeEvent("select", ctx);
if( !noEvents ) {
tree._triggerNodeEvent("select", ctx);
}
},
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
*
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
* @param {EventData} ctx
*/
nodeToggleSelected: function(ctx) {
return this.nodeSetSelected(ctx, !ctx.node.selected);
var node = ctx.node,
flag = !node.selected;
// In selectMode: 3 this node may be unselected+partsel, even if
// setSelected(true) was called before, due to `unselectable` children.
// In this case, we now toggle as `setSelected(false)`
if( node.partsel && !node.selected && node._lastSelectIntent === true ) {
flag = false;
node.selected = true; // so it is not considered 'nothing to do'
}
node._lastSelectIntent = flag;
return this.nodeSetSelected(ctx, flag);
},
/** Remove all nodes.
* @param {EventData} ctx
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
dataType: "json" // Expect json format and pass json object to callbacks.
}, //
aria: false,
aria: true,
autoActivate: true,
autoCollapse: false,
autoScroll: false,
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
focused: "fancytree-focused",
partload: "fancytree-partload",
partsel: "fancytree-partsel",
radio: "fancytree-radio",
// radiogroup: "fancytree-radiogroup",
unselectable: "fancytree-unselectable",
lastsib: "fancytree-lastsib",
loading: "fancytree-loading",
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
/** @lends Fancytree_Static# */
{
/** @type {string} */
version: "2.22.5", // Set to semver by 'grunt release'
version: "2.23.0", // Set to semver by 'grunt release'
/** @type {string} */
buildType: "production", // Set to 'production' by 'grunt build'
/** @type {int} */
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
res.type = "title";
}else if( /\bfancytree-expander\b/.test(tcn) ){
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
}else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
// }else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
}else if( /\bfancytree-checkbox\b/.test(tcn) ){
res.type = "checkbox";
}else if( /\bfancytree-icon\b/.test(tcn) ){
res.type = "icon";
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
if( tmp ){
d.key = tmp;
}
// Translate hideCheckbox -> checkbox:false
if( $li.attr("hideCheckbox") ){
d.checkbox = false;
}
// Add <li data-NAME='...'> as node.data.NAME
allData = _getElementDataAsDict($li);
if( allData && !$.isEmptyObject(allData) ) {

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 1em;
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -156,11 +154,6 @@ span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 1em;
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -156,11 +154,6 @@ span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 1em;
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 2px;
}
@ -156,11 +154,6 @@ span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -170,7 +170,7 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
// span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: @fancy-icon-width;
@ -187,7 +187,7 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
// span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: @fancy-icon-ofs-top;
}
@ -323,15 +323,21 @@ span.fancytree-checkbox {
margin-left: @fancy-icon-spacing;
.useSprite(0, 2);
&:hover { .useSprite(1, 2); }
&.fancytree-radio { .useSprite(0, 3); }
&.fancytree-radio:hover { .useSprite(1, 3); }
}
.fancytree-partsel span.fancytree-checkbox {
.useSprite(4, 2);
&:hover { .useSprite(5, 2); }
&.fancytree-radio { .useSprite(4, 3); }
&.fancytree-radio:hover { .useSprite(5, 3); }
}
// selected after partsel, so it takes precedence:
.fancytree-selected span.fancytree-checkbox {
.useSprite(2, 2);
&:hover { .useSprite(3, 2); }
&.fancytree-radio { .useSprite(2, 3); }
&.fancytree-radio:hover { .useSprite(3, 3); }
}
// Unselectable is dimmed, without hover effects
.fancytree-unselectable {
@ -350,35 +356,6 @@ span.fancytree-checkbox {
}
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio {
span.fancytree-checkbox {
.useSprite(0, 3);
&:hover { .useSprite(1, 3); }
}
.fancytree-partsel span.fancytree-checkbox {
.useSprite(4, 3);
&:hover { .useSprite(5, 3); }
}
// Selected after partsel, so it takes precedence:
.fancytree-selected span.fancytree-checkbox {
.useSprite(2, 3);
&:hover { .useSprite(3, 3); }
}
// Unselectable is dimmed, without hover effects
.fancytree-unselectable {
span.fancytree-checkbox,
span.fancytree-checkbox:hover {
.useSprite(0, 3);
}
}
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

View File

@ -82,7 +82,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -97,7 +96,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -212,18 +210,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -237,33 +253,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -78,7 +78,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -93,7 +92,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 2px;
}
@ -208,18 +206,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -233,33 +249,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -92,7 +92,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -107,7 +106,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -222,18 +220,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -247,33 +263,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 2px;
}
@ -206,18 +204,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -206,18 +204,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 32px;
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -206,18 +204,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -32px -64px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -96px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -32px -96px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -128px -64px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -160px -64px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -128px -96px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -160px -96px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -64px -64px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -96px -64px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -64px -96px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -96px -96px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -64px -64px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -96px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -32px -96px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -128px -96px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -160px -96px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -64px -96px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -96px -96px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -96px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 2px;
}
@ -206,18 +204,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,6 @@ span.fancytree-vline,
span.fancytree-expander,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-radio,
span.fancytree-drag-helper-img,
#fancytree-drop-marker {
width: 16px;
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
span.fancytree-icon,
span.fancytree-checkbox,
span.fancytree-expander,
span.fancytree-radio,
span.fancytree-custom-icon {
margin-top: 0px;
}
@ -206,18 +204,36 @@ span.fancytree-checkbox {
span.fancytree-checkbox:hover {
background-position: -16px -32px;
}
span.fancytree-checkbox.fancytree-radio {
background-position: 0px -48px;
}
span.fancytree-checkbox.fancytree-radio:hover {
background-position: -16px -48px;
}
.fancytree-partsel span.fancytree-checkbox {
background-position: -64px -32px;
}
.fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -32px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio {
background-position: -64px -48px;
}
.fancytree-partsel span.fancytree-checkbox.fancytree-radio:hover {
background-position: -80px -48px;
}
.fancytree-selected span.fancytree-checkbox {
background-position: -32px -32px;
}
.fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -32px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio {
background-position: -32px -48px;
}
.fancytree-selected span.fancytree-checkbox.fancytree-radio:hover {
background-position: -48px -48px;
}
.fancytree-unselectable span.fancytree-checkbox {
opacity: 0.4;
filter: alpha(opacity=40);
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
background-position: -32px -32px;
}
/*------------------------------------------------------------------------------
* Radiobutton icon
* This is a customization, that may be activated by overriding the 'checkbox'
* class name as 'fancytree-radio' in the tree options.
*----------------------------------------------------------------------------*/
.fancytree-radio span.fancytree-checkbox {
background-position: 0px -48px;
}
.fancytree-radio span.fancytree-checkbox:hover {
background-position: -16px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox {
background-position: -64px -48px;
}
.fancytree-radio .fancytree-partsel span.fancytree-checkbox:hover {
background-position: -80px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox {
background-position: -32px -48px;
}
.fancytree-radio .fancytree-selected span.fancytree-checkbox:hover {
background-position: -48px -48px;
}
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox,
.fancytree-radio .fancytree-unselectable span.fancytree-checkbox:hover {
background-position: 0px -48px;
}
/*------------------------------------------------------------------------------
* Node type icon
* Note: IE6 doesn't correctly evaluate multiples class names,

File diff suppressed because one or more lines are too long

View File

@ -12,8 +12,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;( function( $, window, document, undefined ) {
@ -253,7 +253,7 @@ $.ui.fancytree._FancytreeClass.prototype.activateCell = function( $td ) {
*/
$.ui.fancytree.registerExtension({
name: "ariagrid",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
// Internal behavior flags, currently controlled via `extendedMode`

View File

@ -19,8 +19,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
// To keep the global namespace clean, we wrap everything in a closure
@ -122,7 +122,7 @@ $.ui.fancytree.registerExtension({
// Every extension must be registered by a unique name.
name: "childcounter",
// Version information should be compliant with [semver](http://semver.org)
version: "2.22.5",
version: "2.23.0",
// Extension specific options and their defaults.
// This options will be available as `tree.options.childcounter.hideExpanded`

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -342,7 +342,7 @@ $.ui.fancytree._FancytreeClass.prototype.changeRefKey = function(oldRefKey, newR
*/
$.ui.fancytree.registerExtension({
name: "clones",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -41,7 +41,7 @@ function _assert(cond, msg){
*/
$.ui.fancytree.registerExtension({
name: "columnview",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
},

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -41,7 +41,7 @@ for(i=0; i<EVENT_NAMES.length; i++){ EVENT_NAME_MAP[EVENT_NAMES[i]] = true; }
*/
$.ui.fancytree.registerExtension({
name: "tracecalls",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
logTarget: null, // optional redirect logging to this <div> tag
@ -92,7 +92,7 @@ $.ui.fancytree.registerExtension({
},
nodeSetFocus: function(ctx) {
},
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
},
nodeSetStatus: function(ctx, status, message, details) {
},
@ -124,7 +124,7 @@ $.ui.fancytree.registerExtension({
;(function($, window, document, undefined) {
$.ui.fancytree.registerExtension({
name: "profiler",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension
options: {
prefix: ""

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -247,7 +247,7 @@ function _initDragAndDrop(tree) {
$.ui.fancytree.registerExtension({
name: "dnd",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
// Make tree nodes accept draggables

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
@ -263,7 +263,7 @@ function handleDragOver(event, data) {
$.ui.fancytree.registerExtension({
name: "dnd5",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -253,7 +253,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isEditing = function(){
*/
$.ui.fancytree.registerExtension({
name: "edit",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
adjustWidthOfs: 4, // null: don't adjust input size to content

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -273,7 +273,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isMatched = function(){
*/
$.ui.fancytree.registerExtension({
name: "filter",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autoApply: true, // Re-apply last filter if lazy data is loaded

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -27,7 +27,7 @@ function _getIcon(opts, type){
$.ui.fancytree.registerExtension({
name: "glyph",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
map: {

View File

@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -116,7 +116,7 @@ function findNeighbourTd($target, keyCode){
*/
$.ui.fancytree.registerExtension({
name: "gridnav",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
autofocusInput: false, // Focus first embedded input if node gets activated

View File

@ -7,8 +7,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
/** Core Fancytree module.
@ -53,10 +53,11 @@ var i, attr,
221: "]", 222: "'"},
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
// Boolean attributes that can be set with equivalent class names in the LI tags
CLASS_ATTRS = "active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),
// Note: v2.23: checkbox and hideCheckbox are *not* in this list
CLASS_ATTRS = "active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),
CLASS_ATTR_MAP = {},
// Top-level Fancytree node attributes, that can be set by dict
NODE_ATTRS = "expanded extraClasses folder hideCheckbox icon key lazy refKey selected statusNodeType title tooltip unselectable".split(" "),
NODE_ATTRS = "checkbox expanded extraClasses folder icon key lazy radiogroup refKey selected statusNodeType title tooltip unselectable unselectableIgnore unselectableStatus".split(" "),
NODE_ATTR_MAP = {},
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
NODE_ATTR_LOWERCASE_MAP = {},
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
name = NODE_ATTRS[i];
this[name] = obj[name];
}
// unselectableIgnore and unselectableStatus imply unselectable
if( this.unselectableIgnore != null || this.unselectableStatus != null ) {
this.unselectable = true;
}
if( obj.hideCheckbox ) {
$.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'");
}
// node.data += obj.data
if(obj.data){
$.extend(this.data, obj.data);
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
this.tree.lastSelectedNode = this;
}
// TODO: handle obj.focus = true
// Create child nodes
cl = obj.children;
if( cl ){
@ -689,9 +698,15 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
return res;
},
/* Apply selection state (internal use only) */
_changeSelectStatusAttrs: function (state) {
var changed = false;
_changeSelectStatusAttrs: function(state) {
var changed = false,
opts = this.tree.options,
unselectable = FT.evalOption("unselectable", this, this, opts, false),
unselectableStatus = FT.evalOption("unselectableStatus", this, this, opts, undefined);
if( unselectable && unselectableStatus != null ) {
state = unselectableStatus;
}
switch(state){
case false:
changed = ( this.selected || this.partsel );
@ -721,7 +736,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Fix selection status, after this node was (de)selected in multi-hier mode.
* This includes (de)selecting all children.
*/
fixSelection3AfterClick: function() {
fixSelection3AfterClick: function(callOpts) {
var flag = this.isSelected();
// this.debug("fixSelection3AfterClick()");
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
this.visit(function(node){
node._changeSelectStatusAttrs(flag);
});
this.fixSelection3FromEndNodes();
this.fixSelection3FromEndNodes(callOpts);
},
/**
* Fix selection status for multi-hier mode.
@ -737,14 +752,16 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
* Should be called after this node has loaded new children or after
* children have been modified using the API.
*/
fixSelection3FromEndNodes: function() {
fixSelection3FromEndNodes: function(callOpts) {
var opts = this.tree.options;
// this.debug("fixSelection3FromEndNodes()");
_assert(this.tree.options.selectMode === 3, "expected selectMode 3");
_assert(opts.selectMode === 3, "expected selectMode 3");
// Visit all end nodes and adjust their parent's `selected` and `partsel`
// attributes. Return selection state true, false, or undefined.
function _walk(node){
var i, l, child, s, state, allSelected,someSelected,
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
children = node.children;
if( children && children.length ){
@ -756,18 +773,22 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
child = children[i];
// the selection state of a node is not relevant; we need the end-nodes
s = _walk(child);
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
// if( !child.unselectableIgnore ) {
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
if( s !== false ) {
someSelected = true;
}
if( s !== true ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
}else{
// This is an end-node: simply report the status
// state = ( node.unselectable ) ? undefined : !!node.selected;
state = !!node.selected;
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
state = ( unselState == null ) ? !!node.selected : !!unselState;
}
node._changeSelectStatusAttrs(state);
return state;
@ -776,20 +797,25 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// Update parent's state
this.visitParents(function(node){
var i, l, child, state,
var i, l, child, state, unselIgnore, unselState,
children = node.children,
allSelected = true,
someSelected = false;
for( i=0, l=children.length; i<l; i++ ){
child = children[i];
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( child.selected || child.partsel ) {
someSelected = true;
}
if( !child.unselectable && !child.selected ) {
allSelected = false;
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
if( !unselIgnore ) {
unselState = FT.evalOption("unselectableStatus", child, child, opts, undefined);
state = ( unselState == null ) ? !!child.selected : !!unselState;
// When fixing the parents, we trust the sibling status (i.e.
// we don't recurse)
if( state || child.partsel ) {
someSelected = true;
}
if( !state ) {
allSelected = false;
}
}
}
state = allSelected ? true : (someSelected ? undefined : false);
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
isRoot: function() {
return this.isRootNode();
},
/** Return true if node is partially selected (tri-state).
* @returns {boolean}
* @since 2.23
*/
isPartsel: function() {
return !this.selected && !!this.partsel;
},
/** (experimental) Return true if this is partially loaded.
* @returns {boolean}
* @since 2.15
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
},
/**Select this node, i.e. check the checkbox.
* @param {boolean} [flag=true] pass false to deselect
* @param {object} [opts] additional options. Defaults to {noEvents: false, p
* propagateDown: null, propagateUp: null, callback: null }
*/
setSelected: function(flag){
return this.tree._callHook("nodeSetSelected", this, flag);
setSelected: function(flag, opts){
return this.tree._callHook("nodeSetSelected", this, flag, opts);
},
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
* @param {string} status 'error'|'empty'|'ok'
@ -1910,11 +1945,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
// this.info("-> toggleClass('" + value + "', " + flag + "): '" + this.extraClasses + "'");
return wasAdded;
},
/** Flip expanded status. */
/** Flip expanded status. */
toggleExpanded: function(){
return this.tree._callHook("nodeToggleExpanded", this);
},
/** Flip selection status. */
/** Flip selection status. */
toggleSelected: function(){
return this.tree._callHook("nodeToggleSelected", this);
},
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
}
return true;
},
/** Call fn(node) for all sibling nodes.<br>
* Stop iteration, if fn() returns false.<br>
* Return false if iteration was stopped.
*
* @param {function} fn the callback function.
* Return false to stop iteration.
* @param {boolean} [includeSelf=false]
* @returns {boolean}
*/
visitSiblings: function(fn, includeSelf) {
var i, l, n,
ac = this.parent.children;
for (i=0, l=ac.length; i<l; i++) {
n = ac[i];
if ( includeSelf || n !== this ){
if( fn(n) === false ) {
return false;
}
}
}
return true;
},
/** Write warning to browser console (prepending node info)
*
* @param {*} msg string or object or array of such
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
*/
nodeRenderTitle: function(ctx, title) {
// set node connector images, links and text
var icon, nodeTitle, role, tabindex, tooltip,
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
node = ctx.node,
tree = ctx.tree,
opts = ctx.options,
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
ares.push("<span " + role + " class='fancytree-expander'></span>");
}
// Checkbox mode
if( opts.checkbox && node.hideCheckbox !== true && !node.isStatusNode() ) {
checkbox = FT.evalOption("checkbox", node, node, opts, false);
if( checkbox && !node.isStatusNode() ) {
role = aria ? " role='checkbox'" : "";
ares.push("<span " + role + " class='fancytree-checkbox'></span>");
className = "fancytree-checkbox";
if( checkbox === "radio" || (node.parent && node.parent.radiogroup) ) {
className += " fancytree-radio";
}
ares.push("<span " + role + " class='" + className + "'></span>");
}
// Folder or doctype icon
if( node.data.iconClass !== undefined ) { // 2015-11-16
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
}
if ( !nodeTitle ) {
if( node.tooltip ) {
tooltip = node.tooltip;
} else if ( opts.tooltip ) {
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
tooltip = FT.evalOption("tooltip", node, node, opts, null);
if( tooltip === true ) {
tooltip = node.title;
}
// if( node.tooltip ) {
// tooltip = node.tooltip;
// } else if ( opts.tooltip ) {
// tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
// }
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
if( node.partsel ){
cnList.push(cn.partsel);
}
if( node.unselectable ){
if( FT.evalOption("unselectable", node, node, opts, false) ){
cnList.push(cn.unselectable);
}
if( node._isLoading ){
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
*
* @param {EventData} ctx
* @param {boolean} [flag=true]
* @param {object} [opts] additional options. Defaults to {noEvents: false,
* propagateDown: null, propagateUp: null,
* callback: null,
* }
* @returns {boolean} previous status
*/
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
callOpts = callOpts || {};
var node = ctx.node,
tree = ctx.tree,
opts = ctx.options;
opts = ctx.options,
noEvents = (callOpts.noEvents === true);
// flag defaults to true
flag = (flag !== false);
// node.debug("nodeSetSelected(" + flag + ")", ctx);
if( node.unselectable){
// Cannot (de)select unselectable nodes directly (only by propagation or
// by setting the `.selected` property)
if( FT.evalOption("unselectable", node, node, opts, false) ){
return;
}
// TODO: !!node.expanded is nicer, but doesn't pass jshint
// https://github.com/jshint/jshint/issues/455
// if( !!node.expanded === !!flag){
if((node.selected && flag) || (!node.selected && !flag)){
return !!node.selected;
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
return !!node.selected;
// Remember the user's intent, in case down -> up propagation prevents
// applying it to node.selected
node._lastSelectIntent = flag;
// Nothing to do?
/*jshint -W018 */ // Confusing use of '!'
if( !!node.selected === flag ){
if( opts.selectMode === 3 && node.partsel && !flag ){
// If propagation prevented selecting this node last time, we still
// want to allow to apply setSelected(false) now
}else{
return flag;
}
}
/*jshint +W018 */
if( !noEvents &&
this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ) {
return !!node.selected;
}
if(flag && opts.selectMode === 1){
// single selection mode
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
if(tree.lastSelectedNode){
tree.lastSelectedNode.setSelected(false);
}
}else if(opts.selectMode === 3){
// multi.hier selection mode
node.selected = flag;
// this._fixSelectionState(node);
node.fixSelection3AfterClick();
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
// multi-hierarchical selection mode
node.selected = flag;
node.fixSelection3AfterClick(callOpts);
}else if(node.parent.radiogroup){
node.visitSiblings(function(n){
n._changeSelectStatusAttrs(flag && n === node);
}, true);
}else{
// default: selectMode: 2, multi selection mode
node.selected = flag;
}
node.selected = flag;
this.nodeRenderStatus(ctx);
tree.lastSelectedNode = flag ? node : null;
tree._triggerNodeEvent("select", ctx);
if( !noEvents ) {
tree._triggerNodeEvent("select", ctx);
}
},
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
*
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
* @param {EventData} ctx
*/
nodeToggleSelected: function(ctx) {
return this.nodeSetSelected(ctx, !ctx.node.selected);
var node = ctx.node,
flag = !node.selected;
// In selectMode: 3 this node may be unselected+partsel, even if
// setSelected(true) was called before, due to `unselectable` children.
// In this case, we now toggle as `setSelected(false)`
if( node.partsel && !node.selected && node._lastSelectIntent === true ) {
flag = false;
node.selected = true; // so it is not considered 'nothing to do'
}
node._lastSelectIntent = flag;
return this.nodeSetSelected(ctx, flag);
},
/** Remove all nodes.
* @param {EventData} ctx
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
dataType: "json" // Expect json format and pass json object to callbacks.
}, //
aria: false,
aria: true,
autoActivate: true,
autoCollapse: false,
autoScroll: false,
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
focused: "fancytree-focused",
partload: "fancytree-partload",
partsel: "fancytree-partsel",
radio: "fancytree-radio",
// radiogroup: "fancytree-radiogroup",
unselectable: "fancytree-unselectable",
lastsib: "fancytree-lastsib",
loading: "fancytree-loading",
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
/** @lends Fancytree_Static# */
{
/** @type {string} */
version: "2.22.5", // Set to semver by 'grunt release'
version: "2.23.0", // Set to semver by 'grunt release'
/** @type {string} */
buildType: "production", // Set to 'production' by 'grunt build'
/** @type {int} */
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
res.type = "title";
}else if( /\bfancytree-expander\b/.test(tcn) ){
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
}else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
// }else if( /\bfancytree-checkbox\b/.test(tcn) || /\bfancytree-radio\b/.test(tcn) ){
}else if( /\bfancytree-checkbox\b/.test(tcn) ){
res.type = "checkbox";
}else if( /\bfancytree-icon\b/.test(tcn) ){
res.type = "icon";
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
if( tmp ){
d.key = tmp;
}
// Translate hideCheckbox -> checkbox:false
if( $li.attr("hideCheckbox") ){
d.checkbox = false;
}
// Add <li data-NAME='...'> as node.data.NAME
allData = _getElementDataAsDict($li);
if( allData && !$.isEmptyObject(allData) ) {

View File

@ -11,8 +11,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {

View File

@ -11,8 +11,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -152,7 +152,7 @@ $.ui.fancytree._FancytreeClass.prototype.getPersistData = function(){
*/
$.ui.fancytree.registerExtension({
name: "persist",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
cookieDelimiter: "~",
@ -359,7 +359,7 @@ $.ui.fancytree.registerExtension({
}
return res;
},
nodeSetSelected: function(ctx, flag) {
nodeSetSelected: function(ctx, flag, callOpts) {
var res, selNodes,
tree = ctx.tree,
node = ctx.node,

View File

@ -0,0 +1,54 @@
/*!
* jquery.fancytree.select.js
*
* Configurable support for hierarchical selection.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2017, Martin Wendt (http://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
"use strict";
/*******************************************************************************
* Private functions and variables
*/
// var escapeHtml = $.ui.fancytree.escapeHtml;
/*******************************************************************************
* Extension code
*/
$.ui.fancytree.registerExtension({
name: "select",
version: "2.23.0",
// Default options for this extension.
options: {
checkboxIcon: true // bool | "radio" | function
},
treeInit: function(ctx){
// gridnav requires the table extension to be loaded before itself
// this._requireExtension("table", true, true);
this._superApply(arguments);
this.$container.addClass("fancytree-ext-select");
},
nodeLoadChildren: function(ctx, source) {
return this._superApply(arguments).done(function() {
// TODO
});
},
nodeSetSelected: function(ctx, flag, callOpts) {
return this._superApply(arguments);
}
});
}(jQuery, window, document));

View File

@ -1,7 +1,7 @@
/*!
* jquery.fancytree.table.js
*
* Render tree as table (aka 'treegrid', 'tabletree').
* Render tree as table (aka 'tree grid', 'table tree').
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2017, Martin Wendt (http://wwWendt.de)
@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -88,7 +88,7 @@ function findPrevRowNode(node){
$.ui.fancytree.registerExtension({
name: "table",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)

View File

@ -11,8 +11,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -24,7 +24,7 @@
*/
$.ui.fancytree.registerExtension({
name: "themeroller",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
activeClass: "ui-state-active", // Class added to active node

View File

@ -8,8 +8,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.22.5
* @date 2017-05-11T17:01:53Z
* @version 2.23.0
* @date 2017-05-27T20:09:38Z
*/
;(function($, window, document, undefined) {
@ -109,7 +109,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, labelOfs, measure
*/
$.ui.fancytree.registerExtension({
name: "wide",
version: "2.22.5",
version: "2.23.0",
// Default options for this extension.
options: {
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"