Make browse action available for dynamic/JS-driven tokenizers

Summary: Ref T5750. This makes browse work for all of the dynamic tokenizers in Herald, Policies, batch editor, etc.

Test Plan: Used tokenizers in Herald, Policies, Batch editor.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5750

Differential Revision: https://secure.phabricator.com/D12442
This commit is contained in:
epriestley
2015-04-16 14:46:10 -07:00
parent a641601407
commit a4261f41c2
14 changed files with 95 additions and 78 deletions

View File

@@ -136,18 +136,14 @@ JX.behavior('maniphest-batch-editor', function(config) {
});
function build_tokenizer(tconfig) {
var template = JX.$N('div', JX.$H(config.tokenizerTemplate)).firstChild;
template.id = '';
var build_config = JX.copy({}, tconfig);
build_config.root = template;
var built = JX.Prefab.buildTokenizer(build_config);
var built = JX.Prefab.newTokenizerFromTemplate(
config.tokenizerTemplate,
JX.copy({}, tconfig));
built.tokenizer.start();
return {
object: built.tokenizer,
template: template
template: built.node
};
}