Merge pull request #919 from ONLYOFFICE/feature/release-fixes
Feature/release fixes
This commit is contained in:
commit
a707da477c
|
@ -51,6 +51,7 @@ class CommentsController extends Component {
|
||||||
this.usersStore = this.props.users;
|
this.usersStore = this.props.users;
|
||||||
this.appOptions = this.props.storeAppOptions;
|
this.appOptions = this.props.storeAppOptions;
|
||||||
this.storeComments = this.props.storeComments;
|
this.storeComments = this.props.storeComments;
|
||||||
|
this.storeApplicationSettings = this.props.storeApplicationSettings;
|
||||||
|
|
||||||
Common.Notifications.on('engineCreated', api => {
|
Common.Notifications.on('engineCreated', api => {
|
||||||
api.asc_registerCallback('asc_onAddComment', this.addComment.bind(this));
|
api.asc_registerCallback('asc_onAddComment', this.addComment.bind(this));
|
||||||
|
@ -74,6 +75,8 @@ class CommentsController extends Component {
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
const isLiveCommenting = LocalStorage.getBool(`${window.editorType}-mobile-settings-livecomment`, true);
|
const isLiveCommenting = LocalStorage.getBool(`${window.editorType}-mobile-settings-livecomment`, true);
|
||||||
const resolved = LocalStorage.getBool(`${window.editorType}-settings-resolvedcomment`, true);
|
const resolved = LocalStorage.getBool(`${window.editorType}-settings-resolvedcomment`, true);
|
||||||
|
this.storeApplicationSettings.changeDisplayComments(isLiveCommenting);
|
||||||
|
this.storeApplicationSettings.changeDisplayResolved(resolved);
|
||||||
isLiveCommenting ? api.asc_showComments(resolved) : api.asc_hideComments();
|
isLiveCommenting ? api.asc_showComments(resolved) : api.asc_hideComments();
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
}
|
}
|
||||||
|
@ -98,6 +101,9 @@ class CommentsController extends Component {
|
||||||
}
|
}
|
||||||
removeComment (id) {
|
removeComment (id) {
|
||||||
this.storeComments.removeComment(id);
|
this.storeComments.removeComment(id);
|
||||||
|
if (this.storeComments.showComments.length < 1) {
|
||||||
|
Device.phone ? f7.sheet.close('#view-comment-sheet') : f7.popover.close('#view-comment-popover');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
removeComments (data) {
|
removeComments (data) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
@ -478,7 +484,6 @@ class ViewCommentsController extends Component {
|
||||||
}
|
}
|
||||||
deleteComment (comment) {
|
deleteComment (comment) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
Device.phone ? f7.sheet.close('#view-comment-sheet') : f7.popover.close('#view-comment-popover');
|
|
||||||
comment && api.asc_removeComment(comment.uid);
|
comment && api.asc_removeComment(comment.uid);
|
||||||
}
|
}
|
||||||
deleteReply (comment, reply) {
|
deleteReply (comment, reply) {
|
||||||
|
@ -583,7 +588,7 @@ class ViewCommentsController extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users')(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')(observer(withTranslation()(ViewCommentsController)));
|
||||||
|
|
|
@ -39,6 +39,16 @@ export class storeComments {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeShowComment(id) {
|
||||||
|
const index = this.showComments.findIndex((comment) => {
|
||||||
|
return comment.uid === id;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (index !== -1) {
|
||||||
|
this.showComments.splice(index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addComment (comment) {
|
addComment (comment) {
|
||||||
comment.groupName ? this.groupCollectionComments.push(comment) : this.collectionComments.push(comment);
|
comment.groupName ? this.groupCollectionComments.push(comment) : this.collectionComments.push(comment);
|
||||||
}
|
}
|
||||||
|
@ -51,6 +61,7 @@ export class storeComments {
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
collection.splice(index, 1);
|
collection.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
this.removeShowComment(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
changeComment (id, changeComment) {
|
changeComment (id, changeComment) {
|
||||||
|
|
|
@ -740,7 +740,6 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
||||||
const isAndroid = Device.android;
|
const isAndroid = Device.android;
|
||||||
|
|
||||||
const viewMode = !storeAppOptions.canComments;
|
const viewMode = !storeAppOptions.canComments;
|
||||||
|
|
||||||
const comments = storeComments.showComments;
|
const comments = storeComments.showComments;
|
||||||
|
|
||||||
const [currentIndex, setCurrentIndex] = useState(0);
|
const [currentIndex, setCurrentIndex] = useState(0);
|
||||||
|
@ -760,13 +759,20 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
||||||
};
|
};
|
||||||
|
|
||||||
const onViewNextComment = () => {
|
const onViewNextComment = () => {
|
||||||
if (currentIndex + 1 === comments.length) {
|
if (currentIndex + 1 >= comments.length) {
|
||||||
setCurrentIndex(0);
|
setCurrentIndex(0);
|
||||||
} else {
|
} else {
|
||||||
setCurrentIndex(currentIndex + 1);
|
setCurrentIndex(currentIndex + 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(!comment) {
|
||||||
|
if (comments.length > 0) {
|
||||||
|
onViewNextComment();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Toolbar position='bottom'>
|
<Toolbar position='bottom'>
|
||||||
|
@ -850,6 +856,7 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment}) => {
|
const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment}) => {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
&.icon-prev {
|
&.icon-prev {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="@{white}"><g><polygon points="5.1,10.9 13.9,2 16,4.1 9.2,11.1 16,17.9 13.9,20 5.1,11.2 5,11.1 "/></g></svg>');
|
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="@{themeColor}"><g><polygon points="5.1,10.9 13.9,2 16,4.1 9.2,11.1 16,17.9 13.9,20 5.1,11.2 5,11.1 "/></g></svg>');
|
||||||
&:after {
|
&:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
&.icon-next {
|
&.icon-next {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="@{white}"><g><polygon points="16.9,10.9 8.1,2 6,4.1 12.8,11.1 6,17.9 8.1,20 16.9,11.2 17,11.1 "/></g></svg>');
|
.encoded-svg-background('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 22 22" fill="@{themeColor}"><g><polygon points="16.9,10.9 8.1,2 6,4.1 12.8,11.1 6,17.9 8.1,20 16.9,11.2 17,11.1 "/></g></svg>');
|
||||||
&:after {
|
&:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
||||||
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
|
||||||
class ApplicationSettingsController extends Component {
|
class ApplicationSettingsController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.switchDisplayComments = this.switchDisplayComments.bind(this);
|
this.switchDisplayComments = this.switchDisplayComments.bind(this);
|
||||||
|
this.props.storeApplicationSettings.changeUnitMeasurement(Common.Utils.Metric.getCurrentMetric());
|
||||||
}
|
}
|
||||||
|
|
||||||
setUnitMeasurement(value) {
|
setUnitMeasurement(value) {
|
||||||
|
@ -34,6 +36,8 @@ class ApplicationSettingsController extends Component {
|
||||||
|
|
||||||
switchDisplayComments(value) {
|
switchDisplayComments(value) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
|
this.props.storeAppOptions.changeCanViewComments(value);
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
api.asc_hideComments();
|
api.asc_hideComments();
|
||||||
this.switchDisplayResolved(value);
|
this.switchDisplayResolved(value);
|
||||||
|
@ -42,6 +46,7 @@ class ApplicationSettingsController extends Component {
|
||||||
const resolved = LocalStorage.getBool("de-settings-resolvedcomment");
|
const resolved = LocalStorage.getBool("de-settings-resolvedcomment");
|
||||||
api.asc_showComments(resolved);
|
api.asc_showComments(resolved);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalStorage.setBool("de-mobile-settings-livecomment", value);
|
LocalStorage.setBool("de-mobile-settings-livecomment", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,4 +78,4 @@ class ApplicationSettingsController extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default ApplicationSettingsController;
|
export default inject("storeAppOptions", "storeApplicationSettings")(observer(ApplicationSettingsController));
|
|
@ -27,7 +27,12 @@ export class storeAppOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
isEdit = false;
|
isEdit = false;
|
||||||
|
|
||||||
canViewComments = false;
|
canViewComments = false;
|
||||||
|
changeCanViewComments(value) {
|
||||||
|
this.canViewComments = value;
|
||||||
|
}
|
||||||
|
|
||||||
canReview = false;
|
canReview = false;
|
||||||
canViewReview = false;
|
canViewReview = false;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {makeObservable, action, observable} from 'mobx';
|
import {makeObservable, action, observable} from 'mobx';
|
||||||
|
import { LocalStorage } from '../../../../common/mobile/utils/LocalStorage';
|
||||||
|
|
||||||
export class storeApplicationSettings {
|
export class storeApplicationSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -24,8 +25,8 @@ export class storeApplicationSettings {
|
||||||
isSpellChecking = true;
|
isSpellChecking = true;
|
||||||
isNonprintingCharacters = false;
|
isNonprintingCharacters = false;
|
||||||
isHiddenTableBorders = false;
|
isHiddenTableBorders = false;
|
||||||
isComments = true;
|
isComments = false;
|
||||||
isResolvedComments = true;
|
isResolvedComments = false;
|
||||||
macrosMode = 0;
|
macrosMode = 0;
|
||||||
|
|
||||||
changeUnitMeasurement(value) {
|
changeUnitMeasurement(value) {
|
||||||
|
|
|
@ -595,7 +595,6 @@ class MainController extends Component {
|
||||||
const buttons = [{
|
const buttons = [{
|
||||||
text: 'OK',
|
text: 'OK',
|
||||||
bold: true,
|
bold: true,
|
||||||
close: false,
|
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const password = document.getElementById('modal-password').value;
|
const password = document.getElementById('modal-password').value;
|
||||||
this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
|
this.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
||||||
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
|
||||||
class ApplicationSettingsController extends Component {
|
class ApplicationSettingsController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
this.props.storeApplicationSettings.changeUnitMeasurement(Common.Utils.Metric.getCurrentMetric());
|
||||||
}
|
}
|
||||||
|
|
||||||
setUnitMeasurement(value) {
|
setUnitMeasurement(value) {
|
||||||
|
@ -37,4 +39,4 @@ class ApplicationSettingsController extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default ApplicationSettingsController;
|
export default inject("storeApplicationSettings")(observer(ApplicationSettingsController));
|
|
@ -164,7 +164,8 @@
|
||||||
"errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&)",
|
"errorFrmlMaxTextLength": "Text values in formulas are limited to 255 characters.<br>Use the CONCATENATE function or concatenation operator (&)",
|
||||||
"errorFrmlMaxLength": "You cannot add this formula as its length exceeded the allowed number of characters.<br>Please edit it and try again.",
|
"errorFrmlMaxLength": "You cannot add this formula as its length exceeded the allowed number of characters.<br>Please edit it and try again.",
|
||||||
"errorFrmlMaxReference": "You cannot enter this formula because it has too many values,<br>cell references, and/or names.",
|
"errorFrmlMaxReference": "You cannot enter this formula because it has too many values,<br>cell references, and/or names.",
|
||||||
"errorDataValidate":"The value you entered is not valid.<br>A user has restricted values that can be entered into this cell."
|
"errorDataValidate":"The value you entered is not valid.<br>A user has restricted values that can be entered into this cell.",
|
||||||
|
"errorLockedCellPivot": "You cannot change data inside a pivot table."
|
||||||
},
|
},
|
||||||
"ContextMenu": {
|
"ContextMenu": {
|
||||||
"menuViewComment": "View Comment",
|
"menuViewComment": "View Comment",
|
||||||
|
|
|
@ -167,6 +167,10 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
|
||||||
config.msg = _t.errorPasteMaxRange;
|
config.msg = _t.errorPasteMaxRange;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Asc.c_oAscError.ID.LockedCellPivot:
|
||||||
|
config.msg = _t.errorLockedCellPivot;
|
||||||
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.LockedAllError:
|
case Asc.c_oAscError.ID.LockedAllError:
|
||||||
config.msg = _t.errorLockedAll;
|
config.msg = _t.errorLockedAll;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
||||||
import {observer, inject} from "mobx-react";
|
import {observer, inject} from "mobx-react";
|
||||||
|
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
||||||
|
|
||||||
class ApplicationSettingsController extends Component {
|
class ApplicationSettingsController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.onFormulaLangChange = this.onFormulaLangChange.bind(this);
|
this.onFormulaLangChange = this.onFormulaLangChange.bind(this);
|
||||||
|
this.onChangeDisplayComments = this.onChangeDisplayComments.bind(this);
|
||||||
this.onRegSettings = this.onRegSettings.bind(this);
|
this.onRegSettings = this.onRegSettings.bind(this);
|
||||||
this.initRegSettings = this.initRegSettings.bind(this);
|
this.initRegSettings = this.initRegSettings.bind(this);
|
||||||
this.props.storeApplicationSettings.initRegData();
|
this.props.storeApplicationSettings.initRegData();
|
||||||
this.initRegSettings();
|
this.initRegSettings();
|
||||||
|
this.props.storeApplicationSettings.changeUnitMeasurement(Common.Utils.Metric.getCurrentMetric());
|
||||||
}
|
}
|
||||||
|
|
||||||
initRegSettings() {
|
initRegSettings() {
|
||||||
|
@ -32,54 +35,54 @@ class ApplicationSettingsController extends Component {
|
||||||
|
|
||||||
onChangeDisplayComments(displayComments) {
|
onChangeDisplayComments(displayComments) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
|
this.props.storeAppOptions.changeCanViewComments(displayComments);
|
||||||
|
|
||||||
if (!displayComments) {
|
if (!displayComments) {
|
||||||
api.asc_hideComments();
|
api.asc_hideComments();
|
||||||
Common.localStorage.setBool("sse-settings-resolvedcomment", false);
|
LocalStorage.setBool("sse-settings-resolvedcomment", false);
|
||||||
} else {
|
} else {
|
||||||
let resolved = Common.localStorage.getBool("sse-settings-resolvedcomment");
|
let resolved = LocalStorage.getBool("sse-settings-resolvedcomment");
|
||||||
api.asc_showComments(resolved);
|
api.asc_showComments(resolved);
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.localStorage.setBool("sse-mobile-settings-livecomment", displayComments);
|
LocalStorage.setBool("sse-mobile-settings-livecomment", displayComments);
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeDisplayResolved(value) {
|
onChangeDisplayResolved(value) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
let displayComments = Common.localStorage.getBool("sse-mobile-settings-livecomment");
|
let displayComments = LocalStorage.getBool("sse-mobile-settings-livecomment");
|
||||||
|
|
||||||
if (displayComments) {
|
if (displayComments) {
|
||||||
api.asc_showComments(value);
|
api.asc_showComments(value);
|
||||||
Common.localStorage.setBool("sse-settings-resolvedcomment", value);
|
LocalStorage.setBool("sse-settings-resolvedcomment", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clickR1C1Style(checked) {
|
clickR1C1Style(checked) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
Common.localStorage.setBool('sse-settings-r1c1', checked);
|
LocalStorage.setBool('sse-settings-r1c1', checked);
|
||||||
api.asc_setR1C1Mode(checked);
|
api.asc_setR1C1Mode(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
unitMeasurementChange(value) {
|
unitMeasurementChange(value) {
|
||||||
value = value ? +value : Common.Utils.Metric.getDefaultMetric();
|
value = value ? +value : Common.Utils.Metric.getDefaultMetric();
|
||||||
Common.Utils.Metric.setCurrentMetric(value);
|
Common.Utils.Metric.setCurrentMetric(value);
|
||||||
Common.localStorage.setItem("se-mobile-settings-unit", value);
|
LocalStorage.setItem("sse-mobile-settings-unit", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeMacrosSettings(value) {
|
onChangeMacrosSettings(value) {
|
||||||
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", +value);
|
Common.Utils.InternalSettings.set("sse-mobile-macros-mode", +value);
|
||||||
Common.localStorage.setItem("sse-mobile-macros-mode", +value);
|
LocalStorage.setItem("sse-mobile-macros-mode", +value);
|
||||||
}
|
}
|
||||||
|
|
||||||
onFormulaLangChange(value) {
|
onFormulaLangChange(value) {
|
||||||
Common.localStorage.setItem("sse-settings-func-lang", value);
|
LocalStorage.setItem("sse-settings-func-lang", value);
|
||||||
this.initRegSettings();
|
this.initRegSettings();
|
||||||
// SSE.getController('AddFunction').onDocumentReady();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onRegSettings(regCode) {
|
onRegSettings(regCode) {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
Common.localStorage.setItem("sse-settings-regional", regCode);
|
LocalStorage.setItem("sse-settings-regional", regCode);
|
||||||
this.initRegSettings();
|
this.initRegSettings();
|
||||||
if (regCode!==null) api.asc_setLocale(+regCode);
|
if (regCode!==null) api.asc_setLocale(+regCode);
|
||||||
}
|
}
|
||||||
|
@ -102,4 +105,4 @@ class ApplicationSettingsController extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default inject("storeApplicationSettings")(observer(ApplicationSettingsController));
|
export default inject("storeApplicationSettings", "storeAppOptions")(observer(ApplicationSettingsController));
|
|
@ -19,7 +19,11 @@ export class storeAppOptions {
|
||||||
|
|
||||||
isEdit = false;
|
isEdit = false;
|
||||||
config = {};
|
config = {};
|
||||||
|
|
||||||
canViewComments = false;
|
canViewComments = false;
|
||||||
|
changeCanViewComments(value) {
|
||||||
|
this.canViewComments = value;
|
||||||
|
}
|
||||||
|
|
||||||
lostEditingRights = false;
|
lostEditingRights = false;
|
||||||
changeEditingRights (value) {
|
changeEditingRights (value) {
|
||||||
|
|
|
@ -159,7 +159,7 @@ const EditLink = props => {
|
||||||
</List>
|
</List>
|
||||||
<List className="buttons-list">
|
<List className="buttons-list">
|
||||||
<ListButton title={_t.textEditLink}
|
<ListButton title={_t.textEditLink}
|
||||||
className={`button-fill button-raised${(typeLink === 'ext' && link.length < 1 || typeLink === 'int' || range.length < 1 || !curSheet.length) && ' disabled'}`}
|
className={`button-fill button-raised ${(typeLink === 1 && !link.length) || (typeLink === 2 && (!range.length || !curSheet.length)) ? 'disabled' : ''}`}
|
||||||
onClick={() => {props.onEditLink(typeLink === 1 ?
|
onClick={() => {props.onEditLink(typeLink === 1 ?
|
||||||
{type: 1, url: link, text: stateDisplayText, tooltip: screenTip} :
|
{type: 1, url: link, text: stateDisplayText, tooltip: screenTip} :
|
||||||
{type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip})}}
|
{type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip})}}
|
||||||
|
|
|
@ -185,7 +185,7 @@ const PageMacrosSettings = props => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ApplicationSettings = inject("storeApplicationSettings")(observer(PageApplicationSettings));
|
const ApplicationSettings = inject("storeApplicationSettings", "storeAppOptions")(observer(PageApplicationSettings));
|
||||||
const MacrosSettings = inject("storeApplicationSettings")(observer(PageMacrosSettings));
|
const MacrosSettings = inject("storeApplicationSettings")(observer(PageMacrosSettings));
|
||||||
const RegionalSettings = inject("storeApplicationSettings")(observer(PageRegionalSettings));
|
const RegionalSettings = inject("storeApplicationSettings")(observer(PageRegionalSettings));
|
||||||
const FormulaLanguage = inject("storeApplicationSettings")(observer(PageFormulaLanguage));
|
const FormulaLanguage = inject("storeApplicationSettings")(observer(PageFormulaLanguage));
|
||||||
|
|
Loading…
Reference in a new issue