fancytree-rails 2.0.0.pre.6.pre.1 → 2.0.0.pre.11.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Rakefile +6 -7
- data/lib/fancytree/rails/version.rb +2 -2
- data/vendor/assets/images/fancytree/skin-win8-xxl/icons.gif +0 -0
- data/vendor/assets/images/fancytree/skin-win8-xxl/loading.gif +0 -0
- data/vendor/assets/javascripts/fancytree.js +1 -1
- data/vendor/assets/javascripts/fancytree/MIT-LICENSE.txt +21 -0
- data/vendor/assets/javascripts/fancytree/jquery.fancytree-all.js +1267 -475
- data/vendor/assets/javascripts/fancytree/jquery.fancytree-custom.min.js +41 -0
- data/vendor/assets/javascripts/fancytree/jquery.fancytree.js +582 -310
- data/vendor/assets/javascripts/fancytree/jquery.fancytree.min.js +14 -7
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.childcounter.js +185 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.clones.js +417 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.columnview.js +149 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.debug.js +142 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.dnd.js +539 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.edit.js +318 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.filter.js +173 -0
- data/vendor/assets/javascripts/fancytree/{jquery.fancytree.awesome.js → src/jquery.fancytree.glyph.js} +28 -26
- data/vendor/assets/javascripts/fancytree/{jquery.fancytree.gridnav.js → src/jquery.fancytree.gridnav.js} +77 -41
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.js +4027 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.menu.js +155 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.persist.js +345 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.table.js +345 -0
- data/vendor/assets/javascripts/fancytree/src/jquery.fancytree.themeroller.js +82 -0
- data/vendor/assets/stylesheets/fancytree/skin-awesome/ui.fancytree.css +29 -15
- data/vendor/assets/stylesheets/fancytree/skin-awesome/ui.fancytree.min.css +1 -1
- data/vendor/assets/stylesheets/fancytree/skin-bootstrap/ui.fancytree.css +366 -0
- data/vendor/assets/stylesheets/fancytree/skin-bootstrap/ui.fancytree.min.css +6 -0
- data/vendor/assets/stylesheets/fancytree/skin-lion/ui.fancytree.css +34 -7
- data/vendor/assets/stylesheets/fancytree/skin-lion/ui.fancytree.min.css +1 -1
- data/vendor/assets/stylesheets/fancytree/skin-vista/ui.fancytree.css +34 -7
- data/vendor/assets/stylesheets/fancytree/skin-vista/ui.fancytree.min.css +1 -1
- data/vendor/assets/stylesheets/fancytree/skin-win7/ui.fancytree.css +34 -7
- data/vendor/assets/stylesheets/fancytree/skin-win7/ui.fancytree.min.css +1 -1
- data/vendor/assets/stylesheets/fancytree/skin-win8-xxl/ui.fancytree.css +507 -0
- data/vendor/assets/stylesheets/fancytree/skin-win8-xxl/ui.fancytree.min.css +11 -0
- data/vendor/assets/stylesheets/fancytree/skin-win8/ui.fancytree.css +34 -7
- data/vendor/assets/stylesheets/fancytree/skin-win8/ui.fancytree.min.css +1 -1
- data/vendor/assets/stylesheets/fancytree/skin-xp/ui.fancytree.css +34 -7
- data/vendor/assets/stylesheets/fancytree/skin-xp/ui.fancytree.min.css +1 -1
- metadata +24 -13
- data/vendor/assets/javascripts/fancytree/jquery.fancytree-all.min.js +0 -7
- data/vendor/assets/javascripts/fancytree/jquery.fancytree-all.min.js.map +0 -1
- data/vendor/assets/javascripts/fancytree/jquery.fancytree.min.js.map +0 -1
- data/vendor/assets/stylesheets/fancytree/skin-lion/ui.fancytree-org.css +0 -460
- data/vendor/assets/stylesheets/fancytree/skin-themeroller/ui.fancytree-org.css +0 -505
- data/vendor/assets/stylesheets/fancytree/skin-vista/ui.fancytree-org.css +0 -610
- data/vendor/assets/stylesheets/fancytree/skin-win7/ui.fancytree-org.css +0 -592
- data/vendor/assets/stylesheets/fancytree/skin-win8/ui.fancytree-org.css +0 -602
- data/vendor/assets/stylesheets/fancytree/skin-xp/ui.fancytree-org.css +0 -578
@@ -0,0 +1,345 @@
|
|
1
|
+
/*!
|
2
|
+
* jquery.fancytree.table.js
|
3
|
+
*
|
4
|
+
* Render tree as table (aka 'treegrid', 'tabletree').
|
5
|
+
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
|
6
|
+
*
|
7
|
+
* Copyright (c) 2014, Martin Wendt (http://wwWendt.de)
|
8
|
+
*
|
9
|
+
* Released under the MIT license
|
10
|
+
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
11
|
+
*
|
12
|
+
* @version 2.0.0-11
|
13
|
+
* @date 2014-04-27T22:28
|
14
|
+
*/
|
15
|
+
|
16
|
+
;(function($, window, document, undefined) {
|
17
|
+
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
/* *****************************************************************************
|
21
|
+
* Private functions and variables
|
22
|
+
*/
|
23
|
+
function _assert(cond, msg){
|
24
|
+
msg = msg || "";
|
25
|
+
if(!cond){
|
26
|
+
$.error("Assertion failed " + msg);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
function insertSiblingAfter(referenceNode, newNode) {
|
31
|
+
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
32
|
+
}
|
33
|
+
|
34
|
+
/* Show/hide all rows that are structural descendants of `parent`. */
|
35
|
+
function setChildRowVisibility(parent, flag) {
|
36
|
+
parent.visit(function(node){
|
37
|
+
var tr = node.tr;
|
38
|
+
// currentFlag = node.hide ? false : flag; // fix for ext-filter
|
39
|
+
if(tr){
|
40
|
+
tr.style.display = (node.hide || !flag) ? "none" : "";
|
41
|
+
}
|
42
|
+
if(!node.expanded){
|
43
|
+
return "skip";
|
44
|
+
}
|
45
|
+
});
|
46
|
+
}
|
47
|
+
|
48
|
+
/* Find node that is rendered in previous row. */
|
49
|
+
function findPrevRowNode(node){
|
50
|
+
var i, last, prev,
|
51
|
+
parent = node.parent,
|
52
|
+
siblings = parent ? parent.children : null;
|
53
|
+
|
54
|
+
if(siblings && siblings.length > 1 && siblings[0] !== node){
|
55
|
+
// use the lowest descendant of the preceeding sibling
|
56
|
+
i = $.inArray(node, siblings);
|
57
|
+
prev = siblings[i - 1];
|
58
|
+
_assert(prev.tr);
|
59
|
+
// descend to lowest child (with a <tr> tag)
|
60
|
+
while(prev.children){
|
61
|
+
last = prev.children[prev.children.length - 1];
|
62
|
+
if(!last.tr){
|
63
|
+
break;
|
64
|
+
}
|
65
|
+
prev = last;
|
66
|
+
}
|
67
|
+
}else{
|
68
|
+
// if there is no preceding sibling, use the direct parent
|
69
|
+
prev = parent;
|
70
|
+
}
|
71
|
+
return prev;
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
$.ui.fancytree.registerExtension({
|
76
|
+
name: "table",
|
77
|
+
version: "0.2.0",
|
78
|
+
// Default options for this extension.
|
79
|
+
options: {
|
80
|
+
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
|
81
|
+
customStatus: false, // true: generate renderColumns events for status nodes
|
82
|
+
indentation: 16, // indent every node level by 16px
|
83
|
+
nodeColumnIdx: 0 // render node expander, icon, and title to this column (default: #0)
|
84
|
+
},
|
85
|
+
// Overide virtual methods for this extension.
|
86
|
+
// `this` : is this extension object
|
87
|
+
// `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree)
|
88
|
+
treeInit: function(ctx){
|
89
|
+
var i, $row, tdRole,
|
90
|
+
tree = ctx.tree,
|
91
|
+
$table = tree.widget.element;
|
92
|
+
|
93
|
+
$table.addClass("fancytree-container fancytree-ext-table");
|
94
|
+
tree.tbody = $table.find("> tbody")[0];
|
95
|
+
tree.columnCount = $("thead >tr >th", $table).length;
|
96
|
+
$(tree.tbody).empty();
|
97
|
+
|
98
|
+
tree.rowFragment = document.createDocumentFragment();
|
99
|
+
$row = $("<tr />");
|
100
|
+
tdRole = "";
|
101
|
+
if(ctx.options.aria){
|
102
|
+
$row.attr("role", "row");
|
103
|
+
tdRole = " role='gridcell'";
|
104
|
+
}
|
105
|
+
for(i=0; i<tree.columnCount; i++) {
|
106
|
+
if(ctx.options.table.nodeColumnIdx === i){
|
107
|
+
$row.append("<td" + tdRole + "><span class='fancytree-node' /></td>");
|
108
|
+
}else{
|
109
|
+
$row.append("<td" + tdRole + " />");
|
110
|
+
}
|
111
|
+
}
|
112
|
+
tree.rowFragment.appendChild($row.get(0));
|
113
|
+
|
114
|
+
// Make sure that status classes are set on the node's <tr> elements
|
115
|
+
tree.statusClassPropName = "tr";
|
116
|
+
tree.ariaPropName = "tr";
|
117
|
+
this.nodeContainerAttrName = "tr";
|
118
|
+
|
119
|
+
this._super(ctx);
|
120
|
+
|
121
|
+
// standard Fancytree created a root UL
|
122
|
+
$(tree.rootNode.ul).remove();
|
123
|
+
tree.rootNode.ul = null;
|
124
|
+
tree.$container = $table;
|
125
|
+
// Add container to the TAB chain
|
126
|
+
this.$container.attr("tabindex", this.options.tabbable ? "0" : "-1");
|
127
|
+
if(this.options.aria){
|
128
|
+
tree.$container
|
129
|
+
.attr("role", "treegrid")
|
130
|
+
.attr("aria-readonly", true);
|
131
|
+
}
|
132
|
+
},
|
133
|
+
/* Called by nodeRender to sync node order with tag order.*/
|
134
|
+
// nodeFixOrder: function(ctx) {
|
135
|
+
// },
|
136
|
+
nodeRemoveChildMarkup: function(ctx) {
|
137
|
+
var node = ctx.node;
|
138
|
+
// DT.debug("nodeRemoveChildMarkup()", node.toString());
|
139
|
+
node.visit(function(n){
|
140
|
+
if(n.tr){
|
141
|
+
$(n.tr).remove();
|
142
|
+
n.tr = null;
|
143
|
+
}
|
144
|
+
});
|
145
|
+
},
|
146
|
+
nodeRemoveMarkup: function(ctx) {
|
147
|
+
var node = ctx.node;
|
148
|
+
// DT.debug("nodeRemoveMarkup()", node.toString());
|
149
|
+
if(node.tr){
|
150
|
+
$(node.tr).remove();
|
151
|
+
node.tr = null;
|
152
|
+
}
|
153
|
+
this.nodeRemoveChildMarkup(ctx);
|
154
|
+
},
|
155
|
+
/* Override standard render. */
|
156
|
+
nodeRender: function(ctx, force, deep, collapsed, _recursive) {
|
157
|
+
var children, firstTr, i, l, newRow, prevNode, prevTr, subCtx,
|
158
|
+
tree = ctx.tree,
|
159
|
+
node = ctx.node,
|
160
|
+
opts = ctx.options,
|
161
|
+
isRootNode = !node.parent;
|
162
|
+
|
163
|
+
if( !_recursive ){
|
164
|
+
ctx.hasCollapsedParents = node.parent && !node.parent.expanded;
|
165
|
+
}
|
166
|
+
// $.ui.fancytree.debug("*** nodeRender " + node + ", isRoot=" + isRootNode, "tr=" + node.tr, "hcp=" + ctx.hasCollapsedParents, "parent.tr=" + (node.parent && node.parent.tr));
|
167
|
+
if( !isRootNode ){
|
168
|
+
if(!node.tr){
|
169
|
+
if( ctx.hasCollapsedParents /*&& !node.parent.tr*/ ) {
|
170
|
+
// #166: we assume that the parent will be (recursively) rendered
|
171
|
+
// later anyway.
|
172
|
+
node.debug("nodeRender ignored due to unrendered parent");
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
// Create new <tr> after previous row
|
176
|
+
newRow = tree.rowFragment.firstChild.cloneNode(true);
|
177
|
+
prevNode = findPrevRowNode(node);
|
178
|
+
// $.ui.fancytree.debug("*** nodeRender " + node + ": prev: " + prevNode.key);
|
179
|
+
_assert(prevNode);
|
180
|
+
if(collapsed === true && _recursive){
|
181
|
+
// hide all child rows, so we can use an animation to show it later
|
182
|
+
newRow.style.display = "none";
|
183
|
+
}else if(deep && ctx.hasCollapsedParents){
|
184
|
+
// also hide this row if deep === true but any parent is collapsed
|
185
|
+
newRow.style.display = "none";
|
186
|
+
// newRow.style.color = "red";
|
187
|
+
}
|
188
|
+
if(!prevNode.tr){
|
189
|
+
_assert(!prevNode.parent, "prev. row must have a tr, or is system root");
|
190
|
+
tree.tbody.appendChild(newRow);
|
191
|
+
}else{
|
192
|
+
insertSiblingAfter(prevNode.tr, newRow);
|
193
|
+
}
|
194
|
+
node.tr = newRow;
|
195
|
+
if( node.key && opts.generateIds ){
|
196
|
+
node.tr.id = opts.idPrefix + node.key;
|
197
|
+
}
|
198
|
+
node.tr.ftnode = node;
|
199
|
+
if(opts.aria){
|
200
|
+
// TODO: why doesn't this work:
|
201
|
+
// node.li.role = "treeitem";
|
202
|
+
$(node.tr).attr("aria-labelledby", "ftal_" + node.key);
|
203
|
+
}
|
204
|
+
node.span = $("span.fancytree-node", node.tr).get(0);
|
205
|
+
// Set icon, link, and title (normally this is only required on initial render)
|
206
|
+
this.nodeRenderTitle(ctx);
|
207
|
+
// Allow tweaking, binding, after node was created for the first time
|
208
|
+
// tree._triggerNodeEvent("createNode", ctx);
|
209
|
+
if ( opts.createNode ){
|
210
|
+
opts.createNode.call(tree, {type: "createNode"}, ctx);
|
211
|
+
}
|
212
|
+
} else {
|
213
|
+
if( force ) {
|
214
|
+
// Set icon, link, and title (normally this is only required on initial render)
|
215
|
+
this.nodeRenderTitle(ctx); // triggers renderColumns()
|
216
|
+
} else {
|
217
|
+
// Update element classes according to node state
|
218
|
+
this.nodeRenderStatus(ctx);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
// Allow tweaking after node state was rendered
|
223
|
+
// tree._triggerNodeEvent("renderNode", ctx);
|
224
|
+
if ( opts.renderNode ){
|
225
|
+
opts.renderNode.call(tree, {type: "renderNode"}, ctx);
|
226
|
+
}
|
227
|
+
// Visit child nodes
|
228
|
+
// Add child markup
|
229
|
+
children = node.children;
|
230
|
+
if(children && (isRootNode || deep || node.expanded)){
|
231
|
+
for(i=0, l=children.length; i<l; i++) {
|
232
|
+
subCtx = $.extend({}, ctx, {node: children[i]});
|
233
|
+
subCtx.hasCollapsedParents = subCtx.hasCollapsedParents || !node.expanded;
|
234
|
+
this.nodeRender(subCtx, force, deep, collapsed, true);
|
235
|
+
}
|
236
|
+
}
|
237
|
+
// Make sure, that <tr> order matches node.children order.
|
238
|
+
if(children && !_recursive){ // we only have to do it once, for the root branch
|
239
|
+
prevTr = node.tr || null;
|
240
|
+
firstTr = tree.tbody.firstChild;
|
241
|
+
// Iterate over all descendants
|
242
|
+
node.visit(function(n){
|
243
|
+
if(n.tr){
|
244
|
+
if(!n.parent.expanded && n.tr.style.display !== "none"){
|
245
|
+
// fix after a node was dropped over a collapsed
|
246
|
+
n.tr.style.display = "none";
|
247
|
+
setChildRowVisibility(n, false);
|
248
|
+
}
|
249
|
+
if(n.tr.previousSibling !== prevTr){
|
250
|
+
node.debug("_fixOrder: mismatch at node: " + n);
|
251
|
+
var nextTr = prevTr ? prevTr.nextSibling : firstTr;
|
252
|
+
tree.tbody.insertBefore(n.tr, nextTr);
|
253
|
+
}
|
254
|
+
prevTr = n.tr;
|
255
|
+
}
|
256
|
+
});
|
257
|
+
}
|
258
|
+
// Update element classes according to node state
|
259
|
+
// if(!isRootNode){
|
260
|
+
// this.nodeRenderStatus(ctx);
|
261
|
+
// }
|
262
|
+
},
|
263
|
+
nodeRenderTitle: function(ctx, title) {
|
264
|
+
var $cb,
|
265
|
+
node = ctx.node,
|
266
|
+
opts = ctx.options;
|
267
|
+
|
268
|
+
this._super(ctx);
|
269
|
+
// Move checkbox to custom column
|
270
|
+
if(opts.checkbox && opts.table.checkboxColumnIdx != null ){
|
271
|
+
$cb = $("span.fancytree-checkbox", node.span).detach();
|
272
|
+
$(node.tr).find("td:first").html($cb);
|
273
|
+
}
|
274
|
+
// Let user code write column content
|
275
|
+
// ctx.tree._triggerNodeEvent("renderColumns", node);
|
276
|
+
// Update element classes according to node state
|
277
|
+
if( ! node.isRoot() ){
|
278
|
+
this.nodeRenderStatus(ctx);
|
279
|
+
}
|
280
|
+
if( !opts.table.customStatus && node.isStatusNode() ) {
|
281
|
+
// default rendering for status node: leave other cells empty
|
282
|
+
} else if ( opts.renderColumns ) {
|
283
|
+
opts.renderColumns.call(ctx.tree, {type: "renderColumns"}, ctx);
|
284
|
+
}
|
285
|
+
},
|
286
|
+
nodeRenderStatus: function(ctx) {
|
287
|
+
var indent,
|
288
|
+
node = ctx.node,
|
289
|
+
opts = ctx.options;
|
290
|
+
|
291
|
+
this._super(ctx);
|
292
|
+
|
293
|
+
$(node.tr).removeClass("fancytree-node");
|
294
|
+
// indent
|
295
|
+
indent = (node.getLevel() - 1) * opts.table.indentation;
|
296
|
+
$(node.span).css({marginLeft: indent + "px"});
|
297
|
+
},
|
298
|
+
/* Expand node, return Deferred.promise. */
|
299
|
+
nodeSetExpanded: function(ctx, flag, opts) {
|
300
|
+
var dfd = new $.Deferred(),
|
301
|
+
prevOpts = opts || {};
|
302
|
+
|
303
|
+
opts = $.extend({}, opts, {noEvents: true, noAnimation: true});
|
304
|
+
|
305
|
+
function _afterExpand(ok) {
|
306
|
+
flag = (flag !== false);
|
307
|
+
setChildRowVisibility(ctx.node, flag);
|
308
|
+
if( !prevOpts.noEvents ) {
|
309
|
+
ctx.tree._triggerNodeEvent(flag ? "expand" : "collapse", ctx);
|
310
|
+
}
|
311
|
+
if( ok ) {
|
312
|
+
dfd.resolveWith(ctx.node);
|
313
|
+
} else {
|
314
|
+
dfd.rejectWith(ctx.node);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
this._super(ctx, flag, opts).done(function () {
|
318
|
+
_afterExpand(true);
|
319
|
+
}).fail(function () {
|
320
|
+
_afterExpand(false);
|
321
|
+
});
|
322
|
+
return dfd.promise();
|
323
|
+
},
|
324
|
+
nodeSetStatus: function(ctx, status, message, details) {
|
325
|
+
if(status === "ok"){
|
326
|
+
var node = ctx.node,
|
327
|
+
firstChild = ( node.children ? node.children[0] : null );
|
328
|
+
if ( firstChild && firstChild.isStatusNode() ) {
|
329
|
+
$(firstChild.tr).remove();
|
330
|
+
}
|
331
|
+
}
|
332
|
+
this._super(ctx, status, message, details);
|
333
|
+
},
|
334
|
+
treeClear: function(ctx) {
|
335
|
+
this.nodeRemoveChildMarkup(this._makeHookContext(this.rootNode));
|
336
|
+
return this._super(ctx);
|
337
|
+
}
|
338
|
+
/*,
|
339
|
+
treeSetFocus: function(ctx, flag) {
|
340
|
+
// alert("treeSetFocus" + ctx.tree.$container);
|
341
|
+
ctx.tree.$container.focus();
|
342
|
+
$.ui.fancytree.focusTree = ctx.tree;
|
343
|
+
}*/
|
344
|
+
});
|
345
|
+
}(jQuery, window, document));
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/*!
|
2
|
+
* jquery.fancytree.themeroller.js
|
3
|
+
*
|
4
|
+
* Enable jQuery UI ThemeRoller styles.
|
5
|
+
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
|
6
|
+
*
|
7
|
+
* @see http://jqueryui.com/themeroller/
|
8
|
+
*
|
9
|
+
* Copyright (c) 2014, Martin Wendt (http://wwWendt.de)
|
10
|
+
*
|
11
|
+
* Released under the MIT license
|
12
|
+
* https://github.com/mar10/fancytree/wiki/LicenseInfo
|
13
|
+
*
|
14
|
+
* @version 2.0.0-11
|
15
|
+
* @date 2014-04-27T22:28
|
16
|
+
*/
|
17
|
+
|
18
|
+
;(function($, window, document, undefined) {
|
19
|
+
|
20
|
+
"use strict";
|
21
|
+
|
22
|
+
/*******************************************************************************
|
23
|
+
* Extension code
|
24
|
+
*/
|
25
|
+
$.ui.fancytree.registerExtension({
|
26
|
+
name: "themeroller",
|
27
|
+
version: "0.0.1",
|
28
|
+
// Default options for this extension.
|
29
|
+
options: {
|
30
|
+
activeClass: "ui-state-active",
|
31
|
+
foccusClass: "ui-state-focus",
|
32
|
+
hoverClass: "ui-state-hover",
|
33
|
+
selectedClass: "ui-state-highlight"
|
34
|
+
},
|
35
|
+
// Overide virtual methods for this extension.
|
36
|
+
// `this` : is this extension object
|
37
|
+
// `this._base` : the Fancytree instance
|
38
|
+
// `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree)
|
39
|
+
treeInit: function(ctx){
|
40
|
+
this._super(ctx);
|
41
|
+
var $el = ctx.widget.element;
|
42
|
+
|
43
|
+
if($el[0].nodeName === "TABLE"){
|
44
|
+
$el.addClass("ui-widget ui-corner-all");
|
45
|
+
$el.find(">thead tr").addClass("ui-widget-header");
|
46
|
+
$el.find(">tbody").addClass("ui-widget-conent");
|
47
|
+
}else{
|
48
|
+
$el.addClass("ui-widget ui-widget-content ui-corner-all");
|
49
|
+
}
|
50
|
+
|
51
|
+
$el.delegate(".fancytree-node", "mouseenter mouseleave", function(event){
|
52
|
+
var node = $.ui.fancytree.getNode(event.target),
|
53
|
+
flag = (event.type === "mouseenter");
|
54
|
+
node.debug("hover: " + flag);
|
55
|
+
$(node.span).toggleClass("ui-state-hover ui-corner-all", flag);
|
56
|
+
});
|
57
|
+
},
|
58
|
+
treeDestroy: function(ctx){
|
59
|
+
this._super(ctx);
|
60
|
+
ctx.widget.element.removeClass("ui-widget ui-widget-content ui-corner-all");
|
61
|
+
},
|
62
|
+
nodeRenderStatus: function(ctx){
|
63
|
+
var node = ctx.node,
|
64
|
+
$el = $(node.span);
|
65
|
+
this._super(ctx);
|
66
|
+
/*
|
67
|
+
.ui-state-highlight: Class to be applied to highlighted or selected elements. Applies "highlight" container styles to an element and its child text, links, and icons.
|
68
|
+
.ui-state-error: Class to be applied to error messaging container elements. Applies "error" container styles to an element and its child text, links, and icons.
|
69
|
+
.ui-state-error-text: An additional class that applies just the error text color without background. Can be used on form labels for instance. Also applies error icon color to child icons.
|
70
|
+
|
71
|
+
.ui-state-default: Class to be applied to clickable button-like elements. Applies "clickable default" container styles to an element and its child text, links, and icons.
|
72
|
+
.ui-state-hover: Class to be applied on mouseover to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons.
|
73
|
+
.ui-state-focus: Class to be applied on keyboard focus to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons.
|
74
|
+
.ui-state-active: Class to be applied on mousedown to clickable button-like elements. Applies "clickable active" container styles to an element and its child text, links, and icons.
|
75
|
+
*/
|
76
|
+
$el.toggleClass("ui-state-active", node.isActive());
|
77
|
+
$el.toggleClass("ui-state-focus", node.hasFocus());
|
78
|
+
$el.toggleClass("ui-state-highlight", node.isSelected());
|
79
|
+
// node.debug("ext-themeroller.nodeRenderStatus: ", node.span.className);
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}(jQuery, window, document));
|
@@ -27,7 +27,7 @@ ul.fancytree-container {
|
|
27
27
|
background-color: white;
|
28
28
|
border: 1px dotted gray;
|
29
29
|
overflow: auto;
|
30
|
-
height:
|
30
|
+
min-height: 0%;
|
31
31
|
}
|
32
32
|
ul.fancytree-container ul {
|
33
33
|
padding: 0 0 0 16px;
|
@@ -75,7 +75,6 @@ span.fancytree-drag-helper-img,
|
|
75
75
|
vertical-align: top;
|
76
76
|
background-repeat: no-repeat;
|
77
77
|
background-position: left;
|
78
|
-
background-image: url("icons.gif");
|
79
78
|
background-position: 0em 0em;
|
80
79
|
}
|
81
80
|
/* Used by iconclass option */
|
@@ -109,9 +108,6 @@ span.fancytree-expander {
|
|
109
108
|
background-image: none;
|
110
109
|
cursor: default;
|
111
110
|
}
|
112
|
-
.fancytree-loading span.fancytree-expander {
|
113
|
-
background-image: url("loading.gif");
|
114
|
-
}
|
115
111
|
/*------------------------------------------------------------------------------
|
116
112
|
* Checkbox icon
|
117
113
|
*----------------------------------------------------------------------------*/
|
@@ -141,14 +137,12 @@ span.fancytree-icon {
|
|
141
137
|
/* Documents */
|
142
138
|
/* Folders */
|
143
139
|
/* Status node icons */
|
144
|
-
.fancytree-statusnode-wait span.fancytree-icon {
|
145
|
-
background-image: url("loading.gif");
|
146
|
-
}
|
147
140
|
/*------------------------------------------------------------------------------
|
148
141
|
* Node titles and highlighting
|
149
142
|
*----------------------------------------------------------------------------*/
|
150
143
|
span.fancytree-node {
|
151
|
-
|
144
|
+
/* See #117 */
|
145
|
+
display: inherit;
|
152
146
|
width: 100%;
|
153
147
|
}
|
154
148
|
span.fancytree-title {
|
@@ -161,6 +155,9 @@ span.fancytree-title {
|
|
161
155
|
margin-left: 3px;
|
162
156
|
cursor: pointer;
|
163
157
|
}
|
158
|
+
span.fancytree-node.fancytree-error span.fancytree-title {
|
159
|
+
color: red;
|
160
|
+
}
|
164
161
|
/*------------------------------------------------------------------------------
|
165
162
|
* Drag'n'drop support
|
166
163
|
*----------------------------------------------------------------------------*/
|
@@ -204,6 +201,9 @@ span.fancytree-drop-target.fancytree-drop-accept a {
|
|
204
201
|
table.fancytree-ext-table {
|
205
202
|
border-collapse: collapse;
|
206
203
|
}
|
204
|
+
table.fancytree-ext-table span.fancytree-node {
|
205
|
+
display: inline-block;
|
206
|
+
}
|
207
207
|
/*------------------------------------------------------------------------------
|
208
208
|
* 'columnview' extension
|
209
209
|
*----------------------------------------------------------------------------*/
|
@@ -235,6 +235,7 @@ table.fancytree-ext-columnview tbody tr td > ul li {
|
|
235
235
|
table.fancytree-ext-columnview span.fancytree-node {
|
236
236
|
position: relative;
|
237
237
|
/* allow positioning of embedded spans */
|
238
|
+
display: inline-block;
|
238
239
|
}
|
239
240
|
table.fancytree-ext-columnview span.fancytree-node.fancytree-expanded {
|
240
241
|
background-color: #CBE8F6;
|
@@ -246,18 +247,34 @@ table.fancytree-ext-columnview .fancytree-has-children span.fancytree-cv-right {
|
|
246
247
|
/*------------------------------------------------------------------------------
|
247
248
|
* 'filter' extension
|
248
249
|
*----------------------------------------------------------------------------*/
|
249
|
-
.fancytree-ext-filter span.fancytree-node span.fancytree-title {
|
250
|
+
.fancytree-ext-filter-dimm span.fancytree-node span.fancytree-title {
|
250
251
|
color: silver;
|
251
252
|
font-weight: lighter;
|
252
253
|
}
|
253
|
-
.fancytree-ext-filter
|
254
|
+
.fancytree-ext-filter-dimm tr.fancytree-submatch span.fancytree-title,
|
255
|
+
.fancytree-ext-filter-dimm span.fancytree-node.fancytree-submatch span.fancytree-title {
|
254
256
|
color: black;
|
255
257
|
font-weight: normal;
|
256
258
|
}
|
257
|
-
.fancytree-ext-filter
|
259
|
+
.fancytree-ext-filter-dimm tr.fancytree-match span.fancytree-title,
|
260
|
+
.fancytree-ext-filter-dimm span.fancytree-node.fancytree-match span.fancytree-title {
|
258
261
|
color: black;
|
259
262
|
font-weight: bold;
|
260
263
|
}
|
264
|
+
.fancytree-ext-filter-hide tr.fancytree-hide,
|
265
|
+
.fancytree-ext-filter-hide span.fancytree-node.fancytree-hide {
|
266
|
+
display: none;
|
267
|
+
}
|
268
|
+
.fancytree-ext-filter-hide tr.fancytree-submatch span.fancytree-title,
|
269
|
+
.fancytree-ext-filter-hide span.fancytree-node.fancytree-submatch span.fancytree-title {
|
270
|
+
color: silver;
|
271
|
+
font-weight: lighter;
|
272
|
+
}
|
273
|
+
.fancytree-ext-filter-hide tr.fancytree-match span.fancytree-title,
|
274
|
+
.fancytree-ext-filter-hide span.fancytree-node.fancytree-match span.fancytree-title {
|
275
|
+
color: black;
|
276
|
+
font-weight: normal;
|
277
|
+
}
|
261
278
|
/*******************************************************************************
|
262
279
|
* Styles specific to this skin.
|
263
280
|
*
|
@@ -267,6 +284,3 @@ ul.fancytree-container ul {
|
|
267
284
|
padding: 0.3em 0 0 1em;
|
268
285
|
margin: 0;
|
269
286
|
}
|
270
|
-
.fancytree-container {
|
271
|
-
border: 5px solid green;
|
272
|
-
}
|