Merge pull request #1111 from ONLYOFFICE/feature/bug-fixes

Feature/bug fixes
This commit is contained in:
maxkadushkin 2021-08-23 15:09:23 +03:00 committed by GitHub
commit 7f7e344ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 21 deletions

View file

@ -564,25 +564,37 @@ class ViewCommentsController extends Component {
this.onResolveComment(comment);
break;
case 'deleteComment':
f7.dialog.confirm(
_t.textMessageDeleteComment,
_t.textDeleteComment,
() => {
this.deleteComment(comment);
}
);
f7.dialog.create({
title: _t.textDeleteComment,
text: _t.textMessageDeleteComment,
buttons: [
{
text: _t.textCancel
},
{
text: _t.textOk,
onClick: () => this.deleteComment(comment)
}
]
}).open();
break;
case 'editReply':
this.props.storeComments.openEditReply(true, comment, reply);
break;
case 'deleteReply':
f7.dialog.confirm(
_t.textMessageDeleteReply,
_t.textDeleteReply,
() => {
this.deleteReply(comment, reply);
}
);
f7.dialog.create({
title: _t.textDeleteReply,
text: _t.textMessageDeleteReply,
buttons: [
{
text: _t.textCancel
},
{
text: _t.textOk,
onClick: () => this.deleteReply(comment, reply)
}
]
}).open();
break;
case 'addReply':
this.props.storeComments.openAddReply(true, comment);

View file

@ -75,6 +75,7 @@
"textBold": "Bold",
"textBreakBefore": "Page break before",
"textCancel": "Cancel",
"textOk": "Ok",
"textCaps": "All caps",
"textCenter": "Align center",
"textChart": "Chart",

View file

@ -13,8 +13,8 @@ const PageLink = props => {
const [stateLink, setLink] = useState('');
const [stateDisplay, setDisplay] = useState(display);
const [stateTip, setTip] = useState('');
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplay ? true : false);
return (
<Page>
{!props.noNavbar && <Navbar title={_t.textAddLink} backLink={_t.textBack}></Navbar>}
@ -26,7 +26,7 @@ const PageLink = props => {
value={stateLink}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplay || stateDisplay === stateLink) && stateAutoUpdate) setDisplay(event.target.value);
if(stateAutoUpdate) setDisplay(event.target.value);
}}
></ListInput>
<ListInput

View file

@ -15,6 +15,7 @@
"textAddReply": "Add Reply",
"textBack": "Back",
"textCancel": "Cancel",
"textOk": "Ok",
"textCollaboration": "Collaboration",
"textComments": "Comments",
"textDeleteComment": "Delete Comment",

View file

@ -99,7 +99,7 @@ const PageLink = props => {
const display = props.getTextDisplay();
const displayDisabled = display !== false && display === null;
const [stateDisplay, setDisplay] = useState(display !== false ? ((display !== null) ? display : _t.textDefault) : "");
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplay ? true : false);
const [screenTip, setScreenTip] = useState('');
return (
@ -117,7 +117,7 @@ const PageLink = props => {
value={link}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplay || stateDisplay === link) && stateAutoUpdate) setDisplay(event.target.value);
if(stateAutoUpdate) setDisplay(event.target.value);
}}
/> :
<ListItem link={'/add-link-to/'} title={_t.textLinkTo} after={displayTo} routeProps={{

View file

@ -15,6 +15,7 @@
"textAddReply": "Add Reply",
"textBack": "Back",
"textCancel": "Cancel",
"textOk": "Ok",
"textCollaboration": "Collaboration",
"textComments": "Comments",
"textDeleteComment": "Delete Comment",

View file

@ -63,7 +63,7 @@ const AddLinkView = props => {
displayText = displayDisabled ? _t.textSelectedRange : displayText;
const [stateDisplayText, setDisplayText] = useState(displayText);
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplayText ? true : false);
const [screenTip, setScreenTip] = useState('');
const activeSheet = props.activeSheet;
@ -90,7 +90,7 @@ const AddLinkView = props => {
value={link}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplayText || stateDisplayText === link) && stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value);
if(stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value);
}}
className={isIos ? 'list-input-right' : ''}
/>