From 0901a700788714f448a9c92f7cfae82c06a68b30 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 30 Jun 2020 11:38:46 +0200 Subject: [PATCH] fix #3698 --- js/libs/fluidbook/fluidbook.articles.js | 15 +++++++++++++-- style/articles.less | 15 +++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.articles.js b/js/libs/fluidbook/fluidbook.articles.js index af8397c3..3563e78f 100644 --- a/js/libs/fluidbook/fluidbook.articles.js +++ b/js/libs/fluidbook/fluidbook.articles.js @@ -15,7 +15,7 @@ FluidbookArticles.prototype = { $this.resize(); }); - $(document).on('click', '.mview[data-menu="article"] .print', function () { + $(document).on('click touchend', '.mview[data-menu="article"] .articlesPrint', function () { var a = $(this).closest('article').attr('data-id'); var print_window = window.open('', 'print_article', 'height=400,width=600'); print_window.document.write($this.fluidbook.settings.articlesList[a].print); @@ -26,6 +26,12 @@ FluidbookArticles.prototype = { }, 1000); return false; }); + + $(document).on('click touchend', '.mview[data-menu="article"] .articlesShare', function () { + $(".mview").remove(); + $this.fluidbook.menu.openView('share', 'article:'+$(this).attr('data-id'), 'article'); + return false; + }); }, openArticle: function (url, callback) { @@ -39,6 +45,7 @@ FluidbookArticles.prototype = { $("#view").html('
' + this.fluidbook.menu.closeButton() + view + '
'); this.fluidbook.silentChangePage(article.page); + this.resize(); callback(); }, @@ -58,6 +65,10 @@ FluidbookArticles.prototype = { }, resize: function () { - + $(".mview article").each(function () { + var w = $(this).width(); + var aw = $(this).find('.actions').outerWidth(); + $(this).find('h3').eq(0).css('width', w - aw); + }); }, } \ No newline at end of file diff --git a/style/articles.less b/style/articles.less index 81e17230..b585678b 100644 --- a/style/articles.less +++ b/style/articles.less @@ -16,25 +16,32 @@ article { font-weight: 300; text-align: left; - .print { + .actions { position: absolute; top: 55px; right: 45px; color: @articles-title-color; - svg { - fill:currentColor; + a { width: 20px; + height: 20px; + margin-left: 10px; + display: inline-block; + + svg { + fill: currentColor; + width: 20px; + } } } + h3 { color: #fff; font-size: 14px; padding: 5px 10px; font-weight: 300; text-transform: uppercase; - width: ~"calc(100% - 30px)"; } h2 { -- 2.39.5