1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/webroot/rsrc/js/application/projects/behavior-project-create.js
Bob Trahan 8a4c08b01d Allow commits to be associated with projects and associated goodies
Summary:
- Commit detail view
 - List of projects
 - "edit" action which takes the user to a simple form where they can only add / remove projects.
-  Integrated the project relationship into the commit search indexer
 - fixed a bug from D790; it seems you must select the column if you're going to join against it later. Without this change searching for author or projectfails 100% for me.

Test Plan: added and removed projects. verified appropriate projects showed up in detail and edit view. searched for commits by project and found the ones I was supposed to...!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1614

Differential Revision: https://secure.phabricator.com/D3189
2012-08-08 10:03:41 -07:00

26 lines
588 B
JavaScript

/**
* @provides javelin-behavior-project-create
* @requires javelin-behavior
* javelin-dom
* javelin-stratcom
* javelin-workflow
*/
JX.behavior('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();
});
});