@@ -22,20 +22,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
THE SOFTWARE.
23
23
-->
24
24
<?jelly escape-by-default =' true' ?>
25
- <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define" xmlns : l =" /lib/layout " xmlns : t = " /lib/hudson " xmlns : f =" /lib/form" xmlns : i = " jelly:fmt " xmlns : local = " local " >
26
-
25
+ <j : jelly xmlns : j =" jelly:core" xmlns : st =" jelly:stapler" xmlns : d =" jelly:define" xmlns : sv =" /lib/sectioned_view " xmlns : f =" /lib/form" xmlns : local = " local " xmlns : l = " /lib/layout " >
26
+ < st : adjunct includes = " hudson.plugins.sectioned_view.sectioned-view-config " />
27
27
<d : taglib uri =" local" >
28
- <d : tag name =" add-children" >
29
- <j : forEach var =" item" items =" ${items}" >
30
- <j : if test =" ${descriptor.isFolder(item)}" >
31
- <j : set var =" itemName" value =" ${prefix == ''?'':prefix+'$'}${item.name}" />
32
- <j : set var =" name" value =" sections.${descriptor.escapeJobName(h.getRelativeNameFrom(item, it.ownerItemGroup, false))}" />
33
- items['${itemName}'] = new YAHOO.widget.HTMLNode('< input type="checkbox" name="${name}" '+has("${itemName}")+'/>< label class="attach-previous"> ${h.jsStringEscape(item.name)}< /label> ', ${parentNode}, false);
34
- <j : if test =" ${item.items != null}" >
35
- <local : add-children parentNode =" items['${itemName}']" items =" ${item.items}" prefix =" ${itemName}" />
36
- </j : if >
28
+ <d : tag name =" tree-view" >
29
+ <j : forEach var =" item" items =" ${items}" >
30
+ <div class =" sectioned-view-tree__container" >
31
+ <j : set var =" name" value =" sections.${descriptor.escapeJobName(h.getRelativeNameFrom(item, it.ownerItemGroup, false))}" />
32
+ <j : set var =" subItems" value =" ${descriptor.getAllFolders(item)}" />
33
+ <div class =" sectioned-view-tree__row" >
34
+ <f : checkbox name =" ${name}" title =" ${item.name}" checked =" ${instance.isChecked(item, it.ownerItemGroup)}" />
35
+ <j : if test =" ${subItems.size() gt 0}" >
36
+ <button type =" button" class =" jenkins-button sectioned-view-tree__button" data-hidden =" true" >
37
+ <l : icon src =" symbol-chevron-down" class =" icon-sm" />
38
+ </button >
39
+ </j : if >
40
+ </div >
41
+
42
+ <j : if test =" ${subItems.size() gt 0}" >
43
+ <div class =" jenkins-!-margin-left-3 sectioned-view-tree jenkins-hidden" data-hidden =" true" >
44
+ <local : tree-view items =" ${subItems}" />
45
+ </div >
37
46
</j : if >
38
- </j : forEach >
47
+ </div >
48
+ </j : forEach >
39
49
</d : tag >
40
50
</d : taglib >
41
51
@@ -44,40 +54,9 @@ THE SOFTWARE.
44
54
<f : textbox name =" sections.name" value =" ${instance.name}" />
45
55
</f : entry >
46
56
<f : entry title =" Folders" >
47
- <div class =" yahooTree folders-tree" style =" border: 1px solid #ccc; height: 20em; overflow:auto;" values =" ${instance.getSelectedFoldersString(it.ownerItemGroup)}" />
48
- <script >
49
- hudsonRules["DIV.folders-tree"] = function(e) {
50
- var tree = new YAHOO.widget.TreeView(e);
51
- var rootNode = tree.getRoot();
52
-
53
- var values = (e.getAttribute("values") || "").split(",");
54
-
55
- function has(v) {
56
- return values.includes(v) ? 'checked="true" ' : "";
57
- }
58
- var items = {};
59
-
60
- <local : add-children parentNode =" rootNode" items =" ${descriptor.getAvailableFolders(it.ownerItemGroup, it)}" prefix =" " />
61
-
62
- tree.draw();
63
- <!--
64
- force the rendering of HTML, so that input fields are there
65
- even when the form is submitted without this tree expanded.
66
- -->
67
- tree.expandAll();
68
- tree.collapseAll();
69
-
70
- <!--
71
- cancel the event.
72
-
73
- from http://yuilibrary.com/forum/viewtopic.php?f=89&t=8209&p=26239&hilit=HTMLNode#p26239
74
- "To prevent toggling and allow the link to work, add a listener to the clickEvent on that tree and simply return false"
75
- -->
76
- tree.subscribe("clickEvent", function(node) {
77
- return false;
78
- });
79
- };
80
- </script >
57
+ <div class =" jenkins-input sectioned-view-tree" >
58
+ <local : tree-view items =" ${descriptor.getAllFolders(it.ownerItemGroup)}" />
59
+ </div >
81
60
</f : entry >
82
61
<f : advanced >
83
62
<f : entry field =" alignment" title =" ${%Align}" >
0 commit comments