* unused signal

* remove isGuest thing

This is always false; no point in having conditionals depending on this
variable

* another unused variable
master^2
Pranav Kant 6 years ago committed by Andras Timar
parent ad21d5d89b
commit 8bbc30c52d

@ -65,7 +65,4 @@ if ($wopiUrl !== '') {
$policy = new ContentSecurityPolicy();
$policy->addAllowedFrameDomain($wopiUrl);
$manager->addDefaultPolicy($policy);
}
// Listen to delete file signal
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
}

@ -60,8 +60,6 @@ $.widget('oc.documentOverlay', {
var documentsMain = {
isEditorMode : false,
isViewerMode: false,
isGuest : false,
esId : false,
ready :false,
fileName: null,
baseName: null,
@ -280,11 +278,6 @@ var documentsMain = {
},
showEditor : function(title, fileId, action){
if (documentsMain.isGuest){
// !Login page mess wih WebODF toolbars
$(document.body).attr('id', 'body-user');
}
if (documentsMain.loadError) {
documentsMain.onEditorShutdown(documentsMain.loadErrorMessage + '\n' + documentsMain.loadErrorHint);
return;
@ -412,12 +405,6 @@ var documentsMain = {
},
hideEditor : function(){
if (documentsMain.isGuest){
// !Login page mess wih WebODF toolbars
$(document.body).attr('id', 'body-login');
$('footer,nav').show();
}
// Fade out editor
$('#mainContainer').fadeOut('fast', function() {
$('#mainContainer').remove();
@ -487,8 +474,7 @@ var documentsMain = {
$('footer,nav').hide();
$(documentsMain.toolbar).appendTo('#header');
documentsMain.canShare = !documentsMain.isGuest
&& typeof OC.Share !== 'undefined' && richdocuments_permissions & OC.PERMISSION_SHARE;
documentsMain.canShare = typeof OC.Share !== 'undefined' && richdocuments_permissions & OC.PERMISSION_SHARE;
// fade out file list and show the cloudsuite
$('#content-wrapper').fadeOut('fast').promise().done(function() {
@ -499,11 +485,6 @@ var documentsMain = {
documentsMain.canEdit = Boolean(richdocuments_permissions & OC.PERMISSION_UPDATE);
documentsMain.loadDocument(documentsMain.fileName, documentsMain.fileId);
if (documentsMain.isGuest){
$('#odf-close').text(t('richdocuments', 'Save') );
$('#odf-close').removeClass('icon-view-close');
}
});
},
@ -564,9 +545,6 @@ var documentsMain = {
},
show: function(fileId){
if (documentsMain.isGuest){
return;
}
documentsMain.UI.showProgress(t('richdocuments', 'Loading documents…'));
documentsMain.docs.documentGrid('render', fileId);
documentsMain.UI.hideProgress();

Loading…
Cancel
Save