mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 08:12:40 +01:00
b8551bb5f9
Summary: Depends on D20414. Ref T13272. Several minor things here: - Currently, you can drag panels underneath the invisible "there are no items in this column" div and the "Create Panel / Add Existing Panel" buttons. This is silly; stop it. - Currently, when viewing a tab panel on a dashboard, you can drag the panels inside it. This is extremely silly. Make "movable" off by default and pass it through the async flow only when we actually need it. - Make the whole "Add Tab..." virtual tab clickable to open the dropdown. This removes the rare exception/todo combo I added earlier. {key F} - Add or remove some icons or something. Test Plan: Moved panels around on dashboards. Tried to drag panels inside tab panels. Added tab. Things were less obviously broken. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13272 Differential Revision: https://secure.phabricator.com/D20415
26 lines
634 B
JavaScript
26 lines
634 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(','),
|
|
headerMode: config.headerMode,
|
|
contextPHID: config.contextPHID,
|
|
movable: config.movable,
|
|
panelKey: config.panelKey
|
|
};
|
|
|
|
new JX.Workflow(config.uri)
|
|
.setData(data)
|
|
.setHandler(function(r) {
|
|
JX.DOM.replace(panel, JX.$H(r.panelMarkup));
|
|
})
|
|
.start();
|
|
});
|