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
69b5025f83
|
@ -4,6 +4,8 @@ import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
// Import Framework7
|
// Import Framework7
|
||||||
import Framework7 from 'framework7/lite-bundle';
|
import Framework7 from 'framework7/lite-bundle';
|
||||||
|
import { Dom7 } from 'framework7';
|
||||||
|
window.$$ = Dom7;
|
||||||
|
|
||||||
// Import Framework7-React Plugin
|
// Import Framework7-React Plugin
|
||||||
import Framework7React from 'framework7-react';
|
import Framework7React from 'framework7-react';
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import { f7 } from 'framework7-react';
|
||||||
import StatusbarView from '../view/Statusbar';
|
import StatusbarView from '../view/Statusbar';
|
||||||
import { inject } from 'mobx-react';
|
import { inject } from 'mobx-react';
|
||||||
|
|
||||||
|
@ -7,12 +8,25 @@ const Statusbar = inject('sheets')(props => {
|
||||||
const {sheets} = props;
|
const {sheets} = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log("status bar did mount");
|
const on_api_created = api => {
|
||||||
|
api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged.bind(api));
|
||||||
|
};
|
||||||
|
|
||||||
|
const on_main_view_click = e => {
|
||||||
|
// f7.popover.close('.document-menu.modal-in');
|
||||||
|
};
|
||||||
|
|
||||||
Common.Notifications.on('document:ready', onApiSheetsChanged);
|
Common.Notifications.on('document:ready', onApiSheetsChanged);
|
||||||
Common.Notifications.on('engineCreated', api => {
|
Common.Notifications.on('engineCreated', on_api_created);
|
||||||
api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged.bind(api));
|
|
||||||
});
|
$$('.view-main').on('click', on_main_view_click);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
Common.Notifications.off('document:ready', onApiSheetsChanged);
|
||||||
|
Common.Notifications.off('engineCreated', on_api_created);
|
||||||
|
|
||||||
|
$$('.view-main').off('click', on_main_view_click);
|
||||||
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onApiSheetsChanged = api => {
|
const onApiSheetsChanged = api => {
|
||||||
|
|
Loading…
Reference in a new issue