Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-webclient
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
0
Merge Requests
0
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-webclient
Commits
b520f3fa
Commit
b520f3fa
authored
Mar 09, 2017
by
Георгий Попов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair client code
parent
dad0b155
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
etersoft_typos.js
etersoft_typos.js
+7
-5
No files found.
etersoft_typos.js
View file @
b520f3fa
...
@@ -48,6 +48,9 @@ ETYPOS.prototype = {
...
@@ -48,6 +48,9 @@ ETYPOS.prototype = {
//время последнего запроса
//время последнего запроса
last_query_time
:
0
,
last_query_time
:
0
,
//задержка между запросами
request_delay
:
60000
,
//сайт обработки опечаток
//сайт обработки опечаток
server_url
:
"http://barbass.pubsandbox.eterhost.ru/typos/server.php"
,
server_url
:
"http://barbass.pubsandbox.eterhost.ru/typos/server.php"
,
...
@@ -249,7 +252,6 @@ ETYPOS.prototype = {
...
@@ -249,7 +252,6 @@ ETYPOS.prototype = {
try
{
try
{
var
response
=
window
.
JSON
.
parse
(
this_object
.
request
.
responseText
);
var
response
=
window
.
JSON
.
parse
(
this_object
.
request
.
responseText
);
if
(
response
[
'success'
]
&&
response
[
'message'
])
{
if
(
response
[
'success'
]
&&
response
[
'message'
])
{
if
(
response
[
'success'
]
==
'true'
)
{
if
(
response
[
'success'
]
==
'true'
)
{
var
success
=
'success'
;
var
success
=
'success'
;
...
@@ -258,14 +260,14 @@ ETYPOS.prototype = {
...
@@ -258,14 +260,14 @@ ETYPOS.prototype = {
}
}
this_object
.
printMessage
(
success
,
response
[
'message'
]);
this_object
.
printMessage
(
success
,
response
[
'message'
]);
}
else
{
}
else
{
this_object
.
printMessage
(
'attention'
,
this
.
language
[
this
.
default_language
][
'error_response'
]);
this_object
.
printMessage
(
'attention'
,
this
_object
.
language
[
this_object
.
default_language
][
'error_response'
]);
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
this_object
.
printMessage
(
'error'
,
this
.
language
[
this
.
default_language
][
'error_response_parse'
]);
this_object
.
printMessage
(
'error'
,
this
_object
.
language
[
this_object
.
default_language
][
'error_response_parse'
]);
}
}
};
};
this
.
request
.
onerror
=
function
()
{
this
.
request
.
onerror
=
function
()
{
this_object
.
printMessage
(
"error"
,
this
.
language
[
this
.
default_language
][
'error_post_data'
]);
this_object
.
printMessage
(
"error"
,
this
_object
.
language
[
this_object
.
default_language
][
'error_post_data'
]);
};
};
this
.
request
.
send
(
form_data
);
this
.
request
.
send
(
form_data
);
},
},
...
@@ -288,7 +290,7 @@ ETYPOS.prototype = {
...
@@ -288,7 +290,7 @@ ETYPOS.prototype = {
return
true
;
return
true
;
}
}
if
(
(
this
.
getTime
()
-
prev_time
)
<
60000
)
{
if
(
(
this
.
getTime
()
-
prev_time
)
<
this
.
request_delay
)
{
return
false
;
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