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
2b1e284e
Commit
2b1e284e
authored
Sep 22, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Set serverVersion parameter to version history items.
parent
6f1e72f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
apps/common/main/lib/controller/History.js
apps/common/main/lib/controller/History.js
+4
-0
apps/common/main/lib/model/HistoryVersion.js
apps/common/main/lib/model/HistoryVersion.js
+2
-1
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+4
-2
No files found.
apps/common/main/lib/controller/History.js
View file @
2b1e284e
...
@@ -58,6 +58,7 @@ define([
...
@@ -58,6 +58,7 @@ define([
this
.
currentDocId
=
''
;
this
.
currentDocId
=
''
;
this
.
currentDocIdPrev
=
''
;
this
.
currentDocIdPrev
=
''
;
this
.
currentRev
=
0
;
this
.
currentRev
=
0
;
this
.
currentServerVersion
=
0
;
},
},
events
:
{
events
:
{
...
@@ -130,6 +131,7 @@ define([
...
@@ -130,6 +131,7 @@ define([
this
.
currentDocId
=
record
.
get
(
'
docId
'
);
this
.
currentDocId
=
record
.
get
(
'
docId
'
);
this
.
currentDocIdPrev
=
record
.
get
(
'
docIdPrev
'
);
this
.
currentDocIdPrev
=
record
.
get
(
'
docIdPrev
'
);
this
.
currentRev
=
rev
;
this
.
currentRev
=
rev
;
this
.
currentServerVersion
=
record
.
get
(
'
serverVersion
'
);
if
(
_
.
isEmpty
(
url
)
||
(
urlGetTime
-
record
.
get
(
'
urlGetTime
'
)
>
5
*
60000
))
{
if
(
_
.
isEmpty
(
url
)
||
(
urlGetTime
-
record
.
get
(
'
urlGetTime
'
)
>
5
*
60000
))
{
_
.
delay
(
function
()
{
_
.
delay
(
function
()
{
...
@@ -146,6 +148,7 @@ define([
...
@@ -146,6 +148,7 @@ define([
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setIsRequested
(
false
);
hist
.
asc_setIsRequested
(
false
);
hist
.
asc_setServerVersion
(
this
.
currentServerVersion
);
this
.
api
.
asc_showRevision
(
hist
);
this
.
api
.
asc_showRevision
(
hist
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
...
@@ -196,6 +199,7 @@ define([
...
@@ -196,6 +199,7 @@ define([
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setArrColors
(
this
.
currentArrColors
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setToken
(
token
);
hist
.
asc_setIsRequested
(
true
);
hist
.
asc_setIsRequested
(
true
);
hist
.
asc_setServerVersion
(
this
.
currentServerVersion
);
this
.
api
.
asc_showRevision
(
hist
);
this
.
api
.
asc_showRevision
(
hist
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
var
commentsController
=
this
.
getApplication
().
getController
(
'
Common.Controllers.Comments
'
);
...
...
apps/common/main/lib/model/HistoryVersion.js
View file @
2b1e284e
...
@@ -73,7 +73,8 @@ define([
...
@@ -73,7 +73,8 @@ define([
isExpanded
:
true
,
isExpanded
:
true
,
isVisible
:
true
,
isVisible
:
true
,
allowSelected
:
true
,
allowSelected
:
true
,
selected
:
false
selected
:
false
,
serverVersion
:
0
}
}
}
}
});
});
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
2b1e284e
...
@@ -447,7 +447,8 @@ define([
...
@@ -447,7 +447,8 @@ define([
markedAsVersion
:
(
group
!==
version
.
versionGroup
),
markedAsVersion
:
(
group
!==
version
.
versionGroup
),
selected
:
(
opts
.
data
.
currentVersion
==
version
.
version
),
selected
:
(
opts
.
data
.
currentVersion
==
version
.
version
),
canRestore
:
this
.
appOptions
.
canHistoryRestore
&&
(
ver
<
versions
.
length
-
1
),
canRestore
:
this
.
appOptions
.
canHistoryRestore
&&
(
ver
<
versions
.
length
-
1
),
isExpanded
:
true
isExpanded
:
true
,
serverVersion
:
version
.
serverVersion
}));
}));
if
(
opts
.
data
.
currentVersion
==
version
.
version
)
{
if
(
opts
.
data
.
currentVersion
==
version
.
version
)
{
currentVersion
=
arrVersions
[
arrVersions
.
length
-
1
];
currentVersion
=
arrVersions
[
arrVersions
.
length
-
1
];
...
@@ -496,7 +497,8 @@ define([
...
@@ -496,7 +497,8 @@ define([
selected
:
false
,
selected
:
false
,
canRestore
:
this
.
appOptions
.
canHistoryRestore
,
canRestore
:
this
.
appOptions
.
canHistoryRestore
,
isRevision
:
false
,
isRevision
:
false
,
isVisible
:
true
isVisible
:
true
,
serverVersion
:
version
.
serverVersion
}));
}));
arrColors
.
push
(
user
.
get
(
'
colorval
'
));
arrColors
.
push
(
user
.
get
(
'
colorval
'
));
}
}
...
...
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