[DE mobile] Turned on mobile view in start
This commit is contained in:
parent
7d6f4dbd8c
commit
63d942c238
|
@ -124,7 +124,7 @@ class MainController extends Component {
|
||||||
docInfo = new Asc.asc_CDocInfo();
|
docInfo = new Asc.asc_CDocInfo();
|
||||||
docInfo.put_Id(data.doc.key);
|
docInfo.put_Id(data.doc.key);
|
||||||
docInfo.put_Url(data.doc.url);
|
docInfo.put_Url(data.doc.url);
|
||||||
// docInfo.put_DirectUrl(data.doc.directUrl);
|
docInfo.put_DirectUrl(data.doc.directUrl);
|
||||||
docInfo.put_Title(data.doc.title);
|
docInfo.put_Title(data.doc.title);
|
||||||
docInfo.put_Format(data.doc.fileType);
|
docInfo.put_Format(data.doc.fileType);
|
||||||
docInfo.put_VKey(data.doc.vkey);
|
docInfo.put_VKey(data.doc.vkey);
|
||||||
|
@ -273,7 +273,7 @@ class MainController extends Component {
|
||||||
this.api.Resize();
|
this.api.Resize();
|
||||||
this.api.zoomFitToWidth();
|
this.api.zoomFitToWidth();
|
||||||
this.api.asc_GetDefaultTableStyles && setTimeout(() => {this.api.asc_GetDefaultTableStyles()}, 1);
|
this.api.asc_GetDefaultTableStyles && setTimeout(() => {this.api.asc_GetDefaultTableStyles()}, 1);
|
||||||
|
this.api.ChangeReaderMode();
|
||||||
this.applyLicense();
|
this.applyLicense();
|
||||||
|
|
||||||
Common.Notifications.trigger('document:ready');
|
Common.Notifications.trigger('document:ready');
|
||||||
|
|
|
@ -87,11 +87,16 @@ const Settings = props => {
|
||||||
|
|
||||||
appOptions.changeMobileView();
|
appOptions.changeMobileView();
|
||||||
api.ChangeReaderMode();
|
api.ChangeReaderMode();
|
||||||
|
|
||||||
|
if(Device.phone) {
|
||||||
|
closeModal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return <SettingsView usePopover={!Device.phone}
|
return <SettingsView usePopover={!Device.phone}
|
||||||
openOptions={props.openOptions}
|
openOptions={props.openOptions}
|
||||||
onclosed={props.onclosed}
|
closeOptions={props.closeOptions}
|
||||||
|
// onclosed={props.onclosed}
|
||||||
onPrint={onPrint}
|
onPrint={onPrint}
|
||||||
showHelp={showHelp}
|
showHelp={showHelp}
|
||||||
showFeedback={showFeedback}
|
showFeedback={showFeedback}
|
||||||
|
|
|
@ -173,9 +173,10 @@ class MainPage extends Component {
|
||||||
!this.state.addOptionsVisible ? null :
|
!this.state.addOptionsVisible ? null :
|
||||||
<AddOptions onclosed={this.handleOptionsViewClosed.bind(this, 'add')} showOptions={this.state.addShowOptions} />
|
<AddOptions onclosed={this.handleOptionsViewClosed.bind(this, 'add')} showOptions={this.state.addShowOptions} />
|
||||||
}
|
}
|
||||||
|
{/*onclosed={this.handleOptionsViewClosed.bind(this, 'settings')}*/}
|
||||||
{
|
{
|
||||||
!this.state.settingsVisible ? null :
|
!this.state.settingsVisible ? null :
|
||||||
<Settings openOptions={this.handleClickToOpenOptions.bind(this)} onclosed={this.handleOptionsViewClosed.bind(this, 'settings')} />
|
<Settings openOptions={this.handleClickToOpenOptions.bind(this)} closeOptions={this.handleOptionsViewClosed.bind(this)} />
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!this.state.collaborationVisible ? null :
|
!this.state.collaborationVisible ? null :
|
||||||
|
|
|
@ -35,7 +35,7 @@ export class storeAppOptions {
|
||||||
|
|
||||||
isEdit = false;
|
isEdit = false;
|
||||||
|
|
||||||
isMobileView = false;
|
isMobileView = true;
|
||||||
changeMobileView() {
|
changeMobileView() {
|
||||||
this.isMobileView = !this.isMobileView;
|
this.isMobileView = !this.isMobileView;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,10 +164,11 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
||||||
<ListItem title={t('Settings.textMobileView')}>
|
<ListItem title={t('Settings.textMobileView')}>
|
||||||
<Icon slot="media" icon="icon-mobile-view"></Icon>
|
<Icon slot="media" icon="icon-mobile-view"></Icon>
|
||||||
<Toggle checked={isMobileView} onToggleChange={() => {
|
<Toggle checked={isMobileView} onToggleChange={() => {
|
||||||
// props.onclosed();
|
|
||||||
props.onChangeMobileView();
|
props.onChangeMobileView();
|
||||||
props.openOptions('snackbar');
|
props.openOptions('snackbar');
|
||||||
// if(Device.phone) closeModal();
|
setTimeout( () => {
|
||||||
|
props.closeOptions('snackbar');
|
||||||
|
}, 1000);
|
||||||
}} />
|
}} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
}
|
}
|
||||||
|
@ -235,11 +236,11 @@ class SettingsView extends Component {
|
||||||
const show_popover = this.props.usePopover;
|
const show_popover = this.props.usePopover;
|
||||||
return (
|
return (
|
||||||
show_popover ?
|
show_popover ?
|
||||||
<Popover id="settings-popover" closeByOutsideClick={false} className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
<Popover id="settings-popover" closeByOutsideClick={false} className="popover__titled" onPopoverClosed={() => this.props.closeOptions('settings')}>
|
||||||
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} onclosed={this.props.onclosed} openOptions={this.props.openOptions} style={{height: '410px'}} onChangeMobileView={this.props.onChangeMobileView} onPrint={this.props.onPrint} showHelp={this.props.showHelp} showFeedback={this.props.showFeedback} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
|
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} closeOptions={this.props.closeOptions} openOptions={this.props.openOptions} style={{height: '410px'}} onChangeMobileView={this.props.onChangeMobileView} onPrint={this.props.onPrint} showHelp={this.props.showHelp} showFeedback={this.props.showFeedback} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
|
||||||
</Popover> :
|
</Popover> :
|
||||||
<Popup className="settings-popup" onPopupClosed={() => this.props.onclosed()}>
|
<Popup className="settings-popup" onPopupClosed={() => this.props.closeOptions('settings')}>
|
||||||
<SettingsList onOptionClick={this.onoptionclick} onclosed={this.props.onclosed} openOptions={this.props.openOptions} onChangeMobileView={this.props.onChangeMobileView} onPrint={this.props.onPrint} showHelp={this.props.showHelp} showFeedback={this.props.showFeedback} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
|
<SettingsList onOptionClick={this.onoptionclick} closeOptions={this.props.closeOptions} openOptions={this.props.openOptions} onChangeMobileView={this.props.onChangeMobileView} onPrint={this.props.onPrint} showHelp={this.props.showHelp} showFeedback={this.props.showFeedback} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
|
||||||
</Popup>
|
</Popup>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue