From: Vincent Vanwaelscappel Date: Fri, 2 Jun 2023 04:59:17 +0000 (+0200) Subject: wait #5985 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8d3ede57a4504b77885cf055817fc054e8e75eb9;p=fluidbook-toolbox.git wait #5985 @0.5 --- diff --git a/app/Models/FluidbookPublication.php b/app/Models/FluidbookPublication.php index 302945d97..2b83524c4 100644 --- a/app/Models/FluidbookPublication.php +++ b/app/Models/FluidbookPublication.php @@ -108,10 +108,11 @@ class FluidbookPublication extends ToolboxSettingsModel 'type' => Hidden::class, 'read_only' => true, 'column' => true, - 'column_type' => 'textwrap', - 'column_view_namespace' => CubistBackpackServiceProvider::NAMESPACE . '::columns', + 'column_type' => 'model_function', + 'column_function_name' => 'getTitleForColumn', 'column_move_after' => 'id', 'column_limit' => 150, + 'column_escape' => false, ], 'c_pages' => [ 'label' => __('Pages'), @@ -640,6 +641,15 @@ class FluidbookPublication extends ToolboxSettingsModel return true; } + public function getTitleForColumn() + { + $more = ''; + if ($this->mobileNavigationType === 'mobilefirst') { + $more .= ' '; + } + return '' . e($this->c_title) . $more . ''; + } + public function allowsDownload() { if ($this->id < WorkshopMigration::WS3_BOOK_ID) { diff --git a/public/packages/fluidbook/toolbox/css/style.less b/public/packages/fluidbook/toolbox/css/style.less index 55dbcb19e..782aa9644 100644 --- a/public/packages/fluidbook/toolbox/css/style.less +++ b/public/packages/fluidbook/toolbox/css/style.less @@ -479,3 +479,7 @@ table.dataTable thead > tr > th.sorting_asc::before, table.dataTable thead > tr } table.dataTable thead .sorting::before, table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::before, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::before, table.dataTable thead .sorting_desc::after, table.dataTabl + +.fluidbook-title-icon{ + font-size: 120%; +} diff --git a/resources/linkeditor/js/linkeditor.loader.js b/resources/linkeditor/js/linkeditor.loader.js index cdcd27d43..b45a6a830 100644 --- a/resources/linkeditor/js/linkeditor.loader.js +++ b/resources/linkeditor/js/linkeditor.loader.js @@ -16,15 +16,6 @@ LinkeditorLoader.prototype = { loadPage: function (p, side) { var container = $("#linkeditor-page-" + side); $(container).attr('data-page', p); - if (this.linkeditor.utils.isSpecialPage(p)) { - var dim = this.linkeditor.utils.getPageDimensions(p); - $("#linkeditor-fluidbook").css({width: dim[0], height: dim[1]}); - $(container).css({width: dim[0], height: dim[1]}); - } else if (this.linkeditor.mobileFirst) { - let h = this.linkeditor.utils.getPageDimensions(p)[1]; - $("#linkeditor-fluidbook").css('height', h); - $(container).css('height', h); - } if (p === 0 || p > FLUIDBOOK_DATA.settings.pages) { $(container).html(''); @@ -32,6 +23,8 @@ LinkeditorLoader.prototype = { this._loadPage(p, container); } + this.linkeditor.resize.resizePages(); + this.linkeditor.links.loadLinks(p, side); this.linkeditor.rulers.loadRulers(p, side); }, diff --git a/resources/linkeditor/js/linkeditor.resize.js b/resources/linkeditor/js/linkeditor.resize.js index 4729effd8..9d93171ff 100644 --- a/resources/linkeditor/js/linkeditor.resize.js +++ b/resources/linkeditor/js/linkeditor.resize.js @@ -30,22 +30,7 @@ LinkeditorResize.prototype = { $("#linkeditor").addClass('double').removeClass('single'); } - if (special) { - var dim = this.linkeditor.utils.getPageDimensions(); - $('.linkeditor-page,#linkeditor-fluidbook').css({ - width: dim[0], height: dim[1] - }); - } else { - $('.linkeditor-page').css({ - width: this.linkeditor.pw, height: this.linkeditor.ph - }); - - $("#linkeditor-page-right").css({left: this.linkeditor.pw}) - $('#linkeditor-fluidbook').css({ - width: this.linkeditor.fw, height: this.linkeditor.ph - }); - } - + this.resizePages(); this.updateWindowDimensions(); this.resizeMain(); this.resizeCanvas(); @@ -58,6 +43,29 @@ LinkeditorResize.prototype = { } }, + resizePages: function () { + let $this = this; + let dimCover = $this.linkeditor.utils.getPageDimensions(1); + + $(".linkeditor-page[data-page]").each(function () { + let p = $(this).attr('data-page'); + let dim = $this.linkeditor.utils.getPageDimensions(p); + let pw = dim[0]; + let ph = dim[1]; + if ($this.linkeditor.utils.isSpecialPage(p)) { + + } else if ($this.linkeditor.mobileFirst) { + pw = dimCover[0]; + } else { + pw = dimCover[0]; + ph = dimCover[1]; + } + $("#linkeditor-fluidbook").css({width: pw, height: ph}); + $(this).css({width: pw, height: ph}); + }); + + }, + resizeMain: function () { $("#linkeditor-main").css('width', this.ww - $('#linkeditor-left').outerWidth() - $('#linkeditor-right').outerWidth()); }, diff --git a/resources/linkeditor/js/linkeditor.utils.js b/resources/linkeditor/js/linkeditor.utils.js index 2642c1c2d..00e5c1758 100644 --- a/resources/linkeditor/js/linkeditor.utils.js +++ b/resources/linkeditor/js/linkeditor.utils.js @@ -41,6 +41,8 @@ LinkeditorUtils.prototype = { } else { return THEME[page]['dim']; } + } else { + page = parseInt(page); } return FLUIDBOOK_DATA.page_dimensions[page]; },