Correct fileId
This commit is contained in:
parent
8aee613fca
commit
0b7c7198c1
@ -60,7 +60,7 @@ var documentsMain = {
|
|||||||
showEditor : function(title, canShare){
|
showEditor : function(title, canShare){
|
||||||
$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
|
$(document.body).prepend(documentsMain.UI.toolbar.replace(/%title%/g, title));
|
||||||
if (!canShare){
|
if (!canShare){
|
||||||
$('#odf-invite,#invite-block').remove();
|
$('#odf-invite').remove();
|
||||||
} else {
|
} else {
|
||||||
//TODO: fill in with users
|
//TODO: fill in with users
|
||||||
}
|
}
|
||||||
@ -90,8 +90,8 @@ var documentsMain = {
|
|||||||
documentsMain.UI.init();
|
documentsMain.UI.init();
|
||||||
|
|
||||||
// Does anything indicate that we need to autostart a session?
|
// Does anything indicate that we need to autostart a session?
|
||||||
var esId = parent.location.hash.replace(/\W*/g, '');
|
var fileId = parent.location.hash.replace(/\W*/g, '');
|
||||||
if (!esId){
|
if (!fileId){
|
||||||
documentsMain.show();
|
documentsMain.show();
|
||||||
} else {
|
} else {
|
||||||
documentsMain.UI.showOverlay();
|
documentsMain.UI.showOverlay();
|
||||||
@ -105,9 +105,9 @@ var documentsMain = {
|
|||||||
ready(function() {
|
ready(function() {
|
||||||
require({}, ["webodf/editor/Editor"], function(Editor) {
|
require({}, ["webodf/editor/Editor"], function(Editor) {
|
||||||
|
|
||||||
if (esId){
|
if (fileId){
|
||||||
documentsMain.prepareSession();
|
documentsMain.prepareSession();
|
||||||
documentsMain.joinSession(esId);
|
documentsMain.joinSession(fileId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -187,7 +187,13 @@ var documentsMain = {
|
|||||||
if (OC.Share.droppedDown) {
|
if (OC.Share.droppedDown) {
|
||||||
OC.Share.hideDropDown();
|
OC.Share.hideDropDown();
|
||||||
} else {
|
} else {
|
||||||
OC.Share.showDropDown('file', 118, $("#odf-toolbar"), true, OC.PERMISSION_READ | OC.PERMISSION_SHARE | OC.PERMISSION_UPDATE);
|
OC.Share.showDropDown(
|
||||||
|
'file',
|
||||||
|
parent.location.hash.replace(/\W*/g, ''),
|
||||||
|
$("#odf-toolbar"),
|
||||||
|
true,
|
||||||
|
OC.PERMISSION_READ | OC.PERMISSION_SHARE | OC.PERMISSION_UPDATE
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user