Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
482280c2
Commit
482280c2
authored
Feb 07, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix start co authoring when first user long save and second user connect in this time
parent
f2a366fc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
101 deletions
+136
-101
cell/api.js
cell/api.js
+60
-43
common/docscoapi.js
common/docscoapi.js
+21
-10
slide/Editor/CollaborativeEditing.js
slide/Editor/CollaborativeEditing.js
+3
-2
slide/api.js
slide/api.js
+24
-17
word/Editor/CollaborativeEditing.js
word/Editor/CollaborativeEditing.js
+3
-2
word/api.js
word/api.js
+25
-27
No files found.
cell/api.js
View file @
482280c2
...
...
@@ -312,28 +312,29 @@ var editor;
this
.
_asc_downloadAs
(
typeFile
,
c_oAscAsyncAction
.
DownloadAs
,
{
downloadType
:
bIsDownloadEvent
?
DownloadType
.
Download
:
DownloadType
.
None
});
};
spreadsheet_api
.
prototype
.
asc_Save
=
function
(
isAutoSave
)
{
if
(
!
this
.
canSave
||
this
.
isChartEditor
||
c_oAscAdvancedOptionsAction
.
None
!==
this
.
advancedOptionsAction
||
this
.
isLongAction
()
||
!
(
this
.
asc_isDocumentCanSave
()
||
this
.
collaborativeEditing
.
haveOtherChanges
()))
{
return
;
}
spreadsheet_api
.
prototype
.
asc_Save
=
function
(
isAutoSave
)
{
if
(
!
this
.
canSave
||
this
.
isChartEditor
||
c_oAscAdvancedOptionsAction
.
None
!==
this
.
advancedOptionsAction
||
this
.
isLongAction
()
||
!
(
this
.
asc_isDocumentCanSave
()
||
this
.
collaborativeEditing
.
haveOtherChanges
()
||
this
.
canUnlockDocument
))
{
return
;
}
this
.
IsUserSave
=
!
isAutoSave
;
if
(
this
.
IsUserSave
)
{
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
Information
,
c_oAscAsyncAction
.
Save
);
}
/* Нужно закрыть редактор (до выставления флага canSave, т.к. мы должны успеть отправить
asc_onDocumentModifiedChanged для подписки на сборку) Баг http://bugzilla.onlyoffice.com/show_bug.cgi?id=28331 */
this
.
asc_closeCellEditor
();
this
.
IsUserSave
=
!
isAutoSave
;
if
(
this
.
IsUserSave
)
{
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
Information
,
c_oAscAsyncAction
.
Save
);
}
/* Нужно закрыть редактор (до выставления флага canSave, т.к. мы должны успеть отправить
asc_onDocumentModifiedChanged для подписки на сборку) Баг http://bugzilla.onlyoffice.com/show_bug.cgi?id=28331 */
this
.
asc_closeCellEditor
();
// Не даем пользователю сохранять, пока не закончится сохранение
this
.
canSave
=
false
;
// Не даем пользователю сохранять, пока не закончится сохранение
this
.
canSave
=
false
;
var
t
=
this
;
this
.
CoAuthoringApi
.
askSaveChanges
(
function
(
e
)
{
t
.
onSaveCallback
(
e
);
});
};
var
t
=
this
;
this
.
CoAuthoringApi
.
askSaveChanges
(
function
(
e
)
{
t
.
onSaveCallback
(
e
);
});
};
spreadsheet_api
.
prototype
.
asc_Print
=
function
(
adjustPrint
,
bIsDownloadEvent
)
{
if
(
window
[
"
AscDesktopEditor
"
])
{
...
...
@@ -1180,25 +1181,29 @@ var editor;
t
.
collaborativeEditing
.
_recalcLockArray
(
c_oAscLockTypes
.
kLockTypeOther
,
oRecalcIndexColumns
,
oRecalcIndexRows
);
}
};
this
.
CoAuthoringApi
.
onStartCoAuthoring
=
function
(
isStartEvent
)
{
t
.
startCollaborationEditing
();
// На старте не нужно ничего делать
if
(
!
isStartEvent
)
{
// Когда документ еще не загружен, нужно отпустить lock (при быстром открытии 2-мя пользователями)
if
(
!
t
.
IsSendDocumentLoadCompleate
)
{
t
.
CoAuthoringApi
.
unLockDocument
(
false
);
}
else
{
// Принимаем чужие изменения
t
.
collaborativeEditing
.
applyChanges
();
// Пересылаем свои изменения
t
.
collaborativeEditing
.
sendChanges
();
}
}
};
this
.
CoAuthoringApi
.
onEndCoAuthoring
=
function
(
isStartEvent
)
{
t
.
endCollaborationEditing
();
};
this
.
CoAuthoringApi
.
onStartCoAuthoring
=
function
(
isStartEvent
)
{
// На старте не нужно ничего делать
if
(
isStartEvent
)
{
t
.
startCollaborationEditing
();
}
else
{
// Когда документ еще не загружен, нужно отпустить lock (при быстром открытии 2-мя пользователями)
if
(
!
t
.
IsSendDocumentLoadCompleate
)
{
t
.
startCollaborationEditing
();
t
.
CoAuthoringApi
.
unLockDocument
(
false
);
}
else
{
// Сохранять теперь должны на таймере автосохранения. Иначе могли два раза запустить сохранение, не дожидаясь окончания
t
.
canUnlockDocument
=
true
;
t
.
canStartCoAuthoring
=
true
;
}
}
};
this
.
CoAuthoringApi
.
onEndCoAuthoring
=
function
(
isStartEvent
)
{
if
(
t
.
canUnlockDocument
)
{
t
.
canStartCoAuthoring
=
false
;
}
else
{
t
.
endCollaborationEditing
();
}
};
};
spreadsheet_api
.
prototype
.
_onSaveChanges
=
function
(
recalcIndexColumns
,
recalcIndexRows
)
{
...
...
@@ -1213,11 +1218,12 @@ var editor;
}
}
if
(
0
<
arrChanges
.
length
||
null
!==
deleteIndex
||
null
!==
excelAdditionalInfo
)
{
this
.
CoAuthoringApi
.
saveChanges
(
arrChanges
,
deleteIndex
,
excelAdditionalInfo
);
this
.
CoAuthoringApi
.
saveChanges
(
arrChanges
,
deleteIndex
,
excelAdditionalInfo
,
this
.
canUnlockDocument2
);
History
.
CanNotAddChanges
=
true
;
}
else
{
this
.
CoAuthoringApi
.
unLockDocument
(
true
);
this
.
CoAuthoringApi
.
unLockDocument
(
true
,
this
.
canUnlockDocument2
);
}
this
.
canUnlockDocument2
=
false
;
}
};
...
...
@@ -1430,6 +1436,13 @@ var editor;
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
Information
,
c_oAscAsyncAction
.
Save
);
}
this
.
canUnlockDocument2
=
this
.
canUnlockDocument
;
if
(
this
.
canUnlockDocument
&&
this
.
canStartCoAuthoring
)
{
this
.
CoAuthoringApi
.
onStartCoAuthoring
(
true
);
this
.
canStartCoAuthoring
=
false
;
this
.
canUnlockDocument
=
false
;
}
AscCommon
.
CollaborativeEditing
.
Clear_CollaborativeMarks
();
// Принимаем чужие изменения
this
.
collaborativeEditing
.
applyChanges
();
...
...
@@ -1454,8 +1467,6 @@ var editor;
window
[
"
AscDesktopEditor
"
][
"
OnSave
"
]();
}
};
// Пересылаем всегда, но чистим только если началось совместное редактирование
// Пересылаем свои изменения
this
.
collaborativeEditing
.
sendChanges
(
this
.
IsUserSave
);
}
else
{
...
...
@@ -2950,11 +2961,17 @@ var editor;
////////////////////////////AutoSave api/////////////////////////////////
/////////////////////////////////////////////////////////////////////////
spreadsheet_api
.
prototype
.
_autoSave
=
function
()
{
if
((
0
===
this
.
autoSaveGap
&&
(
!
this
.
collaborativeEditing
.
getFast
()
||
!
this
.
collaborativeEditing
.
getCollaborativeEditing
()))
if
((
!
this
.
canUnlockDocument
&&
0
===
this
.
autoSaveGap
&&
(
!
this
.
collaborativeEditing
.
getFast
()
||
!
this
.
collaborativeEditing
.
getCollaborativeEditing
()))
||
this
.
asc_getCellEditMode
()
||
this
.
asc_getIsTrackShape
()
||
this
.
isOpenedChartFrame
||
!
History
.
IsEndTransaction
()
||
!
this
.
canSave
)
{
return
;
}
if
(
this
.
canUnlockDocument
)
{
this
.
asc_Save
(
true
);
return
;
}
if
(
!
History
.
Have_Changes
(
true
)
&&
!
(
this
.
collaborativeEditing
.
getCollaborativeEditing
()
&&
0
!==
this
.
collaborativeEditing
.
getOwnLocksLength
()))
{
if
(
this
.
collaborativeEditing
.
getFast
()
&&
this
.
collaborativeEditing
.
haveOtherChanges
())
{
AscCommon
.
CollaborativeEditing
.
Clear_CollaborativeMarks
();
...
...
common/docscoapi.js
View file @
482280c2
...
...
@@ -278,15 +278,17 @@
}
};
CDocsCoApi
.
prototype
.
saveChanges
=
function
(
arrayChanges
,
deleteIndex
,
excelAdditionalInfo
)
{
CDocsCoApi
.
prototype
.
saveChanges
=
function
(
arrayChanges
,
deleteIndex
,
excelAdditionalInfo
,
canUnlockDocument
)
{
if
(
this
.
_CoAuthoringApi
&&
this
.
_onlineWork
)
{
this
.
_CoAuthoringApi
.
canUnlockDocument
=
canUnlockDocument
;
this
.
_CoAuthoringApi
.
saveChanges
(
arrayChanges
,
null
,
deleteIndex
,
excelAdditionalInfo
);
}
};
CDocsCoApi
.
prototype
.
unLockDocument
=
function
(
isSave
)
{
CDocsCoApi
.
prototype
.
unLockDocument
=
function
(
isSave
,
canUnlockDocument
)
{
if
(
this
.
_CoAuthoringApi
&&
this
.
_onlineWork
)
{
this
.
_CoAuthoringApi
.
unLockDocument
(
isSave
);
this
.
_CoAuthoringApi
.
canUnlockDocument
=
canUnlockDocument
;
this
.
_CoAuthoringApi
.
unLockDocument
(
isSave
,
canUnlockDocument
);
}
};
...
...
@@ -561,6 +563,8 @@
this
.
changesIndex
=
0
;
// Дополнительная информация для Excel
this
.
excelAdditionalInfo
=
null
;
// Unlock document
this
.
canUnlockDocument
=
false
;
this
.
_url
=
""
;
...
...
@@ -796,11 +800,12 @@
this
.
_send
({
'
type
'
:
'
saveChanges
'
,
'
changes
'
:
JSON
.
stringify
(
arrayChanges
.
slice
(
startIndex
,
endIndex
)),
'
startSaveChanges
'
:
(
startIndex
===
0
),
'
endSaveChanges
'
:
(
endIndex
===
arrayChanges
.
length
),
'
isCoAuthoring
'
:
this
.
isCoAuthoring
,
'
isExcel
'
:
this
.
_isExcel
,
'
deleteIndex
'
:
this
.
deleteIndex
,
'
excelAdditionalInfo
'
:
this
.
excelAdditionalInfo
?
JSON
.
stringify
(
this
.
excelAdditionalInfo
)
:
null
});
'
excelAdditionalInfo
'
:
this
.
excelAdditionalInfo
?
JSON
.
stringify
(
this
.
excelAdditionalInfo
)
:
null
,
'
unlock
'
:
this
.
canUnlockDocument
});
};
DocsCoApi
.
prototype
.
unLockDocument
=
function
(
isSave
)
{
this
.
_send
({
'
type
'
:
'
unLockDocument
'
,
'
isSave
'
:
isSave
});
this
.
_send
({
'
type
'
:
'
unLockDocument
'
,
'
isSave
'
:
isSave
,
'
unlock
'
:
this
.
canUnlockDocument
});
};
DocsCoApi
.
prototype
.
getUsers
=
function
()
{
...
...
@@ -891,13 +896,13 @@
};
DocsCoApi
.
prototype
.
_onMessages
=
function
(
data
,
clear
)
{
if
(
data
[
"
messages
"
]
&&
this
.
onMessage
)
{
if
(
ConnectionState
.
Authorized
===
this
.
_state
&&
data
[
"
messages
"
]
&&
this
.
onMessage
)
{
this
.
onMessage
(
data
[
"
messages
"
],
clear
);
}
};
DocsCoApi
.
prototype
.
_onCursor
=
function
(
data
)
{
if
(
data
[
"
messages
"
]
&&
this
.
onCursor
)
{
if
(
ConnectionState
.
Authorized
===
this
.
_state
&&
data
[
"
messages
"
]
&&
this
.
onCursor
)
{
this
.
onCursor
(
data
[
"
messages
"
]);
}
};
...
...
@@ -909,7 +914,7 @@
};
DocsCoApi
.
prototype
.
_onSession
=
function
(
data
)
{
if
(
data
[
"
messages
"
]
&&
this
.
onSession
)
{
if
(
ConnectionState
.
Authorized
===
this
.
_state
&&
data
[
"
messages
"
]
&&
this
.
onSession
)
{
this
.
onSession
(
data
[
"
messages
"
]);
}
};
...
...
@@ -940,7 +945,7 @@
};
DocsCoApi
.
prototype
.
_onGetLock
=
function
(
data
)
{
if
(
data
[
"
locks
"
])
{
if
(
ConnectionState
.
Authorized
===
this
.
_state
&&
data
[
"
locks
"
])
{
for
(
var
key
in
data
[
"
locks
"
])
{
if
(
data
[
"
locks
"
].
hasOwnProperty
(
key
))
{
var
lock
=
data
[
"
locks
"
][
key
],
blockTmp
=
(
this
.
_isExcel
||
this
.
_isPresentation
)
?
lock
[
"
block
"
][
"
guid
"
]
:
key
,
blockValue
=
(
this
.
_isExcel
||
this
.
_isPresentation
)
?
lock
[
"
block
"
]
:
key
;
...
...
@@ -978,7 +983,7 @@
};
DocsCoApi
.
prototype
.
_onReleaseLock
=
function
(
data
)
{
if
(
data
[
"
locks
"
])
{
if
(
ConnectionState
.
Authorized
===
this
.
_state
&&
data
[
"
locks
"
])
{
var
bSendEnd
=
false
;
for
(
var
block
in
data
[
"
locks
"
])
{
if
(
data
[
"
locks
"
].
hasOwnProperty
(
block
))
{
...
...
@@ -1004,6 +1009,9 @@
};
DocsCoApi
.
prototype
.
_onSaveChanges
=
function
(
data
)
{
if
(
ConnectionState
.
Authorized
!==
this
.
_state
)
{
return
;
}
if
(
data
[
"
locks
"
])
{
var
bSendEnd
=
false
;
for
(
var
block
in
data
[
"
locks
"
])
{
...
...
@@ -1196,6 +1204,9 @@
};
DocsCoApi
.
prototype
.
_onConnectionStateChanged
=
function
(
data
)
{
if
(
ConnectionState
.
Authorized
!==
this
.
_state
)
{
return
;
}
var
userStateChanged
=
null
,
userId
,
stateChanged
=
false
,
isEditUser
=
true
;
if
(
this
.
onConnectionStateChanged
)
{
userStateChanged
=
new
AscCommon
.
asc_CUser
(
data
[
'
user
'
]);
...
...
slide/Editor/CollaborativeEditing.js
View file @
482280c2
...
...
@@ -176,10 +176,11 @@ CCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, AdditionalIn
this
.
m_aNeedUnlock2
.
length
=
0
;
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
{
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
,
editor
.
canUnlockDocument2
);
AscCommon
.
History
.
CanNotAddChanges
=
true
;
}
else
editor
.
CoAuthoringApi
.
unLockDocument
(
true
);
editor
.
CoAuthoringApi
.
unLockDocument
(
true
,
editor
.
canUnlockDocument2
);
editor
.
canUnlockDocument2
=
false
;
if
(
-
1
===
this
.
m_nUseType
)
{
...
...
slide/api.js
View file @
482280c2
...
...
@@ -960,26 +960,23 @@
};
this
.
CoAuthoringApi
.
onStartCoAuthoring
=
function
(
isStartEvent
)
{
if
(
t
.
ParcedDocument
)
{
AscCommon
.
CollaborativeEditing
.
Start_CollaborationEditing
();
t
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
Start_CollaborationEditing
(
);
if
(
true
!=
History
.
Is_Clear
())
{
AscCommon
.
CollaborativeEditing
.
Apply_Changes
()
;
AscCommon
.
CollaborativeEditing
.
Send_Changes
()
;
if
(
t
.
ParcedDocument
)
{
if
(
isStartEvent
)
{
AscCommon
.
CollaborativeEditing
.
Start_CollaborationEditing
();
t
.
asc_setDrawCollaborationMarks
(
true
);
t
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
Start_CollaborationEditing
();
}
else
{
// Сохранять теперь должны на таймере автосохранения. Иначе могли два раза запустить сохранение, не дожидаясь окончания
t
.
canUnlockDocument
=
true
;
t
.
canStartCoAuthoring
=
true
;
}
else
{
// Изменений нет, но нужно сбросить lock
}
else
{
t
.
isStartCoAuthoringOnEndLoad
=
true
;
if
(
!
isStartEvent
)
{
// Документ еще не подгрузился, но нужно сбросить lock
t
.
CoAuthoringApi
.
unLockDocument
(
false
);
}
}
else
{
t
.
isStartCoAuthoringOnEndLoad
=
true
;
}
};
this
.
CoAuthoringApi
.
onEndCoAuthoring
=
function
(
isStartEvent
)
{
...
...
@@ -1832,6 +1829,13 @@ background-repeat: no-repeat;\
}
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
Information
,
c_oAscAsyncAction
.
Save
);
this
.
canUnlockDocument2
=
this
.
canUnlockDocument
;
if
(
this
.
canUnlockDocument
&&
this
.
canStartCoAuthoring
)
{
this
.
CoAuthoringApi
.
onStartCoAuthoring
(
true
);
this
.
canStartCoAuthoring
=
false
;
this
.
canUnlockDocument
=
false
;
}
if
(
c_oAscCollaborativeMarksShowType
.
LastChanges
===
this
.
CollaborativeMarksShowType
)
{
AscCommon
.
CollaborativeEditing
.
Clear_CollaborativeMarks
();
...
...
@@ -1930,7 +1934,7 @@ background-repeat: no-repeat;\
{
this
.
IsUserSave
=
!
isAutoSave
;
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
()
&&
(
this
.
asc_isDocumentCanSave
()
||
History
.
Have_Changes
()
||
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()))
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()
||
this
.
canUnlockDocument
))
{
this
.
canSave
=
false
;
...
...
@@ -5863,6 +5867,9 @@ background-repeat: no-repeat;\
{
this
.
sendEvent
(
"
asc_onCloseChartEditor
"
);
};
asc_docs_api
.
prototype
.
asc_setDrawCollaborationMarks
=
function
()
{
};
//-----------------------------------------------------------------
// События контекстного меню
...
...
word/Editor/CollaborativeEditing.js
View file @
482280c2
...
...
@@ -127,13 +127,14 @@ CWordCollaborativeEditing.prototype.Send_Changes = function(IsUserSave, Addition
if
(
0
<
aChanges
.
length
||
null
!==
deleteIndex
)
{
this
.
private_OnSendOwnChanges
(
aChanges2
,
deleteIndex
);
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
);
editor
.
CoAuthoringApi
.
saveChanges
(
aChanges
,
deleteIndex
,
AdditionalInfo
,
editor
.
canUnlockDocument2
);
AscCommon
.
History
.
CanNotAddChanges
=
true
;
}
else
{
editor
.
CoAuthoringApi
.
unLockDocument
(
true
);
editor
.
CoAuthoringApi
.
unLockDocument
(
true
,
editor
.
canUnlockDocument2
);
}
editor
.
canUnlockDocument2
=
false
;
if
(
-
1
===
this
.
m_nUseType
)
{
...
...
word/api.js
View file @
482280c2
...
...
@@ -1182,32 +1182,19 @@ background-repeat: no-repeat;\
};
this
.
CoAuthoringApi
.
onStartCoAuthoring
=
function
(
isStartEvent
)
{
AscCommon
.
CollaborativeEditing
.
Start_CollaborationEditing
();
t
.
asc_setDrawCollaborationMarks
(
true
);
if
(
t
.
ParcedDocument
)
{
t
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
Start_CollaborationEditing
();
if
(
!
isStartEvent
)
{
if
(
true
!=
History
.
Is_Clear
())
{
AscCommon
.
CollaborativeEditing
.
Apply_Changes
();
AscCommon
.
CollaborativeEditing
.
Send_Changes
();
}
else
{
// Изменений нет, но нужно сбросить lock
t
.
CoAuthoringApi
.
unLockDocument
(
true
);
}
if
(
t
.
ParcedDocument
)
{
if
(
isStartEvent
)
{
AscCommon
.
CollaborativeEditing
.
Start_CollaborationEditing
();
t
.
asc_setDrawCollaborationMarks
(
true
);
t
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
Start_CollaborationEditing
();
}
else
{
// Сохранять теперь должны на таймере автосохранения. Иначе могли два раза запустить сохранение, не дожидаясь окончания
t
.
canUnlockDocument
=
true
;
t
.
canStartCoAuthoring
=
true
;
}
}
else
{
}
else
{
t
.
isStartCoAuthoringOnEndLoad
=
true
;
if
(
!
isStartEvent
)
{
if
(
!
isStartEvent
)
{
// Документ еще не подгрузился, но нужно сбросить lock
t
.
CoAuthoringApi
.
unLockDocument
(
false
);
}
...
...
@@ -1215,8 +1202,12 @@ background-repeat: no-repeat;\
};
this
.
CoAuthoringApi
.
onEndCoAuthoring
=
function
(
isStartEvent
)
{
AscCommon
.
CollaborativeEditing
.
End_CollaborationEditing
();
t
.
asc_setDrawCollaborationMarks
(
false
);
if
(
t
.
canUnlockDocument
)
{
t
.
canStartCoAuthoring
=
false
;
}
else
{
AscCommon
.
CollaborativeEditing
.
End_CollaborationEditing
();
t
.
asc_setDrawCollaborationMarks
(
false
);
}
};
};
...
...
@@ -1801,6 +1792,13 @@ background-repeat: no-repeat;\
}
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
Information
,
c_oAscAsyncAction
.
Save
);
this
.
canUnlockDocument2
=
this
.
canUnlockDocument
;
if
(
this
.
canUnlockDocument
&&
this
.
canStartCoAuthoring
)
{
this
.
CoAuthoringApi
.
onStartCoAuthoring
(
true
);
this
.
canStartCoAuthoring
=
false
;
this
.
canUnlockDocument
=
false
;
}
if
(
c_oAscCollaborativeMarksShowType
.
LastChanges
===
this
.
CollaborativeMarksShowType
)
{
AscCommon
.
CollaborativeEditing
.
Clear_CollaborativeMarks
();
...
...
@@ -1908,7 +1906,7 @@ background-repeat: no-repeat;\
{
this
.
IsUserSave
=
!
isAutoSave
;
if
(
true
===
this
.
canSave
&&
!
this
.
isLongAction
()
&&
(
this
.
asc_isDocumentCanSave
()
||
History
.
Have_Changes
()
||
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()
||
true
===
isUndoRequest
))
AscCommon
.
CollaborativeEditing
.
Have_OtherChanges
()
||
true
===
isUndoRequest
||
this
.
canUnlockDocument
))
{
this
.
canSave
=
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