From 2ab2ecea1140e0f50d60b63270e8befefca6c63b Mon Sep 17 00:00:00 2001 From: Tobias Hintze Date: Fri, 9 Aug 2013 21:54:33 +0200 Subject: [PATCH] bogus way of passing a memberId (pre-joined session) to webodf --- js/office.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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. }