aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author8nevil82011-09-18 02:37:07 (EDT)
committerWinston Prakash2011-12-01 20:47:40 (EST)
commit2c5ed3bdaa687a04822bf3be7bbfd766e29ed229 (patch)
treecac7a84f0e57ed5635c02e65cba8bb64f7df4f40
parentcdcefed2fd2eee113af5020b6b55460941592844 (diff)
downloadorg.eclipse.hudson.core-2c5ed3bdaa687a04822bf3be7bbfd766e29ed229.zip
org.eclipse.hudson.core-2c5ed3bdaa687a04822bf3be7bbfd766e29ed229.tar.gz
org.eclipse.hudson.core-2c5ed3bdaa687a04822bf3be7bbfd766e29ed229.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>
-rw-r--r--hudson-core/src/main/resources/hudson/matrix/LabelAxis/config.jelly44
-rw-r--r--hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly2
-rw-r--r--hudson-war/src/main/webapp/css/style.css7
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('&lt;input type="checkbox" name="values" json="${l.name}" '+has("${l.name}")+'/&gt;&lt;label class="attach-previous"&gt;${h.jsStringEscape(l.name)} (${h.jsStringEscape(l.description)})&lt;/label&gt;', ${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