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
f91ec42e
Commit
f91ec42e
authored
Jul 07, 2016
by
Julia Radzhabova
Committed by
GitHub
Jul 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from ONLYOFFICE/release/4.0.1
Release/4.0.1
parents
1e73c03b
56b75be8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
23 deletions
+24
-23
apps/common/main/lib/controller/Chat.js
apps/common/main/lib/controller/Chat.js
+10
-7
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+7
-9
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+3
-3
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+4
-4
No files found.
apps/common/main/lib/controller/Chat.js
View file @
f91ec42e
...
...
@@ -80,14 +80,17 @@ define([
setMode
:
function
(
mode
)
{
this
.
mode
=
mode
;
if
(
this
.
api
&&
this
.
mode
.
canCoAuthoring
)
{
if
(
this
.
mode
.
canChat
)
if
(
this
.
api
)
{
if
(
this
.
mode
.
canC
oAuthoring
&&
this
.
mode
.
canC
hat
)
this
.
api
.
asc_registerCallback
(
'
asc_onCoAuthoringChatReceiveMessage
'
,
_
.
bind
(
this
.
onReceiveMessage
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onAuthParticipantsChanged
'
,
_
.
bind
(
this
.
onUsersChanged
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onConnectionStateChanged
'
,
_
.
bind
(
this
.
onUserConnection
,
this
));
this
.
api
.
asc_coAuthoringGetUsers
();
if
(
this
.
mode
.
canChat
)
if
(
!
this
.
mode
.
isEditDiagram
&&
!
this
.
mode
.
isEditMailMerge
)
{
this
.
api
.
asc_registerCallback
(
'
asc_onAuthParticipantsChanged
'
,
_
.
bind
(
this
.
onUsersChanged
,
this
));
this
.
api
.
asc_registerCallback
(
'
asc_onConnectionStateChanged
'
,
_
.
bind
(
this
.
onUserConnection
,
this
));
this
.
api
.
asc_coAuthoringGetUsers
();
}
if
(
this
.
mode
.
canCoAuthoring
&&
this
.
mode
.
canChat
)
this
.
api
.
asc_coAuthoringChatGetMessages
();
}
return
this
;
...
...
@@ -100,7 +103,7 @@ define([
},
onUsersChanged
:
function
(
users
){
if
(
!
this
.
mode
.
canLicense
)
{
if
(
!
this
.
mode
.
canLicense
||
!
this
.
mode
.
canCoAuthoring
)
{
var
len
=
0
;
for
(
name
in
users
)
{
if
(
undefined
!==
name
)
len
++
;
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
f91ec42e
...
...
@@ -837,11 +837,9 @@ define([
application
.
getController
(
'
Common.Controllers.ExternalDiagramEditor
'
).
setApi
(
this
.
api
).
loadConfig
({
config
:
this
.
editorConfig
,
customization
:
this
.
editorConfig
.
customization
});
application
.
getController
(
'
Common.Controllers.ExternalMergeEditor
'
).
setApi
(
this
.
api
).
loadConfig
({
config
:
this
.
editorConfig
,
customization
:
this
.
editorConfig
.
customization
});
if
(
!
me
.
appOptions
.
isLightVersion
)
{
pluginsController
.
setApi
(
me
.
api
);
me
.
updatePluginsList
(
me
.
plugins
);
me
.
api
.
asc_registerCallback
(
'
asc_onPluginsInit
'
,
_
.
bind
(
me
.
updatePluginsList
,
me
));
}
pluginsController
.
setApi
(
me
.
api
);
me
.
updatePluginsList
(
me
.
plugins
);
me
.
api
.
asc_registerCallback
(
'
asc_onPluginsInit
'
,
_
.
bind
(
me
.
updatePluginsList
,
me
));
documentHolderController
.
setApi
(
me
.
api
);
documentHolderController
.
createDelayedElements
();
...
...
@@ -934,13 +932,13 @@ define([
},
onEditorPermissions
:
function
(
params
)
{
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
true
;
/** coauthoring end **/
this
.
permissions
.
review
=
(
this
.
permissions
.
review
===
undefined
)
?
(
this
.
permissions
.
edit
!==
false
)
:
this
.
permissions
.
review
;
this
.
appOptions
.
canAnalytics
=
params
.
asc_getIsAnalyticsEnable
();
this
.
appOptions
.
canLicense
=
params
.
asc_getCanLicense
?
params
.
asc_getCanLicense
()
:
false
;
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
!
this
.
appOptions
.
isLightVersion
;
/** coauthoring end **/
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
isReviewOnly
=
(
this
.
permissions
.
review
===
true
)
&&
(
this
.
permissions
.
edit
===
false
);
this
.
appOptions
.
canRequestEditRights
=
this
.
editorConfig
.
canRequestEditRights
;
...
...
@@ -949,7 +947,7 @@ define([
(
!
this
.
appOptions
.
isReviewOnly
||
this
.
appOptions
.
canLicense
);
// if isReviewOnly==true -> canLicense must be true
this
.
appOptions
.
isEdit
=
this
.
appOptions
.
canLicense
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
appOptions
.
canReview
=
this
.
appOptions
.
canLicense
&&
this
.
appOptions
.
isEdit
&&
(
this
.
permissions
.
review
===
true
);
this
.
appOptions
.
canUseHistory
=
this
.
appOptions
.
canLicense
&&
this
.
editorConfig
.
canUseHistory
&&
(
this
.
permissions
.
edit
!==
false
)
&&
this
.
appOptions
.
canCoAuthoring
&&
!
this
.
appOptions
.
isDesktopApp
;
this
.
appOptions
.
canUseHistory
=
this
.
appOptions
.
canLicense
&&
!
this
.
appOptions
.
isLightVersion
&&
this
.
editorConfig
.
canUseHistory
&&
(
this
.
permissions
.
edit
!==
false
)
&&
this
.
appOptions
.
canCoAuthoring
&&
!
this
.
appOptions
.
isDesktopApp
;
this
.
appOptions
.
canHistoryClose
=
this
.
editorConfig
.
canHistoryClose
;
this
.
appOptions
.
canUseMailMerge
=
this
.
appOptions
.
canLicense
&&
this
.
appOptions
.
canEdit
&&
!
this
.
appOptions
.
isDesktopApp
;
this
.
appOptions
.
canSendEmailAddresses
=
this
.
appOptions
.
canLicense
&&
this
.
editorConfig
.
canSendEmailAddresses
&&
this
.
appOptions
.
canEdit
&&
this
.
appOptions
.
canCoAuthoring
;
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
f91ec42e
...
...
@@ -715,12 +715,12 @@ define([
},
onEditorPermissions
:
function
(
params
)
{
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
true
;
/** coauthoring end **/
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
canLicense
=
params
.
asc_getCanLicense
?
params
.
asc_getCanLicense
()
:
false
;
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
!
this
.
appOptions
.
isLightVersion
;
/** coauthoring end **/
this
.
appOptions
.
canRequestEditRights
=
this
.
editorConfig
.
canRequestEditRights
;
this
.
appOptions
.
canEdit
=
this
.
permissions
.
edit
!==
false
&&
// can edit
(
this
.
editorConfig
.
canRequestEditRights
||
this
.
editorConfig
.
mode
!==
'
view
'
);
// if mode=="view" -> canRequestEditRights must be defined
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
f91ec42e
...
...
@@ -595,7 +595,7 @@ define([
leftMenuView
.
getMenu
(
'
file
'
).
loadDocument
({
doc
:
me
.
appOptions
.
spreadsheet
});
leftmenuController
.
setMode
(
me
.
appOptions
).
createDelayedElements
().
setApi
(
me
.
api
);
if
(
!
me
.
appOptions
.
is
LightVersion
&&
!
me
.
appOptions
.
is
EditMailMerge
&&
!
me
.
appOptions
.
isEditDiagram
)
{
if
(
!
me
.
appOptions
.
isEditMailMerge
&&
!
me
.
appOptions
.
isEditDiagram
)
{
pluginsController
.
setApi
(
me
.
api
);
me
.
updatePluginsList
(
me
.
plugins
);
me
.
api
.
asc_registerCallback
(
'
asc_onPluginsInit
'
,
_
.
bind
(
me
.
updatePluginsList
,
me
));
...
...
@@ -735,12 +735,12 @@ define([
this
.
appOptions
.
canAutosave
=
true
;
this
.
appOptions
.
canAnalytics
=
params
.
asc_getIsAnalyticsEnable
();
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
true
;
/** coauthoring end **/
this
.
appOptions
.
isOffline
=
this
.
api
.
asc_isOffline
();
this
.
appOptions
.
canLicense
=
params
.
asc_getCanLicense
?
params
.
asc_getCanLicense
()
:
false
;
this
.
appOptions
.
isLightVersion
=
params
.
asc_getIsLight
();
/** coauthoring begin **/
this
.
appOptions
.
canCoAuthoring
=
!
this
.
appOptions
.
isLightVersion
;
/** coauthoring end **/
this
.
appOptions
.
canComments
=
this
.
appOptions
.
canLicense
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
comments
===
false
);
this
.
appOptions
.
canChat
=
this
.
appOptions
.
canLicense
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
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