Skip to content

Commit

Permalink
Merge pull request #3107 from ONLYOFFICE/release/v8.2.0
Browse files Browse the repository at this point in the history
Release/v8.2.0
  • Loading branch information
JuliaRadzhabova authored Aug 1, 2024
2 parents 4e23c03 + 01ea099 commit 55357bd
Show file tree
Hide file tree
Showing 73 changed files with 316 additions and 215 deletions.
4 changes: 2 additions & 2 deletions apps/common/main/lib/collection/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ define([
},

getEditingOriginalCount: function() {
return this.chain().filter(function(item){return item.get('online') && !item.get('view')}).groupBy('idOriginal').size().value();
return this.chain().filter(function(item){return item.get('online') && !item.get('view')}).groupBy(function(item) { return item.get('idOriginal'); }).size().value();
},

getVisibleEditingOriginalCount: function() {
return this.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy('idOriginal').size().value();
return this.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy(function(item) { return item.get('idOriginal'); }).size().value();
},

findUser: function(id) {
Expand Down
8 changes: 4 additions & 4 deletions apps/common/main/lib/component/HSBColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ define([], function () {
'<% if (this.showCurrentColor) { %>'+
'<div class="top-panel">'+
'<span class="color-value">'+
'<span class="transparent-color img-colorpicker"></span>'+
'<span class="transparent-color"></span>'+
'</span>'+
'<div class="color-text"></div>'+
'</div>'+
'<% } %>'+
'<div>'+
'<div class="cnt-hb img-colorpicker">'+
'<div class="cnt-hb">'+
'<div class="cnt-hb-arrow"></div>'+
'</div>'+
'<% if (this.changeSaturation) { %>'+
'<div class="cnt-root">'+
'<div class="cnt-sat img-colorpicker">'+
'<div class="cnt-sat-arrow img-colorpicker"></div>'+
'<div class="cnt-sat">'+
'<div class="cnt-sat-arrow"></div>'+
'</div>'+
'</div>'+
'<% } %>'+
Expand Down
22 changes: 22 additions & 0 deletions apps/common/main/lib/controller/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ define([
this.currentUserName = '';
this.currentUserColor = '';
this.currentDateCreated = '';
this.currentDocumentSha256 = undefined;
},

events: {
Expand Down Expand Up @@ -142,6 +143,7 @@ define([
this.currentUserName = record.get('username');
this.currentUserColor = record.get('usercolor');
this.currentDateCreated = record.get('created');
this.currentDocumentSha256 = record.get('documentSha256');

if ( _.isEmpty(url) || (urlGetTime - record.get('urlGetTime') > 5 * 60000)) {
var me = this;
Expand Down Expand Up @@ -175,6 +177,7 @@ define([
hist.asc_SetUserName(this.currentUserName);
hist.asc_SetUserColor(this.currentUserColor);
hist.asc_SetDateOfRevision(this.currentDateCreated);
hist.asc_setDocumentSha256(this.currentDocumentSha256);
this.api.asc_showRevision(hist);

var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
Expand Down Expand Up @@ -245,6 +248,7 @@ define([
hist.asc_SetUserName(this.currentUserName);
hist.asc_SetUserColor(this.currentUserColor);
hist.asc_SetDateOfRevision(this.currentDateCreated);
hist.asc_setDocumentSha256(this.currentDocumentSha256);
this.api.asc_showRevision(hist);
this.currentRev = data.version;

Expand Down Expand Up @@ -294,6 +298,24 @@ define([
}
},

onHashError: function() {
if (!this.panelHistory || !this.panelHistory.storeHistory) return;

var store = this.panelHistory.storeHistory;
store.remove(store.where({revision: this.currentRev, level: 1}));

var rec = store.findWhere({revision: this.currentRev});
if (rec && this.panelHistory.viewHistoryList) {
rec.set('hasSubItems', false);
rec.set('changeid', undefined);
rec.set('documentSha256', undefined);
rec.set('url', '');
this.panelHistory.viewHistoryList.selectRecord(rec);
this.onSelectRevision(null, null, rec);
}
console.log('Received changes that are incompatible with the file version');
},

notcriticalErrorTitle: 'Warning'

}, Common.Controllers.History || {}));
Expand Down
5 changes: 4 additions & 1 deletion apps/common/main/lib/controller/LaunchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ define([
// console.log('on_app_ready', app.postLaunchScripts);

require(app.postLaunchScripts, function () {
Common.UI.ScreenReaderFocusManager.init(me.api);
if (!!Common.UI.ScreenReaderFocusManager) {
Common.UI.ScreenReaderFocusManager.init(me.api);
}

if ( !!window.less ) { // detect development mode
Common.NotificationCenter.trigger('script:loaded');
Expand All @@ -67,5 +69,6 @@ define([
};
}

!Common.Controllers && (Common.Controllers = {});
Common.Controllers.LaunchController = new launchController();
});
3 changes: 2 additions & 1 deletion apps/common/main/lib/model/HistoryVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ define([
markedAsVersion: false,
canRestore: false,
serverVersion: 0,
fileType: 'docx'
fileType: 'docx',
documentSha256: undefined
}, Common.UI.TreeViewModel.prototype.defaults() || {});
}
});
Expand Down
14 changes: 8 additions & 6 deletions apps/common/main/lib/template/ExtendedColorDialog.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@
<div class="color-info" style="">
<div class="margin-left-15">
<label class="color-label"><%= txtNew %></label>
<div id="field-new-color" class="color-cnt top"></div>
<div id="field-start-color" class="color-cnt bottom"></div>
<div class="color-field-wrapper">
<div id="field-new-color" class="color-cnt top"></div>
<div id="field-start-color" class="color-cnt bottom"></div>
</div>
<label class="color-label"><%= txtCurrent %></label>
</div>
<div style="padding:13px 0 2px 0;">
<label class="input-label">R:</label>
<label class="input-label">R</label>
<div id="extended-spin-r" class="color-spin"></div>
</div>
<div style="padding:2px 0;">
<label class="input-label">G:</label>
<label class="input-label">G</label>
<div id="extended-spin-g" class="color-spin"></div>
</div>
<div style="padding:2px 0;">
<label class="input-label">B:</label>
<label class="input-label">B</label>
<div id="extended-spin-b" class="color-spin"></div>
</div>
<div style="padding:11px 0 0 0;">
<label class="input-label" style="width:12px;">#:</label>
<label class="input-label" style="width:12px;">#</label>
<input id="extended-text-color" type="text" role="textbox" style="width:62px; height: 22px;">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/lib/view/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ define([

_onResetUsers: function(c, opts) {
if (this.panelUsers) {
this.panelUsers.html(this.templateUserList({users: this.storeUsers.chain().filter(function(item){return item.get('online');}).groupBy('idOriginal').value(),
this.panelUsers.html(this.templateUserList({users: this.storeUsers.chain().filter(function(item){return item.get('online');}).groupBy(function(item) { return item.get('idOriginal'); }).value(),
usertpl: this.tplUser, scope: this}));
this.panelUsers.scroller.update({minScrollbarLength : 25, alwaysVisibleY: true});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/lib/view/ExtendedColorDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ define([
header: false,
buttons: [{value: '1', caption: this.addButtonText}, {value: '0', caption: this.cancelButtonText}],
primary: '1',
width: 340
width: 356
});

this.hexRe = /\s*#?([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/;
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ define([
//'<label id="rib-doc-name" />' +
'<input id="rib-doc-name" autofill="off" autocomplete="off"/></input>' +
'</section>' +
'<section style="display: inherit;">' +
'<section id="box-right-btn-group" style="display: inherit;">' +
'<div class="hedset">' +
'<div class="btn-slot margin-right-2" id="slot-btn-header-form-submit"></div>' +
'<div class="btn-slot margin-right-2" id="slot-btn-start-fill"></div>' +
Expand Down Expand Up @@ -172,7 +172,7 @@ define([
if ( $userList ) {
if (appConfig && (usercount > 1 && (appConfig.isEdit || appConfig.isRestrictedEdit) || usercount >0 && appConfig.canLiveView)) {
$userList.html(templateUserList({
users: collection.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy('idOriginal').value(),
users: collection.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy(function(item) { return item.get('idOriginal'); }).value(),
usertpl: _.template(templateUserItem),
fnEncode: function(username) {
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
Expand Down
4 changes: 3 additions & 1 deletion apps/common/main/lib/view/UserNameDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
*
*/

define([], function () { 'use strict';
define([
'common/main/lib/component/Window'
], function () { 'use strict';

Common.Views.UserNameDialog = Common.UI.Window.extend(_.extend({
options: {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 0 additions & 34 deletions apps/common/main/resources/less/asc-mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -453,40 +453,6 @@
}
}

@img-colorpicker-width: 208px;
.img-colorpicker, .hsb-colorpicker .empty-color:before
{
background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')), ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker.png)");
background-repeat: no-repeat;
background-size: @img-colorpicker-width auto;

@media only screen {
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
(min-resolution: 144dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/[email protected])";
background-size: @img-colorpicker-width auto;
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),
(min-resolution: 192dpi)
{
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/[email protected])";
background-size: @img-colorpicker-width auto;
}
}

.pixel-ratio__1_25 & {
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/[email protected])";
}

.pixel-ratio__1_75 & {
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/[email protected])";
}
}

.icon.lang-flag {
@img-flags-width: 48px;

Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/resources/less/colors-table-classic.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
--highlight-primary-dialog-button-hover: #666d73;
--highlight-accent-button-hover: #375478;
--highlight-accent-button-pressed: #293f59;
--highlight-header-button-hover: fade(#fff, 20%);
--highlight-header-button-pressed: fade(#000, 20%);
--highlight-header-button-hover: fade(#000, 15%);
--highlight-header-button-pressed: fade(#000, 25%);
--highlight-toolbar-tab-underline: #444;
--highlight-text-select: #3494fb;
--highlight-fill-button-hover: #ffe165;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
--highlight-primary-dialog-button-hover: #a6a6a6;
--highlight-accent-button-hover: #75a2d6;
--highlight-accent-button-pressed: #89afdc;
--highlight-header-button-hover: #424242;
--highlight-header-button-pressed: #828282;
--highlight-header-button-hover: fade(#fff, 20%);
--highlight-header-button-pressed: fade(#fff, 35%);
--highlight-toolbar-tab-underline: #d0d0d0;
--highlight-text-select: #96c8fd;
--highlight-fill-button-hover: #ffe165;
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/resources/less/colors-table-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
--highlight-primary-dialog-button-hover: #fcfcfc;
--highlight-accent-button-hover: #75a2d6;
--highlight-accent-button-pressed: #89afdc;
--highlight-header-button-hover: fade(#fff, 5%);
--highlight-header-button-pressed: fade(#fff, 15%);
--highlight-header-button-hover: fade(#fff, 15%);
--highlight-header-button-pressed: fade(#fff, 25%);
--highlight-toolbar-tab-underline: #ddd;
--highlight-text-select: #96c8fd;
--highlight-fill-button-hover: #ffe165;
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/resources/less/colors-table-ie-fix.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
@highlight-button-pressed-ie: #7d858c;
@highlight-button-pressed-hover-ie: #7d858c;
@highlight-primary-dialog-button-hover-ie: #666d73;
@highlight-header-button-hover-ie: fade(#fff, 20%);
@highlight-header-button-pressed-ie: fade(#000, 20%);
@highlight-header-button-hover-ie: fade(#000, 15%);
@highlight-header-button-pressed-ie: fade(#000, 25%);
@highlight-toolbar-tab-underline-ie: #444;
@highlight-text-select-ie: #3494fb;
@highlight-accent-button-hover-ie: #375478;
Expand Down
4 changes: 2 additions & 2 deletions apps/common/main/resources/less/colors-table.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
--highlight-primary-dialog-button-hover: #1c1c1c;
--highlight-accent-button-hover: #375478;
--highlight-accent-button-pressed: #293f59;
--highlight-header-button-hover: fade(#fff, 15%);
--highlight-header-button-pressed: fade(#fff, 25%);
--highlight-header-button-hover: fade(#000, 15%);
--highlight-header-button-pressed: fade(#000, 25%);
--highlight-toolbar-tab-underline: #444;
--highlight-text-select: #3494fb;
--highlight-fill-button-hover: #ffe165;
Expand Down
12 changes: 10 additions & 2 deletions apps/common/main/resources/less/extended-color-picker.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@
background-color: @background-normal;
}

.color-field-wrapper {
border-radius: 2px;
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
padding: 1px;
}

.color-cnt {
width: 63px;
height: 20px;
background-color: transparent;
border: @scaled-one-px-value-ie solid @border-color-shading-ie;
border: @scaled-one-px-value solid @border-color-shading;
&.top {
border-bottom: none;
}
Expand All @@ -52,6 +57,9 @@
}

.color-transparent {
border: @scaled-one-px-value-ie solid @border-color-shading-ie;
border: @scaled-one-px-value solid @border-color-shading;

&:before {
height: 64px;
transform: translate(29px, -22px) rotate(73deg);
Expand Down
Loading

0 comments on commit 55357bd

Please sign in to comment.