1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00
phorge-phorge/webroot/rsrc/js/application/files/behavior-launch-icon-composer.js
epriestley 4f05736175 Add an icon+background selector for project images
Summary: Makes it easy to choose distinctive icons for projects.

Test Plan:
{F71018}

{F71020}

{F71019}

{F71021}

Reviewers: btrahan, chad

Reviewed By: chad

CC: chad, aran

Differential Revision: https://secure.phabricator.com/D7333
2013-10-17 09:32:34 -07:00

25 lines
526 B
JavaScript

/**
* @provides javelin-behavior-launch-icon-composer
* @requires javelin-behavior
* javelin-dom
* javelin-workflow
*/
JX.behavior('launch-icon-composer', function(config) {
JX.DOM.listen(
JX.$(config.launchID),
'click',
null,
function(e) {
e.kill();
new JX.Workflow('/file/compose/')
.setHandler(function(r) {
JX.$(config.inputID).value = r.phid;
JX.DOM.findAbove(e.getTarget(), 'form').submit();
})
.start();
});
});