[PE mobile] Fixed Link Settings

This commit is contained in:
SergeyEzhin 2021-03-01 18:03:47 +03:00
parent 0a36021498
commit c2ba15338c
2 changed files with 8 additions and 7 deletions

View file

@ -67,7 +67,7 @@ class EditLinkController extends Component {
let mask = "ppaction://hlinksldjumpslide",
indSlide = url.indexOf(mask);
if (0 == indSlide) {
slideNum = parseInt(url.substring(mask.length));
this.slideNum = parseInt(url.substring(mask.length));
if (slideNum < 0) this.slideNum = 0;
if (slideNum >= slidesCount) this.slideNum = slidesCount - 1;
} else this.slideNum = 0;
@ -121,7 +121,7 @@ class EditLinkController extends Component {
break;
case 1:
url = url + "showjump?jump=previousslide";
slidetip = _t.textPrevSlide;
slidetip = _t.textPreviousSlide;
break;
case 2:
url = url + "showjump?jump=firstslide";
@ -137,12 +137,12 @@ class EditLinkController extends Component {
break;
}
props.put_Value(url);
props.put_ToolTip(!tip ? slidetip : tip);
props.put_ToolTip(tip === '' ? slidetip : tip);
def_display = slidetip;
}
if (!linkInfo.displayDisabled) {
props.put_Text(!display ? def_display : display);
props.put_Text(display === '' ? def_display : display);
} else
props.put_Text(null);

View file

@ -13,8 +13,8 @@ const PageTypeLink = props => {
<Page>
<Navbar title={_t.textLinkType} backLink={_t.textBack}/>
<List>
<ListItem title={_t.textExternalLink} radio checked={typeLink === 1} onClick={() => {setTypeLink(1); props.changeType(1); props.initLink();}}></ListItem>
<ListItem title={_t.textSlideInThisPresentation} radio checked={typeLink === 0} onClick={() => {setTypeLink(0); props.changeType(0); props.initLink();}}></ListItem>
<ListItem title={_t.textExternalLink} radio checked={typeLink === 1} onClick={() => {setTypeLink(1); props.changeType(1);}}></ListItem>
<ListItem title={_t.textSlideInThisPresentation} radio checked={typeLink === 0} onClick={() => {setTypeLink(0); props.changeType(0);}}></ListItem>
</List>
</Page>
)
@ -32,7 +32,7 @@ const PageLinkTo = props => {
props.changeTo(type);
};
const [stateNumberTo, setNumberTo] = useState(0);
const [stateNumberTo, setNumberTo] = useState(props.numberTo);
const changeNumber = (curNumber, isDecrement) => {
setTypeTo(4);
@ -139,6 +139,7 @@ const PageLink = props => {
<ListItem link={'/edit-link-to/'} title={_t.textLinkTo} after={displayTo} routeProps={{
changeTo: changeTo,
curTo: linkTo,
numberTo: numberTo,
initLink: props.initLink,
slidesCount: props.slidesCount
}}/>