diff --git a/js/office.js b/js/office.js index 06b69878..38c6287a 100644 --- a/js/office.js +++ b/js/office.js @@ -1,4 +1,4 @@ -/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require,dojo */ +/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require,dojo,runtime */ var officeMain = { onStartup: function() { "use strict"; @@ -38,7 +38,7 @@ var officeMain = { // fade out file list and show WebODF canvas $('.documentslist, #emptyfolder').fadeOut('slow').promise().done(function() { - var odfelement, odfcanvas, canvashtml = + var memberId, odfelement, odfcanvas, canvashtml = '
'+ '
'+ //''+ @@ -61,6 +61,7 @@ var officeMain = { $('#preview').html(canvashtml); runtime.assert(response.es_id, "invalid session id."); + memberId = response.es_id + "member"; webodfEditor.boot( { collaborative: "owncloud", @@ -68,6 +69,9 @@ var officeMain = { loginProcedure: function(cb) { cb(response.es_id, OC.currentUser, "token"); }, + joinSession: function(userId, sessionId, cb) { + cb(memberId); + }, callback: function() { // initialized. }