提交 0f24ceac 编写于 作者: K kohsuke

<f:optionalBlock> initialization wasn't properly happening when it's inserted...

<f:optionalBlock> initialization wasn't properly happening when it's inserted into a DOM tree dynamically, due to the extra BODY tag in the CSS selector.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36058 71c3de6d-444a-0410-be80-ed276b4c234a
上级 51a627ac
......@@ -116,10 +116,10 @@ function isAncestor(p,c) {
function findElementsBySelector(startNode,selector) {
// Split selector in to tokens
var tokens = selector.split(' ');
var tokens = selector.replace(/^\s+/,'').replace(/\s+$/,'').split(' ');
var currentContext = new Array(startNode);
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
var token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');
if (token.indexOf('#') > -1) {
// Token is an ID selector
var bits = token.split('#');
......
......@@ -779,8 +779,8 @@ var hudsonRules = {
applyNameRef(start,end,ref);
},
"BODY TR.optional-block-start": function(e) { // see optionalBlock.jelly
// this is prefixed by a pointless BODY so that two processing for optional-block-start
"TR.optional-block-start ": function(e) { // see optionalBlock.jelly
// this is suffixed by a pointless string so that two processing for optional-block-start
// can sandwitch row-set-end
// this requires "TR.row-set-end" to mark rows
var checkbox = e.firstChild.firstChild;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册