Merge pull request #1414 from ONLYOFFICE/feature/fix-bug-reactjs
Feature/fix bug reactjs
This commit is contained in:
commit
2871048bf0
|
@ -162,7 +162,7 @@ class SearchView extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onReplaceClick() {
|
onReplaceClick() {
|
||||||
if (this.searchbar && this.state.searchQuery) {
|
if (this.searchbar && this.state.replaceQuery) {
|
||||||
if (this.props.onReplaceQuery) {
|
if (this.props.onReplaceQuery) {
|
||||||
let params = this.searchParams();
|
let params = this.searchParams();
|
||||||
params.find = this.state.searchQuery;
|
params.find = this.state.searchQuery;
|
||||||
|
@ -174,7 +174,7 @@ class SearchView extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onReplaceAllClick() {
|
onReplaceAllClick() {
|
||||||
if (this.searchbar && this.state.searchQuery) {
|
if (this.searchbar && this.state.replaceQuery) {
|
||||||
if (this.props.onReplaceAllQuery) {
|
if (this.props.onReplaceAllQuery) {
|
||||||
let params = this.searchParams();
|
let params = this.searchParams();
|
||||||
params.find = this.state.searchQuery;
|
params.find = this.state.searchQuery;
|
||||||
|
@ -281,9 +281,9 @@ class SearchView extends Component {
|
||||||
{/* <a id="replace-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} style={!usereplace ? hidden: null} onClick={() => this.onReplaceClick()}>{_t.textReplace}</a>
|
{/* <a id="replace-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} style={!usereplace ? hidden: null} onClick={() => this.onReplaceClick()}>{_t.textReplace}</a>
|
||||||
<a id="replace-all-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} style={!usereplace ? hidden: null} onClick={() => this.onReplaceAllClick()}>{_t.textReplaceAll}</a> */}
|
<a id="replace-all-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} style={!usereplace ? hidden: null} onClick={() => this.onReplaceAllClick()}>{_t.textReplaceAll}</a> */}
|
||||||
{isReplaceAll ? (
|
{isReplaceAll ? (
|
||||||
<a id="replace-all-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} onClick={() => this.onReplaceAllClick()}>{_t.textReplaceAll}</a>
|
<a id="replace-all-link" className={"link " + (replaceQuery.trim().length ? "" : "disabled")} onClick={() => this.onReplaceAllClick()}>{_t.textReplaceAll}</a>
|
||||||
) : usereplace ? (
|
) : usereplace ? (
|
||||||
<a id="replace-link" className={"link " + (searchQuery.trim().length ? "" : "disabled")} onClick={() => this.onReplaceClick()}>{_t.textReplace}</a>
|
<a id="replace-link" className={"link " + (replaceQuery.trim().length ? "" : "disabled")} onClick={() => this.onReplaceClick()}>{_t.textReplace}</a>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="buttons-row">
|
<div className="buttons-row">
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
.content-block {
|
.content-block {
|
||||||
margin: 0 auto 15px;
|
margin: 0 auto 15px;
|
||||||
|
|
||||||
a {
|
// a {
|
||||||
color: @text-normal;
|
// color: @text-normal;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-about-logo {
|
.settings-about-logo {
|
||||||
|
|
|
@ -148,8 +148,8 @@
|
||||||
.about {
|
.about {
|
||||||
.content-block {
|
.content-block {
|
||||||
margin: 0 auto 15px;
|
margin: 0 auto 15px;
|
||||||
a {
|
p:last-child {
|
||||||
color: @black;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,7 @@ const Search = withTranslation()(props => {
|
||||||
let searchIn = +params.searchIn === 1;
|
let searchIn = +params.searchIn === 1;
|
||||||
let searchBy = +params.searchBy === 0;
|
let searchBy = +params.searchBy === 0;
|
||||||
|
|
||||||
if (params.find && params.find.length) {
|
// if (params.find && params.find.length) {
|
||||||
api.isReplaceAll = false;
|
api.isReplaceAll = false;
|
||||||
|
|
||||||
let options = new Asc.asc_CFindOptions();
|
let options = new Asc.asc_CFindOptions();
|
||||||
|
@ -198,7 +198,7 @@ const Search = withTranslation()(props => {
|
||||||
options.asc_setIsReplaceAll(false);
|
options.asc_setIsReplaceAll(false);
|
||||||
|
|
||||||
api.asc_replaceText(options);
|
api.asc_replaceText(options);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const onReplaceAllQuery = params => {
|
const onReplaceAllQuery = params => {
|
||||||
|
@ -207,7 +207,7 @@ const Search = withTranslation()(props => {
|
||||||
let searchIn = +params.searchIn === 1;
|
let searchIn = +params.searchIn === 1;
|
||||||
let searchBy = +params.searchBy === 0;
|
let searchBy = +params.searchBy === 0;
|
||||||
|
|
||||||
if (params.find && params.find.length) {
|
// if (params.find && params.find.length) {
|
||||||
api.isReplaceAll = true;
|
api.isReplaceAll = true;
|
||||||
|
|
||||||
let options = new Asc.asc_CFindOptions();
|
let options = new Asc.asc_CFindOptions();
|
||||||
|
@ -222,7 +222,7 @@ const Search = withTranslation()(props => {
|
||||||
options.asc_setIsReplaceAll(true);
|
options.asc_setIsReplaceAll(true);
|
||||||
|
|
||||||
api.asc_replaceText(options);
|
api.asc_replaceText(options);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return <SESearchView _t={_t} onSearchQuery={onSearchQuery} onchangeSearchQuery={onchangeSearchQuery} onReplaceQuery={onReplaceQuery} onReplaceAllQuery={onReplaceAllQuery} />
|
return <SESearchView _t={_t} onSearchQuery={onSearchQuery} onchangeSearchQuery={onchangeSearchQuery} onReplaceQuery={onReplaceQuery} onReplaceAllQuery={onReplaceAllQuery} />
|
||||||
|
|
Loading…
Reference in a new issue