Merge pull request #586 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-11-23 21:47:47 +03:00 committed by GitHub
commit 0083bb3347
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 16 deletions

View file

@ -175,7 +175,7 @@ define([
'<div class="item-inner">' +
'<div class="header-comment"><div class="comment-left">';
if (isAndroid) {
template += '<div class="initials-comment" style="background-color: ' + comment.usercolor + ';">' + comment.userInitials + '</div><div>';
template += '<div class="initials-comment" style="background-color: ' + (comment.usercolor ? comment.usercolor : '#cfcfcf') + ';">' + comment.userInitials + '</div><div>';
}
template += '<div class="user-name">' + me.getUserName(comment.username) + '</div>' +
'<div class="comment-date">' + comment.date + '</div>';
@ -200,7 +200,7 @@ define([
'<div class="header-reply">' +
'<div class="reply-left">';
if (isAndroid) {
template += '<div class="initials-reply" style="background-color: ' + reply.usercolor + ';">' + reply.userInitials + '</div><div>'
template += '<div class="initials-reply" style="background-color: ' + (reply.usercolor ? reply.usercolor : '#cfcfcf') + ';">' + reply.userInitials + '</div><div>'
}
template += '<div class="user-name">' + me.getUserName(reply.username) + '</div>' +
'<div class="reply-date">' + reply.date + '</div>' +
@ -248,7 +248,7 @@ define([
'<li class="comment item-content" data-uid="<%= item.uid %>">',
'<div class="item-inner">',
'<div class="header-comment"><div class="comment-left">',
'<% if (android) { %><div class="initials-comment" style="background-color:<%= item.usercolor %> "> <%= item.userInitials %></div><div><% } %>',
'<% if (android) { %><div class="initials-comment" style="background-color:<% if (item.usercolor!==null) { %><%=item.usercolor%><% } else { %> #cfcfcf <% } %>;"> <%= item.userInitials %></div><div><% } %>',
'<div class="user-name"><%= scope.getUserName(item.username) %></div>',
'<div class="comment-date"><%= item.date %></div>',
'<% if (android) { %></div><% } %>',
@ -270,7 +270,7 @@ define([
'<li class="reply-item" data-ind="<%= reply.ind %>">',
'<div class="header-reply">',
'<div class="reply-left">',
'<% if (android) { %><div class="initials-reply" style="background-color: <%= reply.usercolor %>;"><%= reply.userInitials %></div><div><% } %>',
'<% if (android) { %><div class="initials-reply" style="background-color: <% if (reply.usercolor!==null) { %><%=reply.usercolor%><% } else { %> #cfcfcf <% } %>;"><%= reply.userInitials %></div><div><% } %>',
'<div class="user-name"><%= scope.getUserName(reply.username) %></div>',
'<div class="reply-date"><%= reply.date %></div>',
'</div>',
@ -304,7 +304,7 @@ define([
var $pageEdit = $('.page-edit-comment .page-content');
var isAndroid = Framework7.prototype.device.android === true;
var template = '<div class="wrap-comment">' +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + comment.usercolor + ';">' + comment.userInitials + '</div><div>' : '') +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + (comment.usercolor ? comment.usercolor : '#cfcfcf') + ';">' + comment.userInitials + '</div><div>' : '') +
'<div class="user-name">' + this.getUserName(comment.username) + '</div>' +
'<div class="comment-date">' + comment.date + '</div>' +
(isAndroid ? '</div></div>' : '') +
@ -330,7 +330,7 @@ define([
var $pageEdit = $('.page-edit-reply .page-content');
var isAndroid = Framework7.prototype.device.android === true;
var template = '<div class="wrap-comment">' +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + reply.usercolor + ';">' + reply.userInitials + '</div><div>' : '') +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + (reply.usercolor ? reply.usercolor : '#cfcfcf') + ';">' + reply.userInitials + '</div><div>' : '') +
'<div class="user-name">' + this.getUserName(reply.username) + '</div>' +
'<div class="comment-date">' + reply.date + '</div>' +
(isAndroid ? '</div></div>' : '') +
@ -401,7 +401,7 @@ define([
'<div class="page-edit-comment">' +
'<div class="page-content">' +
'<div class="wrap-comment">' +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + comment.usercolor + ';">' + comment.userInitials + '</div><div>' : '') +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + (comment.usercolor ? comment.usercolor : '#cfcfcf') + ';">' + comment.userInitials + '</div><div>' : '') +
'<div class="user-name">' + this.getUserName(comment.username) + '</div>' +
'<div class="comment-date">' + comment.date + '</div>' +
(isAndroid ? '</div></div>' : '') +
@ -427,7 +427,7 @@ define([
'<div class="page add-comment">' +
'<div class="page-content">' +
'<div class="wrap-comment">' +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + reply.usercolor + ';">' + reply.userInitials + '</div><div>' : '') +
(isAndroid ? '<div class="header-comment"><div class="initials-comment" style="background-color: ' + (reply.usercolor ? reply.usercolor : '#cfcfcf') + ';">' + reply.userInitials + '</div><div>' : '') +
'<div class="user-name">' + this.getUserName(reply.username) + '</div>' +
'<div class="comment-date">' + reply.date + '</div>' +
(isAndroid ? '</div></div>' : '') +

View file

@ -337,6 +337,7 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
},
isEndNote: isEndNote,
hasSections: me.api.asc_GetSectionsCount()>1,
props: isEndNote ? me.api.asc_GetEndnoteProps() : me.api.asc_GetFootnoteProps()
})).show();
break;

View file

@ -130,6 +130,7 @@ define([
this.handler = options.handler;
this.props = options.props;
this.isEndNote = options.isEndNote || false;
this.hasSections = options.hasSections || false;
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
@ -260,17 +261,16 @@ define([
me.btnApply.setDisabled(value.length>0);
});
var arr = this.hasSections ? [{ displayValue: this.textSection, value: 0 }] : [];
arr.push({ displayValue: this.textDocument, value: 1 });
this.cmbApply = new Common.UI.ComboBox({
el: $('#note-settings-combo-apply'),
cls: 'input-group-nr',
menuStyle: 'min-width: 150px;',
editable: false,
data: [
{ displayValue: this.textDocument, value: 1 },
{ displayValue: this.textSection, value: 0 }
]
data: arr
});
this.cmbApply.setValue(1);
this.cmbApply.setValue(arr[0].value);
this.btnApply = new Common.UI.Button({
el: $('#note-settings-btn-apply')

View file

@ -176,7 +176,7 @@ define([
_.delay(function () {
var $commentInfo = $('#comment-info');
var template = [
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <% if (comment.usercolor!==null) { %><%=comment.usercolor%><% } else { %> #cfcfcf <% } %>;"><%= comment.userInitials %></div><div><% } %>',
'<div class="user-name"><%= scope.getUserName(comment.username) %></div>',
'<div class="comment-date"><%= comment.date %></div>',
'<% if (android) { %></div></div><% } %>',

View file

@ -142,7 +142,7 @@ define([
_.delay(function () {
var $commentInfo = $('#comment-info');
var template = [
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <% if (comment.usercolor!==null) { %><%=comment.usercolor%><% } else { %> #cfcfcf <% } %>;"><%= comment.userInitials %></div><div><% } %>',
'<div class="user-name"><%= scope.getUserName(comment.username) %></div>',
'<div class="comment-date"><%= comment.date %></div>',
'<% if (android) { %></div></div><% } %>',

View file

@ -216,7 +216,7 @@ define([
_.delay(function () {
var $commentInfo = $('#comment-info');
var template = [
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <% if (comment.usercolor!==null) { %><%=comment.usercolor%><% } else { %> #cfcfcf <% } %>;"><%= comment.userInitials %></div><div><% } %>',
'<div class="user-name"><%= scope.getUserName(comment.username) %></div>',
'<div class="comment-date"><%= comment.date %></div>',
'<% if (android) { %></div></div><% } %>',