diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 91184b080..20a3ea7d0 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -115,8 +115,6 @@ DE.ApplicationController = new(function(){ } embedConfig.docTitle = docConfig.title; - if ( !embedConfig.saveUrl && permissions.print === false) - $('#idt-copy').hide(); } } @@ -221,6 +219,9 @@ DE.ApplicationController = new(function(){ var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2); (zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100)); + if ( !embedConfig.saveUrl && permissions.print === false) + $('#idt-download').hide(); + if ( !embedConfig.shareUrl ) $('#idt-share').hide(); @@ -230,6 +231,9 @@ DE.ApplicationController = new(function(){ if ( !embedConfig.fullscreenUrl ) $('#idt-fullscreen').hide(); + if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl) + $('#box-tools').addClass('hidden'); + common.controller.modals.attach({ share: '#idt-share', embed: '#idt-embed' diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index a425b3840..440ef0d56 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -111,8 +111,6 @@ PE.ApplicationController = new(function(){ } embedConfig.docTitle = docConfig.title; - if (!embedConfig.saveUrl && permissions.print === false) - $('#idt-copy').hide(); } } @@ -225,6 +223,9 @@ PE.ApplicationController = new(function(){ var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -1); (zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100)); + if (!embedConfig.saveUrl && permissions.print === false) + $('#idt-download').hide(); + if ( !embedConfig.shareUrl ) $('#idt-share').hide(); @@ -234,6 +235,9 @@ PE.ApplicationController = new(function(){ if ( !embedConfig.fullscreenUrl ) $('#idt-fullscreen').hide(); + if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl) + $('#box-tools').addClass('hidden'); + common.controller.modals.attach({ share: '#idt-share', embed: '#idt-embed' diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index f446c6a07..7eeb18036 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -109,8 +109,6 @@ SSE.ApplicationController = new(function(){ } embedConfig.docTitle = docConfig.title; - if ( !embedConfig.saveUrl && permissions.print === false) - $('#idt-copy').hide(); } } @@ -170,6 +168,9 @@ SSE.ApplicationController = new(function(){ function onDocumentContentReady() { hidePreloader(); + if ( !embedConfig.saveUrl && permissions.print === false) + $('#idt-download').hide(); + if ( !embedConfig.shareUrl ) $('#idt-share').hide(); @@ -179,6 +180,9 @@ SSE.ApplicationController = new(function(){ if ( !embedConfig.fullscreenUrl ) $('#idt-fullscreen').hide(); + if ( !embedConfig.saveUrl && permissions.print === false && !embedConfig.shareUrl && !embedConfig.embedUrl && !embedConfig.fullscreenUrl) + $('#box-tools').addClass('hidden'); + common.controller.modals.attach({ share: '#idt-share', embed: '#idt-embed'