diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js
index 19f32f884..4eaf9b218 100644
--- a/apps/api/documents/api.js
+++ b/apps/api/documents/api.js
@@ -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
diff --git a/apps/common/main/lib/component/ComboDataView.js b/apps/common/main/lib/component/ComboDataView.js
index ee482b9e7..7bd9bdc5b 100644
--- a/apps/common/main/lib/component/ComboDataView.js
+++ b/apps/common/main/lib/component/ComboDataView.js
@@ -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();
diff --git a/apps/common/main/resources/less/combo-dataview.less b/apps/common/main/resources/less/combo-dataview.less
index 65a02ee28..ff16ee109 100644
--- a/apps/common/main/resources/less/combo-dataview.less
+++ b/apps/common/main/resources/less/combo-dataview.less
@@ -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;
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index fac43e2b1..38b419858 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -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();
}
diff --git a/apps/documenteditor/main/app/controller/PageLayout.js b/apps/documenteditor/main/app/controller/PageLayout.js
index 222538d4a..06c3a6bdd 100644
--- a/apps/documenteditor/main/app/controller/PageLayout.js
+++ b/apps/documenteditor/main/app/controller/PageLayout.js
@@ -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,
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 9345674eb..8747ee8dd 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -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) {
diff --git a/apps/documenteditor/main/app/controller/ViewTab.js b/apps/documenteditor/main/app/controller/ViewTab.js
index 4f8128f23..0e544b79b 100644
--- a/apps/documenteditor/main/app/controller/ViewTab.js
+++ b/apps/documenteditor/main/app/controller/ViewTab.js
@@ -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'),
diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js
index a375cc8ed..469e35668 100644
--- a/apps/documenteditor/main/app/controller/Viewport.js
+++ b/apps/documenteditor/main/app/controller/Viewport.js
@@ -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({
diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template
index 196330558..32f4fe63d 100644
--- a/apps/documenteditor/main/app/template/Toolbar.template
+++ b/apps/documenteditor/main/app/template/Toolbar.template
@@ -202,14 +202,14 @@
-
+
diff --git a/apps/documenteditor/main/app/template/Viewport.template b/apps/documenteditor/main/app/template/Viewport.template
index c407ba7a5..d18c97b98 100644
--- a/apps/documenteditor/main/app/template/Viewport.template
+++ b/apps/documenteditor/main/app/template/Viewport.template
@@ -4,7 +4,7 @@
-
+
-
+
diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js
index a9b03c443..79bd02b9c 100644
--- a/apps/documenteditor/main/app/view/DocumentHolder.js
+++ b/apps/documenteditor/main/app/view/DocumentHolder.js
@@ -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';
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js
index 11d3be5d7..a3642b8ce 100644
--- a/apps/documenteditor/main/app/view/Toolbar.js
+++ b/apps/documenteditor/main/app/view/Toolbar.js
@@ -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',
diff --git a/apps/documenteditor/main/app/view/ViewTab.js b/apps/documenteditor/main/app/view/ViewTab.js
index ce54da4e9..ed1636b24 100644
--- a/apps/documenteditor/main/app/view/ViewTab.js
+++ b/apps/documenteditor/main/app/view/ViewTab.js
@@ -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) {
diff --git a/apps/documenteditor/mobile/src/controller/Error.jsx b/apps/documenteditor/mobile/src/controller/Error.jsx
index 7a9f49a26..16eca5427 100644
--- a/apps/documenteditor/mobile/src/controller/Error.jsx
+++ b/apps/documenteditor/mobile/src/controller/Error.jsx
@@ -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,
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index aa78778e4..72428694d 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -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();
}
diff --git a/apps/presentationeditor/main/app/controller/ViewTab.js b/apps/presentationeditor/main/app/controller/ViewTab.js
index bfd39f5fc..9fedc8a61 100644
--- a/apps/presentationeditor/main/app/controller/ViewTab.js
+++ b/apps/presentationeditor/main/app/controller/ViewTab.js
@@ -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'),
diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js
index 4cecb100f..b79d21b1d 100644
--- a/apps/presentationeditor/main/app/controller/Viewport.js
+++ b/apps/presentationeditor/main/app/controller/Viewport.js
@@ -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({
diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template
index 94900bc54..e04dd86b9 100644
--- a/apps/presentationeditor/main/app/template/Toolbar.template
+++ b/apps/presentationeditor/main/app/template/Toolbar.template
@@ -211,10 +211,10 @@
diff --git a/apps/presentationeditor/main/app/template/Viewport.template b/apps/presentationeditor/main/app/template/Viewport.template
index 8f80302b9..14dff927e 100644
--- a/apps/presentationeditor/main/app/template/Viewport.template
+++ b/apps/presentationeditor/main/app/template/Viewport.template
@@ -5,7 +5,7 @@
diff --git a/apps/presentationeditor/main/app/view/Animation.js b/apps/presentationeditor/main/app/view/Animation.js
index 245bffd35..3018af9fb 100644
--- a/apps/presentationeditor/main/app/view/Animation.js
+++ b/apps/presentationeditor/main/app/view/Animation.js
@@ -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({
diff --git a/apps/presentationeditor/main/app/view/Transitions.js b/apps/presentationeditor/main/app/view/Transitions.js
index 22bee8463..e48dc56a4 100644
--- a/apps/presentationeditor/main/app/view/Transitions.js
+++ b/apps/presentationeditor/main/app/view/Transitions.js
@@ -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',
diff --git a/apps/presentationeditor/main/resources/less/animation.less b/apps/presentationeditor/main/resources/less/animation.less
index 57e81dce9..1beca9c3b 100644
--- a/apps/presentationeditor/main/resources/less/animation.less
+++ b/apps/presentationeditor/main/resources/less/animation.less
@@ -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);
+ }
}
}
}
\ No newline at end of file
diff --git a/apps/presentationeditor/main/resources/less/app.less b/apps/presentationeditor/main/resources/less/app.less
index 8d5db8d30..b681f127c 100644
--- a/apps/presentationeditor/main/resources/less/app.less
+++ b/apps/presentationeditor/main/resources/less/app.less
@@ -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";
diff --git a/apps/presentationeditor/main/resources/less/transitions.less b/apps/presentationeditor/main/resources/less/transitions.less
deleted file mode 100644
index 1623fd2ef..000000000
--- a/apps/presentationeditor/main/resources/less/transitions.less
+++ /dev/null
@@ -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;
- }
- }
-}
\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/src/controller/Error.jsx b/apps/presentationeditor/mobile/src/controller/Error.jsx
index e2784d2c7..839dd126b 100644
--- a/apps/presentationeditor/mobile/src/controller/Error.jsx
+++ b/apps/presentationeditor/mobile/src/controller/Error.jsx
@@ -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,
diff --git a/apps/spreadsheeteditor/embed/index.html b/apps/spreadsheeteditor/embed/index.html
index 15dc7afa4..94cf225af 100644
--- a/apps/spreadsheeteditor/embed/index.html
+++ b/apps/spreadsheeteditor/embed/index.html
@@ -74,7 +74,7 @@
font-size: 0;
border: 1px solid #dfdfdf;
white-space: nowrap;
- padding-top: 48px;
+ padding-top: 28px;
}
.loadmask > .placeholder > .columns {
diff --git a/apps/spreadsheeteditor/embed/index.html.deploy b/apps/spreadsheeteditor/embed/index.html.deploy
index c7d4f973a..eb9dbabea 100644
--- a/apps/spreadsheeteditor/embed/index.html.deploy
+++ b/apps/spreadsheeteditor/embed/index.html.deploy
@@ -71,7 +71,7 @@
font-size: 0;
border: 1px solid #dfdfdf;
white-space: nowrap;
- padding-top: 48px;
+ padding-top: 28px;
}
.loadmask > .placeholder > .columns {
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index 48e5cf103..15e20d05f 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -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();
}
diff --git a/apps/spreadsheeteditor/main/app/controller/ViewTab.js b/apps/spreadsheeteditor/main/app/controller/ViewTab.js
index bac0719d4..09d045e0b 100644
--- a/apps/spreadsheeteditor/main/app/controller/ViewTab.js
+++ b/apps/spreadsheeteditor/main/app/controller/ViewTab.js
@@ -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),
diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js
index 551281f55..171cbf229 100644
--- a/apps/spreadsheeteditor/main/app/controller/Viewport.js
+++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js
@@ -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,
diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template
index 5faa336fb..b4701806e 100644
--- a/apps/spreadsheeteditor/main/app/template/Toolbar.template
+++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template
@@ -294,10 +294,10 @@
diff --git a/apps/spreadsheeteditor/main/app/template/Viewport.template b/apps/spreadsheeteditor/main/app/template/Viewport.template
index 3104c7962..9f4c6db7a 100644
--- a/apps/spreadsheeteditor/main/app/template/Viewport.template
+++ b/apps/spreadsheeteditor/main/app/template/Viewport.template
@@ -4,7 +4,7 @@
-
+
-
+
diff --git a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx
index 9b5c0deee..94f05d1c3 100644
--- a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx
+++ b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx
@@ -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) {