From: Vincent Vanwaelscappel Date: Tue, 7 May 2019 14:31:56 +0000 (+0200) Subject: wait #2687 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9210faa2e8fbe88d5ed84a29cfed6e6d2f958a00;p=fluidbook-html5.git wait #2687 @1 --- diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 80626b7b..0a1335f4 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -32,6 +32,7 @@ Fluidbook.prototype = { if (this.datas.landingPage != undefined && this.datas.landingPage != '') { this.landingpage = new FluidbookLandingPage(this); } + this.secure = new FluidbookSecure(this); this.contentlock = new FluidbookContentLock(this); this.menu = new FluidbookMenu(this); this.support = new FluidbookSupport(this); diff --git a/js/libs/fluidbook/fluidbook.secure.js b/js/libs/fluidbook/fluidbook.secure.js new file mode 100644 index 00000000..4b432b40 --- /dev/null +++ b/js/libs/fluidbook/fluidbook.secure.js @@ -0,0 +1,23 @@ +function FluidbookSecure(fluidbook) { + this.fluidbook = fluidbook; + this.init(); +} + +FluidbookSecure.prototype = { + init: function () { + if (this.fluidbook.datas.restrictPrintDownload !== '') { + if (window.location.search.indexOf(this.fluidbook.datas.restrictPrintDownload) === -1) { + if (this.fluidbook.datas.restrictPrint) { + this.fluidbook.datas.print = false; + } + if (this.fluidbook.datas.restrictDownload) { + this.fluidbook.datas.pdf = false; + } + + if (this.fluidbook.datas.restrictSendBookmark) { + this.fluidbook.datas.bookmarkSendEnable = false; + } + } + } + }, +}; \ No newline at end of file