mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 23:32:40 +01:00
eab768f705
Summary: Provide a quick workflow for adding a new project. This ended up being sort of complicated because we don't currently put forms in dialogs. I separated the actual <form /> tag out of the display/layout of AphrontFormView to enable this (the dialog is itself a form). Limitations: if you create a new project and then remove it, it won't appear in the tokenizer until you reload the page. We need to add the ability for the datasource to drop its cache to enable this, which is super complicated. Test Plan: Used "Create new project" to add a new project when creating a task. Reviewed By: aran Reviewers: jungejason, tuomaspelkonen, aran CC: anjali, aran, epriestley Differential Revision: 422
26 lines
608 B
JavaScript
26 lines
608 B
JavaScript
/**
|
|
* @provides javelin-behavior-maniphest-project-create
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-stratcom
|
|
* javelin-workflow
|
|
*/
|
|
|
|
JX.behavior('maniphest-project-create', function(config) {
|
|
|
|
JX.Stratcom.listen(
|
|
'click',
|
|
'project-create',
|
|
function(e) {
|
|
JX.Workflow.newFromLink(e.getTarget())
|
|
.setHandler(function(r) {
|
|
var node = JX.$(config.tokenizerID);
|
|
var tokenizer = JX.Stratcom.getData(node).tokenizer;
|
|
tokenizer.addToken(r.phid, r.name);
|
|
})
|
|
.start();
|
|
|
|
e.kill();
|
|
});
|
|
|
|
});
|