mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fancytree upgrade
This commit is contained in:
parent
1e2c5ed130
commit
d775947daa
51
static/lib/fancytree/jquery.fancytree-all-deps.min.js
vendored
Normal file
51
static/lib/fancytree/jquery.fancytree-all-deps.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -7,8 +7,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Core Fancytree module.
|
/** Core Fancytree module.
|
||||||
@ -53,10 +53,11 @@ var i, attr,
|
|||||||
221: "]", 222: "'"},
|
221: "]", 222: "'"},
|
||||||
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
||||||
// Boolean attributes that can be set with equivalent class names in the LI tags
|
// 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 = {},
|
CLASS_ATTR_MAP = {},
|
||||||
// Top-level Fancytree node attributes, that can be set by dict
|
// 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 = {},
|
NODE_ATTR_MAP = {},
|
||||||
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
||||||
NODE_ATTR_LOWERCASE_MAP = {},
|
NODE_ATTR_LOWERCASE_MAP = {},
|
||||||
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
|
|||||||
name = NODE_ATTRS[i];
|
name = NODE_ATTRS[i];
|
||||||
this[name] = obj[name];
|
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
|
// node.data += obj.data
|
||||||
if(obj.data){
|
if(obj.data){
|
||||||
$.extend(this.data, obj.data);
|
$.extend(this.data, obj.data);
|
||||||
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
|
|||||||
this.tree.lastSelectedNode = this;
|
this.tree.lastSelectedNode = this;
|
||||||
}
|
}
|
||||||
// TODO: handle obj.focus = true
|
// TODO: handle obj.focus = true
|
||||||
|
|
||||||
// Create child nodes
|
// Create child nodes
|
||||||
cl = obj.children;
|
cl = obj.children;
|
||||||
if( cl ){
|
if( cl ){
|
||||||
@ -690,8 +699,14 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/* Apply selection state (internal use only) */
|
/* Apply selection state (internal use only) */
|
||||||
_changeSelectStatusAttrs: function(state) {
|
_changeSelectStatusAttrs: function(state) {
|
||||||
var changed = false;
|
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){
|
switch(state){
|
||||||
case false:
|
case false:
|
||||||
changed = ( this.selected || this.partsel );
|
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.
|
* Fix selection status, after this node was (de)selected in multi-hier mode.
|
||||||
* This includes (de)selecting all children.
|
* This includes (de)selecting all children.
|
||||||
*/
|
*/
|
||||||
fixSelection3AfterClick: function() {
|
fixSelection3AfterClick: function(callOpts) {
|
||||||
var flag = this.isSelected();
|
var flag = this.isSelected();
|
||||||
|
|
||||||
// this.debug("fixSelection3AfterClick()");
|
// this.debug("fixSelection3AfterClick()");
|
||||||
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
this.visit(function(node){
|
this.visit(function(node){
|
||||||
node._changeSelectStatusAttrs(flag);
|
node._changeSelectStatusAttrs(flag);
|
||||||
});
|
});
|
||||||
this.fixSelection3FromEndNodes();
|
this.fixSelection3FromEndNodes(callOpts);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Fix selection status for multi-hier mode.
|
* 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
|
* Should be called after this node has loaded new children or after
|
||||||
* children have been modified using the API.
|
* children have been modified using the API.
|
||||||
*/
|
*/
|
||||||
fixSelection3FromEndNodes: function() {
|
fixSelection3FromEndNodes: function(callOpts) {
|
||||||
|
var opts = this.tree.options;
|
||||||
|
|
||||||
// this.debug("fixSelection3FromEndNodes()");
|
// 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`
|
// Visit all end nodes and adjust their parent's `selected` and `partsel`
|
||||||
// attributes. Return selection state true, false, or undefined.
|
// attributes. Return selection state true, false, or undefined.
|
||||||
function _walk(node){
|
function _walk(node){
|
||||||
var i, l, child, s, state, allSelected,someSelected,
|
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
|
||||||
children = node.children;
|
children = node.children;
|
||||||
|
|
||||||
if( children && children.length ){
|
if( children && children.length ){
|
||||||
@ -756,6 +773,9 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
child = children[i];
|
child = children[i];
|
||||||
// the selection state of a node is not relevant; we need the end-nodes
|
// the selection state of a node is not relevant; we need the end-nodes
|
||||||
s = _walk(child);
|
s = _walk(child);
|
||||||
|
// if( !child.unselectableIgnore ) {
|
||||||
|
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
|
||||||
|
if( !unselIgnore ) {
|
||||||
if( s !== false ) {
|
if( s !== false ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
@ -763,11 +783,12 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
}else{
|
}else{
|
||||||
// This is an end-node: simply report the status
|
// This is an end-node: simply report the status
|
||||||
// state = ( node.unselectable ) ? undefined : !!node.selected;
|
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
|
||||||
state = !!node.selected;
|
state = ( unselState == null ) ? !!node.selected : !!unselState;
|
||||||
}
|
}
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
return state;
|
return state;
|
||||||
@ -776,22 +797,27 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
|
|
||||||
// Update parent's state
|
// Update parent's state
|
||||||
this.visitParents(function(node){
|
this.visitParents(function(node){
|
||||||
var i, l, child, state,
|
var i, l, child, state, unselIgnore, unselState,
|
||||||
children = node.children,
|
children = node.children,
|
||||||
allSelected = true,
|
allSelected = true,
|
||||||
someSelected = false;
|
someSelected = false;
|
||||||
|
|
||||||
for( i=0, l=children.length; i<l; i++ ){
|
for( i=0, l=children.length; i<l; i++ ){
|
||||||
child = children[i];
|
child = children[i];
|
||||||
|
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.
|
// When fixing the parents, we trust the sibling status (i.e.
|
||||||
// we don't recurse)
|
// we don't recurse)
|
||||||
if( child.selected || child.partsel ) {
|
if( state || child.partsel ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
if( !child.unselectable && !child.selected ) {
|
if( !state ) {
|
||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
});
|
});
|
||||||
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
isRoot: function() {
|
isRoot: function() {
|
||||||
return this.isRootNode();
|
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.
|
/** (experimental) Return true if this is partially loaded.
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @since 2.15
|
* @since 2.15
|
||||||
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/**Select this node, i.e. check the checkbox.
|
/**Select this node, i.e. check the checkbox.
|
||||||
* @param {boolean} [flag=true] pass false to deselect
|
* @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){
|
setSelected: function(flag, opts){
|
||||||
return this.tree._callHook("nodeSetSelected", this, flag);
|
return this.tree._callHook("nodeSetSelected", this, flag, opts);
|
||||||
},
|
},
|
||||||
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
||||||
* @param {string} status 'error'|'empty'|'ok'
|
* @param {string} status 'error'|'empty'|'ok'
|
||||||
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
}
|
}
|
||||||
return true;
|
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)
|
/** Write warning to browser console (prepending node info)
|
||||||
*
|
*
|
||||||
* @param {*} msg string or object or array of such
|
* @param {*} msg string or object or array of such
|
||||||
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
|
|||||||
*/
|
*/
|
||||||
nodeRenderTitle: function(ctx, title) {
|
nodeRenderTitle: function(ctx, title) {
|
||||||
// set node connector images, links and text
|
// set node connector images, links and text
|
||||||
var icon, nodeTitle, role, tabindex, tooltip,
|
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
|
||||||
node = ctx.node,
|
node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options,
|
opts = ctx.options,
|
||||||
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
|
|||||||
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
||||||
}
|
}
|
||||||
// Checkbox mode
|
// 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'" : "";
|
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
|
// Folder or doctype icon
|
||||||
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
||||||
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
|
|||||||
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
||||||
}
|
}
|
||||||
if ( !nodeTitle ) {
|
if ( !nodeTitle ) {
|
||||||
if( node.tooltip ) {
|
tooltip = FT.evalOption("tooltip", node, node, opts, null);
|
||||||
tooltip = node.tooltip;
|
if( tooltip === true ) {
|
||||||
} else if ( opts.tooltip ) {
|
tooltip = node.title;
|
||||||
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
|
|
||||||
}
|
}
|
||||||
|
// 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) + "'" : "";
|
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
|
||||||
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
||||||
|
|
||||||
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
|
|||||||
if( node.partsel ){
|
if( node.partsel ){
|
||||||
cnList.push(cn.partsel);
|
cnList.push(cn.partsel);
|
||||||
}
|
}
|
||||||
if( node.unselectable ){
|
if( FT.evalOption("unselectable", node, node, opts, false) ){
|
||||||
cnList.push(cn.unselectable);
|
cnList.push(cn.unselectable);
|
||||||
}
|
}
|
||||||
if( node._isLoading ){
|
if( node._isLoading ){
|
||||||
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
|
|||||||
*
|
*
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
* @param {boolean} [flag=true]
|
* @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,
|
var node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options;
|
opts = ctx.options,
|
||||||
|
noEvents = (callOpts.noEvents === true);
|
||||||
|
|
||||||
// flag defaults to true
|
// flag defaults to true
|
||||||
flag = (flag !== false);
|
flag = (flag !== false);
|
||||||
|
|
||||||
// node.debug("nodeSetSelected(" + flag + ")", ctx);
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: !!node.expanded is nicer, but doesn't pass jshint
|
|
||||||
// https://github.com/jshint/jshint/issues/455
|
// Remember the user's intent, in case down -> up propagation prevents
|
||||||
// if( !!node.expanded === !!flag){
|
// applying it to node.selected
|
||||||
if((node.selected && flag) || (!node.selected && !flag)){
|
node._lastSelectIntent = flag;
|
||||||
return !!node.selected;
|
|
||||||
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
|
// 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;
|
return !!node.selected;
|
||||||
}
|
}
|
||||||
if(flag && opts.selectMode === 1){
|
if(flag && opts.selectMode === 1){
|
||||||
// single selection mode
|
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
|
||||||
if(tree.lastSelectedNode){
|
if(tree.lastSelectedNode){
|
||||||
tree.lastSelectedNode.setSelected(false);
|
tree.lastSelectedNode.setSelected(false);
|
||||||
}
|
}
|
||||||
}else if(opts.selectMode === 3){
|
|
||||||
// multi.hier selection mode
|
|
||||||
node.selected = flag;
|
node.selected = flag;
|
||||||
// this._fixSelectionState(node);
|
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
|
||||||
node.fixSelection3AfterClick();
|
// 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);
|
this.nodeRenderStatus(ctx);
|
||||||
tree.lastSelectedNode = flag ? node : null;
|
tree.lastSelectedNode = flag ? node : null;
|
||||||
|
if( !noEvents ) {
|
||||||
tree._triggerNodeEvent("select", ctx);
|
tree._triggerNodeEvent("select", ctx);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
||||||
*
|
*
|
||||||
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
|
|||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
*/
|
*/
|
||||||
nodeToggleSelected: function(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.
|
/** Remove all nodes.
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
|
|||||||
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
|
// 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.
|
dataType: "json" // Expect json format and pass json object to callbacks.
|
||||||
}, //
|
}, //
|
||||||
aria: false,
|
aria: true,
|
||||||
autoActivate: true,
|
autoActivate: true,
|
||||||
autoCollapse: false,
|
autoCollapse: false,
|
||||||
autoScroll: false,
|
autoScroll: false,
|
||||||
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
|
|||||||
focused: "fancytree-focused",
|
focused: "fancytree-focused",
|
||||||
partload: "fancytree-partload",
|
partload: "fancytree-partload",
|
||||||
partsel: "fancytree-partsel",
|
partsel: "fancytree-partsel",
|
||||||
|
radio: "fancytree-radio",
|
||||||
|
// radiogroup: "fancytree-radiogroup",
|
||||||
unselectable: "fancytree-unselectable",
|
unselectable: "fancytree-unselectable",
|
||||||
lastsib: "fancytree-lastsib",
|
lastsib: "fancytree-lastsib",
|
||||||
loading: "fancytree-loading",
|
loading: "fancytree-loading",
|
||||||
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
|
|||||||
/** @lends Fancytree_Static# */
|
/** @lends Fancytree_Static# */
|
||||||
{
|
{
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
version: "2.22.5", // Set to semver by 'grunt release'
|
version: "2.23.0", // Set to semver by 'grunt release'
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
buildType: "production", // Set to 'production' by 'grunt build'
|
buildType: "production", // Set to 'production' by 'grunt build'
|
||||||
/** @type {int} */
|
/** @type {int} */
|
||||||
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
|
|||||||
res.type = "title";
|
res.type = "title";
|
||||||
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
||||||
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
|
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";
|
res.type = "checkbox";
|
||||||
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
||||||
res.type = "icon";
|
res.type = "icon";
|
||||||
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
|
|||||||
if( tmp ){
|
if( tmp ){
|
||||||
d.key = tmp;
|
d.key = tmp;
|
||||||
}
|
}
|
||||||
|
// Translate hideCheckbox -> checkbox:false
|
||||||
|
if( $li.attr("hideCheckbox") ){
|
||||||
|
d.checkbox = false;
|
||||||
|
}
|
||||||
// Add <li data-NAME='...'> as node.data.NAME
|
// Add <li data-NAME='...'> as node.data.NAME
|
||||||
allData = _getElementDataAsDict($li);
|
allData = _getElementDataAsDict($li);
|
||||||
if( allData && !$.isEmptyObject(allData) ) {
|
if( allData && !$.isEmptyObject(allData) ) {
|
||||||
@ -5148,8 +5266,8 @@ $.extend($.ui.fancytree,
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// To keep the global namespace clean, we wrap everything in a closure
|
// 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.
|
// Every extension must be registered by a unique name.
|
||||||
name: "childcounter",
|
name: "childcounter",
|
||||||
// Version information should be compliant with [semver](http://semver.org)
|
// Version information should be compliant with [semver](http://semver.org)
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
|
|
||||||
// Extension specific options and their defaults.
|
// Extension specific options and their defaults.
|
||||||
// This options will be available as `tree.options.childcounter.hideExpanded`
|
// This options will be available as `tree.options.childcounter.hideExpanded`
|
||||||
@ -5349,8 +5467,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -5682,7 +5800,7 @@ $.ui.fancytree._FancytreeClass.prototype.changeRefKey = function(oldRefKey, newR
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "clones",
|
name: "clones",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
|
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
|
||||||
@ -5815,8 +5933,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -6053,7 +6171,7 @@ function _initDragAndDrop(tree) {
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "dnd",
|
name: "dnd",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
// Make tree nodes accept draggables
|
// Make tree nodes accept draggables
|
||||||
@ -6388,8 +6506,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -6642,7 +6760,7 @@ function handleDragOver(event, data) {
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "dnd5",
|
name: "dnd5",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
|
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
|
||||||
@ -6969,8 +7087,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -7213,7 +7331,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isEditing = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "edit",
|
name: "edit",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
adjustWidthOfs: 4, // null: don't adjust input size to content
|
adjustWidthOfs: 4, // null: don't adjust input size to content
|
||||||
@ -7285,8 +7403,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -7549,7 +7667,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isMatched = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "filter",
|
name: "filter",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autoApply: true, // Re-apply last filter if lazy data is loaded
|
autoApply: true, // Re-apply last filter if lazy data is loaded
|
||||||
@ -7639,8 +7757,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -7657,7 +7775,7 @@ function _getIcon(opts, type){
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "glyph",
|
name: "glyph",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
map: {
|
map: {
|
||||||
@ -7783,8 +7901,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -7890,7 +8008,7 @@ function findNeighbourTd($target, keyCode){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "gridnav",
|
name: "gridnav",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autofocusInput: false, // Focus first embedded input if node gets activated
|
autofocusInput: false, // Focus first embedded input if node gets activated
|
||||||
@ -7989,8 +8107,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -8130,7 +8248,7 @@ $.ui.fancytree._FancytreeClass.prototype.getPersistData = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "persist",
|
name: "persist",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
cookieDelimiter: "~",
|
cookieDelimiter: "~",
|
||||||
@ -8337,7 +8455,7 @@ $.ui.fancytree.registerExtension({
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
nodeSetSelected: function(ctx, flag) {
|
nodeSetSelected: function(ctx, flag, callOpts) {
|
||||||
var res, selNodes,
|
var res, selNodes,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
node = ctx.node,
|
node = ctx.node,
|
||||||
@ -8377,8 +8495,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -8456,7 +8574,7 @@ function findPrevRowNode(node){
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "table",
|
name: "table",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
|
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
|
||||||
@ -8826,8 +8944,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -8839,7 +8957,7 @@ $.ui.fancytree.registerExtension({
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "themeroller",
|
name: "themeroller",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
activeClass: "ui-state-active", // Class added to active node
|
activeClass: "ui-state-active", // Class added to active node
|
||||||
@ -8922,8 +9040,8 @@ $.ui.fancytree.registerExtension({
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -9023,7 +9141,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, labelOfs, measure
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "wide",
|
name: "wide",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"
|
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"
|
||||||
|
30
static/lib/fancytree/jquery.fancytree-all.min.js
vendored
30
static/lib/fancytree/jquery.fancytree-all.min.js
vendored
File diff suppressed because one or more lines are too long
@ -7,8 +7,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Core Fancytree module.
|
/** Core Fancytree module.
|
||||||
@ -53,10 +53,11 @@ var i, attr,
|
|||||||
221: "]", 222: "'"},
|
221: "]", 222: "'"},
|
||||||
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
||||||
// Boolean attributes that can be set with equivalent class names in the LI tags
|
// 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 = {},
|
CLASS_ATTR_MAP = {},
|
||||||
// Top-level Fancytree node attributes, that can be set by dict
|
// 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 = {},
|
NODE_ATTR_MAP = {},
|
||||||
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
||||||
NODE_ATTR_LOWERCASE_MAP = {},
|
NODE_ATTR_LOWERCASE_MAP = {},
|
||||||
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
|
|||||||
name = NODE_ATTRS[i];
|
name = NODE_ATTRS[i];
|
||||||
this[name] = obj[name];
|
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
|
// node.data += obj.data
|
||||||
if(obj.data){
|
if(obj.data){
|
||||||
$.extend(this.data, obj.data);
|
$.extend(this.data, obj.data);
|
||||||
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
|
|||||||
this.tree.lastSelectedNode = this;
|
this.tree.lastSelectedNode = this;
|
||||||
}
|
}
|
||||||
// TODO: handle obj.focus = true
|
// TODO: handle obj.focus = true
|
||||||
|
|
||||||
// Create child nodes
|
// Create child nodes
|
||||||
cl = obj.children;
|
cl = obj.children;
|
||||||
if( cl ){
|
if( cl ){
|
||||||
@ -690,8 +699,14 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/* Apply selection state (internal use only) */
|
/* Apply selection state (internal use only) */
|
||||||
_changeSelectStatusAttrs: function(state) {
|
_changeSelectStatusAttrs: function(state) {
|
||||||
var changed = false;
|
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){
|
switch(state){
|
||||||
case false:
|
case false:
|
||||||
changed = ( this.selected || this.partsel );
|
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.
|
* Fix selection status, after this node was (de)selected in multi-hier mode.
|
||||||
* This includes (de)selecting all children.
|
* This includes (de)selecting all children.
|
||||||
*/
|
*/
|
||||||
fixSelection3AfterClick: function() {
|
fixSelection3AfterClick: function(callOpts) {
|
||||||
var flag = this.isSelected();
|
var flag = this.isSelected();
|
||||||
|
|
||||||
// this.debug("fixSelection3AfterClick()");
|
// this.debug("fixSelection3AfterClick()");
|
||||||
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
this.visit(function(node){
|
this.visit(function(node){
|
||||||
node._changeSelectStatusAttrs(flag);
|
node._changeSelectStatusAttrs(flag);
|
||||||
});
|
});
|
||||||
this.fixSelection3FromEndNodes();
|
this.fixSelection3FromEndNodes(callOpts);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Fix selection status for multi-hier mode.
|
* 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
|
* Should be called after this node has loaded new children or after
|
||||||
* children have been modified using the API.
|
* children have been modified using the API.
|
||||||
*/
|
*/
|
||||||
fixSelection3FromEndNodes: function() {
|
fixSelection3FromEndNodes: function(callOpts) {
|
||||||
|
var opts = this.tree.options;
|
||||||
|
|
||||||
// this.debug("fixSelection3FromEndNodes()");
|
// 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`
|
// Visit all end nodes and adjust their parent's `selected` and `partsel`
|
||||||
// attributes. Return selection state true, false, or undefined.
|
// attributes. Return selection state true, false, or undefined.
|
||||||
function _walk(node){
|
function _walk(node){
|
||||||
var i, l, child, s, state, allSelected,someSelected,
|
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
|
||||||
children = node.children;
|
children = node.children;
|
||||||
|
|
||||||
if( children && children.length ){
|
if( children && children.length ){
|
||||||
@ -756,6 +773,9 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
child = children[i];
|
child = children[i];
|
||||||
// the selection state of a node is not relevant; we need the end-nodes
|
// the selection state of a node is not relevant; we need the end-nodes
|
||||||
s = _walk(child);
|
s = _walk(child);
|
||||||
|
// if( !child.unselectableIgnore ) {
|
||||||
|
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
|
||||||
|
if( !unselIgnore ) {
|
||||||
if( s !== false ) {
|
if( s !== false ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
@ -763,11 +783,12 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
}else{
|
}else{
|
||||||
// This is an end-node: simply report the status
|
// This is an end-node: simply report the status
|
||||||
// state = ( node.unselectable ) ? undefined : !!node.selected;
|
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
|
||||||
state = !!node.selected;
|
state = ( unselState == null ) ? !!node.selected : !!unselState;
|
||||||
}
|
}
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
return state;
|
return state;
|
||||||
@ -776,22 +797,27 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
|
|
||||||
// Update parent's state
|
// Update parent's state
|
||||||
this.visitParents(function(node){
|
this.visitParents(function(node){
|
||||||
var i, l, child, state,
|
var i, l, child, state, unselIgnore, unselState,
|
||||||
children = node.children,
|
children = node.children,
|
||||||
allSelected = true,
|
allSelected = true,
|
||||||
someSelected = false;
|
someSelected = false;
|
||||||
|
|
||||||
for( i=0, l=children.length; i<l; i++ ){
|
for( i=0, l=children.length; i<l; i++ ){
|
||||||
child = children[i];
|
child = children[i];
|
||||||
|
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.
|
// When fixing the parents, we trust the sibling status (i.e.
|
||||||
// we don't recurse)
|
// we don't recurse)
|
||||||
if( child.selected || child.partsel ) {
|
if( state || child.partsel ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
if( !child.unselectable && !child.selected ) {
|
if( !state ) {
|
||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
});
|
});
|
||||||
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
isRoot: function() {
|
isRoot: function() {
|
||||||
return this.isRootNode();
|
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.
|
/** (experimental) Return true if this is partially loaded.
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @since 2.15
|
* @since 2.15
|
||||||
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/**Select this node, i.e. check the checkbox.
|
/**Select this node, i.e. check the checkbox.
|
||||||
* @param {boolean} [flag=true] pass false to deselect
|
* @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){
|
setSelected: function(flag, opts){
|
||||||
return this.tree._callHook("nodeSetSelected", this, flag);
|
return this.tree._callHook("nodeSetSelected", this, flag, opts);
|
||||||
},
|
},
|
||||||
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
||||||
* @param {string} status 'error'|'empty'|'ok'
|
* @param {string} status 'error'|'empty'|'ok'
|
||||||
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
}
|
}
|
||||||
return true;
|
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)
|
/** Write warning to browser console (prepending node info)
|
||||||
*
|
*
|
||||||
* @param {*} msg string or object or array of such
|
* @param {*} msg string or object or array of such
|
||||||
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
|
|||||||
*/
|
*/
|
||||||
nodeRenderTitle: function(ctx, title) {
|
nodeRenderTitle: function(ctx, title) {
|
||||||
// set node connector images, links and text
|
// set node connector images, links and text
|
||||||
var icon, nodeTitle, role, tabindex, tooltip,
|
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
|
||||||
node = ctx.node,
|
node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options,
|
opts = ctx.options,
|
||||||
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
|
|||||||
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
||||||
}
|
}
|
||||||
// Checkbox mode
|
// 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'" : "";
|
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
|
// Folder or doctype icon
|
||||||
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
||||||
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
|
|||||||
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
||||||
}
|
}
|
||||||
if ( !nodeTitle ) {
|
if ( !nodeTitle ) {
|
||||||
if( node.tooltip ) {
|
tooltip = FT.evalOption("tooltip", node, node, opts, null);
|
||||||
tooltip = node.tooltip;
|
if( tooltip === true ) {
|
||||||
} else if ( opts.tooltip ) {
|
tooltip = node.title;
|
||||||
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
|
|
||||||
}
|
}
|
||||||
|
// 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) + "'" : "";
|
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
|
||||||
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
||||||
|
|
||||||
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
|
|||||||
if( node.partsel ){
|
if( node.partsel ){
|
||||||
cnList.push(cn.partsel);
|
cnList.push(cn.partsel);
|
||||||
}
|
}
|
||||||
if( node.unselectable ){
|
if( FT.evalOption("unselectable", node, node, opts, false) ){
|
||||||
cnList.push(cn.unselectable);
|
cnList.push(cn.unselectable);
|
||||||
}
|
}
|
||||||
if( node._isLoading ){
|
if( node._isLoading ){
|
||||||
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
|
|||||||
*
|
*
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
* @param {boolean} [flag=true]
|
* @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,
|
var node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options;
|
opts = ctx.options,
|
||||||
|
noEvents = (callOpts.noEvents === true);
|
||||||
|
|
||||||
// flag defaults to true
|
// flag defaults to true
|
||||||
flag = (flag !== false);
|
flag = (flag !== false);
|
||||||
|
|
||||||
// node.debug("nodeSetSelected(" + flag + ")", ctx);
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: !!node.expanded is nicer, but doesn't pass jshint
|
|
||||||
// https://github.com/jshint/jshint/issues/455
|
// Remember the user's intent, in case down -> up propagation prevents
|
||||||
// if( !!node.expanded === !!flag){
|
// applying it to node.selected
|
||||||
if((node.selected && flag) || (!node.selected && !flag)){
|
node._lastSelectIntent = flag;
|
||||||
return !!node.selected;
|
|
||||||
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
|
// 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;
|
return !!node.selected;
|
||||||
}
|
}
|
||||||
if(flag && opts.selectMode === 1){
|
if(flag && opts.selectMode === 1){
|
||||||
// single selection mode
|
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
|
||||||
if(tree.lastSelectedNode){
|
if(tree.lastSelectedNode){
|
||||||
tree.lastSelectedNode.setSelected(false);
|
tree.lastSelectedNode.setSelected(false);
|
||||||
}
|
}
|
||||||
}else if(opts.selectMode === 3){
|
|
||||||
// multi.hier selection mode
|
|
||||||
node.selected = flag;
|
node.selected = flag;
|
||||||
// this._fixSelectionState(node);
|
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
|
||||||
node.fixSelection3AfterClick();
|
// 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);
|
this.nodeRenderStatus(ctx);
|
||||||
tree.lastSelectedNode = flag ? node : null;
|
tree.lastSelectedNode = flag ? node : null;
|
||||||
|
if( !noEvents ) {
|
||||||
tree._triggerNodeEvent("select", ctx);
|
tree._triggerNodeEvent("select", ctx);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
||||||
*
|
*
|
||||||
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
|
|||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
*/
|
*/
|
||||||
nodeToggleSelected: function(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.
|
/** Remove all nodes.
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
|
|||||||
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
|
// 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.
|
dataType: "json" // Expect json format and pass json object to callbacks.
|
||||||
}, //
|
}, //
|
||||||
aria: false,
|
aria: true,
|
||||||
autoActivate: true,
|
autoActivate: true,
|
||||||
autoCollapse: false,
|
autoCollapse: false,
|
||||||
autoScroll: false,
|
autoScroll: false,
|
||||||
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
|
|||||||
focused: "fancytree-focused",
|
focused: "fancytree-focused",
|
||||||
partload: "fancytree-partload",
|
partload: "fancytree-partload",
|
||||||
partsel: "fancytree-partsel",
|
partsel: "fancytree-partsel",
|
||||||
|
radio: "fancytree-radio",
|
||||||
|
// radiogroup: "fancytree-radiogroup",
|
||||||
unselectable: "fancytree-unselectable",
|
unselectable: "fancytree-unselectable",
|
||||||
lastsib: "fancytree-lastsib",
|
lastsib: "fancytree-lastsib",
|
||||||
loading: "fancytree-loading",
|
loading: "fancytree-loading",
|
||||||
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
|
|||||||
/** @lends Fancytree_Static# */
|
/** @lends Fancytree_Static# */
|
||||||
{
|
{
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
version: "2.22.5", // Set to semver by 'grunt release'
|
version: "2.23.0", // Set to semver by 'grunt release'
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
buildType: "production", // Set to 'production' by 'grunt build'
|
buildType: "production", // Set to 'production' by 'grunt build'
|
||||||
/** @type {int} */
|
/** @type {int} */
|
||||||
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
|
|||||||
res.type = "title";
|
res.type = "title";
|
||||||
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
||||||
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
|
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";
|
res.type = "checkbox";
|
||||||
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
||||||
res.type = "icon";
|
res.type = "icon";
|
||||||
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
|
|||||||
if( tmp ){
|
if( tmp ){
|
||||||
d.key = tmp;
|
d.key = tmp;
|
||||||
}
|
}
|
||||||
|
// Translate hideCheckbox -> checkbox:false
|
||||||
|
if( $li.attr("hideCheckbox") ){
|
||||||
|
d.checkbox = false;
|
||||||
|
}
|
||||||
// Add <li data-NAME='...'> as node.data.NAME
|
// Add <li data-NAME='...'> as node.data.NAME
|
||||||
allData = _getElementDataAsDict($li);
|
allData = _getElementDataAsDict($li);
|
||||||
if( allData && !$.isEmptyObject(allData) ) {
|
if( allData && !$.isEmptyObject(allData) ) {
|
||||||
|
8
static/lib/fancytree/jquery.fancytree.min.js
vendored
8
static/lib/fancytree/jquery.fancytree.min.js
vendored
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -156,11 +154,6 @@ span.fancytree-checkbox {
|
|||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -156,11 +154,6 @@ span.fancytree-checkbox {
|
|||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 1em;
|
width: 1em;
|
||||||
@ -90,7 +89,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
@ -156,11 +154,6 @@ span.fancytree-checkbox {
|
|||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -170,7 +170,7 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
// span.fancytree-radio,
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: @fancy-icon-width;
|
width: @fancy-icon-width;
|
||||||
@ -187,7 +187,7 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
// span.fancytree-radio,
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: @fancy-icon-ofs-top;
|
margin-top: @fancy-icon-ofs-top;
|
||||||
}
|
}
|
||||||
@ -323,15 +323,21 @@ span.fancytree-checkbox {
|
|||||||
margin-left: @fancy-icon-spacing;
|
margin-left: @fancy-icon-spacing;
|
||||||
.useSprite(0, 2);
|
.useSprite(0, 2);
|
||||||
&:hover { .useSprite(1, 2); }
|
&:hover { .useSprite(1, 2); }
|
||||||
|
&.fancytree-radio { .useSprite(0, 3); }
|
||||||
|
&.fancytree-radio:hover { .useSprite(1, 3); }
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
.useSprite(4, 2);
|
.useSprite(4, 2);
|
||||||
&:hover { .useSprite(5, 2); }
|
&:hover { .useSprite(5, 2); }
|
||||||
|
&.fancytree-radio { .useSprite(4, 3); }
|
||||||
|
&.fancytree-radio:hover { .useSprite(5, 3); }
|
||||||
}
|
}
|
||||||
// selected after partsel, so it takes precedence:
|
// selected after partsel, so it takes precedence:
|
||||||
.fancytree-selected span.fancytree-checkbox {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
.useSprite(2, 2);
|
.useSprite(2, 2);
|
||||||
&:hover { .useSprite(3, 2); }
|
&:hover { .useSprite(3, 2); }
|
||||||
|
&.fancytree-radio { .useSprite(2, 3); }
|
||||||
|
&.fancytree-radio:hover { .useSprite(3, 3); }
|
||||||
}
|
}
|
||||||
// Unselectable is dimmed, without hover effects
|
// Unselectable is dimmed, without hover effects
|
||||||
.fancytree-unselectable {
|
.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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
@ -82,7 +82,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -97,7 +96,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -212,18 +210,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -237,33 +253,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -78,7 +78,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -93,7 +92,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
@ -208,18 +206,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -233,33 +249,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -92,7 +92,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -107,7 +106,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -222,18 +220,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -247,33 +263,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
@ -206,18 +204,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -206,18 +204,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -206,18 +204,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -64px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -128px -64px;
|
background-position: -128px -64px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -160px -64px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -64px -64px;
|
background-position: -64px -64px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -96px -64px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -64px -64px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
@ -206,18 +204,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -76,7 +76,6 @@ span.fancytree-vline,
|
|||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-drag-helper-img,
|
span.fancytree-drag-helper-img,
|
||||||
#fancytree-drop-marker {
|
#fancytree-drop-marker {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
@ -91,7 +90,6 @@ span.fancytree-drag-helper-img,
|
|||||||
span.fancytree-icon,
|
span.fancytree-icon,
|
||||||
span.fancytree-checkbox,
|
span.fancytree-checkbox,
|
||||||
span.fancytree-expander,
|
span.fancytree-expander,
|
||||||
span.fancytree-radio,
|
|
||||||
span.fancytree-custom-icon {
|
span.fancytree-custom-icon {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
@ -206,18 +204,36 @@ span.fancytree-checkbox {
|
|||||||
span.fancytree-checkbox:hover {
|
span.fancytree-checkbox:hover {
|
||||||
background-position: -16px -32px;
|
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 {
|
.fancytree-partsel span.fancytree-checkbox {
|
||||||
background-position: -64px -32px;
|
background-position: -64px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||||
background-position: -80px -32px;
|
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 {
|
.fancytree-selected span.fancytree-checkbox {
|
||||||
background-position: -32px -32px;
|
background-position: -32px -32px;
|
||||||
}
|
}
|
||||||
.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -48px -32px;
|
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 {
|
.fancytree-unselectable span.fancytree-checkbox {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
filter: alpha(opacity=40);
|
filter: alpha(opacity=40);
|
||||||
@ -231,33 +247,6 @@ span.fancytree-checkbox:hover {
|
|||||||
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
.fancytree-unselectable.fancytree-selected span.fancytree-checkbox:hover {
|
||||||
background-position: -32px -32px;
|
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
|
* Node type icon
|
||||||
* Note: IE6 doesn't correctly evaluate multiples class names,
|
* Note: IE6 doesn't correctly evaluate multiples class names,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -12,8 +12,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;( function( $, window, document, undefined ) {
|
;( function( $, window, document, undefined ) {
|
||||||
@ -253,7 +253,7 @@ $.ui.fancytree._FancytreeClass.prototype.activateCell = function( $td ) {
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "ariagrid",
|
name: "ariagrid",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
// Internal behavior flags, currently controlled via `extendedMode`
|
// Internal behavior flags, currently controlled via `extendedMode`
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// To keep the global namespace clean, we wrap everything in a closure
|
// 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.
|
// Every extension must be registered by a unique name.
|
||||||
name: "childcounter",
|
name: "childcounter",
|
||||||
// Version information should be compliant with [semver](http://semver.org)
|
// Version information should be compliant with [semver](http://semver.org)
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
|
|
||||||
// Extension specific options and their defaults.
|
// Extension specific options and their defaults.
|
||||||
// This options will be available as `tree.options.childcounter.hideExpanded`
|
// This options will be available as `tree.options.childcounter.hideExpanded`
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -342,7 +342,7 @@ $.ui.fancytree._FancytreeClass.prototype.changeRefKey = function(oldRefKey, newR
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "clones",
|
name: "clones",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
|
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -41,7 +41,7 @@ function _assert(cond, msg){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "columnview",
|
name: "columnview",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
},
|
},
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(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({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "tracecalls",
|
name: "tracecalls",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
logTarget: null, // optional redirect logging to this <div> tag
|
logTarget: null, // optional redirect logging to this <div> tag
|
||||||
@ -92,7 +92,7 @@ $.ui.fancytree.registerExtension({
|
|||||||
},
|
},
|
||||||
nodeSetFocus: function(ctx) {
|
nodeSetFocus: function(ctx) {
|
||||||
},
|
},
|
||||||
nodeSetSelected: function(ctx, flag) {
|
nodeSetSelected: function(ctx, flag, callOpts) {
|
||||||
},
|
},
|
||||||
nodeSetStatus: function(ctx, status, message, details) {
|
nodeSetStatus: function(ctx, status, message, details) {
|
||||||
},
|
},
|
||||||
@ -124,7 +124,7 @@ $.ui.fancytree.registerExtension({
|
|||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "profiler",
|
name: "profiler",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension
|
// Default options for this extension
|
||||||
options: {
|
options: {
|
||||||
prefix: ""
|
prefix: ""
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -247,7 +247,7 @@ function _initDragAndDrop(tree) {
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "dnd",
|
name: "dnd",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
// Make tree nodes accept draggables
|
// Make tree nodes accept draggables
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ function handleDragOver(event, data) {
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "dnd5",
|
name: "dnd5",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
|
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -253,7 +253,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isEditing = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "edit",
|
name: "edit",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
adjustWidthOfs: 4, // null: don't adjust input size to content
|
adjustWidthOfs: 4, // null: don't adjust input size to content
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -273,7 +273,7 @@ $.ui.fancytree._FancytreeNodeClass.prototype.isMatched = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "filter",
|
name: "filter",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autoApply: true, // Re-apply last filter if lazy data is loaded
|
autoApply: true, // Re-apply last filter if lazy data is loaded
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -27,7 +27,7 @@ function _getIcon(opts, type){
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "glyph",
|
name: "glyph",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
map: {
|
map: {
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -116,7 +116,7 @@ function findNeighbourTd($target, keyCode){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "gridnav",
|
name: "gridnav",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
autofocusInput: false, // Focus first embedded input if node gets activated
|
autofocusInput: false, // Focus first embedded input if node gets activated
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** Core Fancytree module.
|
/** Core Fancytree module.
|
||||||
@ -53,10 +53,11 @@ var i, attr,
|
|||||||
221: "]", 222: "'"},
|
221: "]", 222: "'"},
|
||||||
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
MOUSE_BUTTONS = { 0: "", 1: "left", 2: "middle", 3: "right" },
|
||||||
// Boolean attributes that can be set with equivalent class names in the LI tags
|
// 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 = {},
|
CLASS_ATTR_MAP = {},
|
||||||
// Top-level Fancytree node attributes, that can be set by dict
|
// 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 = {},
|
NODE_ATTR_MAP = {},
|
||||||
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)
|
||||||
NODE_ATTR_LOWERCASE_MAP = {},
|
NODE_ATTR_LOWERCASE_MAP = {},
|
||||||
@ -320,6 +321,13 @@ function FancytreeNode(parent, obj){
|
|||||||
name = NODE_ATTRS[i];
|
name = NODE_ATTRS[i];
|
||||||
this[name] = obj[name];
|
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
|
// node.data += obj.data
|
||||||
if(obj.data){
|
if(obj.data){
|
||||||
$.extend(this.data, obj.data);
|
$.extend(this.data, obj.data);
|
||||||
@ -355,6 +363,7 @@ function FancytreeNode(parent, obj){
|
|||||||
this.tree.lastSelectedNode = this;
|
this.tree.lastSelectedNode = this;
|
||||||
}
|
}
|
||||||
// TODO: handle obj.focus = true
|
// TODO: handle obj.focus = true
|
||||||
|
|
||||||
// Create child nodes
|
// Create child nodes
|
||||||
cl = obj.children;
|
cl = obj.children;
|
||||||
if( cl ){
|
if( cl ){
|
||||||
@ -690,8 +699,14 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/* Apply selection state (internal use only) */
|
/* Apply selection state (internal use only) */
|
||||||
_changeSelectStatusAttrs: function(state) {
|
_changeSelectStatusAttrs: function(state) {
|
||||||
var changed = false;
|
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){
|
switch(state){
|
||||||
case false:
|
case false:
|
||||||
changed = ( this.selected || this.partsel );
|
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.
|
* Fix selection status, after this node was (de)selected in multi-hier mode.
|
||||||
* This includes (de)selecting all children.
|
* This includes (de)selecting all children.
|
||||||
*/
|
*/
|
||||||
fixSelection3AfterClick: function() {
|
fixSelection3AfterClick: function(callOpts) {
|
||||||
var flag = this.isSelected();
|
var flag = this.isSelected();
|
||||||
|
|
||||||
// this.debug("fixSelection3AfterClick()");
|
// this.debug("fixSelection3AfterClick()");
|
||||||
@ -729,7 +744,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
this.visit(function(node){
|
this.visit(function(node){
|
||||||
node._changeSelectStatusAttrs(flag);
|
node._changeSelectStatusAttrs(flag);
|
||||||
});
|
});
|
||||||
this.fixSelection3FromEndNodes();
|
this.fixSelection3FromEndNodes(callOpts);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Fix selection status for multi-hier mode.
|
* 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
|
* Should be called after this node has loaded new children or after
|
||||||
* children have been modified using the API.
|
* children have been modified using the API.
|
||||||
*/
|
*/
|
||||||
fixSelection3FromEndNodes: function() {
|
fixSelection3FromEndNodes: function(callOpts) {
|
||||||
|
var opts = this.tree.options;
|
||||||
|
|
||||||
// this.debug("fixSelection3FromEndNodes()");
|
// 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`
|
// Visit all end nodes and adjust their parent's `selected` and `partsel`
|
||||||
// attributes. Return selection state true, false, or undefined.
|
// attributes. Return selection state true, false, or undefined.
|
||||||
function _walk(node){
|
function _walk(node){
|
||||||
var i, l, child, s, state, allSelected,someSelected,
|
var i, l, child, s, state, allSelected, someSelected, unselIgnore, unselState,
|
||||||
children = node.children;
|
children = node.children;
|
||||||
|
|
||||||
if( children && children.length ){
|
if( children && children.length ){
|
||||||
@ -756,6 +773,9 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
child = children[i];
|
child = children[i];
|
||||||
// the selection state of a node is not relevant; we need the end-nodes
|
// the selection state of a node is not relevant; we need the end-nodes
|
||||||
s = _walk(child);
|
s = _walk(child);
|
||||||
|
// if( !child.unselectableIgnore ) {
|
||||||
|
unselIgnore = FT.evalOption("unselectableIgnore", child, child, opts, false);
|
||||||
|
if( !unselIgnore ) {
|
||||||
if( s !== false ) {
|
if( s !== false ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
@ -763,11 +783,12 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
}else{
|
}else{
|
||||||
// This is an end-node: simply report the status
|
// This is an end-node: simply report the status
|
||||||
// state = ( node.unselectable ) ? undefined : !!node.selected;
|
unselState = FT.evalOption("unselectableStatus", node, node, opts, undefined);
|
||||||
state = !!node.selected;
|
state = ( unselState == null ) ? !!node.selected : !!unselState;
|
||||||
}
|
}
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
return state;
|
return state;
|
||||||
@ -776,22 +797,27 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
|
|
||||||
// Update parent's state
|
// Update parent's state
|
||||||
this.visitParents(function(node){
|
this.visitParents(function(node){
|
||||||
var i, l, child, state,
|
var i, l, child, state, unselIgnore, unselState,
|
||||||
children = node.children,
|
children = node.children,
|
||||||
allSelected = true,
|
allSelected = true,
|
||||||
someSelected = false;
|
someSelected = false;
|
||||||
|
|
||||||
for( i=0, l=children.length; i<l; i++ ){
|
for( i=0, l=children.length; i<l; i++ ){
|
||||||
child = children[i];
|
child = children[i];
|
||||||
|
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.
|
// When fixing the parents, we trust the sibling status (i.e.
|
||||||
// we don't recurse)
|
// we don't recurse)
|
||||||
if( child.selected || child.partsel ) {
|
if( state || child.partsel ) {
|
||||||
someSelected = true;
|
someSelected = true;
|
||||||
}
|
}
|
||||||
if( !child.unselectable && !child.selected ) {
|
if( !state ) {
|
||||||
allSelected = false;
|
allSelected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
state = allSelected ? true : (someSelected ? undefined : false);
|
state = allSelected ? true : (someSelected ? undefined : false);
|
||||||
node._changeSelectStatusAttrs(state);
|
node._changeSelectStatusAttrs(state);
|
||||||
});
|
});
|
||||||
@ -1101,6 +1127,13 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
isRoot: function() {
|
isRoot: function() {
|
||||||
return this.isRootNode();
|
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.
|
/** (experimental) Return true if this is partially loaded.
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @since 2.15
|
* @since 2.15
|
||||||
@ -1776,9 +1809,11 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
},
|
},
|
||||||
/**Select this node, i.e. check the checkbox.
|
/**Select this node, i.e. check the checkbox.
|
||||||
* @param {boolean} [flag=true] pass false to deselect
|
* @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){
|
setSelected: function(flag, opts){
|
||||||
return this.tree._callHook("nodeSetSelected", this, flag);
|
return this.tree._callHook("nodeSetSelected", this, flag, opts);
|
||||||
},
|
},
|
||||||
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
|
||||||
* @param {string} status 'error'|'empty'|'ok'
|
* @param {string} status 'error'|'empty'|'ok'
|
||||||
@ -2055,6 +2090,29 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
|
|||||||
}
|
}
|
||||||
return true;
|
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)
|
/** Write warning to browser console (prepending node info)
|
||||||
*
|
*
|
||||||
* @param {*} msg string or object or array of such
|
* @param {*} msg string or object or array of such
|
||||||
@ -3496,7 +3554,7 @@ $.extend(Fancytree.prototype,
|
|||||||
*/
|
*/
|
||||||
nodeRenderTitle: function(ctx, title) {
|
nodeRenderTitle: function(ctx, title) {
|
||||||
// set node connector images, links and text
|
// set node connector images, links and text
|
||||||
var icon, nodeTitle, role, tabindex, tooltip,
|
var checkbox, className, icon, nodeTitle, role, tabindex, tooltip,
|
||||||
node = ctx.node,
|
node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options,
|
opts = ctx.options,
|
||||||
@ -3526,9 +3584,15 @@ $.extend(Fancytree.prototype,
|
|||||||
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
ares.push("<span " + role + " class='fancytree-expander'></span>");
|
||||||
}
|
}
|
||||||
// Checkbox mode
|
// 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'" : "";
|
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
|
// Folder or doctype icon
|
||||||
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
if( node.data.iconClass !== undefined ) { // 2015-11-16
|
||||||
@ -3570,11 +3634,15 @@ $.extend(Fancytree.prototype,
|
|||||||
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
nodeTitle = opts.renderTitle.call(tree, {type: "renderTitle"}, ctx) || "";
|
||||||
}
|
}
|
||||||
if ( !nodeTitle ) {
|
if ( !nodeTitle ) {
|
||||||
if( node.tooltip ) {
|
tooltip = FT.evalOption("tooltip", node, node, opts, null);
|
||||||
tooltip = node.tooltip;
|
if( tooltip === true ) {
|
||||||
} else if ( opts.tooltip ) {
|
tooltip = node.title;
|
||||||
tooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);
|
|
||||||
}
|
}
|
||||||
|
// 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) + "'" : "";
|
tooltip = tooltip ? " title='" + _escapeTooltip(tooltip) + "'" : "";
|
||||||
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
tabindex = opts.titlesTabbable ? " tabindex='0'" : "";
|
||||||
|
|
||||||
@ -3661,7 +3729,7 @@ $.extend(Fancytree.prototype,
|
|||||||
if( node.partsel ){
|
if( node.partsel ){
|
||||||
cnList.push(cn.partsel);
|
cnList.push(cn.partsel);
|
||||||
}
|
}
|
||||||
if( node.unselectable ){
|
if( FT.evalOption("unselectable", node, node, opts, false) ){
|
||||||
cnList.push(cn.unselectable);
|
cnList.push(cn.unselectable);
|
||||||
}
|
}
|
||||||
if( node._isLoading ){
|
if( node._isLoading ){
|
||||||
@ -3992,41 +4060,73 @@ $.extend(Fancytree.prototype,
|
|||||||
*
|
*
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
* @param {boolean} [flag=true]
|
* @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,
|
var node = ctx.node,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
opts = ctx.options;
|
opts = ctx.options,
|
||||||
|
noEvents = (callOpts.noEvents === true);
|
||||||
|
|
||||||
// flag defaults to true
|
// flag defaults to true
|
||||||
flag = (flag !== false);
|
flag = (flag !== false);
|
||||||
|
|
||||||
// node.debug("nodeSetSelected(" + flag + ")", ctx);
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: !!node.expanded is nicer, but doesn't pass jshint
|
|
||||||
// https://github.com/jshint/jshint/issues/455
|
// Remember the user's intent, in case down -> up propagation prevents
|
||||||
// if( !!node.expanded === !!flag){
|
// applying it to node.selected
|
||||||
if((node.selected && flag) || (!node.selected && !flag)){
|
node._lastSelectIntent = flag;
|
||||||
return !!node.selected;
|
|
||||||
}else if ( this._triggerNodeEvent("beforeSelect", node, ctx.originalEvent) === false ){
|
// 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;
|
return !!node.selected;
|
||||||
}
|
}
|
||||||
if(flag && opts.selectMode === 1){
|
if(flag && opts.selectMode === 1){
|
||||||
// single selection mode
|
// single selection mode (we don't uncheck all tree nodes, for performance reasons)
|
||||||
if(tree.lastSelectedNode){
|
if(tree.lastSelectedNode){
|
||||||
tree.lastSelectedNode.setSelected(false);
|
tree.lastSelectedNode.setSelected(false);
|
||||||
}
|
}
|
||||||
}else if(opts.selectMode === 3){
|
|
||||||
// multi.hier selection mode
|
|
||||||
node.selected = flag;
|
node.selected = flag;
|
||||||
// this._fixSelectionState(node);
|
}else if(opts.selectMode === 3 && !node.parent.radiogroup && !node.radiogroup){
|
||||||
node.fixSelection3AfterClick();
|
// 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);
|
this.nodeRenderStatus(ctx);
|
||||||
tree.lastSelectedNode = flag ? node : null;
|
tree.lastSelectedNode = flag ? node : null;
|
||||||
|
if( !noEvents ) {
|
||||||
tree._triggerNodeEvent("select", ctx);
|
tree._triggerNodeEvent("select", ctx);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.
|
||||||
*
|
*
|
||||||
@ -4132,7 +4232,18 @@ $.extend(Fancytree.prototype,
|
|||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
*/
|
*/
|
||||||
nodeToggleSelected: function(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.
|
/** Remove all nodes.
|
||||||
* @param {EventData} ctx
|
* @param {EventData} ctx
|
||||||
@ -4377,7 +4488,7 @@ $.widget("ui.fancytree",
|
|||||||
// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable
|
// 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.
|
dataType: "json" // Expect json format and pass json object to callbacks.
|
||||||
}, //
|
}, //
|
||||||
aria: false,
|
aria: true,
|
||||||
autoActivate: true,
|
autoActivate: true,
|
||||||
autoCollapse: false,
|
autoCollapse: false,
|
||||||
autoScroll: false,
|
autoScroll: false,
|
||||||
@ -4427,6 +4538,8 @@ $.widget("ui.fancytree",
|
|||||||
focused: "fancytree-focused",
|
focused: "fancytree-focused",
|
||||||
partload: "fancytree-partload",
|
partload: "fancytree-partload",
|
||||||
partsel: "fancytree-partsel",
|
partsel: "fancytree-partsel",
|
||||||
|
radio: "fancytree-radio",
|
||||||
|
// radiogroup: "fancytree-radiogroup",
|
||||||
unselectable: "fancytree-unselectable",
|
unselectable: "fancytree-unselectable",
|
||||||
lastsib: "fancytree-lastsib",
|
lastsib: "fancytree-lastsib",
|
||||||
loading: "fancytree-loading",
|
loading: "fancytree-loading",
|
||||||
@ -4669,7 +4782,7 @@ $.extend($.ui.fancytree,
|
|||||||
/** @lends Fancytree_Static# */
|
/** @lends Fancytree_Static# */
|
||||||
{
|
{
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
version: "2.22.5", // Set to semver by 'grunt release'
|
version: "2.23.0", // Set to semver by 'grunt release'
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
buildType: "production", // Set to 'production' by 'grunt build'
|
buildType: "production", // Set to 'production' by 'grunt build'
|
||||||
/** @type {int} */
|
/** @type {int} */
|
||||||
@ -4793,7 +4906,8 @@ $.extend($.ui.fancytree,
|
|||||||
res.type = "title";
|
res.type = "title";
|
||||||
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
}else if( /\bfancytree-expander\b/.test(tcn) ){
|
||||||
res.type = (res.node.hasChildren() === false ? "prefix" : "expander");
|
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";
|
res.type = "checkbox";
|
||||||
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
}else if( /\bfancytree-icon\b/.test(tcn) ){
|
||||||
res.type = "icon";
|
res.type = "icon";
|
||||||
@ -5064,6 +5178,10 @@ $.extend($.ui.fancytree,
|
|||||||
if( tmp ){
|
if( tmp ){
|
||||||
d.key = tmp;
|
d.key = tmp;
|
||||||
}
|
}
|
||||||
|
// Translate hideCheckbox -> checkbox:false
|
||||||
|
if( $li.attr("hideCheckbox") ){
|
||||||
|
d.checkbox = false;
|
||||||
|
}
|
||||||
// Add <li data-NAME='...'> as node.data.NAME
|
// Add <li data-NAME='...'> as node.data.NAME
|
||||||
allData = _getElementDataAsDict($li);
|
allData = _getElementDataAsDict($li);
|
||||||
if( allData && !$.isEmptyObject(allData) ) {
|
if( allData && !$.isEmptyObject(allData) ) {
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -152,7 +152,7 @@ $.ui.fancytree._FancytreeClass.prototype.getPersistData = function(){
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "persist",
|
name: "persist",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
cookieDelimiter: "~",
|
cookieDelimiter: "~",
|
||||||
@ -359,7 +359,7 @@ $.ui.fancytree.registerExtension({
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
nodeSetSelected: function(ctx, flag) {
|
nodeSetSelected: function(ctx, flag, callOpts) {
|
||||||
var res, selNodes,
|
var res, selNodes,
|
||||||
tree = ctx.tree,
|
tree = ctx.tree,
|
||||||
node = ctx.node,
|
node = ctx.node,
|
||||||
|
54
static/lib/fancytree/src/jquery.fancytree.select.js
Normal file
54
static/lib/fancytree/src/jquery.fancytree.select.js
Normal 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));
|
@ -9,8 +9,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -88,7 +88,7 @@ function findPrevRowNode(node){
|
|||||||
|
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "table",
|
name: "table",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
|
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "themeroller",
|
name: "themeroller",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
activeClass: "ui-state-active", // Class added to active node
|
activeClass: "ui-state-active", // Class added to active node
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
||||||
*
|
*
|
||||||
* @version 2.22.5
|
* @version 2.23.0
|
||||||
* @date 2017-05-11T17:01:53Z
|
* @date 2017-05-27T20:09:38Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function($, window, document, undefined) {
|
;(function($, window, document, undefined) {
|
||||||
@ -109,7 +109,7 @@ function renderLevelCss(containerId, depth, levelOfs, lineOfs, labelOfs, measure
|
|||||||
*/
|
*/
|
||||||
$.ui.fancytree.registerExtension({
|
$.ui.fancytree.registerExtension({
|
||||||
name: "wide",
|
name: "wide",
|
||||||
version: "2.22.5",
|
version: "2.23.0",
|
||||||
// Default options for this extension.
|
// Default options for this extension.
|
||||||
options: {
|
options: {
|
||||||
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"
|
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user