From 9571c76b06390fd3173a40a10b3e6b2ba0ce6e8f Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 16 Jul 2020 19:56:51 +0200 Subject: [PATCH] fix #3767 @1 --- js/libs/cube/util.js | 2 ++ js/libs/fluidbook/fluidbook.bookmarks.js | 10 +++++++--- js/libs/fluidbook/menu/fluidbook.index.js | 16 +++++++++++----- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/js/libs/cube/util.js b/js/libs/cube/util.js index 14b25075..d74353b5 100644 --- a/js/libs/cube/util.js +++ b/js/libs/cube/util.js @@ -156,3 +156,5 @@ Object.size = function (obj) { return size; }; +/*! sprintf-js v1.1.2 | Copyright (c) 2007-present, Alexandru Mărășteanu | BSD-3-Clause */ +!function(){"use strict";var g={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function y(e){return function(e,t){var r,n,i,s,a,o,p,c,l,u=1,f=e.length,d="";for(n=0;n>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}g.json.test(s.type)?d+=r:(!g.number.test(s.type)||c&&!s.sign?l="":(l=c?"+":"-",r=r.toString().replace(g.sign,"")),o=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+r).length,a=s.width&&0'; @@ -426,7 +430,7 @@ FluidbookBookmarks.prototype = { title = this.fluidbook.l10n.__('bookmarks'); } var index = '
'; - index+=this.fluidbook.menu.getCaption(title); + index += this.fluidbook.menu.getCaption(title); index += c; index += '
'; return index; diff --git a/js/libs/fluidbook/menu/fluidbook.index.js b/js/libs/fluidbook/menu/fluidbook.index.js index 5b2adf62..4b70488f 100644 --- a/js/libs/fluidbook/menu/fluidbook.index.js +++ b/js/libs/fluidbook/menu/fluidbook.index.js @@ -38,7 +38,7 @@ FluidbookIndex.prototype = { var c = !closeAll ? ' one' : ''; var index = this.fluidbook.menu.getCaption(title); index += this.getView(group); - this.fluidbook.menu.viewWrap(index,'index'); + this.fluidbook.menu.viewWrap(index, 'index'); // Mark current page var cp = this.fluidbook.currentPage; @@ -84,7 +84,7 @@ FluidbookIndex.prototype = { res += '
' + this.fluidbook.settings.indexMessage + '
'; } - res += '
'; + res += '
'; + res += ''; return res; }, + _thumb: function (page, side, height) { + var dim = this.getThumbDimensions(page, height); + var virtual = this.fluidbook.physicalToVirtual(page); + return '
' + this.fluidbook.loader.getThumbImage(page, true, dim.thumb) + ''; + }, + getThumbDimensions: function (page, height) { var h = ''; var pnt = ''; -- 2.39.5