Merge pull request #1377 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2021-12-06 09:49:43 +03:00 committed by GitHub
commit 1d646849a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 21 deletions

View file

@ -18,6 +18,15 @@
}
}
.settings-about-logo {
display: flex;
justify-content: center;
img {
max-width: 100%;
height: auto;
}
}
h3 {
font-weight: normal;
margin: 0;

View file

@ -19,7 +19,6 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
const onError = (id, level, errData) => {
const api = Common.EditorApi.get();
api.asc_enableKeyEvents(false);
if (id === Asc.c_oAscError.ID.LoadingScriptError) {
f7.notification.create({
@ -357,10 +356,7 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
buttons: [
{
text: 'OK',
onClick: () => {
api.asc_enableKeyEvents(true);
config.callback;
}
onClick: () => config.callback
}
]
}).open();

View file

@ -223,12 +223,15 @@ const LongActionsController = () => {
onClick: () => {
let password = document.getElementById('modal-password').value;
if(apiCallback) {
apiCallback(true ? api.asc_checkProtectedRangesPassword(password, data) : false, false);
api.asc_checkProtectedRangesPassword(password, data, (res) => {
apiCallback(res, false);
});
}
}
},
{
text: t('LongActions.textCancel')
text: t('LongActions.textCancel'),
onClick: () => apiCallback(false, true)
}
]
}).open();

View file

@ -17,6 +17,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
const storeFocusObjects = props.storeFocusObjects;
const focusOn = storeFocusObjects.focusOn;
const isObjectLocked = storeFocusObjects.isLocked;
const isShapeLocked = storeFocusObjects.isLockedShape;
const isEditCell = storeFocusObjects.isEditCell;
const editFormulaMode = storeFocusObjects.editFormulaMode;
@ -159,6 +160,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn
isDisconnected={isDisconnected}
wsProps={wsProps}
focusOn={focusOn}
isShapeLocked={isShapeLocked}
/>
)
}));

View file

@ -15,6 +15,8 @@ export class storeFocusObjects {
imageObject: computed,
chartObject: computed,
isLocked: observable,
isLockedText: observable,
isLockedShape: observable,
setIsLocked: action,
editFormulaMode: observable,
setEditFormulaMode: action,
@ -89,9 +91,14 @@ export class storeFocusObjects {
}
isLocked = false;
isLockedShape = false;
isLockedText = false;
setIsLocked(info) {
let islocked = false;
let isLocked = false,
isLockedShape = false,
isLockedText = false;
switch (info.asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeChart:
case Asc.c_oAscSelectionType.RangeImage:
@ -101,15 +108,19 @@ export class storeFocusObjects {
const objects = Common.EditorApi.get().asc_getGraphicObjectProps();
for ( let i in objects ) {
if ( objects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image ) {
if ((islocked = objects[i].asc_getObjectValue().asc_getLocked()))
break;
isLocked = objects[i].asc_getObjectValue().asc_getLocked();
isLockedShape = objects[i].asc_getObjectValue().asc_getProtectionLocked();
isLockedText = objects[i].asc_getObjectValue().asc_getProtectionLockText();
break;
}
}
break;
default:
islocked = info.asc_getLocked();
this.isLocked = info.asc_getLocked();
}
this.isLocked = islocked;
this.isLocked = isLocked;
this.isLockedShape = isLockedShape;
this.isLockedText = isLockedText;
}
editFormulaMode = false;

View file

@ -109,7 +109,7 @@ const CellEditorView = props => {
</div>
<div className="ce-group group--content" style={contentStyle}>
<div id="idx-list-target" className="target-function-list"></div>
<textarea id="idx-cell-content" spellCheck="false" onFocus={(e) => {wsLock && e.target.blur()}}/>
<textarea id="idx-cell-content" spellCheck="false"/>
</div>
<div className="ce-group">
<Link icon="caret" onClick={expandClick} />

View file

@ -7,6 +7,7 @@ const ToolbarView = props => {
const isDisconnected = props.isDisconnected;
const wsProps = props.wsProps;
const focusOn = props.focusOn;
const isShapeLocked = props.isShapeLocked;
const undo_box = props.isEdit && EditorUIController.toolbarOptions ? EditorUIController.toolbarOptions.getUndoRedo({
disabledUndo: !props.isCanUndo || isDisconnected,
disabledRedo: !props.isCanRedo || isDisconnected,
@ -30,6 +31,7 @@ const ToolbarView = props => {
disabled: props.disabledEditControls || props.disabledControls || isDisconnected,
wsProps,
focusOn,
isShapeLocked,
onEditClick: () => props.openOptions('edit'),
onAddClick: () => props.openOptions('add')
})}

View file

@ -333,7 +333,6 @@ const EditTabs = props => {
const { t } = useTranslation();
const _t = t('View.Edit', {returnObjects: true});
const store = props.storeFocusObjects;
const wsLock = props.wsLock;
const wsProps = props.wsProps;
const settings = !store.focusOn ? [] : (store.focusOn === 'obj' ? store.objects : store.selections);
let editors = [];
@ -351,14 +350,14 @@ const EditTabs = props => {
component: <EditCellController />
})
}
if (!store.isLockedShape && settings.indexOf('shape') > -1) {
editors.push({
caption: _t.textShape,
id: 'edit-shape',
component: <EditShapeController />
})
}
if(!wsProps.Objects) {
if (settings.indexOf('shape') > -1) {
editors.push({
caption: _t.textShape,
id: 'edit-shape',
component: <EditShapeController />
})
}
if (settings.indexOf('image') > -1) {
editors.push({
caption: _t.textImage,