Skip to content

Commit

Permalink
Merge branch hotfix/v7.4.1 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
papacarlo committed Jul 31, 2023
2 parents 1af3eba + 6fd85e5 commit 1e0cc82
Show file tree
Hide file tree
Showing 1,642 changed files with 18,714 additions and 11,884 deletions.
3 changes: 3 additions & 0 deletions apps/common/main/lib/component/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ define([
me.style = me.options.style;
me.rendered = false;

// if ( /(?<!-)svg-icon(?!-)/.test(me.options.iconCls) )
// me.options.scaling = false;

if ( me.options.scaling === false && me.options.iconCls) {
me.iconCls = me.options.iconCls + ' scaling-off';
}
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/lib/component/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ define([
'</button>',
'<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">',
'<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<li id="<%= item.id %>" data-value="<%- item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<% }); %>',
'</ul>',
'</span>'
Expand Down
37 changes: 21 additions & 16 deletions apps/common/main/lib/controller/Desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,6 @@ define([
webapp.getController('Main').api.asc_DownloadAs();
}
};

window.on_native_message('editor:config', 'request');
if ( !!window.native_message_cmd ) {
for ( var c in window.native_message_cmd ) {
window.on_native_message(c, window.native_message_cmd[c]);
}
}

native.execCommand('webapps:features', JSON.stringify(features));

// hide mask for modal window
var style = document.createElement('style');
style.appendChild(document.createTextNode('.modals-mask{opacity:0 !important;}'));
document.getElementsByTagName('head')[0].appendChild(style);
}

var _serializeHeaderButton = function(action, config) {
Expand Down Expand Up @@ -376,7 +362,7 @@ define([
cls: 'btn-header',
iconCls: 'toolbar__icon icon--inverse btn-home',
visible: false,
hint: 'Show Main window',
hint: Common.Locale.get('hintBtnHome', {name:"Common.Controllers.Desktop", default: 'Show Main window'}),
dataHint:'0',
dataHintDirection: 'right',
dataHintOffset: '10, -18',
Expand Down Expand Up @@ -530,7 +516,8 @@ define([
return !!native;
},
isOffline: function () {
// return webapp.getController('Main').api.asc_isOffline();
if ( config.isFillFormApp )
return webapp.getController('ApplicationController').appOptions.isOffline;
return webapp.getController('Main').appOptions.isOffline;
},
isFeatureAvailable: function (feature) {
Expand Down Expand Up @@ -568,9 +555,27 @@ define([
systemThemeSupported: function () {
return nativevars.theme && nativevars.theme.system !== 'disabled';
},
finalConstruct : function() {
if (!!native) {
window.on_native_message('editor:config', 'request');
if ( !!window.native_message_cmd ) {
for ( var c in window.native_message_cmd ) {
window.on_native_message(c, window.native_message_cmd[c]);
}
}

native.execCommand('webapps:features', JSON.stringify(features));

// hide mask for modal window
var style = document.createElement('style');
style.appendChild(document.createTextNode('.modals-mask{opacity:0 !important;}'));
document.getElementsByTagName('head')[0].appendChild(style);
}
}
};
};

!Common.Controllers && (Common.Controllers = {});
Common.Controllers.Desktop = new Desktop();
Common.Controllers.Desktop.finalConstruct();
});
2 changes: 1 addition & 1 deletion apps/common/main/lib/controller/HintManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ Common.UI.HintManager = new(function() {
}
}
if (curr.prop('id') === 'btn-go-back' || curr.closest('.btn-slot').prop('id') === 'slot-btn-options' ||
curr.closest('.btn-slot').prop('id') === 'slot-btn-mode' || curr.prop('id') === 'btn-favorite' || curr.parent().prop('id') === 'tlb-box-users' ||
curr.closest('.btn-slot').prop('id') === 'slot-btn-mode' || curr.prop('id') === 'id-btn-favorite' || curr.parent().prop('id') === 'tlb-box-users' ||
curr.prop('id') === 'left-btn-thumbs' || curr.hasClass('scroll') || curr.prop('id') === 'left-btn-about' ||
curr.prop('id') === 'left-btn-support' || curr.closest('.btn-slot').prop('id') === 'slot-btn-search') {
_resetToDefault();
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/lib/util/htmlutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ window.Common = {
else {/* error */}
}).then(function (text) {
const el = document.querySelector('div.inlined-svg')
el.append(htmlToElements(text));
el.appendChild(htmlToElements(text));

const i = svg_icons.findIndex(function (item) {return item == url});
if ( !(i < 0) ) svg_icons.splice(i, 1)
Expand Down
7 changes: 4 additions & 3 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ define([
me.btnFavorite.on('click', function (e) {
// wait for setFavorite method
// me.options.favorite = !me.options.favorite;
// me.btnFavorite.changeIcon(me.options.favorite ? {next: 'btn-in-favorite', curr: 'btn-favorite'} : {next: 'btn-favorite', curr: 'btn-in-favorite'});
// me.btnFavorite.changeIcon(me.options.favorite ? {next: 'btn-in-favorite'} : {curr: 'btn-in-favorite'});
// me.btnFavorite.updateHint(!me.options.favorite ? me.textAddFavorite : me.textRemoveFavorite);
Common.NotificationCenter.trigger('markfavorite', !me.options.favorite);
Expand Down Expand Up @@ -491,7 +492,7 @@ define([
});

me.btnFavorite = new Common.UI.Button({
id: 'btn-favorite',
id: 'id-btn-favorite',
cls: 'btn-header',
iconCls: 'toolbar__icon icon--inverse btn-favorite',
dataHint: '0',
Expand Down Expand Up @@ -567,7 +568,7 @@ define([

if ( this.options.favorite !== undefined && this.options.favorite!==null) {
me.btnFavorite.render($html.find('#slot-btn-favorite'));
me.btnFavorite.changeIcon(!!me.options.favorite ? {next: 'btn-in-favorite'} : {curr: 'btn-in-favorite'});
me.btnFavorite.changeIcon(!!me.options.favorite ? {next: 'btn-in-favorite', curr: 'btn-favorite'} : {next: 'btn-favorite', curr: 'btn-in-favorite'});
me.btnFavorite.updateHint(!me.options.favorite ? me.textAddFavorite : me.textRemoveFavorite);
} else {
$html.find('#slot-btn-favorite').hide();
Expand Down Expand Up @@ -744,7 +745,7 @@ define([
setFavorite: function (value) {
this.options.favorite = value;
this.btnFavorite[value!==undefined && value!==null ? 'show' : 'hide']();
this.btnFavorite.changeIcon(!!value ? {next: 'btn-in-favorite'} : {curr: 'btn-in-favorite'});
this.btnFavorite.changeIcon(!!value ? {next: 'btn-in-favorite', curr: 'btn-favorite'} : {next: 'btn-favorite', curr: 'btn-in-favorite'});
this.btnFavorite.updateHint(!value ? this.textAddFavorite : this.textRemoveFavorite);
updateDocNamePosition(appConfig);
return this;
Expand Down
Binary file modified apps/common/main/resources/help/en/images/autocorrect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/chartdata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/charteditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/charttype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/charttype_combo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/editseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/find_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/en/images/selectdata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/fr/images/autocorrect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/fr/images/charteditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/common/main/resources/help/fr/images/charttype.png
Binary file modified apps/common/main/resources/help/fr/images/find_small.png
Binary file modified apps/common/main/resources/help/fr/images/right_chart_3d.png
Binary file modified apps/common/main/resources/help/ru/images/autocorrect.png
Binary file modified apps/common/main/resources/help/ru/images/charttype.png
Binary file modified apps/common/main/resources/help/ru/images/palette_custom.png
Binary file modified apps/common/main/resources/help/ru/images/right_chart_3d.png
4 changes: 1 addition & 3 deletions apps/common/main/resources/img/toolbar/2.5x/btn-favorite.svg
3 changes: 2 additions & 1 deletion apps/common/main/resources/less/bigscaling.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@

.btn-toolbar,
.btn-header,
.btn-category
.btn-category,
.btn-options
{
svg.icon:not(.uni-scale):not(.pixel-ratio__2_5 *) {
display: none;
Expand Down
1 change: 1 addition & 0 deletions apps/common/main/resources/less/listview.less
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
border-bottom: @scaled-one-px-value solid @border-regular-control;
padding: 3px 6px;
position: absolute;
margin: 1px;
margin: @scaled-one-px-value;
width: calc(100% - 2 * @scaled-one-px-value);
display: flex;
Expand Down
9 changes: 8 additions & 1 deletion apps/common/mobile/lib/controller/collaboration/Review.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ class InitReview extends Component {
Common.Notifications.on('document:ready', () => {
const api = Common.EditorApi.get();
const appOptions = props.storeAppOptions;
const isProtected = appOptions.isProtected;

let trackChanges = appOptions.customization && appOptions.customization.review ? appOptions.customization.review.trackChanges : undefined;
(trackChanges===undefined) && (trackChanges = appOptions.customization ? appOptions.customization.trackChanges : undefined);
trackChanges = appOptions.isReviewOnly || trackChanges === true || trackChanges !== false
&& LocalStorage.getBool("de-mobile-track-changes-" + (appOptions.fileKey || ''));

api.asc_SetTrackRevisions(trackChanges);
if(!isProtected) {
api.asc_SetTrackRevisions(trackChanges);
}

// Init display mode

const canViewReview = appOptions.canReview || appOptions.isEdit || api.asc_HaveRevisionsChanges(true);
Expand Down Expand Up @@ -121,9 +125,11 @@ class Review extends Component {
render() {
const displayMode = this.props.storeReview.displayMode;
const isReviewOnly = this.appConfig.isReviewOnly;
const isProtected = this.appConfig.isProtected;
const canReview = this.appConfig.canReview;
const canUseReviewPermissions = this.appConfig.canUseReviewPermissions;
const isRestrictedEdit = this.appConfig.isRestrictedEdit;

return (
<PageReview isReviewOnly={isReviewOnly}
canReview={canReview}
Expand All @@ -136,6 +142,7 @@ class Review extends Component {
onRejectAll={this.onRejectAll}
onDisplayMode={this.onDisplayMode}
noBack={this.props.noBack}
isProtected={isProtected}
/>
)
}
Expand Down
21 changes: 12 additions & 9 deletions apps/common/mobile/lib/view/collaboration/Review.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {Device} from "../../../utils/device";
const PageReview = props => {
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});

const isProtected = props.isProtected;
const isDisableAllSettings = props.isReviewOnly || props.displayMode === "final" || props.displayMode === "original";
const canReview = !!props.canReview;

Expand All @@ -25,8 +25,8 @@ const PageReview = props => {
</Navbar>
<List>
{canReview &&
<ListItem title={_t.textTrackChanges} className={isDisableAllSettings ? 'disabled' : ''}>
<Toggle checked={props.trackChanges} onToggleChange={() => props.onTrackChanges(!props.trackChanges)}/>
<ListItem title={_t.textTrackChanges} className={isDisableAllSettings ? 'disabled' : ''} disabled={isProtected}>
<Toggle checked={props.trackChanges} onToggleChange={() => props.onTrackChanges(!props.trackChanges)} />
</ListItem>
}
{!props.isRestrictedEdit &&
Expand All @@ -39,13 +39,13 @@ const PageReview = props => {
<ListItem title={_t.textReviewChange} link={'/review-change/'}>
<Icon slot="media" icon="icon-review-changes"></Icon>
</ListItem>
{canReview && !props.canUseReviewPermissions &&
{canReview && !props.canUseReviewPermissions && !isProtected &&
<ListItem title={_t.textAcceptAllChanges} link='#'
className={'no-indicator' + (isDisableAllSettings ? ' disabled' : '')} onClick={() => {props.onAcceptAll();}}>
<Icon slot="media" icon="icon-accept-changes"></Icon>
</ListItem>
}
{canReview && !props.canUseReviewPermissions &&
{canReview && !props.canUseReviewPermissions && !isProtected &&
<ListItem title={_t.textRejectAllChanges} link='#'
className={'no-indicator' + (isDisableAllSettings ? ' disabled' : '')} onClick={() => {props.onRejectAll();}}>
<Icon slot="media" icon="icon-reject-changes"></Icon>
Expand Down Expand Up @@ -101,14 +101,17 @@ const DisplayMode = props => {
)
};

const PageReviewChange = props => {
const PageReviewChange = inject("storeAppOptions")(observer(props => {
const isAndroid = Device.android;
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});
const change = props.change;
const displayMode = props.displayMode;
const isLockAcceptReject = (!change || (change && !change.editable) || (displayMode === "final" || displayMode === "original") || !props.canReview);
const isLockPrevNext = (displayMode === "final" || displayMode === "original");
const appOptions = props.storeAppOptions;
const isProtected = appOptions.isProtected;

return (
<Page className='page-review'>
<Navbar title={_t.textReviewChange} backLink={!props.noBack && _t.textBack}>
Expand All @@ -126,12 +129,12 @@ const PageReviewChange = props => {
<span className='accept-reject row'>
<Link id='btn-accept-change'
href='#'
className={isLockAcceptReject && 'disabled'}
className={(isLockAcceptReject || isProtected) && 'disabled'}
onClick={() => {props.onAcceptCurrentChange()}}
>{_t.textAccept}</Link>
<Link id='btn-reject-change'
href='#'
className={isLockAcceptReject && 'disabled'}
className={(isLockAcceptReject || isProtected) && 'disabled'}
onClick={() => {props.onRejectCurrentChange()}}
>{_t.textReject}</Link>
</span>
Expand Down Expand Up @@ -173,7 +176,7 @@ const PageReviewChange = props => {
}
</Page>
)
};
}));

const PageDisplayMode = inject("storeReview")(observer(DisplayMode));

Expand Down
8 changes: 4 additions & 4 deletions apps/documenteditor/embed/locale/pt-pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"DE.ApplicationController.downloadTextText": "A descarregar documento…",
"DE.ApplicationController.errorAccessDeny": "Está a tentar executar uma ação para a qual não tem permissão.<br>Contacte o administrador do servidor de documentos.",
"DE.ApplicationController.errorDefaultMessage": "Código de erro: %1",
"DE.ApplicationController.errorEditingDownloadas": "Ocorreu um erro ao trabalhar o documento.<br>Utilize a opção 'Descarregar como...' para guardar uma cópia do ficheiro no computador.",
"DE.ApplicationController.errorEditingDownloadas": "Ocorreu um erro ao trabalhar no documento.<br>Utilize a opção 'Descarregar como...' para guardar uma cópia do ficheiro no computador.",
"DE.ApplicationController.errorFilePassProtect": "O documento está protegido por palavra-passe e não pode ser aberto.",
"DE.ApplicationController.errorFileSizeExceed": "O tamanho do documento excede o limite permitido pelo servidor.<br>Contacte o administrador do servidor de documentos para mais informações.",
"DE.ApplicationController.errorForceSave": "Ocorreu um erro ao guardar o ficheiro. Utilize a opção 'Descarregar como' para guardar o ficheiro no computador ou tente mais tarde.",
Expand All @@ -23,8 +23,8 @@
"DE.ApplicationController.errorInconsistentExtXlsx": "Ocorreu um erro ao abrir o ficheiro.<br>O conteúdo do ficheiro corresponde a uma folha de cálculo (xls, xlsx...), mas a extensão de ficheiro não é consistente: %1",
"DE.ApplicationController.errorLoadingFont": "Tipos de letra não carregados.<br>Por favor contacte o administrador do servidor de documentos.",
"DE.ApplicationController.errorSubmit": "Falha ao submeter.",
"DE.ApplicationController.errorTokenExpire": "O 'token' de segurança do documento expirou.<br>Entre em contacto com o administrador do servidor de documentos.",
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "A ligação foi restaurada e a versão do ficheiro foi alterada.<br>Antes de poder continuar a trabalhar, é necessário descarregar o ficheiro ou copiar o seu conteúdo para garantir que nada se perde e depois voltar a carregar esta página.",
"DE.ApplicationController.errorTokenExpire": "O 'token' de segurança do documento expirou.<br>Contacte o administrador do servidor de documentos.",
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "A ligação foi restaurada e a versão do ficheiro alterada.<br>Antes de poder trabalhar, tem que descarregar o ficheiro ou copiar o seu conteúdo para garantir que nada se perde e, depois, recarregue esta página.",
"DE.ApplicationController.errorUserDrop": "De momento, não é possível aceder ao ficheiro.",
"DE.ApplicationController.notcriticalErrorTitle": "Aviso",
"DE.ApplicationController.openErrorText": "Ocorreu um erro ao abrir o ficheiro.",
Expand All @@ -37,7 +37,7 @@
"DE.ApplicationController.textLoadingDocument": "A carregar documento",
"DE.ApplicationController.textNext": "Campo seguinte",
"DE.ApplicationController.textOf": "de",
"DE.ApplicationController.textRequired": "Preencha todos os campos obrigatório para submeter o formulário.",
"DE.ApplicationController.textRequired": "Preencha todos os campos obrigatório para enviar o formulário.",
"DE.ApplicationController.textSubmit": "Submeter",
"DE.ApplicationController.textSubmited": "<b>Formulário submetido com sucesso</b><br>Clique para fechar a dica",
"DE.ApplicationController.txtClose": "Fechar",
Expand Down
Loading

0 comments on commit 1e0cc82

Please sign in to comment.