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
3de78e58
Commit
3de78e58
authored
Mar 23, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring.
parent
0f7b20c9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
46 deletions
+20
-46
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+4
-9
apps/documenteditor/mobile/app/controller/Main.js
apps/documenteditor/mobile/app/controller/Main.js
+4
-9
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+4
-9
apps/presentationeditor/mobile/app/controller/Main.js
apps/presentationeditor/mobile/app/controller/Main.js
+4
-9
apps/spreadsheeteditor/mobile/app/controller/Main.js
apps/spreadsheeteditor/mobile/app/controller/Main.js
+4
-10
No files found.
apps/documenteditor/main/app/controller/Main.js
View file @
3de78e58
...
...
@@ -575,14 +575,9 @@ define([
if
(
id
==
Asc
.
c_oAscAsyncAction
[
'
Save
'
]
||
id
==
Asc
.
c_oAscAsyncAction
[
'
ForceSaveButton
'
])
{
if
(
this
.
_state
.
fastCoauth
&&
this
.
_state
.
usersCount
>
1
)
{
var
me
=
this
;
if
(
me
.
_state
.
timerSave
===
undefined
)
me
.
_state
.
timerSave
=
setInterval
(
function
(){
if
((
new
Date
())
-
me
.
_state
.
isSaving
>
500
)
{
clearInterval
(
me
.
_state
.
timerSave
);
me
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
me
.
textChangesSaved
,
false
,
3000
);
me
.
_state
.
timerSave
=
undefined
;
}
},
500
);
me
.
_state
.
timerSave
=
setTimeout
(
function
()
{
me
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
me
.
textChangesSaved
,
false
,
3000
);
},
500
);
}
else
this
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
this
.
textChangesSaved
,
false
,
3000
);
}
else
...
...
@@ -614,7 +609,7 @@ define([
case
Asc
.
c_oAscAsyncAction
[
'
Save
'
]:
case
Asc
.
c_oAscAsyncAction
[
'
ForceSaveButton
'
]:
this
.
_state
.
isSaving
=
new
Date
(
);
clearTimeout
(
this
.
_state
.
timerSave
);
force
=
true
;
title
=
this
.
saveTitleText
;
text
=
this
.
saveTextText
;
...
...
apps/documenteditor/mobile/app/controller/Main.js
View file @
3de78e58
...
...
@@ -312,14 +312,9 @@ define([
me
.
setLongActionView
(
action
)
}
else
{
if
(
me
.
_state
.
fastCoauth
&&
me
.
_state
.
usersCount
>
1
&&
id
==
Asc
.
c_oAscAsyncAction
[
'
Save
'
])
{
if
(
me
.
_state
.
timerSave
===
undefined
)
me
.
_state
.
timerSave
=
setInterval
(
function
(){
if
((
new
Date
())
-
me
.
_state
.
isSaving
>
500
)
{
clearInterval
(
me
.
_state
.
timerSave
);
//console.debug('End long action');
me
.
_state
.
timerSave
=
undefined
;
}
},
500
);
// me._state.timerSave = setTimeout(function () {
//console.debug('End long action');
// }, 500);
}
else
{
// console.debug('End long action');
}
...
...
@@ -352,7 +347,7 @@ define([
break
;
case
Asc
.
c_oAscAsyncAction
[
'
Save
'
]:
me
.
_state
.
isSaving
=
new
Date
(
);
// clearTimeout(this._state.timerSave
);
title
=
me
.
saveTitleText
;
text
=
me
.
saveTextText
;
break
;
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
3de78e58
...
...
@@ -389,14 +389,9 @@ define([
if
(
id
==
Asc
.
c_oAscAsyncAction
[
'
Save
'
]
||
id
==
Asc
.
c_oAscAsyncAction
[
'
ForceSaveButton
'
])
{
if
(
this
.
_state
.
fastCoauth
&&
this
.
_state
.
usersCount
>
1
)
{
var
me
=
this
;
if
(
me
.
_state
.
timerSave
===
undefined
)
me
.
_state
.
timerSave
=
setInterval
(
function
(){
if
((
new
Date
())
-
me
.
_state
.
isSaving
>
500
)
{
clearInterval
(
me
.
_state
.
timerSave
);
me
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
me
.
textChangesSaved
,
false
,
3000
);
me
.
_state
.
timerSave
=
undefined
;
}
},
500
);
me
.
_state
.
timerSave
=
setTimeout
(
function
()
{
me
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
me
.
textChangesSaved
,
false
,
3000
);
},
500
);
}
else
this
.
getApplication
().
getController
(
'
Statusbar
'
).
setStatusCaption
(
this
.
textChangesSaved
,
false
,
3000
);
}
else
...
...
@@ -426,7 +421,7 @@ define([
case
Asc
.
c_oAscAsyncAction
[
'
Save
'
]:
case
Asc
.
c_oAscAsyncAction
[
'
ForceSaveButton
'
]:
this
.
_state
.
isSaving
=
new
Date
(
);
clearTimeout
(
this
.
_state
.
timerSave
);
force
=
true
;
title
=
this
.
saveTitleText
;
text
=
this
.
saveTextText
;
...
...
apps/presentationeditor/mobile/app/controller/Main.js
View file @
3de78e58
...
...
@@ -302,14 +302,9 @@ define([
me
.
setLongActionView
(
action
)
}
else
{
if
(
me
.
_state
.
fastCoauth
&&
me
.
_state
.
usersCount
>
1
&&
id
==
Asc
.
c_oAscAsyncAction
[
'
Save
'
])
{
if
(
me
.
_state
.
timerSave
===
undefined
)
me
.
_state
.
timerSave
=
setInterval
(
function
(){
if
((
new
Date
())
-
me
.
_state
.
isSaving
>
500
)
{
clearInterval
(
me
.
_state
.
timerSave
);
//console.debug('End long action');
me
.
_state
.
timerSave
=
undefined
;
}
},
500
);
// me._state.timerSave = setTimeout(function () {
//console.debug('End long action');
// }, 500);
}
else
{
// console.debug('End long action');
}
...
...
@@ -342,7 +337,7 @@ define([
break
;
case
Asc
.
c_oAscAsyncAction
[
'
Save
'
]:
me
.
_state
.
isSaving
=
new
Date
(
);
// clearTimeout(me._state.timerSave
);
title
=
me
.
saveTitleText
;
text
=
me
.
saveTextText
;
break
;
...
...
apps/spreadsheeteditor/mobile/app/controller/Main.js
View file @
3de78e58
...
...
@@ -305,15 +305,9 @@ define([
me
.
setLongActionView
(
action
)
}
else
{
if
(
me
.
_state
.
fastCoauth
&&
me
.
_state
.
usersCount
>
1
&&
id
==
Asc
.
c_oAscAsyncAction
[
'
Save
'
])
{
var
me
=
me
;
if
(
me
.
_state
.
timerSave
===
undefined
)
me
.
_state
.
timerSave
=
setInterval
(
function
(){
if
((
new
Date
())
-
me
.
_state
.
isSaving
>
500
)
{
clearInterval
(
me
.
_state
.
timerSave
);
// console.debug('End long action');
me
.
_state
.
timerSave
=
undefined
;
}
},
500
);
// me._state.timerSave = setTimeout(function () {
//console.debug('End long action');
// }, 500);
}
else
{
// console.debug('End long action');
}
...
...
@@ -346,7 +340,7 @@ define([
break
;
case
Asc
.
c_oAscAsyncAction
[
'
Save
'
]:
me
.
_state
.
isSaving
=
new
Date
(
);
// clearTimeout(me._state.timerSave
);
title
=
me
.
saveTitleText
;
text
=
me
.
saveTextText
;
break
;
...
...
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