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JzPIYF8QCrSBS4t2fVId5Ym7Kyg=|0K3icsRiZpexNkPIchHkADj+UJE= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEKmRybFZ/yMrtKp92N7MpKSByOo4TNm1yFa96mvH4ktgxG9Iw5LdRBELGknXZO0hRkysrblSsQ6Opu/8ZOdPuo=
|1|6wykuWMhStQ5Tv99aBiqb6H+zyY=|cl+8o5TNKooA36tWnHoIAOIvV4k= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEGI/UefTFGQMkNX5fjbcI6ZIwDbOvWi0Pu2NAdrnqMI7OEHbFZ2PZdyOFkOvg+r6L989kt9xX7UDC4hb7YbFXI=
+kingkong.cubedesigners.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAYlGygCsICCRvgOUYi18Nwudv3z1vUsRmvvDKQ4Gs95
$start = microtime(true);
$farmer = self::pickOneServer();
- $path = str_replace('/protected/fluidbookpublication/docs/', '/fluidbook/docs/', $path);
+ $params = ['toolbox' => 1, 'page' => $page, 'format' => $format, 'resolution' => $resolution, 'withText' => $withText, 'withGraphics' => $withGraphics, 'version' => $version, 'force' => $force, 'out' => $path, 'resolutionRatio' => $resolutionRatio, 'mobileRatio' => $mobileFirstRatio];
- $params = ['page' => $page, 'format' => $format, 'resolution' => $resolution, 'withText' => $withText, 'withGraphics' => $withGraphics, 'version' => $version, 'force' => $force, 'out' => $path, 'resolutionRatio' => $resolutionRatio, 'mobileRatio' => $mobileFirstRatio];
+ $output = trim(self::sendRequest($farmer, 'process.php', $params));
- $output = self::sendRequest($farmer, 'process.php', $params);
-
- if (preg_match('|^/application/fluidbook/docs/[^\s]+$|', $output, $matches)) {
- $o = str_replace('/fluidbook/docs/', '/protected/fluidbookpublication/docs/', $matches[0]);
- } else {
- $o = $output;
- }
-
- if (file_exists($o)) {
- $res = $o;
+ if (file_exists($output)) {
+ $res = $output;
} else {
- echo $o;
$res = false;
}
import 'select2/dist/css/select2.css';
import 'select2-bootstrap-theme/dist/select2-bootstrap.css';
-
window.MD5 = require("crypto-js/md5");
$.ajaxSetup({
}
},
+ togglePDFThumbnails: function () {
+ this.loader.togglePagesSource();
+ if (this.loader.pagesSource === 'thumbnails') {
+ $('[data-action="togglePDFThumbnails"]').addClass('active');
+ } else {
+ $('[data-action="togglePDFThumbnails"]').removeClass('active');
+ }
+ },
+
openFluidbook: function () {
window.open('/fluidbook-publication/preview/' + FLUIDBOOK_DATA.id + '_' + FLUIDBOOK_DATA.hash + '/#/page/' + this.currentPage);
},
function LinkeditorLoader(linkeditor) {
this.linkeditor = linkeditor;
+ this.preloadTimeouts = [];
this.init();
}
LinkeditorLoader.prototype = {
init: function () {
+ this.pagesSource = 'pages';
this.rasterizePages = this.linkeditor.utils.splitPages(FLUIDBOOK_DATA.settings.rasterizePages);
this.vectorPages = this.linkeditor.utils.splitPages(FLUIDBOOK_DATA.settings.vectorPages);
},
this.linkeditor.rulers.loadRulers(p, side);
},
+ togglePagesSource: function () {
+ this.pagesSource = this.pagesSource === 'pages' ? 'thumbnails' : 'pages';
+ this.clearPreloads();
+ this.preloadPages();
+ },
+
+ clearPreloads: function () {
+ $.each(this.preloadTimeouts, function (k, timeout) {
+ clearTimeout(timeout);
+ });
+ $("#linkeditor-preload").html('');
+ },
+
preloadPages: function () {
let j = 1;
var $this = this;
if ($('.preload[data-page="' + i + '"]').length >= 1) {
continue;
}
- setTimeout(function () {
+ this.preloadTimeouts.push(setTimeout(function () {
var c = $('<div class="preload" data-page="i"></div>');
$("#linkeditor-preload").append(c);
$this._loadPage(i, c, true);
- }, j * 1500);
+ }, j * 1500));
j++;
}
},
if (this.linkeditor.utils.isSpecialPage(p)) {
c += '<img draggable="false" class="images" src="' + this.linkeditor.utils.getSpecialPageAssetURL(p) + '" />';
} else {
- if (this.rasterizePages.indexOf(p) >= 0) {
- c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + '" />';
- } else if (this.vectorPages.indexOf(p) >= 0) {
- c += '<img draggable="false" src="vector_' + p + '.svg" />';
- } else {
- c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + '" />';
- c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
+ if(this.pagesSource==='pages') {
+ if (this.rasterizePages.indexOf(p) >= 0) {
+ c += '<img draggable="false" src="raster_' + p + '.' + imageFormat + '" />';
+ } else if (this.vectorPages.indexOf(p) >= 0) {
+ c += '<img draggable="false" src="vector_' + p + '.svg" />';
+ } else {
+ c += '<img draggable="false" class="images" src="images_' + p + '.' + imageFormat + '" />';
+ c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
+ }
+ }else if(this.pagesSource==='thumbnails'){
+ c += '<img draggable="false" src="thumb_' + p + '.' + imageFormat + '" />';
}
}
c += '</div>';
@endif
@endif
<div class="separator"></div>
- <a href="#" data-action="toggleThumbnailsPDF" data-icon="pdf-thumbnails" data-tooltip="{{__('Afficher les pages du PDF des miniatures')}}"></a>
- <a href="#" data-action="toggleWhiteOverlay" data-icon="white-overlay" data-tooltip="{{__('Afficher un overlay blanc semi-opaque au dessus des pages')}}"></a>
- <a href="#" data-action="openFluidbook" data-icon="open-fluidbook" data-tooltip="{{__('Ouvrir le fluidbook à la page courante')}}"></a>
+ @if($fluidbook->pdfThumbnails)toggleThumbnailsPDF
+ <a href="#" data-action="" data-icon="pdf-thumbnails"
+ data-tooltip="{{__('Afficher les pages du PDF des miniatures')}}"></a>
+ @endif
+ <a href="#" data-action="toggleWhiteOverlay" data-icon="white-overlay"
+ data-tooltip="{{__('Afficher un overlay blanc semi-opaque au dessus des pages')}}"></a>
+ <a href="#" data-action="openFluidbook" data-icon="open-fluidbook"
+ data-tooltip="{{__('Ouvrir le fluidbook à la page courante')}}"></a>
</nav>
<nav id="linkeditor-toolbar-right">
});
return '<svg ' + a.join(' ') + ' aria-hidden="true"><use xlink:href="#' + icon + '" /></svg>';
}
-
</script>
@endpush