提交 c9cf3b67 编写于 作者: J Jesse Glick

Retain hudsonRules/jenkinsRules for now, as many scripts in core & plugins...

Retain hudsonRules/jenkinsRules for now, as many scripts in core & plugins directly modify this hash.
上级 e3266eb8
...@@ -561,7 +561,9 @@ function sequencer(fs) { ...@@ -561,7 +561,9 @@ function sequencer(fs) {
return next(); return next();
} }
/** @deprecated Use {@link Behaviour.specify} instead. */
var jenkinsRules = { var jenkinsRules = {
// XXX convert as many as possible to Behaviour.specify calls; some seem to have an implicit order dependency, but what?
"BODY" : function() { "BODY" : function() {
tooltip = new YAHOO.widget.Tooltip("tt", {context:[], zindex:999}); tooltip = new YAHOO.widget.Tooltip("tt", {context:[], zindex:999});
}, },
...@@ -1159,9 +1161,8 @@ var jenkinsRules = { ...@@ -1159,9 +1161,8 @@ var jenkinsRules = {
adjustSticker(); adjustSticker();
} }
}; };
for (var selector in jenkinsRules) { /** @deprecated Use {@link Behaviour.specify} instead. */
Behaviour.specify(selector, 'hudson-behavior', 0, jenkinsRules[selector]); var hudsonRules = jenkinsRules; // legacy name
}
function applyTooltip(e,text) { function applyTooltip(e,text) {
// copied from YAHOO.widget.Tooltip.prototype.configContext to efficiently add a new element // copied from YAHOO.widget.Tooltip.prototype.configContext to efficiently add a new element
...@@ -1214,6 +1215,10 @@ function refillOnChange(e,onChange) { ...@@ -1214,6 +1215,10 @@ function refillOnChange(e,onChange) {
h(); // initial fill h(); // initial fill
} }
Behaviour.register(hudsonRules);
function xor(a,b) { function xor(a,b) {
// convert both values to boolean by '!' and then do a!=b // convert both values to boolean by '!' and then do a!=b
return !a != !b; return !a != !b;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册