Merge pull request #1275 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
e6e7638053
|
@ -160,7 +160,9 @@ const Collaboration = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed ) props.onclosed();
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -522,6 +522,14 @@ class MainController extends Component {
|
|||
this.api.Resize();
|
||||
});
|
||||
|
||||
$$(window).on('popover:open popup:open sheet:open actions:open', () => {
|
||||
this.api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$$(window).on('popover:close popup:close sheet:close actions:close', () => {
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
|
||||
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));
|
||||
this.api.asc_registerCallback('asc_onDocumentName', this.onDocumentName.bind(this));
|
||||
|
|
|
@ -225,8 +225,9 @@ const Add = props => {
|
|||
}
|
||||
});
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
return <AddView usePopover={!Device.phone} onclosed={onviewclosed} showPanels={props.showOptions} />
|
||||
};
|
||||
|
|
|
@ -339,8 +339,9 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -84,9 +84,6 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
|||
await props.openOptions('coauth');
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
});
|
||||
|
||||
// set mode
|
||||
const appOptions = props.storeAppOptions;
|
||||
let _isEdit = false,
|
||||
|
|
|
@ -297,6 +297,14 @@ class MainController extends Component {
|
|||
this.api.Resize();
|
||||
});
|
||||
|
||||
$$(window).on('popover:open popup:open sheet:open actions:open', () => {
|
||||
this.api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$$(window).on('popover:close popup:close sheet:close actions:close', () => {
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
this.api.asc_registerCallback('asc_onDocumentContentReady', this.onDocumentContentReady.bind(this));
|
||||
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
|
||||
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));
|
||||
|
|
|
@ -162,8 +162,9 @@ const Add = props => {
|
|||
}
|
||||
});
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
return <AddView usePopover={!Device.phone} onclosed={onviewclosed} showPanels={props.showOptions} />
|
||||
};
|
||||
|
|
|
@ -360,8 +360,9 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -199,8 +199,9 @@ const Settings = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if (props.onclosed)
|
||||
if (props.onclosed) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} openOptions={props.openOptions} />
|
||||
|
|
|
@ -336,6 +336,14 @@ class MainController extends Component {
|
|||
this.api.asc_Resize();
|
||||
});
|
||||
|
||||
$$(window).on('popover:open popup:open sheet:open actions:open', () => {
|
||||
this.api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$$(window).on('popover:close popup:close sheet:close actions:close', () => {
|
||||
this.api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
this.api.asc_registerCallback('asc_onDocumentUpdateVersion', this.onUpdateVersion.bind(this));
|
||||
this.api.asc_registerCallback('asc_onServerVersion', this.onServerVersion.bind(this));
|
||||
this.api.asc_registerCallback('asc_onPrintUrl', this.onPrintUrl.bind(this));
|
||||
|
|
|
@ -193,6 +193,14 @@ class AddView extends Component {
|
|||
}
|
||||
|
||||
const Add = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const seltype = cellinfo.asc_getSelectionType();
|
||||
const iscelllocked = cellinfo.asc_getLocked();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
let options;
|
||||
|
||||
useEffect(() => {
|
||||
if ( Device.phone ) {
|
||||
f7.popup.open('.add-popup');
|
||||
|
@ -207,17 +215,11 @@ const Add = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const seltype = cellinfo.asc_getSelectionType();
|
||||
const iscelllocked = cellinfo.asc_getLocked();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
let options;
|
||||
|
||||
if ( !iscelllocked ) {
|
||||
options = props.showOptions;
|
||||
if ( !options ) {
|
||||
|
|
|
@ -430,6 +430,11 @@ const EditView = props => {
|
|||
};
|
||||
|
||||
const EditOptions = props => {
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const hyperinfo = cellinfo.asc_getHyperlink();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
useEffect(() => {
|
||||
if ( Device.phone )
|
||||
f7.sheet.open('#edit-sheet');
|
||||
|
@ -441,15 +446,11 @@ const EditOptions = props => {
|
|||
});
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const cellinfo = api.asc_getCellInfo();
|
||||
const hyperinfo = cellinfo.asc_getHyperlink();
|
||||
const isAddShapeHyperlink = api.asc_canAddShapeHyperlink();
|
||||
|
||||
return (
|
||||
<EditView usePopover={!Device.phone} onClosed={onviewclosed} isAddShapeHyperlink={isAddShapeHyperlink} hyperinfo={hyperinfo} wsLock={props.wsLock} wsProps={props.wsProps} />
|
||||
)
|
||||
|
|
|
@ -204,8 +204,9 @@ const Settings = props => {
|
|||
|
||||
|
||||
const onviewclosed = () => {
|
||||
if ( props.onclosed )
|
||||
if ( props.onclosed ) {
|
||||
props.onclosed();
|
||||
}
|
||||
};
|
||||
|
||||
return <SettingsView usePopover={!Device.phone} onclosed={onviewclosed} openOptions={props.openOptions} />
|
||||
|
|
Loading…
Reference in a new issue