Z verze
změnil(a) David Brazda
k 10.01.2021 14:47
Na verzi < 53.1 >
změnil(a) David Brazda
k 10.01.2021 16:16
< >
Popis verze: Install extension [org.xwiki.platform:xwiki-platform-tree-macro/12.9]

Přehled

Rozpis

XWiki.JavaScriptExtension[0]
Kód
... ... @@ -1,6 +1,12 @@
1 1  require(['jquery', "$!services.webjars.url('org.xwiki.platform:xwiki-platform-tree-webjar', 'require-config.min.js', {'evaluate': true})"], function($) {
2 +
3 + $(window).on('click', function(evt) {
4 + evt.preventDefault();
5 + // Do whatever logic here
6 +}),
7 +
2 2   $(document).ready(function(){
3 - $("a").click(function(ev){
9 + $("a.jstree-anchor").click(function(ev){
4 4   ev.preventDefault();
5 5   alert("clicked AAA:"+this.href);
6 6   });//click
... ... @@ -8,8 +8,9 @@
8 8   require(['tree'], function($) {
9 9   $(document).ready(function(){
10 10   //$('.jstree').on("click", ".jstree-anchor", function (e, data) {
11 - $('.xtree').delegate("a", "click", function (event, data) { event.preventDefault(); }),
12 - $('.xtree').on("activate_node.jstree", function (e, data) {
17 + //$('.xtree').on("activate_node.jstree", function (e, data) {
18 + $('.xtree').delegate("a.jstree-anchor", "click", function (event, data) { event.preventDefault(); }),
19 + $('.xtree').on("click", "a.jstree-anchor", function (e, data) {
13 13   e.preventDefault();
14 14   e.stopPropagation();
15 15   e.stopImmediatePropagation();