Merge branch 'release/v7.1.0' into develop

This commit is contained in:
Julia Radzhabova 2022-01-13 17:47:19 +03:00
commit b5a19477b1
33 changed files with 159 additions and 112 deletions

View file

@ -165,7 +165,7 @@
navigation: false/true // navigation button in de
} / false / true, // view tab
save: false/true // save button on toolbar in
},
} / false / true, // use instead of customization.toolbar,
header: {
users: false/true // users list button
save: false/true // save button
@ -179,7 +179,7 @@
textLang: false/true // text language button in de/pe
docLang: false/true // document language button in de/pe
actionStatus: false/true // status of operation
}
} / false / true, // use instead of customization.statusBar
},
features: { // disable feature
spellcheck: {
@ -194,8 +194,8 @@
leftMenu: true, // must be deprecated. use layout.leftMenu instead
rightMenu: true, // must be deprecated. use layout.rightMenu instead
hideRightMenu: false, // hide or show right panel on first loading
toolbar: true,
statusBar: true,
toolbar: true, // must be deprecated. use layout.toolbar instead
statusBar: true, // must be deprecated. use layout.statusBar instead
autosave: true,
forcesave: false,
commentAuthorOnly: false, // must be deprecated. use permissions.editCommentAuthorOnly and permissions.deleteCommentAuthorOnly instead

View file

@ -255,6 +255,7 @@ define([
var picker = this.menuPicker;
if (picker) {
var record = picker.getSelectedRec();
this.itemMarginLeft = undefined;
this.fillComboView(record || picker.store.at(0), !!record, true);
picker.onResize();

View file

@ -383,10 +383,20 @@
height: @combo-dataview-height-calc;
}
.item {
.item, .menu-picker-container .dataview .group-items-container .item {
padding: 0px;
margin: @combo-dataview-item-margins 0 0 @combo-dataview-item-margins;
margin: @combo-dataview-item-margins;
.box-shadow(none);
&:hover {
.box-shadow(0 0 0 2px @border-preview-hover-ie);
.box-shadow(0 0 0 @scaled-two-px-value @border-preview-hover);
}
&.selected {
.box-shadow(0 0 0 2px @border-preview-select-ie);
.box-shadow(0 0 0 @scaled-two-px-value @border-preview-select);
}
}
.menu-picker-container {
@ -396,8 +406,6 @@
}
.group-items-container .item {
box-shadow: none;
margin: @scaled-two-px-value 0 0 @scaled-two-px-value;
&:last-child {
margin-bottom: @combo-dataview-item-margins;
}
@ -429,11 +437,10 @@
width: @x-huge-btn-icon-size;
height: @x-huge-btn-icon-size;
min-width: 0;
margin-top: -2px;
}
.caption{
line-height: 18px;
line-height: 12px;
font-size: 11px;
text-overflow: ellipsis;
overflow: hidden;

View file

@ -2084,6 +2084,10 @@ define([
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.rightMenu!==undefined)
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.statusBar!==undefined)
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.toolbar!==undefined)
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
}
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
}

View file

@ -107,12 +107,12 @@ define([
switch ( type ) {
case Asc.c_oAscWrapStyle2.Inline: menu.items[0].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Square: menu.items[1].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Tight: menu.items[2].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Through: menu.items[3].setChecked(true); break;
case Asc.c_oAscWrapStyle2.TopAndBottom: menu.items[4].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Behind: menu.items[6].setChecked(true); break;
case Asc.c_oAscWrapStyle2.InFront: menu.items[5].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Square: menu.items[2].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Tight: menu.items[3].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Through: menu.items[4].setChecked(true); break;
case Asc.c_oAscWrapStyle2.TopAndBottom: menu.items[5].setChecked(true); break;
case Asc.c_oAscWrapStyle2.Behind: menu.items[8].setChecked(true); break;
case Asc.c_oAscWrapStyle2.InFront: menu.items[7].setChecked(true); break;
default:
for (var i in menu.items) {
menu.items[i].setChecked( false );
@ -140,7 +140,7 @@ define([
_.each(me.toolbar.btnImgWrapping.menu.items, function(item) {
item.setDisabled(notflow);
});
me.toolbar.btnImgWrapping.menu.items[8].setDisabled(!me.api.CanChangeWrapPolygon());
me.toolbar.btnImgWrapping.menu.items[10].setDisabled(!me.api.CanChangeWrapPolygon());
var control_props = me.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,

View file

@ -2910,6 +2910,7 @@ define([
this.toolbar.btnRedo.setDisabled(this._state.can_redo!==true);
this.toolbar.btnCopy.setDisabled(this._state.can_copycut!==true);
this.toolbar.btnPrint.setDisabled(!this.toolbar.mode.canPrint);
this.toolbar.btnDarkDocument && this.toolbar.btnDarkDocument.setDisabled(!Common.UI.Themes.isDarkTheme());
if (!this._state.mmdisable) {
this.toolbar.btnMailRecepients.setDisabled(false);
this.toolbar.mnuMailRecepients.items[2].setVisible(this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients);
@ -3241,6 +3242,7 @@ define([
var viewtab = me.getApplication().getController('ViewTab');
viewtab.setApi(me.api).setConfig({toolbar: me, mode: config});
Array.prototype.push.apply(me.toolbar.toolbarControls, viewtab.getView('ViewTab').getButtons());
me.toolbar.btnDarkDocument = viewtab.getView('ViewTab').btnDarkDocument;
}
if ( config.isEdit && config.canFeatureContentControl && config.canFeatureForms || config.isRestrictedEdit && config.canFillForms ) {
if (config.isFormCreator) {

View file

@ -72,12 +72,22 @@ define([
},
setConfig: function(config) {
var mode = config.mode;
this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode,
mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
var slotChkRulers = this.view.chRulers.$el,
groupRulers = slotChkRulers.closest('.group'),
groupToolbar = this.view.chToolbar.$el.closest('.group');
groupToolbar.find('.elset')[1].append(slotChkRulers[0]);
groupRulers.remove();
this.view.cmpEl.find('.separator-rulers').remove();
}
this.addListeners({
'ViewTab': {
'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'),

View file

@ -171,7 +171,7 @@ define([
var _intvars = Common.Utils.InternalSettings;
var $filemenu = $('.toolbar-fullview-panel');
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
@ -205,7 +205,7 @@ define([
_intvars.set('toolbar-height-compact', _tabs_new_height);
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
toolbar = me.getApplication().getController('Toolbar').getView();
toolbar.btnCollabChanges = me.header.btnSave;
@ -246,7 +246,7 @@ define([
value: 'statusbar'
});
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
me.header.mnuitemHideStatusBar.hide();
me.header.mnuitemHideRulers = new Common.UI.MenuItem({

View file

@ -202,14 +202,14 @@
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="separator long"></div>
</div>
<div class="separator long separator-rulers"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-rulers"></span>

View file

@ -4,7 +4,7 @@
<div id="file-menu-panel" class="toolbar-fullview-panel hint-section" style="display:none;"></div>
</section>
<section id="app-title" class="layout-item"></section>
<div id="toolbar" class="layout-item hint-section"></div>
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
<div class="layout-item middle">
<div id="viewport-hbox-layout" class="layout-ct hbox">
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
@ -14,6 +14,6 @@
<div id="left-panel-history" class="layout-item"></div>
</div>
</div>
<div id="statusbar" class="layout-item"></div>
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
</div>
</div>

View file

@ -1637,22 +1637,22 @@ define([
this.menuImageWrap.menu.items[0].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.Square:
this.menuImageWrap.menu.items[1].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.Tight:
this.menuImageWrap.menu.items[2].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.Through:
case Asc.c_oAscWrapStyle2.Tight:
this.menuImageWrap.menu.items[3].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.TopAndBottom:
case Asc.c_oAscWrapStyle2.Through:
this.menuImageWrap.menu.items[4].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.TopAndBottom:
this.menuImageWrap.menu.items[5].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.Behind:
this.menuImageWrap.menu.items[6].setChecked(true);
this.menuImageWrap.menu.items[8].setChecked(true);
break;
case Asc.c_oAscWrapStyle2.InFront:
this.menuImageWrap.menu.items[5].setChecked(true);
this.menuImageWrap.menu.items[7].setChecked(true);
break;
}
},
@ -2329,6 +2329,7 @@ define([
checkmark : false,
checkable : true
}).on('click', onItemClick),
{ caption: '--' },
new Common.UI.MenuItem({
caption : me.txtSquare,
iconCls : 'menu__icon wrap-square',
@ -2361,6 +2362,7 @@ define([
checkmark : false,
checkable : true
}).on('click', onItemClick),
{ caption: '--' },
new Common.UI.MenuItem({
caption : me.txtInFront,
iconCls : 'menu__icon wrap-infront',
@ -2616,7 +2618,7 @@ define([
var cls = 'menu__icon ';
if (notflow) {
for (var i = 0; i < 6; i++) {
for (var i = 0; i < 8; i++) {
me.menuImageWrap.menu.items[i].setChecked(false);
}
cls += 'wrap-inline';
@ -2627,31 +2629,31 @@ define([
cls += 'wrap-inline';
break;
case Asc.c_oAscWrapStyle2.Square:
me.menuImageWrap.menu.items[1].setChecked(true);
me.menuImageWrap.menu.items[2].setChecked(true);
cls += 'wrap-square';
break;
case Asc.c_oAscWrapStyle2.Tight:
me.menuImageWrap.menu.items[2].setChecked(true);
me.menuImageWrap.menu.items[3].setChecked(true);
cls += 'wrap-tight';
break;
case Asc.c_oAscWrapStyle2.Through:
me.menuImageWrap.menu.items[3].setChecked(true);
me.menuImageWrap.menu.items[4].setChecked(true);
cls += 'wrap-through';
break;
case Asc.c_oAscWrapStyle2.TopAndBottom:
me.menuImageWrap.menu.items[4].setChecked(true);
me.menuImageWrap.menu.items[5].setChecked(true);
cls += 'wrap-topandbottom';
break;
case Asc.c_oAscWrapStyle2.Behind:
me.menuImageWrap.menu.items[6].setChecked(true);
me.menuImageWrap.menu.items[8].setChecked(true);
cls += 'wrap-behind';
break;
case Asc.c_oAscWrapStyle2.InFront:
me.menuImageWrap.menu.items[5].setChecked(true);
me.menuImageWrap.menu.items[7].setChecked(true);
cls += 'wrap-infront';
break;
default:
for (var i = 0; i < 6; i++) {
for (var i = 0; i < 8; i++) {
me.menuImageWrap.menu.items[i].setChecked(false);
}
cls += 'wrap-infront';

View file

@ -1720,7 +1720,9 @@ define([
wrapType : Asc.c_oAscWrapStyle2.Inline,
checkmark : false,
checkable : true
}, {
},
{ caption: '--' },
{
caption : _holder_view.txtSquare,
iconCls : 'menu__icon wrap-square',
toggleGroup : 'imgwrapping',
@ -1748,7 +1750,9 @@ define([
wrapType : Asc.c_oAscWrapStyle2.TopAndBottom,
checkmark : false,
checkable : true
}, {
},
{ caption: '--' },
{
caption : _holder_view.txtInFront,
iconCls : 'menu__icon wrap-infront',
toggleGroup : 'imgwrapping',

View file

@ -178,7 +178,6 @@ define([
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
this.lockedControls.push(this.btnDarkDocument);
this.chStatusbar = new Common.UI.CheckBox({
el: $host.findById('#slot-chk-statusbar'),
@ -212,6 +211,8 @@ define([
dataHintOffset: 'small'
});
this.lockedControls.push(this.chRulers);
this.cmpEl = $host;
},
render: function (el) {
@ -235,6 +236,7 @@ define([
button.setDisabled(state);
}
}, this);
this.btnDarkDocument && this.btnDarkDocument.setDisabled(state);
},
turnNavigation: function (state) {

View file

@ -4,20 +4,25 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
Common.Notifications.on('engineCreated', (api) => {
api.asc_registerCallback('asc_onError', onError);
});
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
const api = Common.EditorApi.get();
if ( !api ) Common.Notifications.on('engineCreated', on_engine_created);
else on_engine_created(api);
return () => {
const api = Common.EditorApi.get();
if ( api ) api.asc_unregisterCallback('asc_onError', onError);
Common.Notifications.off('engineCreated', on_engine_created);
}
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
if (id === Asc.c_oAscError.ID.LoadingScriptError) {
f7.notification.create({
title: _t.criticalErrorTitle,

View file

@ -1720,6 +1720,10 @@ define([
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.rightMenu!==undefined)
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.statusBar!==undefined)
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.toolbar!==undefined)
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
}
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
}

View file

@ -74,12 +74,16 @@ define([
},
setConfig: function(config) {
var mode = config.mode;
this.toolbar = config.toolbar;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode,
mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
}
this.addListeners({
'ViewTab': {
'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'),

View file

@ -181,7 +181,7 @@ define([
var _intvars = Common.Utils.InternalSettings;
var $filemenu = $('.toolbar-fullview-panel');
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
@ -206,7 +206,7 @@ define([
_intvars.set('toolbar-height-compact', _tabs_new_height);
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
toolbar = me.getApplication().getController('Toolbar').getView('Toolbar');
toolbar.btnCollabChanges = me.header.btnSave;
@ -255,7 +255,7 @@ define([
value: 'statusbar'
});
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false )
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
me.header.mnuitemHideStatusBar.hide();
me.header.mnuitemHideRulers = new Common.UI.MenuItem({

View file

@ -211,10 +211,10 @@
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
</div>
</section>

View file

@ -5,7 +5,7 @@
</section>
<div id="viewport-vbox-layout" class="layout-ct vbox">
<section id="app-title" class="layout-item"></section>
<div id="toolbar" class="layout-item hint-section"></div>
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
<div class="layout-item middle">
<div id="viewport-hbox-layout" class="layout-ct hbox">
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
@ -15,6 +15,6 @@
<div id="left-panel-history" class="layout-item"></div>
</div>
</div>
<div id="statusbar" class="layout-item"></div>
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
</div>
</div>

View file

@ -161,7 +161,7 @@ define([
this._arrEffectName = [{group:'none', value: AscFormat.ANIM_PRESET_NONE, iconCls: 'animation-none', displayValue: this.textNone}].concat(Common.define.effectData.getEffectData());
_.forEach(this._arrEffectName,function (elm){elm.tip = elm.displayValue;});
this._arrEffectOptions = [];
var itemWidth = 87,
var itemWidth = 88,
itemHeight = 40;
this.listEffectsMore = new Common.UI.MenuItem({
caption: this.textMoreEffects
@ -416,7 +416,7 @@ define([
]
}));
var itemWidth = 87,
var itemWidth = 88,
itemHeight = 40;
var onShowBefore = function(menu) {
var picker = new Common.UI.DataView({

View file

@ -136,7 +136,7 @@ define([
item.tip = item.title;
});
var itemWidth = 87,
var itemWidth = 88,
itemHeight = 40;
this.listEffects = new Common.UI.ComboDataView({
cls: 'combo-transitions',

View file

@ -15,15 +15,25 @@
font-weight: bold;
}
.group-items-container {
.grouped-data .group-items-container {
float: left;
position: relative;
.item {
box-shadow: none;
margin: @scaled-two-px-value 0 0 @scaled-two-px-value;
margin: @scaled-two-px-value;
&:last-child {
margin-bottom: @scaled-two-px-value;
}
&:hover {
.box-shadow(0 0 0 2px @border-preview-hover-ie);
.box-shadow(0 0 0 @scaled-two-px-value @border-preview-hover);
}
&.selected {
.box-shadow(0 0 0 2px @border-preview-select-ie);
.box-shadow(0 0 0 @scaled-two-px-value @border-preview-select);
}
}
}
}

View file

@ -132,7 +132,6 @@
@import "rightmenu.less";
@import "advanced-settings.less";
@import "document-preview.less";
@import "transitions.less";
@import "animation.less";
@import "sprites/iconssmall@1x";

View file

@ -1,26 +0,0 @@
.combo-transitions {
.btn_item {
color: @text-normal-ie;
color: @text-normal;
display: inline-flex;
flex-direction: column;
align-items: center;
.icon:not(svg) {
width: @x-huge-btn-icon-size;
height: @x-huge-btn-icon-size;
min-width: 0;
margin-top: -2px;
}
.caption{
line-height: normal;
font-size: 11px;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
text-align: center;
padding: 0 2px;
}
}
}

View file

@ -4,20 +4,25 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
Common.Notifications.on('engineCreated', (api) => {
api.asc_registerCallback('asc_onError', onError);
});
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
const api = Common.EditorApi.get();
if ( !api ) Common.Notifications.on('engineCreated', on_engine_created);
else on_engine_created(api);
return () => {
const api = Common.EditorApi.get();
if ( api ) api.asc_unregisterCallback('asc_onError', onError);
Common.Notifications.off('engineCreated', on_engine_created);
}
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
if (id === Asc.c_oAscError.ID.LoadingScriptError) {
f7.notification.create({
title: _t.criticalErrorTitle,

View file

@ -74,7 +74,7 @@
font-size: 0;
border: 1px solid #dfdfdf;
white-space: nowrap;
padding-top: 48px;
padding-top: 28px;
}
.loadmask > .placeholder > .columns {

View file

@ -71,7 +71,7 @@
font-size: 0;
border: 1px solid #dfdfdf;
white-space: nowrap;
padding-top: 48px;
padding-top: 28px;
}
.loadmask > .placeholder > .columns {

View file

@ -2090,6 +2090,10 @@ define([
console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.rightMenu!==undefined)
console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.statusBar!==undefined)
console.log("Obsolete: The 'statusBar' parameter of the 'customization' section is deprecated. Please use 'statusBar' parameter in the 'customization.layout' section instead.");
if (this.appOptions.customization.toolbar!==undefined)
console.log("Obsolete: The 'toolbar' parameter of the 'customization' section is deprecated. Please use 'toolbar' parameter in the 'customization.layout' section instead.");
}
promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization();
}

View file

@ -78,11 +78,15 @@ define([
setConfig: function(config) {
this.toolbar = config.toolbar;
var mode = config.mode;
this.view = this.createView('ViewTab', {
toolbar: this.toolbar.toolbar,
mode: config.mode,
mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView
});
if (mode.canBrandingExt && mode.customization && mode.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
this.view.chStatusbar.$el.remove();
}
this.addListeners({
'ViewTab': {
'zoom:selected': _.bind(this.onSelectedZoomValue, this),

View file

@ -152,7 +152,7 @@ define([
var _intvars = Common.Utils.InternalSettings;
var $filemenu = $('.toolbar-fullview-panel');
$filemenu.css('top', _intvars.get('toolbar-height-tabs'));
$filemenu.css('top', Common.UI.LayoutManager.isElementVisible('toolbar') ? _intvars.get('toolbar-height-tabs') : 0);
me.viewport.$el.attr('applang', me.appConfig.lang.split(/[\-_]/)[0]);
@ -180,7 +180,7 @@ define([
_intvars.set('toolbar-height-compact', _tabs_new_height);
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
$filemenu.css('top', (Common.UI.LayoutManager.isElementVisible('toolbar') ? _tabs_new_height : 0) + _intvars.get('document-title-height'));
}
if ( config.customization ) {
@ -225,6 +225,8 @@ define([
checkable: true,
value: 'statusbar'
});
if ( config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar'))
me.header.mnuitemCompactStatusBar.hide();
me.header.mnuitemHideFormulaBar = new Common.UI.MenuItem({
caption : me.textHideFBar,

View file

@ -293,12 +293,12 @@
</div>
<div class="separator long"></div>
<div class="group small">
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-toolbar"></span>
</div>
<div class="elset">
<span class="btn-slot text" id="slot-chk-statusbar"></span>
</div>
</div>
</section>
</section>

View file

@ -4,7 +4,7 @@
<div id="file-menu-panel" class="toolbar-fullview-panel hint-section" style="display:none;"></div>
</section>
<section id="app-title" class="layout-item"></section>
<div id="toolbar" class="layout-item hint-section"></div>
<div id="toolbar" class="layout-item hint-section" data-layout-name="toolbar"></div>
<div class="layout-item">
<div id="viewport-hbox-layout" class="layout-ct hbox">
<div id="left-menu" class="layout-item hint-section" data-layout-name="leftMenu" style="width: 40px;"></div>
@ -19,6 +19,6 @@
<div id="left-panel-history" class="layout-item hint-section"></div>
</div>
</div>
<div id="statusbar" class="layout-item"></div>
<div id="statusbar" class="layout-item" data-layout-name="statusBar"></div>
</div>
</div>

View file

@ -4,20 +4,24 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
Common.Notifications.on('engineCreated', (api) => {
api.asc_registerCallback('asc_onError', onError);
});
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
const api = Common.EditorApi.get();
if ( !api ) Common.Notifications.on('engineCreated', on_engine_created);
else on_engine_created(api);
return () => {
const api = Common.EditorApi.get();
if ( api ) api.asc_unregisterCallback('asc_onError', onError);
Common.Notifications.off('engineCreated', on_engine_created);
}
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
const api = Common.EditorApi.get();
if (id === Asc.c_oAscError.ID.LoadingScriptError) {