| author | 8nevil8 | 2011-09-18 02:37:07 (EDT) |
|---|---|---|
| committer | Winston Prakash | 2011-12-01 20:47:40 (EST) |
| commit | b641ad0e33ae165ad88dc42db1bf37fba24e82bc (patch) (side-by-side diff) | |
| tree | e5fddf312e2a05ab56ecea899f34daa2da39a07a | |
| parent | 48f1f06521e70d9cf9d5c634e4aea217df0b2491 (diff) | |
| download | org.eclipse.hudson.core-b641ad0e33ae165ad88dc42db1bf37fba24e82bc.zip org.eclipse.hudson.core-b641ad0e33ae165ad88dc42db1bf37fba24e82bc.tar.gz org.eclipse.hudson.core-b641ad0e33ae165ad88dc42db1bf37fba24e82bc.tar.bz2 | |
Remove YUI tree component because of invalid behavior of TreeNode elements. Use simple HTML tags
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
3 files changed, 26 insertions, 27 deletions
diff --git a/hudson-core/src/main/resources/hudson/matrix/LabelAxis/config.jelly b/hudson-core/src/main/resources/hudson/matrix/LabelAxis/config.jelly index 07d1906..aa5fad5 100644 --- a/hudson-core/src/main/resources/hudson/matrix/LabelAxis/config.jelly +++ b/hudson-core/src/main/resources/hudson/matrix/LabelAxis/config.jelly @@ -20,30 +20,24 @@ <f:textbox default="label" /> </f:entry> <f:entry title="${%Node/Label}" field="labels"> - <div class="yahooTree labelAxis-tree" style="border: 1px solid gray; height: 10em; overflow:auto;" values="${instance.valueString}" /> - <script> - hudsonRules["DIV.labelAxis-tree"] = function(e) { - var tree = new YAHOO.widget.TreeView(e); - - var labels = new YAHOO.widget.TextNode("${%Labels}", tree.getRoot(), false); - var machines = new YAHOO.widget.TextNode("${%Individual nodes}", tree.getRoot(), false); - - var values = (e.getAttribute("values") || "").split(/[ \n]/); - function has(v) { - return values.include(v) ? 'checked="checked" ' : ""; - } - <j:forEach var="l" items="${app.labelAtoms}"> - new YAHOO.widget.TextNode('<input type="checkbox" name="values" json="${l.name}" '+has("${l.name}")+'/><label class="attach-previous">${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})</label>', ${l.isSelfLabel()?'machines':'labels'}, false); - </j:forEach> - - tree.draw(); - <!-- - force the rendering of HTML, so that input fields are there - even when the form is submitted without this tree expanded. - --> - tree.expandAll(); - tree.collapseAll(); - }; - </script> + <j:set var="valueString" value="${instance.valueString}"/> + <div class="labelAxis-tree" style="border: 1px solid gray; height: 10em; overflow:auto;" values="${valueString}"> + <div class="axis-label">${%Labels}</div> + <j:forEach var="l" items="${app.labelAtoms}"> + <j:if test="${!l.isSelfLabel()}"> + <div class="axis-child"> + <f:checkbox name="values" json="${l.name}" checked="${valueString.contains(l.name)}" title="${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})"/> + </div> + </j:if> + </j:forEach> + <div class="axis-label">${%Individual nodes}</div> + <j:forEach var="l" items="${app.labelAtoms}"> + <j:if test="${l.isSelfLabel()}"> + <div class="axis-child"> + <f:checkbox name="values" json="${l.name}" checked="${valueString.contains(l.name)}" title="${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})"/> + </div> + </j:if> + </j:forEach> + </div> </f:entry> </j:jelly> diff --git a/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly b/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly index 30b102c..3c152e9 100644 --- a/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly +++ b/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly @@ -41,8 +41,6 @@ </p:config-trigger> <f:section title="${%Configuration Matrix}"> - <!-- Needed for LabelAxis, but including these from LabelAxis/config.jelly is too late --> - <l:yui module="treeview" /> <link rel="stylesheet" type="text/css" href="${rootURL}/scripts/yui/treeview/assets/skins/sam/treeview.css" /> diff --git a/hudson-war/src/main/webapp/css/style.css b/hudson-war/src/main/webapp/css/style.css index f43ccdc..2a90974 100644 --- a/hudson-war/src/main/webapp/css/style.css +++ b/hudson-war/src/main/webapp/css/style.css @@ -1040,4 +1040,11 @@ table.configure { } table.configure > td { padding: 0px; +} +/* --- Slaves Nodes/labels ---*/ +.axis-label { + padding-left: 5px; +} +.axis-child { + padding-left: 15px; }
\ No newline at end of file |

