mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
a211f97737
Summary: this was originally "just" adding the icons like I had bundled into D4790. It morphed a bit though and does a few things - adds the icons - cleans up widget CSS generally a bit so scrolling always works - phutil_tag -- probably was a bad idea but I wanted to play with it. I think its harder to not break conpherence when you land the branch now maybs. Still up for fixing it immediately post land though. Test Plan: played with conphernece a bit. Used FF and Chrome to verify CSS was looking okay-ish. Reviewers: epriestley, chad Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2399 Differential Revision: https://secure.phabricator.com/D4814
33 lines
866 B
JavaScript
33 lines
866 B
JavaScript
/**
|
|
* @provides javelin-behavior-conpherence-widget-pane
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-stratcom
|
|
*/
|
|
|
|
JX.behavior('conpherence-widget-pane', function(config) {
|
|
|
|
JX.Stratcom.listen(
|
|
'click',
|
|
'conpherence-change-widget',
|
|
function(e) {
|
|
e.kill();
|
|
var data = e.getNodeData('conpherence-change-widget');
|
|
for (var widget in config.widgetRegistery) {
|
|
if (widget == data.widget) {
|
|
JX.$(widget).style.display = 'block';
|
|
JX.DOM.alterClass(e.getTarget(), data.toggleClass, true);
|
|
} else {
|
|
JX.$(widget).style.display = 'none';
|
|
var cur_toggle = JX.$(widget + '-toggle');
|
|
JX.DOM.alterClass(
|
|
cur_toggle,
|
|
JX.Stratcom.getData(cur_toggle).toggleClass,
|
|
false
|
|
);
|
|
}
|
|
}
|
|
}
|
|
);
|
|
|
|
});
|