Merge pull request #2139 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
2f18c95b5b
|
@ -28,7 +28,7 @@ const SharingSettingsController = props => {
|
|||
if (msgData?.needUpdate) {
|
||||
setSharingSettings(msgData.sharingSettings);
|
||||
}
|
||||
f7.views.current.router.back();
|
||||
props.f7router.back();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -92,6 +92,9 @@ const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => {
|
|||
const { t } = useTranslation();
|
||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||
const appOptions = props.storeAppOptions;
|
||||
const documentInfo = props.documentInfo;
|
||||
const dataDoc = documentInfo && documentInfo.dataDoc;
|
||||
const fileType = dataDoc && dataDoc.fileType;
|
||||
const sharingSettingsUrl = appOptions.sharingSettingsUrl;
|
||||
const isViewer = appOptions.isViewer;
|
||||
|
||||
|
@ -108,7 +111,7 @@ const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => {
|
|||
}
|
||||
</Navbar>
|
||||
<List>
|
||||
{sharingSettingsUrl &&
|
||||
{(sharingSettingsUrl && fileType !== 'oform') &&
|
||||
<ListItem title={t('Common.Collaboration.textSharingSettings')} link="/sharing-settings/">
|
||||
<Icon slot="media" icon="icon-sharing-settings"></Icon>
|
||||
</ListItem>
|
||||
|
@ -148,10 +151,10 @@ class CollaborationView extends Component {
|
|||
return (
|
||||
show_popover ?
|
||||
<Popover id="coauth-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()} closeByOutsideClick={false}>
|
||||
<PageCollaboration style={{height: '410px'}} page={this.props.page}/>
|
||||
<PageCollaboration documentInfo={this.props.documentInfo} style={{height: '410px'}} page={this.props.page}/>
|
||||
</Popover> :
|
||||
<Sheet className="coauth__sheet" push onSheetClosed={() => this.props.onclosed()}>
|
||||
<PageCollaboration page={this.props.page}/>
|
||||
<PageCollaboration documentInfo={this.props.documentInfo} page={this.props.page}/>
|
||||
</Sheet>
|
||||
)
|
||||
}
|
||||
|
@ -177,9 +180,9 @@ const Collaboration = props => {
|
|||
};
|
||||
|
||||
return (
|
||||
<CollaborationView usePopover={!Device.phone} onclosed={onviewclosed} page={props.page}/>
|
||||
<CollaborationView usePopover={!Device.phone} documentInfo={props.storeDocumentInfo} onclosed={onviewclosed} page={props.page}/>
|
||||
)
|
||||
};
|
||||
|
||||
export {PageCollaboration}
|
||||
export default Collaboration;
|
||||
const CollaborationDocument = inject('storeDocumentInfo')(observer(Collaboration));
|
||||
export {Collaboration, CollaborationDocument};
|
||||
|
|
|
@ -7,7 +7,7 @@ import { withTranslation } from 'react-i18next';
|
|||
import EditOptions from '../view/edit/Edit';
|
||||
import AddOptions from '../view/add/Add';
|
||||
import Settings from '../controller/settings/Settings';
|
||||
import Collaboration from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'
|
||||
import { CollaborationDocument } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'
|
||||
import { Device } from '../../../../common/mobile/utils/device'
|
||||
import { Search, SearchSettings } from '../controller/Search';
|
||||
import ContextMenu from '../controller/ContextMenu';
|
||||
|
@ -229,8 +229,7 @@ class MainPage extends Component {
|
|||
}
|
||||
{
|
||||
!this.state.collaborationVisible ? null :
|
||||
<Collaboration onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')}
|
||||
page={this.state.collaborationPage}/>
|
||||
<CollaborationDocument onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} page={this.state.collaborationPage} />
|
||||
}
|
||||
{
|
||||
!this.state.navigationVisible ? null :
|
||||
|
|
|
@ -62,7 +62,7 @@ const ToolbarView = props => {
|
|||
onRedoClick: props.onRedo
|
||||
})}
|
||||
{/*isAvailableExt && !props.disabledControls &&*/}
|
||||
{(isViewer || !Device.phone) && <Link className={(!isAvailableExt || props.disabledControls) && 'disabled'} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={async e => {
|
||||
{((isViewer || !Device.phone) && isAvailableExt) && <Link className={(!isAvailableExt || props.disabledControls) && 'disabled'} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={async e => {
|
||||
await props.changeMobileView();
|
||||
await props.openOptions('snackbar');
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Device } from '../../../../common/mobile/utils/device';
|
|||
import EditOptions from '../view/edit/Edit';
|
||||
import AddOptions from '../view/add/Add';
|
||||
import Settings from '../view/settings/Settings';
|
||||
import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx';
|
||||
import { Collaboration } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx';
|
||||
import { Preview } from "../controller/Preview";
|
||||
import { Search, SearchSettings } from '../controller/Search';
|
||||
import ContextMenu from '../controller/ContextMenu';
|
||||
|
@ -179,7 +179,7 @@ class MainPage extends Component {
|
|||
}
|
||||
{
|
||||
!this.state.collaborationVisible ? null :
|
||||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
<Collaboration onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
}
|
||||
{appOptions.isDocReady && <ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />}
|
||||
</Page>
|
||||
|
|
|
@ -516,9 +516,6 @@ class MainController extends Component {
|
|||
storeSpreadsheetInfo.changeTitle(meta.title);
|
||||
}
|
||||
});
|
||||
|
||||
const storeAppOptions = this.props.storeAppOptions;
|
||||
this.api.asc_setFilteringMode && this.api.asc_setFilteringMode(storeAppOptions.canModifyFilter);
|
||||
}
|
||||
|
||||
onEntriesListMenu(validation, textArr, addArr) {
|
||||
|
|
|
@ -24,6 +24,9 @@ class AddFilterController extends Component {
|
|||
|
||||
componentDidMount () {
|
||||
const api = Common.EditorApi.get();
|
||||
const appOptions = this.props.storeAppOptions;
|
||||
|
||||
api.asc_setFilteringMode && api.asc_setFilteringMode(appOptions.canModifyFilter);
|
||||
api.asc_registerCallback('asc_onError', this.uncheckedFilter);
|
||||
}
|
||||
|
||||
|
@ -108,7 +111,8 @@ class AddFilterController extends Component {
|
|||
const api = Common.EditorApi.get();
|
||||
const formatTableInfo = api.asc_getCellInfo().asc_getFormatTableInfo();
|
||||
const tablename = (formatTableInfo) ? formatTableInfo.asc_getTableName() : undefined;
|
||||
if (checked) {
|
||||
|
||||
if (checked || tablename) {
|
||||
api.asc_addAutoFilter();
|
||||
} else {
|
||||
api.asc_changeAutoFilter(tablename, Asc.c_oAscChangeFilterOptions.filter, checked);
|
||||
|
@ -127,4 +131,4 @@ class AddFilterController extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default inject("storeWorksheets")(observer(withTranslation()(AddFilterController)));
|
||||
export default inject("storeWorksheets", "storeAppOptions")(observer(withTranslation()(AddFilterController)));
|
|
@ -4,7 +4,7 @@ import { observer, inject } from "mobx-react";
|
|||
import { Device } from '../../../../common/mobile/utils/device';
|
||||
|
||||
import Settings from '../view/settings/Settings';
|
||||
import CollaborationView from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'
|
||||
import { Collaboration } from '../../../../common/mobile/lib/view/collaboration/Collaboration.jsx'
|
||||
import CellEditor from '../controller/CellEditor';
|
||||
import { Statusbar } from '../controller/Statusbar';
|
||||
import FilterOptionsController from '../controller/FilterOptions.jsx'
|
||||
|
@ -167,7 +167,7 @@ class MainPage extends Component {
|
|||
}
|
||||
{
|
||||
!this.state.collaborationVisible ? null :
|
||||
<CollaborationView onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
<Collaboration onclosed={this.handleOptionsViewClosed.bind(this, 'coauth')} />
|
||||
}
|
||||
|
||||
{appOptions.isDocReady &&
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
|
|||
const AddSortAndFilter = props => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('View.Add', {returnObjects: true});
|
||||
const isFilter = props.isFilter;
|
||||
const [isFilter, setIsFilter] = useState(props.isFilter);
|
||||
const wsLock = props.wsLock;
|
||||
|
||||
return (
|
||||
|
@ -27,7 +27,11 @@ const AddSortAndFilter = props => {
|
|||
<List>
|
||||
<ListItem title={_t.textFilter}>
|
||||
<Toggle checked={isFilter}
|
||||
onToggleChange={() => props.onInsertFilter(!isFilter)}/>
|
||||
onToggleChange={() => {
|
||||
setIsFilter(!isFilter);
|
||||
props.onInsertFilter(!isFilter)}
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
</List>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue