2024-12-28 13:46:08 +02:00
|
|
|
import FlexContainer from "../containers/flex_container.js";
|
|
|
|
|
|
|
|
export default class SidebarContainer extends FlexContainer {
|
|
|
|
|
|
|
|
constructor(screenName, direction) {
|
|
|
|
super(direction);
|
|
|
|
|
|
|
|
this.screenName = screenName;
|
|
|
|
}
|
|
|
|
|
2024-12-28 13:56:20 +02:00
|
|
|
doRender() {
|
|
|
|
super.doRender();
|
|
|
|
|
|
|
|
this.$widget.on("click", () => {
|
2024-12-28 14:09:50 +02:00
|
|
|
this.triggerCommand('setActiveScreen', {
|
|
|
|
screen: "detail"
|
|
|
|
});
|
2024-12-28 13:56:20 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-12-28 13:46:08 +02:00
|
|
|
activeScreenChangedEvent({activeScreen}) {
|
|
|
|
if (activeScreen === this.screenName) {
|
|
|
|
this.$widget.addClass('show');
|
|
|
|
} else {
|
|
|
|
this.$widget.removeClass('show');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|