[DE mobile] extended controller for private functions
This commit is contained in:
parent
0283f82a4d
commit
dc4c20081b
|
@ -13,8 +13,7 @@ import {
|
|||
EditCommentController,
|
||||
ViewCommentsController
|
||||
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
||||
|
||||
import patch from '../lib/patch'
|
||||
import EditorUIController from '../lib/patch'
|
||||
|
||||
@inject(
|
||||
"storeAppOptions",
|
||||
|
@ -59,7 +58,7 @@ class MainController extends Component {
|
|||
};
|
||||
|
||||
const loadConfig = data => {
|
||||
patch.isSupportEditFeature();
|
||||
EditorUIController.isSupportEditFeature();
|
||||
console.log('load config');
|
||||
|
||||
this.editorConfig = Object.assign({}, this.editorConfig, data.config);
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
const patch = () => {
|
||||
const EditorUIController = () => {
|
||||
return null
|
||||
};
|
||||
|
||||
patch.isSupportEditFeature = () => {
|
||||
EditorUIController.isSupportEditFeature = () => {
|
||||
return false
|
||||
};
|
||||
|
||||
export default patch;
|
||||
EditorUIController.getToolbarOptions = () => {
|
||||
return null
|
||||
};
|
||||
|
||||
export default EditorUIController;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, {Fragment} from 'react';
|
||||
import {NavLeft, NavRight, NavTitle, Link, Icon} from 'framework7-react';
|
||||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
import EditorUIController from '../lib/patch'
|
||||
|
||||
const ToolbarView = props => {
|
||||
const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls;
|
||||
|
@ -13,8 +14,13 @@ const ToolbarView = props => {
|
|||
</NavLeft>
|
||||
{!Device.phone && <NavTitle>{props.docTitle}</NavTitle>}
|
||||
<NavRight>
|
||||
<Link className={disableEditBtn && 'disabled'} id='btn-edit' icon='icon-edit-settings' href={false} onClick={e => props.openOptions('edit')}></Link>
|
||||
<Link className={disableEditBtn && 'disabled'} id='btn-add' icon='icon-plus' href={false} onClick={e => props.openOptions('add')}></Link>
|
||||
{
|
||||
EditorUIController.getToolbarOptions({
|
||||
disabled: disableEditBtn,
|
||||
onEditClick: e => props.openOptions('edit'),
|
||||
onAddClick: e => props.openOptions('add'),
|
||||
})
|
||||
}
|
||||
{ Device.phone ? null : <Link icon='icon-search' searchbarEnable='.searchbar' href={false}></Link> }
|
||||
{props.displayCollaboration && <Link id='btn-coauth' href={false} icon='icon-collaboration' onClick={e => props.openOptions('coauth')}></Link>}
|
||||
<Link className={props.disabledSettings && '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/dom7'),
|
||||
resolvePath('node_modules/ssr-window'),
|
||||
|
||||
resolvePath('../../../web-apps-mobile/word'),
|
||||
],
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue