diff --git a/js/documents.js b/js/documents.js
index 436faf7c..7bab03e5 100644
--- a/js/documents.js
+++ b/js/documents.js
@@ -6,7 +6,6 @@ var documentsMain = {
isEditormode : false,
useUnstable : false,
mainTitle : '',
- documentTitle : '',
onStartup: function() {
"use strict";
documentsMain.mainTitle = $('title').text();
@@ -17,6 +16,11 @@ var documentsMain = {
require({}, ["dojo/ready"], function(ready) {
ready(function() {
require({}, ["webodf/editor/Editor"], function(Editor) {
+ var esId = parent.location.hash.replace(/\W*/g, '');
+ if (esId){
+ documentsMain.prepareSession();
+ documentsMain.joinSession(esId);
+ }
});
});
});
@@ -24,6 +28,12 @@ var documentsMain = {
});
//setInterval(documentsMain.updateInfo, 10000);
},
+
+ prepareSession : function(){
+ documentsMain.isEditorMode = true;
+ documentsMain.showOverlay();
+ },
+
initSession: function(response) {
"use strict";
@@ -45,7 +55,7 @@ var documentsMain = {
t('documents', 'Close') +
' ' +
'
' +
- documentsMain.documentTitle +
+ documentsMain.getNameByFileid(response.file_id) +
'
' +
'