Skip to content

Commit

Permalink
Tagging the 2.0.0-12 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Apr 29, 2014
1 parent f9192bb commit 58aa9b2
Show file tree
Hide file tree
Showing 18 changed files with 162 additions and 360 deletions.
241 changes: 71 additions & 170 deletions dist/jquery.fancytree-all.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/jquery.fancytree-custom.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/jquery.fancytree.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

/** Core Fancytree module.
Expand Down Expand Up @@ -3772,7 +3772,7 @@ $.extend($.ui.fancytree,
/** @lends Fancytree_Static# */
{
/** @type {string} */
version: "2.0.0-11", // Set to semver by 'grunt release'
version: "2.0.0-12", // Set to semver by 'grunt release'
/** @type {string} */
buildType: "production", // Set to 'production' by 'grunt build'
/** @type {int} */
Expand Down
6 changes: 3 additions & 3 deletions dist/jquery.fancytree.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/src/jquery.fancytree.childcounter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

// To keep the global namespace clean, we wrap everything in a closure
Expand Down
4 changes: 2 additions & 2 deletions dist/src/jquery.fancytree.clones.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/src/jquery.fancytree.columnview.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/src/jquery.fancytree.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand Down
52 changes: 17 additions & 35 deletions dist/src/jquery.fancytree.dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand Down Expand Up @@ -73,8 +73,7 @@ function _initDragAndDrop(tree) {
addClasses: false,
tolerance: "intersect",
greedy: false
/*
,
/*
activate: function(event, ui) {
logMsg("droppable - activate", event, ui, this);
},
Expand Down Expand Up @@ -112,18 +111,11 @@ function _registerDnd() {
// 'draggable' was renamed to 'ui-draggable' since jQueryUI 1.10
var draggable = $(this).data("ui-draggable") || $(this).data("draggable"),
sourceNode = ui.helper.data("ftSourceNode") || null;
// logMsg("draggable-connectToFancytree.start, %s", sourceNode);
// logMsg(" this: %o", this);
// logMsg(" event: %o", event);
// logMsg(" draggable: %o", draggable);
// logMsg(" ui: %o", ui);

if(sourceNode) {
// Adjust helper offset, so cursor is slightly outside top/left corner
draggable.offset.click.top = -2;
draggable.offset.click.left = + 16;
// logMsg(" draggable2: %o", draggable);
// logMsg(" draggable.offset.click FIXED: %s/%s", draggable.offset.click.left, draggable.offset.click.top);
// Trigger dragStart event
// TODO: when called as connectTo..., the return value is ignored(?)
return sourceNode.tree.ext.dnd._onDragEvent("start", sourceNode, null, event, ui, draggable);
Expand All @@ -136,8 +128,7 @@ function _registerDnd() {
sourceNode = ui.helper.data("ftSourceNode") || null,
prevTargetNode = ui.helper.data("ftTargetNode") || null,
targetNode = $.ui.fancytree.getNode(event.target);
// logMsg("$.ui.fancytree.getNode(%o): %s", event.target, targetNode);
// logMsg("connectToFancytree.drag: helper: %o", ui.helper[0]);

if(event.target && !targetNode){
// We got a drag event, but the targetNode could not be found
// at the event location. This may happen,
Expand All @@ -150,7 +141,6 @@ function _registerDnd() {
return;
}
}
// logMsg("draggable-connectToFancytree.drag: targetNode(from event): %s, ftTargetNode: %s", targetNode, ui.helper.data("ftTargetNode"));
ui.helper.data("ftTargetNode", targetNode);
// Leaving a tree node
if(prevTargetNode && prevTargetNode !== targetNode ) {
Expand All @@ -177,10 +167,7 @@ function _registerDnd() {
// mouseDownEvent = draggable._mouseDownEvent,
eventType = event.type,
dropped = (eventType === "mouseup" && event.which === 1);
// logMsg("draggable-connectToFancytree.stop: targetNode(from event): %s, ftTargetNode: %s", targetNode, ui.helper.data("ftTargetNode"));
// logMsg("draggable-connectToFancytree.stop, %s", sourceNode);
// logMsg(" type: %o, downEvent: %o, upEvent: %o", eventType, mouseDownEvent, event);
// logMsg(" targetNode: %o", targetNode);

if(!dropped){
logMsg("Drag was cancelled");
}
Expand All @@ -204,8 +191,7 @@ function _registerDnd() {
*
*/

$.ui.fancytree.registerExtension(
{
$.ui.fancytree.registerExtension({
name: "dnd",
version: "0.1.0",
// Default options for this extension.
Expand All @@ -226,9 +212,7 @@ $.ui.fancytree.registerExtension(
draggable: null, // Additional options passed to jQuery draggable
droppable: null // Additional options passed to jQuery droppable
},
// Override virtual methods for this extension.
// `this` : Fancytree instance
// `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree)

treeInit: function(ctx){
var tree = ctx.tree;
this._super(ctx);
Expand Down Expand Up @@ -257,15 +241,7 @@ $.ui.fancytree.registerExtension(
.css({"z-index": 1000})
.prependTo($(this.$div).parent());
// .prependTo("body");
// logMsg("Creating marker: %o", this.$dropMarker);
}
/*
if(hitMode === "start"){
}
if(hitMode === "stop"){
// sourceNode.removeClass("fancytree-drop-target");
}
*/
// this.$dropMarker.attr("class", hitMode);
if(hitMode === "after" || hitMode === "before" || hitMode === "over"){
// $source && $source.addClass("fancytree-drag-source");
Expand Down Expand Up @@ -386,16 +362,16 @@ $.ui.fancytree.registerExtension(
case "helper":
// Only event and node argument is available
$helper = $("<div class='fancytree-drag-helper'><span class='fancytree-drag-helper-img' /></div>")
// .append($(event.target).closest("span.fancytree-node").find("span.fancytree-title").clone());
.append(nodeTag.find("span.fancytree-title").clone());
// issue 244: helper should be child of scrollParent
// DT issue 244: helper should be child of scrollParent
$("ul.fancytree-container", node.tree.$div).append($helper);
// Attach node reference to helper object
$helper.data("ftSourceNode", node);
// logMsg("helper=%o", $helper);
// logMsg("helper.sourceNode=%o", $helper.data("ftSourceNode"));
res = $helper;
break;

case "start":
if( node.isStatusNode() ) {
res = false;
Expand All @@ -413,6 +389,7 @@ $.ui.fancytree.registerExtension(
nodeTag.addClass("fancytree-drag-source");
}
break;

case "enter":
if(dnd.preventRecursiveMoves && node.isDescendantOf(otherNode)){
r = false;
Expand All @@ -439,6 +416,7 @@ $.ui.fancytree.registerExtension(
ui.helper.data("enterResponse", res);
logMsg("helper.enterResponse: %o", res);
break;

case "over":
enterResponse = ui.helper.data("enterResponse");
hitMode = null;
Expand Down Expand Up @@ -496,17 +474,19 @@ $.ui.fancytree.registerExtension(
ctx.hitMode = hitMode;
res = dnd.dragOver(node, ctx);
}
// issue 332
// DT issue 332
// this._setDndStatus(otherNode, node, ui.helper, hitMode, res!==false);
this._local._setDndStatus(otherNode, node, ui.helper, hitMode, res!==false && hitMode !== null);
break;

case "drop":
hitMode = ui.helper.data("hitMode");
if(hitMode && dnd.dragDrop){
ctx.hitMode = hitMode;
dnd.dragDrop(node, ctx);
}
break;

case "leave":
// Cancel pending expand request
node.scheduleAction("cancel");
Expand All @@ -517,14 +497,16 @@ $.ui.fancytree.registerExtension(
dnd.dragLeave(node, ctx);
}
break;

case "stop":
nodeTag.removeClass("fancytree-drag-source");
if(dnd.dragStop){
dnd.dragStop(node, ctx);
}
break;

default:
throw "Unsupported drag event: " + eventName;
$.error("Unsupported drag event: " + eventName);
}
return res;
},
Expand Down
10 changes: 3 additions & 7 deletions dist/src/jquery.fancytree.edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand Down Expand Up @@ -273,10 +273,6 @@ $.ui.fancytree.registerExtension({
// Local attributes
currentNode: null,

// Override virtual methods for this extension.
// `this` : the Fancytree instance
// `this._local`: the namespace that contains extension attributes and private methods (same as this.ext.EXTNAME)
// `this._super`: the virtual function that was overridden (member of previous extension or Fancytree)
treeInit: function(ctx){
this._super(ctx);
this.$container.addClass("fancytree-ext-edit");
Expand All @@ -288,7 +284,7 @@ $.ui.fancytree.registerExtension({
return false;
}
}
this._super(ctx);
return this._super(ctx);
},
nodeDblclick: function(ctx) {
if( $.inArray("dblclick", ctx.options.edit.triggerStart) >= 0 ){
Expand Down
60 changes: 9 additions & 51 deletions dist/src/jquery.fancytree.filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.0.0-11
* @date 2014-04-27T22:28
* @version 2.0.0-12
* @date 2014-04-29T19:55
*/

;(function($, window, document, undefined) {
Expand All @@ -27,20 +27,6 @@ function _escapeRegex(str){
return (str + "").replace(/([.?*+\^\$\[\]\\(){}|-])/g, "\\$1");
}

/* EXT-TABLE: Show/hide all rows that are structural descendants of `parent`. */
// function setChildRowVisibility(parent, flag) {
// parent.visit(function(node){
// var tr = node.tr;
// if(tr){
// tr.style.display = flag ? "" : "none";
// }
// node.debug(flag ? "SHOW" : "HIDE");
// if(!node.expanded){
// return "skip";
// }
// });
// }

/**
* [ext-filter] Dimm or hide nodes.
*
Expand Down Expand Up @@ -73,18 +59,15 @@ $.ui.fancytree._FancytreeClass.prototype.applyFilter = function(filter){
}
// Reset current filter
this.visit(function(node){
// node.hide = hideMode && true;
delete node.match;
delete node.subMatch;
});
// Adjust node.hide, .match, .subMatch flags
this.visit(function(node){
if ((!leavesOnly || node.children == null) && filter(node)) {
count++;
// node.hide = false;
node.match = true;
node.visitParents(function(p){
// p.hide = false;
p.subMatch = true;
});
}
Expand All @@ -102,7 +85,6 @@ $.ui.fancytree._FancytreeClass.prototype.applyFilter = function(filter){
*/
$.ui.fancytree._FancytreeClass.prototype.clearFilter = function(){
this.visit(function(node){
// delete node.hide;
delete node.match;
delete node.subMatch;
});
Expand All @@ -117,22 +99,14 @@ $.ui.fancytree._FancytreeClass.prototype.clearFilter = function(){
*/
$.ui.fancytree.registerExtension({
name: "filter",
version: "0.0.2",
version: "0.1.0",
// Default options for this extension.
options: {
mode: "dimm",
leavesOnly: false
},
// Override virtual methods for this extension.
// `this` : is this extension object
// `this._base` : the Fancytree instance
// `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree)
treeInit: function(ctx){
this._super(ctx);
// ctx.tree.filter = false;
},
treeDestroy: function(ctx){
this._super(ctx);
},
nodeRenderStatus: function(ctx) {
// Set classes for current status
Expand All @@ -142,31 +116,15 @@ $.ui.fancytree.registerExtension({
$span = $(node[tree.statusClassPropName]);

res = this._super(ctx);

if(!$span.length){
return res; // nothing to do, if node was not yet rendered
}
if(!tree.enableFilter){
// nothing to do, if node was not yet rendered
if( !$span.length || !tree.enableFilter ) {
return res;
}
$span.toggleClass("fancytree-match", !!node.match);
$span.toggleClass("fancytree-submatch", !!node.subMatch);
$span.toggleClass("fancytree-hide", !(node.match || node.subMatch));
$span
.toggleClass("fancytree-match", !!node.match)
.toggleClass("fancytree-submatch", !!node.subMatch)
.toggleClass("fancytree-hide", !(node.match || node.subMatch));

// if(opts.filter.mode === "hide"){
// // visible = !!(node.match || node.subMatch);
// visible = !node.hide;
// node.debug(node.title + ": visible=" + visible);
// if( node.li ) {
// $(node.li).toggle(visible);
// } else if( node.tr ) {
// // Show/hide all rows that are structural descendants of `parent`
// $(node.tr).toggle(visible);
// // if( !visible ) {
// // setChildRowVisibility(node, visible);
// // }
// }
// }
return res;
}
});
Expand Down
Loading

0 comments on commit 58aa9b2

Please sign in to comment.