use smarter shutdown API
This commit is contained in:
parent
417540c1d3
commit
da12ca4b55
13
js/office.js
13
js/office.js
@ -75,11 +75,8 @@ var officeMain = {
|
||||
joinSession: function(userId, sessionId, cb) {
|
||||
cb(memberId);
|
||||
},
|
||||
registerCallbackForShutdown: function(webodfShutdownFunction) {
|
||||
officeMain.webodfShutdownFunction = webodfShutdownFunction;
|
||||
},
|
||||
callback: function() {
|
||||
// initialized.
|
||||
callback: function(webodfEditorInstance) {
|
||||
officeMain.webodfEditorInstance = webodfEditorInstance;
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -122,6 +119,9 @@ var officeMain = {
|
||||
onClose: function() {
|
||||
"use strict";
|
||||
|
||||
officeMain.webodfEditorInstance.shutdown(function() {
|
||||
// successfull shutdown - all is good.
|
||||
|
||||
// Fade out odf-toolbar
|
||||
$('#odf-toolbar').fadeOut('slow');
|
||||
// Fade out editor
|
||||
@ -132,12 +132,13 @@ var officeMain = {
|
||||
$('.documentslist, #emptyfolder, #editing-sessions').fadeIn('slow');
|
||||
$(document.body).removeClass('claro');
|
||||
$('#office-content').removeClass('wide');
|
||||
officeMain.webodfShutdownFunction();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
"use strict";
|
||||
$('.documentslist tr').click(function(event) {
|
||||
event.preventDefault();
|
||||
officeMain.startSession($(this).attr('data-file'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user