Fix color handling and message parsing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
101c6bd1d4
Коммит
f772a056a8
|
@ -92,7 +92,7 @@ export default class PostMessageService {
|
|||
|
||||
private handlePostMessage(data: any) {
|
||||
const parsed = PostMessageService.parsePostMessage(data);
|
||||
if (typeof parsed === 'undefined') {
|
||||
if (typeof parsed === 'undefined' || parsed === null) {
|
||||
return
|
||||
}
|
||||
this.postMessageHandlers.forEach((fn: Function): void => {
|
||||
|
|
|
@ -275,9 +275,11 @@ export default {
|
|||
const userId = (view.UserId === '') ? view.UserName : view.UserId
|
||||
var avatarContainer = $('<div class="richdocuments-avatar"><div class="avatar" title="' + view.UserName + '" data-user="' + userId + '"></div></div>')
|
||||
var avatar = avatarContainer.find('.avatar')
|
||||
avatar.css({ 'border-color': view.Color,
|
||||
avatar.css({
|
||||
'border-color': Number(view.Color).toString(16),
|
||||
'border-width': '2px',
|
||||
'border-style': 'solid' })
|
||||
'border-style': 'solid'
|
||||
})
|
||||
if (view.ReadOnly === '1') {
|
||||
avatarContainer.addClass('read-only')
|
||||
$(avatar).attr('title', view.UserName + ' ' + t('richdocuments', '(read only)'))
|
||||
|
|
Загрузка…
Ссылка в новой задаче