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();
|
||||
api.asc_changeComment(comment.uid, ascComment);
|
||||
|
||||
if(!this.props.storeApplicationSettings.isResolvedComments) {
|
||||
this.closeViewCurComments();
|
||||
}
|
||||
}
|
||||
}
|
||||
deleteComment (comment) {
|
||||
|
@ -591,7 +595,7 @@ class ViewCommentsController extends Component {
|
|||
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
||||
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
||||
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 {
|
||||
_CommentsController as CommentsController,
|
||||
|
|
|
@ -86,6 +86,8 @@ export class storeAppOptions {
|
|||
this.canPlugins = false;
|
||||
}
|
||||
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.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||
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) {
|
||||
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||
permissions.edit = false;
|
||||
this.review = (permissions.review === undefined) ? (permissions.edit !== false) : permissions.review;
|
||||
this.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||
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) {
|
||||
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.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||
this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||
|
|
|
@ -28,13 +28,13 @@ export class storeApplicationSettings {
|
|||
|
||||
unitMeasurement = Common.Utils.Metric.getCurrentMetric();
|
||||
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;
|
||||
regExample = '';
|
||||
regData = [];
|
||||
isRefStyle = false;
|
||||
isComments = true;
|
||||
isResolvedComments = true;
|
||||
isResolvedComments = true;
|
||||
|
||||
getFormulaLanguages() {
|
||||
const dataLang = [
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
import React, { useState } from 'react';
|
||||
import { Input, View, Button, Link } from 'framework7-react';
|
||||
import {observer, inject} from "mobx-react";
|
||||
|
||||
const viewStyle = {
|
||||
height: 30
|
||||
|
@ -12,6 +13,8 @@ const contentStyle = {
|
|||
|
||||
const CellEditorView = props => {
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const storeAppOptions = props.storeAppOptions;
|
||||
const isEdit = storeAppOptions.isEdit;
|
||||
|
||||
const expandClick = e => {
|
||||
setExpanded(!expanded);
|
||||
|
@ -20,7 +23,7 @@ const CellEditorView = props => {
|
|||
return <View id="idx-celleditor" style={viewStyle} className={expanded?'expanded':'collapsed'}>
|
||||
<div id="box-cell-name" className="ce-group">
|
||||
<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" />
|
||||
</a>
|
||||
</div>
|
||||
|
@ -33,4 +36,4 @@ const CellEditorView = props => {
|
|||
</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)
|
||||
items.push(functions[k]);
|
||||
}
|
||||
|
||||
items.sort(function(a, b) {
|
||||
return (a.caption.toLowerCase() > b.caption.toLowerCase()) ? 1 : -1;
|
||||
});
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<Navbar title={name} backLink={_t.textBack}/>
|
||||
|
@ -88,6 +93,7 @@ const AddFunction = props => {
|
|||
name: name
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<List>
|
||||
|
|
Loading…
Reference in a new issue