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
44c6f2fc
Commit
44c6f2fc
authored
Mar 14, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show option for saving changes to the server only when customization->forcesave is true.
parent
c1056ad9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
36 deletions
+58
-36
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+9
-6
apps/documenteditor/main/app/view/FileMenuPanels.js
apps/documenteditor/main/app/view/FileMenuPanels.js
+10
-6
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+9
-6
apps/presentationeditor/main/app/view/FileMenuPanels.js
apps/presentationeditor/main/app/view/FileMenuPanels.js
+10
-6
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+10
-6
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+10
-6
No files found.
apps/documenteditor/main/app/controller/Main.js
View file @
44c6f2fc
...
@@ -895,9 +895,11 @@ define([
...
@@ -895,9 +895,11 @@ define([
me
.
api
.
asc_setAutoSaveGap
(
value
);
me
.
api
.
asc_setAutoSaveGap
(
value
);
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
if
(
me
.
appOptions
.
canForcesave
)
{
// use asc_setIsForceSaveOnUserSave only when customization->forcesave = true
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
forcesave
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
}
if
(
me
.
needToUpdateVersion
)
if
(
me
.
needToUpdateVersion
)
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
...
@@ -1022,7 +1024,8 @@ define([
...
@@ -1022,7 +1024,8 @@ define([
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
buildVersion
=
params
.
asc_getBuildVersion
();
this
.
appOptions
.
buildVersion
=
params
.
asc_getBuildVersion
();
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
isEdit
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
canForcesave
=
this
.
appOptions
.
isEdit
&&
!
this
.
appOptions
.
isOffline
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
canForcesave
;
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
this
.
document
.
fileType
);
var
type
=
/^
(?:(
pdf|djvu|xps
))
$/
.
exec
(
this
.
document
.
fileType
);
this
.
appOptions
.
canDownloadOrigin
=
!
this
.
appOptions
.
nativeApp
&&
this
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
this
.
appOptions
.
canDownloadOrigin
=
!
this
.
appOptions
.
nativeApp
&&
this
.
permissions
.
download
!==
false
&&
(
type
&&
typeof
type
[
1
]
===
'
string
'
);
...
@@ -1820,9 +1823,9 @@ define([
...
@@ -1820,9 +1823,9 @@ define([
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
this
.
synchronizeChanges
();
this
.
synchronizeChanges
();
}
}
if
(
this
.
appOptions
.
isEdit
)
{
if
(
this
.
appOptions
.
canForcesave
)
{
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
(
typeof
(
this
.
appOptions
.
customization
)
==
'
object
'
&&
this
.
appOptions
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
this
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
}
}
},
},
...
...
apps/documenteditor/main/app/view/FileMenuPanels.js
View file @
44c6f2fc
...
@@ -132,10 +132,10 @@ define([
...
@@ -132,10 +132,10 @@ define([
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
<tr class="
edit
">
'
,
'
<tr class="
forcesave
">
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider
edit
"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider
forcesave
"></tr>
'
,
/** coauthoring begin **/
/** coauthoring begin **/
'
<tr class="coauth changes">
'
,
'
<tr class="coauth changes">
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
...
@@ -318,6 +318,7 @@ define([
...
@@ -318,6 +318,7 @@ define([
this
.
mode
=
mode
;
this
.
mode
=
mode
;
$
(
'
tr.edit
'
,
this
.
el
)[
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.edit
'
,
this
.
el
)[
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.autosave
'
,
this
.
el
)[
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.autosave
'
,
this
.
el
)[
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.forcesave
'
,
this
.
el
)[
mode
.
canForcesave
?
'
show
'
:
'
hide
'
]();
if
(
this
.
mode
.
isDesktopApp
&&
this
.
mode
.
isOffline
)
{
if
(
this
.
mode
.
isDesktopApp
&&
this
.
mode
.
isOffline
)
{
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
...
@@ -372,9 +373,11 @@ define([
...
@@ -372,9 +373,11 @@ define([
value
=
0
;
value
=
0
;
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
if
(
this
.
mode
.
canForcesave
)
{
value
=
(
value
===
null
)
?
(
this
.
mode
.
customization
&&
this
.
mode
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-forcesave
"
);
this
.
chForcesave
.
setValue
(
value
);
value
=
(
value
===
null
)
?
this
.
mode
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
chForcesave
.
setValue
(
value
);
}
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-spellcheck
"
);
value
=
Common
.
localStorage
.
getItem
(
"
de-settings-spellcheck
"
);
this
.
chSpell
.
setValue
(
value
===
null
||
parseInt
(
value
)
==
1
);
this
.
chSpell
.
setValue
(
value
===
null
||
parseInt
(
value
)
==
1
);
...
@@ -396,7 +399,8 @@ define([
...
@@ -396,7 +399,8 @@ define([
Common
.
localStorage
.
setItem
(
"
de-settings-fontrender
"
,
this
.
cmbFontRender
.
getValue
());
Common
.
localStorage
.
setItem
(
"
de-settings-fontrender
"
,
this
.
cmbFontRender
.
getValue
());
Common
.
localStorage
.
setItem
(
"
de-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
de-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
de-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
if
(
this
.
mode
.
canForcesave
)
Common
.
localStorage
.
setItem
(
"
de-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-spellcheck
"
,
this
.
chSpell
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-spellcheck
"
,
this
.
chSpell
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-showsnaplines
"
,
this
.
chAlignGuides
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
de-settings-showsnaplines
"
,
this
.
chAlignGuides
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
save
();
Common
.
localStorage
.
save
();
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
44c6f2fc
...
@@ -675,9 +675,11 @@ define([
...
@@ -675,9 +675,11 @@ define([
value
=
(
!
me
.
_state
.
fastCoauth
&&
value
!==
null
)
?
parseInt
(
value
)
:
(
me
.
appOptions
.
canCoAuthoring
?
1
:
0
);
value
=
(
!
me
.
_state
.
fastCoauth
&&
value
!==
null
)
?
parseInt
(
value
)
:
(
me
.
appOptions
.
canCoAuthoring
?
1
:
0
);
me
.
api
.
asc_setAutoSaveGap
(
value
);
me
.
api
.
asc_setAutoSaveGap
(
value
);
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
if
(
me
.
appOptions
.
canForcesave
)
{
// use asc_setIsForceSaveOnUserSave only when customization->forcesave = true
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
forcesave
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
}
if
(
me
.
needToUpdateVersion
)
if
(
me
.
needToUpdateVersion
)
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
...
@@ -791,7 +793,8 @@ define([
...
@@ -791,7 +793,8 @@ define([
this
.
appOptions
.
canChat
=
(
licType
===
Asc
.
c_oLicenseResult
.
Success
||
licType
===
Asc
.
c_oLicenseResult
.
SuccessLimit
)
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
false
);
this
.
appOptions
.
canChat
=
(
licType
===
Asc
.
c_oLicenseResult
.
Success
||
licType
===
Asc
.
c_oLicenseResult
.
SuccessLimit
)
&&
!
this
.
appOptions
.
isOffline
&&
!
((
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
)
&&
this
.
editorConfig
.
customization
.
chat
===
false
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
canRename
=
!!
this
.
permissions
.
rename
;
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
isEdit
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
canForcesave
=
this
.
appOptions
.
isEdit
&&
!
this
.
appOptions
.
isOffline
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
canForcesave
;
this
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
_state
.
licenseWarning
=
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
...
@@ -1559,9 +1562,9 @@ define([
...
@@ -1559,9 +1562,9 @@ define([
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
this
.
synchronizeChanges
();
this
.
synchronizeChanges
();
}
}
if
(
this
.
appOptions
.
isEdit
)
{
if
(
this
.
appOptions
.
canForcesave
)
{
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
(
typeof
(
this
.
appOptions
.
customization
)
==
'
object
'
&&
this
.
appOptions
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
this
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
}
}
},
},
...
...
apps/presentationeditor/main/app/view/FileMenuPanels.js
View file @
44c6f2fc
...
@@ -122,10 +122,10 @@ define([
...
@@ -122,10 +122,10 @@ define([
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
<tr class="
edit
">
'
,
'
<tr class="
forcesave
">
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider
edit
"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider
forcesave
"></tr>
'
,
/** coauthoring begin **/
/** coauthoring begin **/
'
<tr class="coauth changes">
'
,
'
<tr class="coauth changes">
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
...
@@ -268,6 +268,7 @@ define([
...
@@ -268,6 +268,7 @@ define([
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
}
}
$
(
'
tr.forcesave
'
,
this
.
el
)[
mode
.
canForcesave
?
'
show
'
:
'
hide
'
]();
/** coauthoring begin **/
/** coauthoring begin **/
$
(
'
tr.coauth.changes
'
,
this
.
el
)[
mode
.
isEdit
&&
!
mode
.
isOffline
&&
mode
.
canCoAuthoring
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.coauth.changes
'
,
this
.
el
)[
mode
.
isEdit
&&
!
mode
.
isOffline
&&
mode
.
canCoAuthoring
?
'
show
'
:
'
hide
'
]();
/** coauthoring end **/
/** coauthoring end **/
...
@@ -304,9 +305,11 @@ define([
...
@@ -304,9 +305,11 @@ define([
value
=
0
;
value
=
0
;
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
if
(
this
.
mode
.
canForcesave
)
{
value
=
(
value
===
null
)
?
(
this
.
mode
.
customization
&&
this
.
mode
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-forcesave
"
);
this
.
chForcesave
.
setValue
(
value
);
value
=
(
value
===
null
)
?
this
.
mode
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
chForcesave
.
setValue
(
value
);
}
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-showsnaplines
"
);
value
=
Common
.
localStorage
.
getItem
(
"
pe-settings-showsnaplines
"
);
this
.
chAlignGuides
.
setValue
(
value
===
null
||
parseInt
(
value
)
==
1
);
this
.
chAlignGuides
.
setValue
(
value
===
null
||
parseInt
(
value
)
==
1
);
...
@@ -322,7 +325,8 @@ define([
...
@@ -322,7 +325,8 @@ define([
/** coauthoring end **/
/** coauthoring end **/
Common
.
localStorage
.
setItem
(
"
pe-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
pe-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
pe-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
pe-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
pe-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
if
(
this
.
mode
.
canForcesave
)
Common
.
localStorage
.
setItem
(
"
pe-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
pe-settings-showsnaplines
"
,
this
.
chAlignGuides
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
pe-settings-showsnaplines
"
,
this
.
chAlignGuides
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
save
();
Common
.
localStorage
.
save
();
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
44c6f2fc
...
@@ -662,9 +662,11 @@ define([
...
@@ -662,9 +662,11 @@ define([
}
}
me
.
api
.
asc_setAutoSaveGap
(
value
);
me
.
api
.
asc_setAutoSaveGap
(
value
);
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
if
(
me
.
appOptions
.
canForcesave
)
{
// use asc_setIsForceSaveOnUserSave only when customization->forcesave = true
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
forcesave
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
me
.
appOptions
.
forcesave
=
(
value
===
null
)
?
me
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
me
.
api
.
asc_setIsForceSaveOnUserSave
(
me
.
appOptions
.
forcesave
);
}
if
(
me
.
needToUpdateVersion
)
{
if
(
me
.
needToUpdateVersion
)
{
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
Common
.
NotificationCenter
.
trigger
(
'
api:disconnect
'
);
...
@@ -823,7 +825,9 @@ define([
...
@@ -823,7 +825,9 @@ define([
this
.
appOptions
.
isEdit
=
(
this
.
appOptions
.
canLicense
||
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
this
.
permissions
.
edit
!==
false
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
appOptions
.
isEdit
=
(
this
.
appOptions
.
canLicense
||
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
this
.
permissions
.
edit
!==
false
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
appOptions
.
canDownload
=
!
this
.
appOptions
.
nativeApp
&&
(
this
.
permissions
.
download
!==
false
);
this
.
appOptions
.
canDownload
=
!
this
.
appOptions
.
nativeApp
&&
(
this
.
permissions
.
download
!==
false
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
canPrint
=
(
this
.
permissions
.
print
!==
false
);
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
isEdit
&&
!
(
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
canForcesave
=
this
.
appOptions
.
isEdit
&&
!
this
.
appOptions
.
isOffline
&&
!
(
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
(
typeof
(
this
.
editorConfig
.
customization
)
==
'
object
'
&&
this
.
editorConfig
.
customization
.
forcesave
);
this
.
appOptions
.
forcesave
=
this
.
appOptions
.
canForcesave
;
this
.
_state
.
licenseWarning
=
!
(
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
this
.
_state
.
licenseWarning
=
!
(
this
.
appOptions
.
isEditDiagram
||
this
.
appOptions
.
isEditMailMerge
)
&&
(
licType
===
Asc
.
c_oLicenseResult
.
Connections
)
&&
this
.
appOptions
.
canEdit
&&
this
.
editorConfig
.
mode
!==
'
view
'
;
...
@@ -1805,9 +1809,9 @@ define([
...
@@ -1805,9 +1809,9 @@ define([
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
if
(
this
.
_state
.
fastCoauth
&&
!
oldval
)
this
.
toolbarView
.
synchronizeChanges
();
this
.
toolbarView
.
synchronizeChanges
();
}
}
if
(
this
.
appOptions
.
isEdit
)
{
if
(
this
.
appOptions
.
canForcesave
)
{
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
(
typeof
(
this
.
appOptions
.
customization
)
==
'
object
'
&&
this
.
appOptions
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
this
.
appOptions
.
forcesave
=
(
value
===
null
)
?
this
.
appOptions
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
this
.
api
.
asc_setIsForceSaveOnUserSave
(
this
.
appOptions
.
forcesave
);
}
}
},
},
...
...
apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
View file @
44c6f2fc
...
@@ -447,10 +447,10 @@ define([
...
@@ -447,10 +447,10 @@ define([
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
<td class="right"><span id="fms-chb-autosave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider autosave"></tr>
'
,
'
<tr class="
auto
save">
'
,
'
<tr class="
force
save">
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
<td class="right"><span id="fms-chb-forcesave" /></td>
'
,
'
</tr>
'
,
'
<tr class="divider
auto
save"></tr>
'
,
'
</tr>
'
,
'
<tr class="divider
force
save"></tr>
'
,
'
<tr class="coauth changes">
'
,
'
<tr class="coauth changes">
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
'
<td class="left"><label><%= scope.strCoAuthMode %></label></td>
'
,
'
<td class="right">
'
,
'
<td class="right">
'
,
...
@@ -662,6 +662,7 @@ define([
...
@@ -662,6 +662,7 @@ define([
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
chAutosave
.
setCaption
(
this
.
strAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
this
.
lblAutosave
.
text
(
this
.
textAutoRecover
);
}
}
$
(
'
tr.forcesave
'
,
this
.
el
)[
mode
.
canForcesave
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.coauth
'
,
this
.
el
)[
mode
.
canCoAuthoring
&&
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.coauth
'
,
this
.
el
)[
mode
.
canCoAuthoring
&&
mode
.
isEdit
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.coauth.changes
'
,
this
.
el
)[
mode
.
isEdit
&&
!
mode
.
isOffline
&&
mode
.
canCoAuthoring
?
'
show
'
:
'
hide
'
]();
$
(
'
tr.coauth.changes
'
,
this
.
el
)[
mode
.
isEdit
&&
!
mode
.
isOffline
&&
mode
.
canCoAuthoring
?
'
show
'
:
'
hide
'
]();
},
},
...
@@ -705,9 +706,11 @@ define([
...
@@ -705,9 +706,11 @@ define([
value
=
0
;
value
=
0
;
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
this
.
chAutosave
.
setValue
(
fast_coauth
||
(
value
===
null
?
this
.
mode
.
canCoAuthoring
:
parseInt
(
value
)
==
1
));
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
if
(
this
.
mode
.
canForcesave
)
{
value
=
(
value
===
null
)
?
(
this
.
mode
.
customization
&&
this
.
mode
.
customization
.
forcesave
)
:
(
parseInt
(
value
)
==
1
);
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-forcesave
"
);
this
.
chForcesave
.
setValue
(
value
);
value
=
(
value
===
null
)
?
this
.
mode
.
canForcesave
:
(
parseInt
(
value
)
==
1
);
this
.
chForcesave
.
setValue
(
value
);
}
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-func-locale
"
);
value
=
Common
.
localStorage
.
getItem
(
"
sse-settings-func-locale
"
);
if
(
value
===
null
)
if
(
value
===
null
)
...
@@ -754,7 +757,8 @@ define([
...
@@ -754,7 +757,8 @@ define([
Common
.
localStorage
.
setItem
(
"
sse-settings-fontrender
"
,
this
.
cmbFontRender
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-fontrender
"
,
this
.
cmbFontRender
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-unit
"
,
this
.
cmbUnit
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
sse-settings-autosave
"
,
this
.
chAutosave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
sse-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
if
(
this
.
mode
.
canForcesave
)
Common
.
localStorage
.
setItem
(
"
sse-settings-forcesave
"
,
this
.
chForcesave
.
isChecked
()
?
1
:
0
);
Common
.
localStorage
.
setItem
(
"
sse-settings-func-locale
"
,
this
.
cmbFuncLocale
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-func-locale
"
,
this
.
cmbFuncLocale
.
getValue
());
if
(
this
.
cmbRegSettings
.
getSelectedRecord
())
if
(
this
.
cmbRegSettings
.
getSelectedRecord
())
Common
.
localStorage
.
setItem
(
"
sse-settings-reg-settings
"
,
this
.
cmbRegSettings
.
getValue
());
Common
.
localStorage
.
setItem
(
"
sse-settings-reg-settings
"
,
this
.
cmbRegSettings
.
getValue
());
...
...
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