... |
... |
@@ -1,6 +1,6 @@ |
1 |
1 |
require(['jquery', 'xwiki-events-bridge'], function ($) { |
2 |
2 |
'use strict'; |
3 |
|
- |
|
3 |
+ |
4 |
4 |
/** |
5 |
5 |
* Add a 'launch tour' button into the 'actions' columns. |
6 |
6 |
*/ |
... |
... |
@@ -10,15 +10,8 @@ |
10 |
10 |
return; |
11 |
11 |
} |
12 |
12 |
var targetPage = XWiki.Model.resolve(row.find('.targetPage').text(), XWiki.EntityType.DOCUMENT); |
13 |
|
- var targetPageDocument; |
14 |
|
- // Two behaviours depending of the handling of the Nested Pages feature. |
15 |
|
- if (XWiki.Document.initializeFromReference) { |
16 |
|
- targetPageDocument = new XWiki.Document(targetPage); |
17 |
|
- } else { |
18 |
|
- targetPageDocument = new XWiki.Document(targetPage.name, |
19 |
|
- targetPage.extractReferenceValue(XWiki.EntityType.SPACE)); |
20 |
|
- } |
21 |
|
- |
|
13 |
+ var targetPageDocument = new XWiki.Document(targetPage); |
|
14 |
+ |
22 |
22 |
// Add a launch tour link to the actions column. |
23 |
23 |
if (row.find('.actionLaunch').length == 0) { |
24 |
24 |
$('<a class="action actionLaunch">$services.icon.renderHTML("play") $escapetool.javascript($escapetool.xml($services.localization.render("tour.livetable._actions.launch")))</a>') |
... |
... |
@@ -26,7 +26,7 @@ |
26 |
26 |
.css('padding-left', '1px').appendTo(row.find('.actions')); |
27 |
27 |
} |
28 |
28 |
} |
29 |
|
- |
|
22 |
+ |
30 |
30 |
/** |
31 |
31 |
* Add the launch button into each livetable raw. |
32 |
32 |
*/ |
... |
... |
@@ -36,8 +36,8 @@ |
36 |
36 |
}); |
37 |
37 |
} |
38 |
38 |
$(document).on('xwiki:livetable:ready', initLivetableResults); |
39 |
|
- $(document).ready(initLivetableResults); |
40 |
|
- |
|
32 |
+ $(initLivetableResults); |
|
33 |
+ |
41 |
41 |
/** |
42 |
42 |
* Add the launch button into each new livetable raw. |
43 |
43 |
*/ |