2013-01-25 02:23:05 +01:00
|
|
|
/**
|
|
|
|
* @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';
|
2013-02-05 04:01:46 +01:00
|
|
|
JX.DOM.alterClass(e.getTarget(), data.toggleClass, true);
|
2013-01-25 02:23:05 +01:00
|
|
|
} else {
|
|
|
|
JX.$(widget).style.display = 'none';
|
2013-02-05 04:01:46 +01:00
|
|
|
var cur_toggle = JX.$(widget + '-toggle');
|
|
|
|
JX.DOM.alterClass(
|
|
|
|
cur_toggle,
|
|
|
|
JX.Stratcom.getData(cur_toggle).toggleClass,
|
|
|
|
false
|
|
|
|
);
|
2013-01-25 02:23:05 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
});
|