Merge pull request #1522 from ONLYOFFICE/feature/fix-bug-reactjs
Feature/fix bug reactjs
This commit is contained in:
commit
0155bb4fea
|
@ -29,6 +29,8 @@
|
||||||
--f7-range-knob-color: @brandColor;
|
--f7-range-knob-color: @brandColor;
|
||||||
--f7-range-knob-size: 16px;
|
--f7-range-knob-size: 16px;
|
||||||
|
|
||||||
|
--f7-list-item-after-text-color: @text-normal;
|
||||||
|
|
||||||
--f7-link-highlight-color: transparent;
|
--f7-link-highlight-color: transparent;
|
||||||
--f7-link-touch-ripple-color: @touchColor;
|
--f7-link-touch-ripple-color: @touchColor;
|
||||||
|
|
||||||
|
|
|
@ -50,11 +50,6 @@ const PageApplicationSettings = props => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem title={'Dark theme'}>
|
|
||||||
<Toggle checked={isThemeDark}
|
|
||||||
onToggleChange={toggle => {Themes.switchDarkTheme(!toggle), setIsThemeDark(!toggle)}}>
|
|
||||||
</Toggle>
|
|
||||||
</ListItem>
|
|
||||||
</List>
|
</List>
|
||||||
<List>
|
<List>
|
||||||
<ListItem title={_t.textNoCharacters} disabled={displayMode !== 'markup'}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
<ListItem title={_t.textNoCharacters} disabled={displayMode !== 'markup'}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
||||||
|
@ -95,6 +90,15 @@ const PageApplicationSettings = props => {
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
|
<List>
|
||||||
|
<ListItem title={'Dark theme'}>
|
||||||
|
<Toggle checked={isThemeDark}
|
||||||
|
onToggleChange={toggle => {Themes.switchDarkTheme(!toggle), setIsThemeDark(!toggle)}}>
|
||||||
|
</Toggle>
|
||||||
|
</ListItem>
|
||||||
|
</List>
|
||||||
|
|
||||||
{_isShowMacros &&
|
{_isShowMacros &&
|
||||||
<List mediaList>
|
<List mediaList>
|
||||||
<ListItem title={_t.textMacrosSettings} link="/macros-settings/" routeProps={{
|
<ListItem title={_t.textMacrosSettings} link="/macros-settings/" routeProps={{
|
||||||
|
|
|
@ -214,7 +214,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
if (isEdit && EditorUIController.ContextMenu) {
|
if (isEdit && EditorUIController.ContextMenu) {
|
||||||
return EditorUIController.ContextMenu.mapMenuItems(this);
|
return EditorUIController.ContextMenu.mapMenuItems(this);
|
||||||
} else {
|
} else {
|
||||||
const {canViewComments, canCoAuthoring, canComments } = this.props;
|
const {canViewComments} = this.props;
|
||||||
|
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const cellinfo = api.asc_getCellInfo();
|
const cellinfo = api.asc_getCellInfo();
|
||||||
|
@ -238,32 +238,25 @@ class ContextMenu extends ContextMenuController {
|
||||||
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
|
case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
itemsIcon.push({
|
itemsIcon.push({
|
||||||
event: 'copy',
|
event: 'copy',
|
||||||
icon: 'icon-copy'
|
icon: 'icon-copy'
|
||||||
});
|
|
||||||
|
|
||||||
if (iscellmenu && cellinfo.asc_getHyperlink()) {
|
|
||||||
itemsText.push({
|
|
||||||
caption: _t.menuOpenLink,
|
|
||||||
event: 'openlink'
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
if(!isDisconnected) {
|
|
||||||
if (canViewComments && hasComments && hasComments.length>0) {
|
|
||||||
itemsText.push({
|
|
||||||
caption: _t.menuViewComment,
|
|
||||||
event: 'viewcomment'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iscellmenu && !api.isCellEdited && canCoAuthoring && canComments && hasComments && hasComments.length<1) {
|
if (iscellmenu && cellinfo.asc_getHyperlink()) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
caption: _t.menuAddComment,
|
caption: _t.menuOpenLink,
|
||||||
event: 'addcomment'
|
event: 'openlink'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
if(!isDisconnected) {
|
||||||
|
if (canViewComments && hasComments && hasComments.length>0) {
|
||||||
|
itemsText.push({
|
||||||
|
caption: _t.menuViewComment,
|
||||||
|
event: 'viewcomment'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return itemsIcon.concat(itemsText);
|
return itemsIcon.concat(itemsText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,8 @@
|
||||||
//font-size: 17px;
|
//font-size: 17px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
color: @text-normal;
|
||||||
|
|
||||||
&[disabled] {
|
&[disabled] {
|
||||||
color: @gray-darker;
|
color: @gray-darker;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|
|
@ -90,7 +90,7 @@ export class storeAppOptions {
|
||||||
this.canEdit = permissions.edit !== false && // can edit or review
|
this.canEdit = permissions.edit !== false && // can edit or review
|
||||||
(this.config.canRequestEditRights || this.config.mode !== 'view') && isSupportEditFeature; // if mode=="view" -> canRequestEditRights must be defined
|
(this.config.canRequestEditRights || this.config.mode !== 'view') && isSupportEditFeature; // if mode=="view" -> canRequestEditRights must be defined
|
||||||
// (!this.isReviewOnly || this.canLicense) && // if isReviewOnly==true -> canLicense must be true
|
// (!this.isReviewOnly || this.canLicense) && // if isReviewOnly==true -> canLicense must be true
|
||||||
this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && true;
|
this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && isSupportEditFeature;
|
||||||
this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view');
|
this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view');
|
||||||
this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false);
|
this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false);
|
||||||
this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false);
|
this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false);
|
||||||
|
|
Loading…
Reference in a new issue