提交 f1f1e162 编写于 作者: K Kohsuke Kawaguchi

Merge branch 'rc'

......@@ -433,17 +433,29 @@ function renderOnDemand(e,callback,noBehaviour) {
if (!e || !Element.hasClassName(e,"render-on-demand")) return;
var proxy = eval(e.getAttribute("proxy"));
proxy.render(function (t) {
var c = document.createElement(e.parentNode.tagName);
var contextTagName = e.parentNode.tagName;
var c;
if (contextTagName=="TBODY") {
c = document.createElement("DIV");
c.innerHTML = "<TABLE><TBODY>"+t.responseText+"</TBODY></TABLE>";
c = c.firstChild.firstChild;
} else {
c = document.createElement(contextTagName);
c.innerHTML = t.responseText;
}
var elements = [];
while (c.firstChild!=null) {
var n = c.firstChild;
e.parentNode.insertBefore(n,e);
if (n.nodeType==1 && !noBehaviour)
Behaviour.applySubtree(n,true);
elements.push(n);
}
Element.remove(e);
t.responseText.evalScripts();
elements.each(function(n) { Behaviour.applySubtree(n,true); });
if (callback) callback(t);
});
}
......@@ -1660,7 +1672,7 @@ function findFormParent(e,form,static) {
return null; // this field shouldn't contribute to the final result
var name = e.getAttribute("name");
if(name!=null) {
if(name!=null && name.length>0) {
if(e.tagName=="INPUT" && !static && !xor(e.checked,Element.hasClassName(e,"negative")))
return null; // field is not active
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册