Merge pull request #1474 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
2521b7dd89
|
@ -189,7 +189,7 @@ const PageAdditionalFormatting = props => {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const PageBullets = props => {
|
const PageBullets = observer(props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const bulletArrays = [
|
const bulletArrays = [
|
||||||
[
|
[
|
||||||
|
@ -218,9 +218,10 @@ const PageBullets = props => {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (bullet.type === -1) {
|
if (bullet.type === -1) {
|
||||||
storeTextSettings.resetBullets(-1);
|
storeTextSettings.resetBullets(-1);
|
||||||
|
} else {
|
||||||
|
storeTextSettings.resetBullets(bullet.type);
|
||||||
}
|
}
|
||||||
props.onBullet(bullet.type)
|
props.onBullet(bullet.type);
|
||||||
props.f7router.back();
|
|
||||||
}}>
|
}}>
|
||||||
{bullet.thumb.length < 1 ?
|
{bullet.thumb.length < 1 ?
|
||||||
<Icon className="thumb" style={{position: 'relative'}}>
|
<Icon className="thumb" style={{position: 'relative'}}>
|
||||||
|
@ -234,9 +235,9 @@ const PageBullets = props => {
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
};
|
});
|
||||||
|
|
||||||
const PageNumbers = props => {
|
const PageNumbers = observer(props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const numberArrays = [
|
const numberArrays = [
|
||||||
[
|
[
|
||||||
|
@ -266,9 +267,10 @@ const PageNumbers = props => {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (number.type === -1) {
|
if (number.type === -1) {
|
||||||
storeTextSettings.resetNumbers(-1);
|
storeTextSettings.resetNumbers(-1);
|
||||||
|
} else {
|
||||||
|
storeTextSettings.resetNumbers(number.type);
|
||||||
}
|
}
|
||||||
props.onNumber(number.type)
|
props.onNumber(number.type);
|
||||||
props.f7router.back();
|
|
||||||
}}>
|
}}>
|
||||||
{number.thumb.length < 1 ?
|
{number.thumb.length < 1 ?
|
||||||
<Icon className="thumb" style={{position: 'relative'}}>
|
<Icon className="thumb" style={{position: 'relative'}}>
|
||||||
|
@ -282,9 +284,9 @@ const PageNumbers = props => {
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
};
|
});
|
||||||
|
|
||||||
const PageMultiLevel = props => {
|
const PageMultiLevel = observer(props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const arrayMultiLevel = [
|
const arrayMultiLevel = [
|
||||||
|
@ -305,7 +307,6 @@ const PageMultiLevel = props => {
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
item.type === -1 ? storeTextSettings.resetMultiLevel(-1) : storeTextSettings.resetMultiLevel(null);
|
item.type === -1 ? storeTextSettings.resetMultiLevel(-1) : storeTextSettings.resetMultiLevel(null);
|
||||||
props.onMultiLevelList(item.type);
|
props.onMultiLevelList(item.type);
|
||||||
props.f7router.back();
|
|
||||||
}}>
|
}}>
|
||||||
{item.thumb.length < 1 ?
|
{item.thumb.length < 1 ?
|
||||||
<Icon className="thumb" style={{position: 'relative'}}>
|
<Icon className="thumb" style={{position: 'relative'}}>
|
||||||
|
@ -319,7 +320,7 @@ const PageMultiLevel = props => {
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
});
|
||||||
|
|
||||||
const PageBulletsAndNumbers = props => {
|
const PageBulletsAndNumbers = props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -337,9 +338,15 @@ const PageBulletsAndNumbers = props => {
|
||||||
}
|
}
|
||||||
</Navbar>
|
</Navbar>
|
||||||
<Swiper pagination>
|
<Swiper pagination>
|
||||||
<SwiperSlide> <PageNumbers f7router={props.f7router} storeTextSettings={storeTextSettings} onNumber={props.onNumber}/></SwiperSlide>
|
<SwiperSlide>
|
||||||
<SwiperSlide> <PageBullets f7router={props.f7router} storeTextSettings={storeTextSettings} onBullet={props.onBullet}/></SwiperSlide>
|
<PageNumbers storeTextSettings={storeTextSettings} onNumber={props.onNumber} />
|
||||||
<SwiperSlide> <PageMultiLevel f7router={props.f7router} storeTextSettings={storeTextSettings} onMultiLevelList={props.onMultiLevelList}/> </SwiperSlide>
|
</SwiperSlide>
|
||||||
|
<SwiperSlide>
|
||||||
|
<PageBullets storeTextSettings={storeTextSettings} onBullet={props.onBullet} />
|
||||||
|
</SwiperSlide>
|
||||||
|
<SwiperSlide>
|
||||||
|
<PageMultiLevel storeTextSettings={storeTextSettings} onMultiLevelList={props.onMultiLevelList} />
|
||||||
|
</SwiperSlide>
|
||||||
</Swiper>
|
</Swiper>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
|
|
|
@ -69,7 +69,6 @@ const PageDocumentMargins = props => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(errorMsg) {
|
if(errorMsg) {
|
||||||
f7.popover.close('#settings-popover');
|
|
||||||
f7.dialog.alert(errorMsg, _t.notcriticalErrorTitle);
|
f7.dialog.alert(errorMsg, _t.notcriticalErrorTitle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,7 @@ 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" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
<Popover id="settings-popover" closeByOutsideClick={false} className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
||||||
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} onOrthographyCheck={this.props.onOrthographyCheck} onDownloadOrigin={this.props.onDownloadOrigin}/>
|
<SettingsList inPopover={true} onOptionClick={this.onoptionclick} openOptions={this.props.openOptions} style={{height: '410px'}} onReaderMode={this.props.onReaderMode} onPrint={this.props.onPrint} showHelp={this.props.showHelp} 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.onclosed()}>
|
||||||
|
|
Loading…
Reference in a new issue