Rebuild workspace widgets and behavioral graph views
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
const threadController = threadModule.createController({
|
||||
contactSelect: document.getElementById(panelId + "-contact-select"),
|
||||
hiddenIdentifier: document.getElementById(panelId + "-input-identifier"),
|
||||
historyLoader: document.getElementById(panelId + "-history-loader"),
|
||||
hiddenPerson: document.getElementById(panelId + "-input-person"),
|
||||
hiddenReplyTo: form.querySelector('input[name="reply_to_message_id"]'),
|
||||
hiddenService: document.getElementById(panelId + "-input-service"),
|
||||
@@ -135,6 +136,7 @@
|
||||
thread: thread,
|
||||
typingNode: document.getElementById(panelId + "-typing"),
|
||||
});
|
||||
state.threadController = threadController;
|
||||
|
||||
const sendController = sendModule.createController({
|
||||
armInput: form.querySelector('input[name="failsafe_arm"]'),
|
||||
@@ -177,6 +179,25 @@
|
||||
},
|
||||
initAll: initAll,
|
||||
initPanel: initPanel,
|
||||
scrollWidgetToLatest: function (widgetId) {
|
||||
const widgetNode = widgetId ? document.getElementById(String(widgetId)) : null;
|
||||
if (!widgetNode) {
|
||||
return;
|
||||
}
|
||||
const panel = widgetNode.querySelector("[data-compose-panel]");
|
||||
const panelId = String(panel && panel.id ? panel.id : "").trim();
|
||||
if (!panelId) {
|
||||
return;
|
||||
}
|
||||
const state = window.giaComposePanels[panelId];
|
||||
if (
|
||||
state
|
||||
&& state.threadController
|
||||
&& typeof state.threadController.scrollToLatest === "function"
|
||||
) {
|
||||
state.threadController.scrollToLatest();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
Reference in New Issue
Block a user