1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
phorge-phorge/webroot/rsrc/js/application/dashboard/behavior-dashboard-async-panel.js
epriestley 302d5bcec5 Allow dashboard panels to render in a headerless mode
Summary:
Ref T4986. This mostly just makes tab panels a little nicer.

Maybe this will be modal (header = "none", "edit", "view") in a few diffs but we can clean it up then if so.

Test Plan: {F155491}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9143
2014-05-15 19:31:13 -07:00

23 lines
545 B
JavaScript

/**
* @provides javelin-behavior-dashboard-async-panel
* @requires javelin-behavior
* javelin-dom
* javelin-workflow
*/
JX.behavior('dashboard-async-panel', function(config) {
var panel = JX.$(config.panelID);
panel.style.opacity = '0.5';
var data = {
parentPanelPHIDs: config.parentPanelPHIDs.join(','),
headerless: config.headerless ? 1 : 0
};
new JX.Workflow(config.uri)
.setData(data)
.setHandler(function(r) {
JX.DOM.replace(panel, JX.$H(r.panelMarkup));
})
.start();
});