Merge branch 'feature/mobile-apps-on-reactjs' of https://github.com/ONLYOFFICE/web-apps into feature/mobile-apps-on-reactjs
This commit is contained in:
commit
2b355ce7ec
|
@ -14,8 +14,7 @@ import {
|
||||||
ViewCommentsController
|
ViewCommentsController
|
||||||
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
||||||
import About from '../../../../common/mobile/lib/view/About';
|
import About from '../../../../common/mobile/lib/view/About';
|
||||||
|
import EditorUIController from '../lib/patch';
|
||||||
import patch from '../lib/patch'
|
|
||||||
|
|
||||||
@inject(
|
@inject(
|
||||||
"storeAppOptions",
|
"storeAppOptions",
|
||||||
|
@ -67,7 +66,7 @@ class MainController extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadConfig = data => {
|
const loadConfig = data => {
|
||||||
patch.isSupportEditFeature();
|
EditorUIController.isSupportEditFeature();
|
||||||
console.log('load config');
|
console.log('load config');
|
||||||
|
|
||||||
this.editorConfig = Object.assign({}, this.editorConfig, data.config);
|
this.editorConfig = Object.assign({}, this.editorConfig, data.config);
|
||||||
|
@ -288,7 +287,7 @@ class MainController extends Component {
|
||||||
applyLicense () {
|
applyLicense () {
|
||||||
const _t = this._t;
|
const _t = this._t;
|
||||||
const appOptions = this.props.storeAppOptions;
|
const appOptions = this.props.storeAppOptions;
|
||||||
if (appOptions.config.mode !== 'view' && !patch.isSupportEditFeature()) {
|
if (appOptions.config.mode !== 'view' && !EditorUIController.isSupportEditFeature()) {
|
||||||
let value = LocalStorage.getItem("de-opensource-warning");
|
let value = LocalStorage.getItem("de-opensource-warning");
|
||||||
value = (value !== null) ? parseInt(value) : 0;
|
value = (value !== null) ? parseInt(value) : 0;
|
||||||
const now = (new Date).getTime();
|
const now = (new Date).getTime();
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
|
|
||||||
const patch = () => {
|
const EditorUIController = () => {
|
||||||
return null
|
return null
|
||||||
};
|
};
|
||||||
|
|
||||||
patch.isSupportEditFeature = () => {
|
EditorUIController.isSupportEditFeature = () => {
|
||||||
return false
|
return false
|
||||||
};
|
};
|
||||||
|
|
||||||
export default patch;
|
EditorUIController.getToolbarOptions = () => {
|
||||||
|
return null
|
||||||
|
};
|
||||||
|
|
||||||
|
export default EditorUIController;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, {Fragment} from 'react';
|
import React, {Fragment} from 'react';
|
||||||
import {NavLeft, NavRight, NavTitle, Link, Icon} from 'framework7-react';
|
import {NavLeft, NavRight, NavTitle, Link, Icon} from 'framework7-react';
|
||||||
import { Device } from '../../../../common/mobile/utils/device';
|
import { Device } from '../../../../common/mobile/utils/device';
|
||||||
|
import EditorUIController from '../lib/patch'
|
||||||
|
|
||||||
const ToolbarView = props => {
|
const ToolbarView = props => {
|
||||||
const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls;
|
const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls;
|
||||||
|
@ -13,8 +14,13 @@ const ToolbarView = props => {
|
||||||
</NavLeft>
|
</NavLeft>
|
||||||
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
||||||
<NavRight>
|
<NavRight>
|
||||||
<Link className={(disableEditBtn || props.disabledControls) && 'disabled'} id='btn-edit' icon='icon-edit-settings' href={false} onClick={e => props.openOptions('edit')}></Link>
|
{
|
||||||
<Link className={(disableEditBtn || props.disabledControls) && 'disabled'} id='btn-add' icon='icon-plus' href={false} onClick={e => props.openOptions('add')}></Link>
|
EditorUIController.getToolbarOptions({
|
||||||
|
disabled: disableEditBtn || props.disabledControls,
|
||||||
|
onEditClick: e => props.openOptions('edit'),
|
||||||
|
onAddClick: e => props.openOptions('add'),
|
||||||
|
})
|
||||||
|
}
|
||||||
{ Device.phone ? null : <Link className={props.disabledControls && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
{ Device.phone ? null : <Link className={props.disabledControls && 'disabled'} icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
||||||
{props.displayCollaboration && <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link>}
|
{props.displayCollaboration && <Link className={props.disabledControls && 'disabled'} id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link>}
|
||||||
<Link className={(props.disabledSettings || props.disabledControls) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={e => props.openOptions('settings')}></Link>
|
<Link className={(props.disabledSettings || props.disabledControls) && 'disabled'} id='btn-settings' icon='icon-settings' href={false} onClick={e => props.openOptions('settings')}></Link>
|
||||||
|
|
|
@ -77,6 +77,8 @@ module.exports = {
|
||||||
resolvePath('node_modules/template7'),
|
resolvePath('node_modules/template7'),
|
||||||
resolvePath('node_modules/dom7'),
|
resolvePath('node_modules/dom7'),
|
||||||
resolvePath('node_modules/ssr-window'),
|
resolvePath('node_modules/ssr-window'),
|
||||||
|
|
||||||
|
resolvePath('../../../web-apps-mobile/word'),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue