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
06a5c330
Commit
06a5c330
authored
Sep 20, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change api event: "onReady" -> "onAppReady", added "onDocumentReady" event.
parent
1fbf9c9e
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
44 additions
and
17 deletions
+44
-17
apps/api/documents/api.js
apps/api/documents/api.js
+9
-5
apps/common/Gateway.js
apps/common/Gateway.js
+6
-1
apps/common/main/lib/controller/ExternalDiagramEditor.js
apps/common/main/lib/controller/ExternalDiagramEditor.js
+1
-1
apps/common/main/lib/controller/ExternalMergeEditor.js
apps/common/main/lib/controller/ExternalMergeEditor.js
+1
-1
apps/documenteditor/embed/js/ApplicationController.js
apps/documenteditor/embed/js/ApplicationController.js
+3
-1
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+3
-1
apps/documenteditor/mobile/app/controller/Main.js
apps/documenteditor/mobile/app/controller/Main.js
+3
-1
apps/presentationeditor/embed/js/ApplicationController.js
apps/presentationeditor/embed/js/ApplicationController.js
+3
-1
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+3
-1
apps/presentationeditor/mobile/app/controller/Main.js
apps/presentationeditor/mobile/app/controller/Main.js
+3
-1
apps/spreadsheeteditor/embed/js/ApplicationController.js
apps/spreadsheeteditor/embed/js/ApplicationController.js
+3
-1
apps/spreadsheeteditor/main/app/controller/Main.js
apps/spreadsheeteditor/main/app/controller/Main.js
+3
-1
apps/spreadsheeteditor/mobile/app/controller/Main.js
apps/spreadsheeteditor/mobile/app/controller/Main.js
+3
-1
No files found.
apps/api/documents/api.js
View file @
06a5c330
...
...
@@ -131,9 +131,11 @@
}
},
events: {
'onReady': <document ready callback>,
'onReady': <application ready callback>, // deprecated
'onAppReady': <application ready callback>,
'onBack': <back to folder callback>,
'onDocumentStateChange': <document state changed callback>
'onDocumentReady': <document ready callback>
}
}
...
...
@@ -164,9 +166,11 @@
}
},
events: {
'onReady': <document ready callback>,
'onReady': <application ready callback>, // deprecated
'onAppReady': <application ready callback>,
'onBack': <back to folder callback>,
'onError': <error callback>,
'onDocumentReady': <document ready callback>
}
}
*/
...
...
@@ -205,7 +209,7 @@
}
};
var
_onReady
=
function
()
{
var
_on
App
Ready
=
function
()
{
if
(
_config
.
type
===
'
mobile
'
)
{
document
.
body
.
onfocus
=
function
(
e
)
{
setTimeout
(
function
(){
...
...
@@ -275,8 +279,8 @@
}
else
if
(
msg
.
event
===
'
onInternalMessage
'
&&
msg
.
data
&&
msg
.
data
.
type
==
'
localstorage
'
)
{
_callLocalStorage
(
msg
.
data
.
data
);
}
else
{
if
(
msg
.
event
===
'
onReady
'
)
{
_onReady
();
if
(
msg
.
event
===
'
on
App
Ready
'
)
{
_on
App
Ready
();
}
if
(
handler
)
{
...
...
apps/common/Gateway.js
View file @
06a5c330
...
...
@@ -138,8 +138,9 @@ if (Common === undefined) {
return
{
r
eady
:
function
()
{
appR
eady
:
function
()
{
_postMessage
({
event
:
'
onReady
'
});
_postMessage
({
event
:
'
onAppReady
'
});
},
requestEditRights
:
function
()
{
...
...
@@ -236,6 +237,10 @@ if (Common === undefined) {
_postMessage
({
event
:
'
onMetaChange
'
,
data
:
meta
});
},
documentReady
:
function
()
{
_postMessage
({
event
:
'
onDocumentReady
'
});
},
on
:
function
(
event
,
handler
){
var
localHandler
=
function
(
event
,
data
){
handler
.
call
(
me
,
data
)
...
...
apps/common/main/lib/controller/ExternalDiagramEditor.js
View file @
06a5c330
...
...
@@ -77,7 +77,7 @@ define([
user
:
{
id
:
(
'
uid-
'
+
Date
.
now
())}
},
events
:
{
'
on
Ready
'
:
function
()
{},
'
on
AppReady
'
:
function
()
{},
'
onDocumentStateChange
'
:
function
()
{},
'
onError
'
:
function
()
{},
'
onInternalMessage
'
:
_
.
bind
(
this
.
onInternalMessage
,
this
)
...
...
apps/common/main/lib/controller/ExternalMergeEditor.js
View file @
06a5c330
...
...
@@ -77,7 +77,7 @@ define([
user
:
{
id
:
(
'
uid-
'
+
Date
.
now
())}
},
events
:
{
'
on
Ready
'
:
function
()
{},
'
on
AppReady
'
:
function
()
{},
'
onDocumentStateChange
'
:
function
()
{},
'
onError
'
:
function
()
{},
'
onInternalMessage
'
:
_
.
bind
(
this
.
onInternalMessage
,
this
)
...
...
apps/documenteditor/embed/js/ApplicationController.js
View file @
06a5c330
...
...
@@ -209,6 +209,8 @@ var ApplicationController = new(function(){
}
function
onDocumentContentReady
()
{
Common
.
Gateway
.
documentReady
();
hidePreloader
();
if
(
!
embedConfig
.
shareUrl
)
...
...
@@ -498,7 +500,7 @@ var ApplicationController = new(function(){
Common
.
Gateway
.
on
(
'
init
'
,
loadConfig
);
Common
.
Gateway
.
on
(
'
opendocument
'
,
loadDocument
);
Common
.
Gateway
.
on
(
'
showmessage
'
,
onExternalMessage
);
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
return
me
;
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
06a5c330
...
...
@@ -172,7 +172,7 @@ define([
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
this
.
loadConfig
,
this
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
this
.
onExternalMessage
,
this
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
this
.
loadDocument
,
this
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
// $(window.top).resize(_.bind(this.onDocumentResize, this));
this
.
getApplication
().
getController
(
'
Viewport
'
).
setApi
(
this
.
api
);
...
...
@@ -749,6 +749,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
var
me
=
this
,
value
;
...
...
apps/documenteditor/mobile/app/controller/Main.js
View file @
06a5c330
...
...
@@ -167,7 +167,7 @@ define([
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
me
.
loadConfig
,
me
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
me
.
onExternalMessage
,
me
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
me
.
loadDocument
,
me
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
},
...
...
@@ -457,6 +457,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
if
(
this
.
_state
.
openDlg
)
uiApp
.
closeModal
(
this
.
_state
.
openDlg
);
...
...
apps/presentationeditor/embed/js/ApplicationController.js
View file @
06a5c330
...
...
@@ -211,6 +211,8 @@ var ApplicationController = new(function(){
}
function
onDocumentContentReady
()
{
Common
.
Gateway
.
documentReady
();
api
.
ShowThumbnails
(
false
);
api
.
asc_DeleteVerticalScroll
();
...
...
@@ -574,7 +576,7 @@ var ApplicationController = new(function(){
Common
.
Gateway
.
on
(
'
init
'
,
loadConfig
);
Common
.
Gateway
.
on
(
'
opendocument
'
,
loadDocument
);
Common
.
Gateway
.
on
(
'
showmessage
'
,
onExternalMessage
);
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
return
me
;
...
...
apps/presentationeditor/main/app/controller/Main.js
View file @
06a5c330
...
...
@@ -172,7 +172,7 @@ define([
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
this
.
loadConfig
,
this
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
this
.
onExternalMessage
,
this
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
this
.
loadDocument
,
this
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
this
.
getApplication
().
getController
(
'
Viewport
'
).
setApi
(
this
.
api
);
this
.
getApplication
().
getController
(
'
Statusbar
'
).
setApi
(
me
.
api
);
...
...
@@ -555,6 +555,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
var
me
=
this
,
value
;
...
...
apps/presentationeditor/mobile/app/controller/Main.js
View file @
06a5c330
...
...
@@ -168,7 +168,7 @@ define([
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
me
.
loadConfig
,
me
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
me
.
onExternalMessage
,
me
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
me
.
loadDocument
,
me
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
me
.
initNames
();
...
...
@@ -443,6 +443,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
if
(
this
.
_state
.
openDlg
)
uiApp
.
closeModal
(
this
.
_state
.
openDlg
);
...
...
apps/spreadsheeteditor/embed/js/ApplicationController.js
View file @
06a5c330
...
...
@@ -166,6 +166,8 @@ var ApplicationController = new(function(){
}
function
onDocumentContentReady
()
{
Common
.
Gateway
.
documentReady
();
hidePreloader
();
if
(
!
embedConfig
.
shareUrl
)
...
...
@@ -520,7 +522,7 @@ var ApplicationController = new(function(){
Common
.
Gateway
.
on
(
'
init
'
,
loadConfig
);
Common
.
Gateway
.
on
(
'
opendocument
'
,
loadDocument
);
Common
.
Gateway
.
on
(
'
showmessage
'
,
onExternalMessage
);
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
return
me
;
...
...
apps/spreadsheeteditor/main/app/controller/Main.js
View file @
06a5c330
...
...
@@ -180,7 +180,7 @@ define([
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
this
.
onExternalMessage
,
this
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
this
.
loadDocument
,
this
));
Common
.
Gateway
.
on
(
'
internalcommand
'
,
_
.
bind
(
this
.
onInternalCommand
,
this
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
this
.
getApplication
().
getController
(
'
Viewport
'
).
setApi
(
this
.
api
);
...
...
@@ -555,6 +555,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
var
me
=
this
,
value
;
...
...
apps/spreadsheeteditor/mobile/app/controller/Main.js
View file @
06a5c330
...
...
@@ -174,7 +174,7 @@ define([
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
me
.
loadConfig
,
me
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
me
.
onExternalMessage
,
me
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
me
.
loadDocument
,
me
));
Common
.
Gateway
.
r
eady
();
Common
.
Gateway
.
appR
eady
();
}
},
...
...
@@ -455,6 +455,8 @@ define([
if
(
this
.
_isDocReady
)
return
;
Common
.
Gateway
.
documentReady
();
if
(
this
.
_state
.
openDlg
)
uiApp
.
closeModal
(
this
.
_state
.
openDlg
);
...
...
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