mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Merge c130a48d89
into 394d542d5e
This commit is contained in:
commit
9590e9f5c1
3 changed files with 6 additions and 3 deletions
|
@ -238,7 +238,7 @@ function OUTER(gscope)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text color
|
// Text color
|
||||||
var txtcolor = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.45) ? '#ffffff' : '#000000';
|
var txtcolor = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5) ? '#ffffff' : '#000000';
|
||||||
|
|
||||||
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||||
getAuthorClassName(author)));
|
getAuthorClassName(author)));
|
||||||
|
|
|
@ -25,6 +25,7 @@ var domline = require('/domline_client').domline;
|
||||||
var Changeset = require('/easysync2_client').Changeset;
|
var Changeset = require('/easysync2_client').Changeset;
|
||||||
var AttribPool = require('/easysync2_client').AttribPool;
|
var AttribPool = require('/easysync2_client').AttribPool;
|
||||||
var linestylefilter = require('/linestylefilter_client').linestylefilter;
|
var linestylefilter = require('/linestylefilter_client').linestylefilter;
|
||||||
|
var colorutils = require('/colorutils').colorutils;
|
||||||
|
|
||||||
// These parameters were global, now they are injected. A reference to the
|
// These parameters were global, now they are injected. A reference to the
|
||||||
// Timeslider controller would probably be more appropriate.
|
// Timeslider controller would probably be more appropriate.
|
||||||
|
@ -757,7 +758,9 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
|
||||||
var bgcolor = typeof data.colorId == "number" ? clientVars.colorPalette[data.colorId] : data.colorId;
|
var bgcolor = typeof data.colorId == "number" ? clientVars.colorPalette[data.colorId] : data.colorId;
|
||||||
if (bgcolor && dynamicCSS)
|
if (bgcolor && dynamicCSS)
|
||||||
{
|
{
|
||||||
dynamicCSS.selectorStyle('.' + linestylefilter.getAuthorClassName(author)).backgroundColor = bgcolor;
|
var selector = dynamicCSS.selectorStyle('.' + linestylefilter.getAuthorClassName(author));
|
||||||
|
selector.backgroundColor = bgcolor
|
||||||
|
selector.color = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.5) ? '#ffffff' : '#000000'; //see ace2_inner.js for the other part
|
||||||
}
|
}
|
||||||
authorData[author] = data;
|
authorData[author] = data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ var chat = (function()
|
||||||
|
|
||||||
var authorName = msg.userName == null ? "unnamed" : padutils.escapeHtml(msg.userName);
|
var authorName = msg.userName == null ? "unnamed" : padutils.escapeHtml(msg.userName);
|
||||||
|
|
||||||
var html = "<p class='" + authorClass + "'><b>" + authorName + ":</b><span class='time'>" + timeStr + "</span> " + text + "</p>";
|
var html = "<p class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>";
|
||||||
$("#chattext").append(html);
|
$("#chattext").append(html);
|
||||||
|
|
||||||
//should we increment the counter??
|
//should we increment the counter??
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue