1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Make herald tokenizers copy values more correctly

Summary:
Fixes T10190. This is still a touch weird (newly typed tokens lose icons when copied) but basically works correctly. Saving/editing rules is fine, just some minor display glitching.

Fixing the icon thing is a little more involved.

Test Plan: Swapped Herald tokenizer fields around saw values (approximately) preserved.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10190

Differential Revision: https://secure.phabricator.com/D15077
This commit is contained in:
epriestley 2016-01-21 11:08:51 -08:00
parent 358240b804
commit 7bf4ef451b
2 changed files with 22 additions and 12 deletions

View file

@ -395,7 +395,7 @@ return array(
'rsrc/js/application/drydock/drydock-live-operation-status.js' => '901935ef', 'rsrc/js/application/drydock/drydock-live-operation-status.js' => '901935ef',
'rsrc/js/application/files/behavior-icon-composer.js' => '8499b6ab', 'rsrc/js/application/files/behavior-icon-composer.js' => '8499b6ab',
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888', 'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
'rsrc/js/application/herald/HeraldRuleEditor.js' => '5bd8f385', 'rsrc/js/application/herald/HeraldRuleEditor.js' => '746ca158',
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec', 'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7', 'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
@ -552,7 +552,7 @@ return array(
'global-drag-and-drop-css' => '697324ad', 'global-drag-and-drop-css' => '697324ad',
'harbormaster-css' => 'b0758ca5', 'harbormaster-css' => 'b0758ca5',
'herald-css' => '826075fa', 'herald-css' => '826075fa',
'herald-rule-editor' => '5bd8f385', 'herald-rule-editor' => '746ca158',
'herald-test-css' => 'a52e323e', 'herald-test-css' => 'a52e323e',
'inline-comment-summary-css' => '51efda3a', 'inline-comment-summary-css' => '51efda3a',
'javelin-aphlict' => '5359e785', 'javelin-aphlict' => '5359e785',
@ -1245,15 +1245,6 @@ return array(
'javelin-uri', 'javelin-uri',
'javelin-routable', 'javelin-routable',
), ),
'5bd8f385' => array(
'multirow-row-manager',
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-json',
'phabricator-prefab',
),
'5c54cbf3' => array( '5c54cbf3' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',
@ -1370,6 +1361,15 @@ return array(
'javelin-vector', 'javelin-vector',
'javelin-dom', 'javelin-dom',
), ),
'746ca158' => array(
'multirow-row-manager',
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-json',
'phabricator-prefab',
),
'76b9fc3e' => array( '76b9fc3e' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',

View file

@ -293,7 +293,17 @@ JX.install('HeraldRuleEditor', {
}, },
function(map) { function(map) {
for (var k in map) { for (var k in map) {
var v = JX.Prefab.transformDatasourceResults(map[k]); var v = map[k];
// The control value may be set from wire values from the server,
// or a transformed value from another control, or a bare string
// value from another control.
if (typeof v == 'string') {
v = v;
} else if (!v.hasOwnProperty('id')) {
v = JX.Prefab.transformDatasourceResults(v);
}
build.tokenizer.addToken(k, v); build.tokenizer.addToken(k, v);
} }
}]; }];