[Embedded] Fix hiding download button and settings menu. (#263)
This commit is contained in:
parent
933a0d001b
commit
a6d4dc6ff7
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue