Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/documents.js')
-rw-r--r--js/documents.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/js/documents.js b/js/documents.js
index 95d2210c..9c3c29c8 100644
--- a/js/documents.js
+++ b/js/documents.js
@@ -92,19 +92,12 @@ var documentsMain = {
if (!OC.currentUser){
documentsMain.isGuest = true;
- var fileId = $("[name='document']").val();
+ var fileId;
} else {
// Does anything indicate that we need to autostart a session?
var fileId = parent.location.hash.replace(/\W*/g, '');
}
-
- if ($("[name='document']").val()){
- // !Login page mess wih WebODF toolbars
- $(document.body).attr('id', 'body-user');
- $('header,footer').hide();
- }
-
if (!fileId){
documentsMain.show();
} else {
@@ -187,7 +180,7 @@ var documentsMain = {
}
$.post(
url,
- { },
+ { name : $("[name='memberName']").val() },
documentsMain.initSession
);
},
@@ -346,7 +339,16 @@ $(document).ready(function() {
$(document.body).on('click', '#odf-close', documentsMain.onClose);
$(document.body).on('click', '#odf-invite', documentsMain.onInvite);
-
+ $(document.body).on('click', '#odf-join', function(event){
+ event.preventDefault();
+ // !Login page mess wih WebODF toolbars
+ $(document.body).attr('id', 'body-user');
+ $('header,footer').hide();
+ documentsMain.prepareSession();
+ documentsMain.joinSession(
+ $("[name='document']").val()
+ );
+ });
$('.add-document').on('click', '.add', documentsMain.onCreate);
var file_upload_start = $('#file_upload_start');