mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 18:32:41 +01:00
ff64c4e02b
Summary: This adds a "column" icon into crumbs, like in workboards, for expanding or hiding the "Widget Pane". This is per user sticky and defaults to off. Test Plan: View a Conpherence Room, see no widgets by default. Toggle it on, see widget. Reload page, see widget stick. Verify mobile, tablets ignore hiding. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10364 Differential Revision: https://secure.phabricator.com/D16533
28 lines
626 B
JavaScript
28 lines
626 B
JavaScript
/**
|
|
* @provides javelin-behavior-toggle-widget
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-util
|
|
* javelin-workflow
|
|
* javelin-stratcom
|
|
*/
|
|
|
|
JX.behavior('toggle-widget', function(config) {
|
|
|
|
function _toggleColumn(e) {
|
|
e.kill();
|
|
var node = JX.$('conpherence-main-layout');
|
|
config.show = !config.show;
|
|
JX.DOM.alterClass(node, 'hide-widgets', !config.show);
|
|
|
|
new JX.Request(config.settingsURI)
|
|
.setData({value: (config.show ? 1 : 0)})
|
|
.send();
|
|
}
|
|
|
|
JX.Stratcom.listen(
|
|
'click',
|
|
'conpherence-widget-toggle',
|
|
_toggleColumn);
|
|
|
|
});
|