Skip to content

Commit

Permalink
grunt format
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Sep 9, 2024
1 parent 3a896bc commit 98041cc
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 144 deletions.
4 changes: 2 additions & 2 deletions demo/taxonomy-browser/taxonomy-browser-itis.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@
$tdList = $(node.tr).find(">td"),
cnList = node.data.commonNames
? $.map(node.data.commonNames, function (o) {
return o.name;
})
return o.name;
})
: [];

$tdList.eq(0).text(node.key);
Expand Down
4 changes: 2 additions & 2 deletions demo/taxonomy-browser/taxonomy-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@
$tdList = $(node.tr).find(">td"),
cnList = node.data.vernacularNames
? $.map(node.data.vernacularNames, function (o) {
return o.vernacularName;
})
return o.vernacularName;
})
: [];

i = 0;
Expand Down
34 changes: 17 additions & 17 deletions src/jquery.fancytree.ariagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@

anyNode.debug(
"activateCell(" +
($prevTd ? $prevTd.text() : "null") +
") -> " +
($td ? $td.text() : "OFF")
($prevTd ? $prevTd.text() : "null") +
") -> " +
($td ? $td.text() : "OFF")
);

// Make available as event
Expand Down Expand Up @@ -408,15 +408,15 @@

tree.debug(
"nodeClick: node: " +
(node ? node.title : "null") +
", targetType: " +
targetType +
", target: " +
($td.length ? $td.text() : null) +
", node was active: " +
(node && node.isActive()) +
", last cell: " +
(tree.$activeTd ? tree.$activeTd.text() : null)
(node ? node.title : "null") +
", targetType: " +
targetType +
", target: " +
($td.length ? $td.text() : null) +
", node was active: " +
(node && node.isActive()) +
", last cell: " +
(tree.$activeTd ? tree.$activeTd.text() : null)
);

if (tree.$activeTd) {
Expand Down Expand Up @@ -547,11 +547,11 @@
}
tree.debug(
"nodeKeydown(" +
eventString +
"), activeTd: '" +
($activeTd && $activeTd.text()) +
"', inputType: " +
inputType
eventString +
"), activeTd: '" +
($activeTd && $activeTd.text()) +
"', inputType: " +
inputType
);

if (inputType && eventString !== "esc" && !forceNav) {
Expand Down
16 changes: 9 additions & 7 deletions src/jquery.fancytree.dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
start: function (event, ui) {
// 'draggable' was renamed to 'ui-draggable' since jQueryUI 1.10
var draggable =
$(this).data("ui-draggable") ||
$(this).data("draggable"),
$(this).data("ui-draggable") ||
$(this).data("draggable"),
sourceNode = ui.helper.data("ftSourceNode") || null;

if (sourceNode) {
Expand Down Expand Up @@ -288,8 +288,8 @@
.find(".fancytree-drag-helper-img")
.addClass(
glyph.map._addClass +
" " +
glyph.map.dragHelper
" " +
glyph.map.dragHelper
);
}
// Allow to modify the helper, e.g. to add multi-node-drag feedback
Expand Down Expand Up @@ -406,7 +406,9 @@
}
setTimeout(function () {
// #300
$(event.target).closest(":tabbable").trigger("focus");
$(event.target)
.closest(":tabbable")
.trigger("focus");
}, 10);
}
});
Expand Down Expand Up @@ -491,8 +493,8 @@
.toggleClass(
classDropTarget,
hitMode === "after" ||
hitMode === "before" ||
hitMode === "over"
hitMode === "before" ||
hitMode === "over"
)
.toggleClass(classDropAfter, hitMode === "after")
.toggleClass(classDropBefore, hitMode === "before")
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.fancytree.edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
case $.ui.keyCode.ENTER:
if (
$.inArray("mac+enter", ctx.options.edit.triggerStart) >=
0 &&
0 &&
isMac
) {
ctx.node.editStart();
Expand Down
16 changes: 8 additions & 8 deletions src/jquery.fancytree.fixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@
.on(
"mouseenter",
"." +
fcn.bottomRight +
" table tr, ." +
fcn.bottomLeft +
" table tr",
fcn.bottomRight +
" table tr, ." +
fcn.bottomLeft +
" table tr",
function (evt) {
var $tr = $(this),
$trOther = $tr.data(fcn.counterpart);
Expand All @@ -204,10 +204,10 @@
.on(
"mouseleave",
"." +
fcn.bottomRight +
" table tr, ." +
fcn.bottomLeft +
" table tr",
fcn.bottomRight +
" table tr, ." +
fcn.bottomLeft +
" table tr",
function (evt) {
var $tr = $(this),
$trOther = $tr.data(fcn.counterpart);
Expand Down
4 changes: 3 additions & 1 deletion src/jquery.fancytree.gridnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@
if (flag) {
if (ctx.options.titlesTabbable) {
if (!triggeredByInput) {
$(node.span).find("span.fancytree-title").trigger("focus");
$(node.span)
.find("span.fancytree-title")
.trigger("focus");
node.setFocus();
}
// If one node is tabbable, the container no longer needs to be
Expand Down
Loading

0 comments on commit 98041cc

Please sign in to comment.