Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-server
Commits
a0d95b00
Commit
a0d95b00
authored
Aug 27, 2018
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Задача 13121] Поправил сокрытие карточки с опечаткой в случае ошибки
parent
b8624760
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
index.jsx
cp/javascript/src/components/Typo/index.jsx
+9
-12
index.jsx
cp/javascript/src/components/TypoList/index.jsx
+7
-2
No files found.
cp/javascript/src/components/Typo/index.jsx
View file @
a0d95b00
...
...
@@ -147,22 +147,18 @@ export default class Typo extends Component {
/**
* Hides typo card
*/
hideTypoCard
(
completeFunc
)
{
$
(
`#typo-
${
this
.
typo
.
id
}
`
).
animate
({
marginLeft
:
"3000px"
,
opacity
:
0
},
500
,
completeFunc
);
}
// hideTypoCard(
) {
//
$(`#typo-${this.typo.id}`).animate({
//
marginLeft: "3000px",
//
opacity: 0
// }, 500
);
//
}
applyCorrection
=
()
=>
{
this
.
hideTypoCard
(()
=>
{
this
.
acceptCallback
(
this
.
typo
.
correctedText
);
});
let
success
=
this
.
acceptCallback
(
this
.
typo
.
correctedText
);
};
declineCorrection
=
()
=>
{
this
.
hideTypoCard
(()
=>
{
this
.
declineCallback
();
});
let
success
=
this
.
declineCallback
();
};
}
\ No newline at end of file
cp/javascript/src/components/TypoList/index.jsx
View file @
a0d95b00
...
...
@@ -34,13 +34,15 @@ export default class TypoList extends Component {
this
.
state
.
resolvedTypos
.
push
(
typoId
)
this
.
_decrementSiteTyposCount
();
this
.
forceUpdate
();
return
;
return
true
;
}
alertify
.
error
(
response
.
message
);
return
false
;
})
.
fail
(()
=>
{
alertify
.
error
(
"Ошибка исправления опечатки, попробуйте позже"
);
return
false
;
})
}
...
...
@@ -55,12 +57,15 @@ export default class TypoList extends Component {
.
done
(()
=>
{
alertify
.
success
(
`Опечатка
${
typoId
}
была отклонена`
);
this
.
state
.
resolvedTypos
.
push
(
typoId
)
this
.
state
.
resolvedTypos
.
push
(
typoId
)
;
this
.
_decrementSiteTyposCount
();
this
.
forceUpdate
();
return
true
;
})
.
fail
(()
=>
{
alertify
.
error
(
"Ошибка исправления опечатки, попробуйте позже"
);
return
false
;
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment