},
togglePagesSource: function () {
+ var $this = this;
this.pagesSource = this.pagesSource === 'pages' ? 'thumbnails' : 'pages';
this.clearPreloads();
- this.preloadPages();
+ $(".linkeditor-page").each(function () {
+ let p = parseInt($(this).attr('data-page'));
+ if (isNaN(p) || p === 0 || p > FLUIDBOOK_DATA.settings.pages) {
+ $(this).html('');
+ } else {
+ $this._loadPage(p, $(this));
+ }
+ });
+ setTimeout(function () {
+ $this.preloadPages();
+ }, 2000);
},
clearPreloads: function () {
if (this.linkeditor.utils.isSpecialPage(p)) {
c += '<img draggable="false" class="images" src="' + this.linkeditor.utils.getSpecialPageAssetURL(p) + '" />';
} else {
- if(this.pagesSource==='pages') {
+ 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" class="images" src="images_' + p + '.' + imageFormat + '" />';
c += '<img draggable="false" class="texts" src="texts_' + p + '.svg" />';
}
- }else if(this.pagesSource==='thumbnails'){
+ } else if (this.pagesSource === 'thumbnails') {
c += '<img draggable="false" src="thumbspdf_' + p + '.' + imageFormat + '" />';
}
}
@endif
<div class="separator"></div>
@if($fluidbook->pdfThumbnails)
- <a href="#" data-action="" data-icon="pdf-thumbnails"
+ <a href="#" data-action="togglePDFThumbnails" data-icon="pdf-thumbnails"
data-tooltip="{{__('Afficher les pages du PDF des miniatures')}}"></a>
@endif
<a href="#" data-action="toggleWhiteOverlay" data-icon="white-overlay"