mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +02:00
BugFix: Restore dynamic class kwarg assignment to goldenlayout-enabled clients
This commit is contained in:
parent
3d3bd5e9d7
commit
5a0cf6ba82
1 changed files with 4 additions and 3 deletions
|
|
@ -635,7 +635,7 @@ let goldenlayout = (function () {
|
|||
// Add new HTML message to an existing Div pane, while
|
||||
// honoring the pane's updateMethod and scroll state, etc.
|
||||
//
|
||||
var addMessageToPaneDiv = function (textDiv, message) {
|
||||
var addMessageToPaneDiv = function (textDiv, message, kwargs) {
|
||||
let atBottom = false;
|
||||
let updateMethod = textDiv.attr("updateMethod");
|
||||
|
||||
|
|
@ -644,7 +644,8 @@ let goldenlayout = (function () {
|
|||
} else if ( updateMethod === "append" ) {
|
||||
textDiv.append(message);
|
||||
} else { // line feed
|
||||
textDiv.append("<div class='out'>" + message + "</div>");
|
||||
var cls = (kwargs === undefined) || (kwargs['cls'] === undefined) ? 'out' : kwargs['cls'];
|
||||
textDiv.append("<div class='" + cls + "'>" + message + "</div>");
|
||||
}
|
||||
|
||||
// Calculate the scrollback state.
|
||||
|
|
@ -779,7 +780,7 @@ let goldenlayout = (function () {
|
|||
divs.forEach( function (div) {
|
||||
let txt = args[0];
|
||||
// yes, so add this text message to the target div
|
||||
addMessageToPaneDiv( div, txt );
|
||||
addMessageToPaneDiv( div, txt, kwargs );
|
||||
msgHandled = true;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue