Merge pull request #948 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
2839960906
|
@ -480,6 +480,10 @@ class ViewCommentsController extends Component {
|
||||||
}
|
}
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
api.asc_changeComment(comment.uid, ascComment);
|
api.asc_changeComment(comment.uid, ascComment);
|
||||||
|
|
||||||
|
if(!this.props.storeApplicationSettings.isResolvedComments) {
|
||||||
|
this.closeViewCurComments();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deleteComment (comment) {
|
deleteComment (comment) {
|
||||||
|
@ -591,7 +595,7 @@ class ViewCommentsController extends Component {
|
||||||
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
||||||
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
||||||
const _EditCommentController = inject('storeComments', 'users')(observer(EditCommentController));
|
const _EditCommentController = inject('storeComments', 'users')(observer(EditCommentController));
|
||||||
const _ViewCommentsController = inject('storeComments', 'users')(observer(withTranslation()(ViewCommentsController)));
|
const _ViewCommentsController = inject('storeComments', 'users', "storeApplicationSettings")(observer(withTranslation()(ViewCommentsController)));
|
||||||
|
|
||||||
export {
|
export {
|
||||||
_CommentsController as CommentsController,
|
_CommentsController as CommentsController,
|
||||||
|
|
|
@ -86,6 +86,8 @@ export class storeAppOptions {
|
||||||
this.canPlugins = false;
|
this.canPlugins = false;
|
||||||
}
|
}
|
||||||
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
||||||
|
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||||
|
permissions.edit = permissions.review = false;
|
||||||
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
|
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
|
||||||
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||||
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||||
|
|
|
@ -64,6 +64,8 @@ export class storeAppOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
||||||
|
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||||
|
permissions.edit = false;
|
||||||
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
|
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
|
||||||
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||||
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||||
|
|
|
@ -71,7 +71,8 @@ export class storeAppOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) {
|
||||||
permissions.edit = params.asc_getRights() !== Asc.c_oRights.Edit ? false : true;
|
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||||
|
permissions.edit = false;
|
||||||
this.canAutosave = true;
|
this.canAutosave = true;
|
||||||
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||||
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||||
|
|
|
@ -28,13 +28,13 @@ export class storeApplicationSettings {
|
||||||
|
|
||||||
unitMeasurement = Common.Utils.Metric.getCurrentMetric();
|
unitMeasurement = Common.Utils.Metric.getCurrentMetric();
|
||||||
macrosMode = 0;
|
macrosMode = 0;
|
||||||
formulaLang = LocalStorage.getItem('sse-settings-func-lang') || dataLang[0].value;
|
formulaLang = LocalStorage.getItem('sse-settings-func-lang') || this.getFormulaLanguages()[0].value;
|
||||||
regCode = undefined;
|
regCode = undefined;
|
||||||
regExample = '';
|
regExample = '';
|
||||||
regData = [];
|
regData = [];
|
||||||
isRefStyle = false;
|
isRefStyle = false;
|
||||||
isComments = true;
|
isComments = true;
|
||||||
isResolvedComments = true;
|
isResolvedComments = true;
|
||||||
|
|
||||||
getFormulaLanguages() {
|
getFormulaLanguages() {
|
||||||
const dataLang = [
|
const dataLang = [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Input, View, Button, Link } from 'framework7-react';
|
import { Input, View, Button, Link } from 'framework7-react';
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
|
||||||
const viewStyle = {
|
const viewStyle = {
|
||||||
height: 30
|
height: 30
|
||||||
|
@ -12,6 +13,8 @@ const contentStyle = {
|
||||||
|
|
||||||
const CellEditorView = props => {
|
const CellEditorView = props => {
|
||||||
const [expanded, setExpanded] = useState(false);
|
const [expanded, setExpanded] = useState(false);
|
||||||
|
const storeAppOptions = props.storeAppOptions;
|
||||||
|
const isEdit = storeAppOptions.isEdit;
|
||||||
|
|
||||||
const expandClick = e => {
|
const expandClick = e => {
|
||||||
setExpanded(!expanded);
|
setExpanded(!expanded);
|
||||||
|
@ -20,7 +23,7 @@ const CellEditorView = props => {
|
||||||
return <View id="idx-celleditor" style={viewStyle} className={expanded?'expanded':'collapsed'}>
|
return <View id="idx-celleditor" style={viewStyle} className={expanded?'expanded':'collapsed'}>
|
||||||
<div id="box-cell-name" className="ce-group">
|
<div id="box-cell-name" className="ce-group">
|
||||||
<span id="idx-cell-name">{props.cellName}</span>
|
<span id="idx-cell-name">{props.cellName}</span>
|
||||||
<a href="#" id="idx-btn-function" className="link icon-only" onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
|
<a href="#" id="idx-btn-function" className='link icon-only' disabled={!isEdit && true} onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
|
||||||
<i className="icon icon-function" />
|
<i className="icon icon-function" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,4 +36,4 @@ const CellEditorView = props => {
|
||||||
</View>;
|
</View>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CellEditorView;
|
export default inject("storeAppOptions")(observer(CellEditorView));
|
||||||
|
|
|
@ -26,6 +26,11 @@ const PageGroup = ({name, type, functions, onInsertFunction, f7router}) => {
|
||||||
if (functions[k].group == type)
|
if (functions[k].group == type)
|
||||||
items.push(functions[k]);
|
items.push(functions[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
items.sort(function(a, b) {
|
||||||
|
return (a.caption.toLowerCase() > b.caption.toLowerCase()) ? 1 : -1;
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<Navbar title={name} backLink={_t.textBack}/>
|
<Navbar title={name} backLink={_t.textBack}/>
|
||||||
|
@ -88,6 +93,7 @@ const AddFunction = props => {
|
||||||
name: name
|
name: name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<List>
|
<List>
|
||||||
|
|
Loading…
Reference in a new issue