Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/webroot/rsrc/js/application/trigger/TriggerRuleControl.js
12242 views
1
/**
2
* @requires phuix-form-control-view
3
* @provides trigger-rule-control
4
* @javelin
5
*/
6
7
JX.install('TriggerRuleControl', {
8
9
construct: function() {
10
},
11
12
properties: {
13
type: null,
14
specification: null
15
},
16
17
statics: {
18
newFromDictionary: function(map) {
19
return new JX.TriggerRuleControl()
20
.setType(map.type)
21
.setSpecification(map.specification);
22
},
23
},
24
25
members: {
26
newInput: function(rule) {
27
var phuix = new JX.PHUIXFormControl()
28
.setControl(this.getType(), this.getSpecification());
29
30
phuix.setValue(rule.getValue());
31
32
return {
33
node: phuix.getRawInputNode(),
34
get: JX.bind(phuix, phuix.getValue)
35
};
36
}
37
38
}
39
40
});
41
42