1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00
phorge-phorge/webroot/rsrc/js/application/conpherence/behavior-toggle-widget.js

30 lines
660 B
JavaScript
Raw Normal View History

/**
* @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);
JX.Stratcom.invoke('resize');
new JX.Request(config.settingsURI)
.setData({value: (config.show ? 1 : 0)})
.send();
}
JX.Stratcom.listen(
'click',
'conpherence-widget-toggle',
_toggleColumn);
});