@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1/**
2 * @requires phuix-form-control-view
3 * javelin-install
4 * javelin-util
5 * @provides trigger-rule-control
6 *
7 * @javelin-installs JX.TriggerRuleControl
8 *
9 * @javelin
10 */
11
12JX.install('TriggerRuleControl', {
13
14 construct: function() {
15 },
16
17 properties: {
18 type: null,
19 specification: null
20 },
21
22 statics: {
23 newFromDictionary: function(map) {
24 return new JX.TriggerRuleControl()
25 .setType(map.type)
26 .setSpecification(map.specification);
27 },
28 },
29
30 members: {
31 newInput: function(rule) {
32 var phuix = new JX.PHUIXFormControl()
33 .setControl(this.getType(), this.getSpecification());
34
35 phuix.setValue(rule.getValue());
36
37 return {
38 node: phuix.getRawInputNode(),
39 get: JX.bind(phuix, phuix.getValue)
40 };
41 }
42
43 }
44
45});