Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit b120327

Browse files
author
Reto Ryter
committed
only open a new dialog on click, and not on refresh of the tree
1 parent b7f2b16 commit b120327

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Resources/public/js/init.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,14 @@ var AdminTree = (function () {
164164
routing_defaults["id"] = data.rslt.obj.attr("url_safe_id");
165165

166166
if (config.editInOverlay) {
167-
generateDialog(
168-
Routing.generate(config.types[data.rslt.obj.attr("rel")].routes.select_route, routing_defaults)
169-
);
167+
if (2 < data.args.length){ // only generateDialog() when the tree has received a click, not on refresh
168+
generateDialog(
169+
Routing.generate(config.types[data.rslt.obj.attr("rel")].routes.select_route, routing_defaults),
170+
function () {
171+
treeInst.jstree('refresh');
172+
}
173+
);
174+
}
170175
} else {
171176
window.location = Routing.generate(config.types[data.rslt.obj.attr("rel")].routes.select_route, routing_defaults);
172177
}

0 commit comments

Comments
 (0)