diff --git a/apps/common/mobile/lib/controller/collaboration/Review.jsx b/apps/common/mobile/lib/controller/collaboration/Review.jsx index 6285c382f..6f212ef94 100644 --- a/apps/common/mobile/lib/controller/collaboration/Review.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Review.jsx @@ -120,6 +120,7 @@ class Review extends Component { onAcceptAll={this.onAcceptAll} onRejectAll={this.onRejectAll} onDisplayMode={this.onDisplayMode} + noBack={this.props.noBack} /> ) } @@ -520,6 +521,7 @@ class ReviewChange extends Component { onRejectCurrentChange={this.onRejectCurrentChange} onGotoNextChange={this.onGotoNextChange} onDeleteChange={this.onDeleteChange} + noBack={this.props.noBack} /> ) } diff --git a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx index 03e2a3051..dde8d8f34 100644 --- a/apps/common/mobile/lib/view/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/view/collaboration/Collaboration.jsx @@ -16,7 +16,15 @@ const PageUsers = inject("users")(observer(props => { const storeUsers = props.users; return ( - + + {Device.phone && + + + + + + } + {_t.textEditUser} {storeUsers.users.map((model, i) => ( @@ -39,6 +47,15 @@ const routes = [ path: '/review/', component: ReviewController }, + { + path: '/cm-review/', + component: ReviewController, + options: { + props: { + noBack: true + } + } + }, { path: '/display-mode/', component: PageDisplayMode @@ -47,6 +64,15 @@ const routes = [ path: '/review-change/', component: ReviewChangeController }, + { + path: '/cm-review-change/', + component: ReviewChangeController, + options: { + props: { + noBack: true + } + } + }, { path: '/comments/', component: ViewCommentsController, @@ -62,10 +88,10 @@ const PageCollaboration = inject('storeAppOptions')(observer(props => { const { t } = useTranslation(); const _t = t('Common.Collaboration', {returnObjects: true}); return ( - + - {props.isSheet && + {Device.phone && @@ -108,10 +134,10 @@ class CollaborationView extends Component { return ( show_popover ? this.props.onclosed()}> - + : this.props.onclosed()}> - + ) } @@ -135,7 +161,7 @@ const Collaboration = props => { }; return ( - + ) }; diff --git a/apps/common/mobile/lib/view/collaboration/Review.jsx b/apps/common/mobile/lib/view/collaboration/Review.jsx index 41514a42f..06390f556 100644 --- a/apps/common/mobile/lib/view/collaboration/Review.jsx +++ b/apps/common/mobile/lib/view/collaboration/Review.jsx @@ -1,6 +1,6 @@ import React, { Component, useEffect } from 'react'; import { observer, inject } from "mobx-react"; -import { Page, Navbar, List, ListItem, Icon, Toggle, Toolbar, Link } from 'framework7-react'; +import { Page, Navbar, NavRight, List, ListItem, Icon, Toggle, Toolbar, Link } from 'framework7-react'; import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from "../../../utils/device"; @@ -14,7 +14,15 @@ const PageReview = props => { return ( - + + {Device.phone && + + + + + + } + {canReview && @@ -58,7 +66,15 @@ const DisplayMode = props => { const mode = props.storeReview.displayMode; return ( - + + {Device.phone && + + + + + + } + { const isLockPrevNext = (displayMode === "final" || displayMode === "original"); return ( - + + {Device.phone && + + + + + + } + {!props.isReviewOnly && diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 4f858bb52..bf9814c77 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -38,6 +38,12 @@ .navbar-inner { z-index: auto; } + .sheet-close { + width: 44px; + height: 44px; + display: flex; + justify-content: center; + } } .popover__titled { diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 6887a13fc..b141870d4 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -21,6 +21,14 @@ --f7-dialog-button-text-color: @themeColor; + .navbar { + .sheet-close { + width: 56px; + height: 56px; + display: flex; + justify-content: center; + } + } // Buttons .segmented { .decrement, .increment { diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 60a124754..b17b3f191 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -20,6 +20,7 @@ class ContextMenu extends ContextMenuController { // console.log('context menu controller created'); this.onApiShowComment = this.onApiShowComment.bind(this); this.onApiHideComment = this.onApiHideComment.bind(this); + this.onApiShowChange = this.onApiShowChange.bind(this); } static closeContextMenu() { @@ -32,6 +33,7 @@ class ContextMenu extends ContextMenuController { const api = Common.EditorApi.get(); api.asc_unregisterCallback('asc_onShowComment', this.onApiShowComment); api.asc_unregisterCallback('asc_onHideComment', this.onApiHideComment); + api.asc_unregisterCallback('asc_onShowRevisionsChange', this.onApiShowChange); } @@ -43,6 +45,10 @@ class ContextMenu extends ContextMenuController { this.isComments = false; } + onApiShowChange(sdkchange) { + this.inRevisionChange = sdkchange && sdkchange.length>0; + } + // onMenuClosed() { // super.onMenuClosed(); // } @@ -73,6 +79,16 @@ class ContextMenu extends ContextMenuController { case 'viewcomment': Common.Notifications.trigger('viewcomment'); break; + case 'review': + setTimeout(() => { + this.props.openOptions('coauth', 'cm-review'); + }, 400); + break; + case 'reviewchange': + setTimeout(() => { + this.props.openOptions('coauth', 'cm-review-change'); + }, 400); + break; } console.log("click context menu item: " + action); @@ -107,6 +123,7 @@ class ContextMenu extends ContextMenuController { const api = Common.EditorApi.get(); api.asc_registerCallback('asc_onShowComment', this.onApiShowComment); api.asc_registerCallback('asc_onHideComment', this.onApiHideComment); + api.asc_registerCallback('asc_onShowRevisionsChange', this.onApiShowChange); } initMenuItems() { @@ -246,7 +263,7 @@ class ContextMenu extends ContextMenuController { // } if ( canReview ) { - if (false /*_inRevisionChange*/) { + if (this.inRevisionChange) { itemsText.push({ caption: _t.menuReviewChange, event: 'reviewchange' diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 4598f8f32..092547c96 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -23,7 +23,7 @@ export default class MainPage extends Component { }; } - handleClickToOpenOptions = opts => { + handleClickToOpenOptions = (opts, page) => { ContextMenu.closeContextMenu(); this.setState(state => { @@ -34,7 +34,10 @@ export default class MainPage extends Component { else if ( opts == 'settings' ) return {settingsVisible: true}; else if ( opts == 'coauth' ) - return {collaborationVisible: true}; + return { + collaborationVisible: true, + collaborationPage: page + }; }); }; @@ -95,9 +98,9 @@ export default class MainPage extends Component { } { !this.state.collaborationVisible ? null : - + } - + ) }