Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
2eb46fa2
Commit
2eb46fa2
authored
Mar 14, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Check if token for history revision is expired.
parent
52e9b6a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
apps/common/main/lib/controller/History.js
apps/common/main/lib/controller/History.js
+11
-0
No files found.
apps/common/main/lib/controller/History.js
View file @
2eb46fa2
...
...
@@ -57,6 +57,7 @@ define([
this
.
currentArrColors
=
[];
this
.
currentDocId
=
''
;
this
.
currentDocIdPrev
=
''
;
this
.
currentRev
=
0
;
},
events
:
{
...
...
@@ -74,6 +75,7 @@ define([
setApi
:
function
(
api
)
{
this
.
api
=
api
;
this
.
api
.
asc_registerCallback
(
'
asc_onDownloadUrl
'
,
_
.
bind
(
this
.
onDownloadUrl
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onExpiredToken
'
,
_
.
bind
(
this
.
onExpiredToken
,
this
));
return
this
;
},
...
...
@@ -127,6 +129,7 @@ define([
this
.
currentArrColors
=
record
.
get
(
'
arrColors
'
);
this
.
currentDocId
=
record
.
get
(
'
docId
'
);
this
.
currentDocIdPrev
=
record
.
get
(
'
docIdPrev
'
);
this
.
currentRev
=
rev
;
if
(
_
.
isEmpty
(
url
)
||
(
urlGetTime
-
record
.
get
(
'
urlGetTime
'
)
>
5
*
60000
))
{
_
.
delay
(
function
()
{
...
...
@@ -142,6 +145,7 @@ define([
hist
.
asc_setCurrentChangeId
(
this
.
currentChangeId
);
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setIsRequested
(
false
);
this
.
api
.
asc_showRevision
(
hist
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
...
...
@@ -191,6 +195,7 @@ define([
hist
.
asc_setCurrentChangeId
(
this
.
currentChangeId
);
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setIsRequested
(
true
);
this
.
api
.
asc_showRevision
(
hist
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
...
...
@@ -199,6 +204,12 @@ define([
}
},
onExpiredToken
:
function
()
{
_
.
delay
(
function
()
{
Common
.
Gateway
.
requestHistoryData
(
this
.
currentRev
);
// получаем url-ы для ревизий
},
10
);
},
onClickBackToDocument
:
function
()
{
// reload editor
Common
.
Gateway
.
requestHistoryClose
();
...
...
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