bogus way of passing a memberId (pre-joined session) to webodf

pull/1/head
Tobias Hintze 11 years ago
parent 3deb473927
commit 2ab2ecea11

@ -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 = { var officeMain = {
onStartup: function() { onStartup: function() {
"use strict"; "use strict";
@ -38,7 +38,7 @@ var officeMain = {
// fade out file list and show WebODF canvas // fade out file list and show WebODF canvas
$('.documentslist, #emptyfolder').fadeOut('slow').promise().done(function() { $('.documentslist, #emptyfolder').fadeOut('slow').promise().done(function() {
var odfelement, odfcanvas, canvashtml = var memberId, odfelement, odfcanvas, canvashtml =
'<div id = "mainContainer" class="claro" style="">'+ '<div id = "mainContainer" class="claro" style="">'+
'<div id = "editor">'+ '<div id = "editor">'+
//'<span id = "toolbar" class="claro"></span>'+ //'<span id = "toolbar" class="claro"></span>'+
@ -61,6 +61,7 @@ var officeMain = {
$('#preview').html(canvashtml); $('#preview').html(canvashtml);
runtime.assert(response.es_id, "invalid session id."); runtime.assert(response.es_id, "invalid session id.");
memberId = response.es_id + "member";
webodfEditor.boot( webodfEditor.boot(
{ {
collaborative: "owncloud", collaborative: "owncloud",
@ -68,6 +69,9 @@ var officeMain = {
loginProcedure: function(cb) { loginProcedure: function(cb) {
cb(response.es_id, OC.currentUser, "token"); cb(response.es_id, OC.currentUser, "token");
}, },
joinSession: function(userId, sessionId, cb) {
cb(memberId);
},
callback: function() { callback: function() {
// initialized. // initialized.
} }

Loading…
Cancel
Save