From: Stephen Cameron Date: Wed, 28 Nov 2018 16:54:27 +0000 (+0100) Subject: WIP #817 @3.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4bad6a8763a685f787f7c32204e1ff1a8435f3e2;p=fluidbook-html5.git WIP #817 @3.5 --- diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index abd6a505..e400844a 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -464,7 +464,7 @@ FluidbookMenu.prototype = { }, openPrint: function (callback) { - var printDialogue = '
' + this.closeButton() + '

' + __('Print') + '

'; + var printDialogue = '
' + this.closeButton() + '

' + __('print') + '

'; printDialogue += this.fluidbook.printing.getView(); @@ -479,7 +479,7 @@ FluidbookMenu.prototype = { }, openDownload: function (callback) { - var downloadDialogue = '
' + this.closeButton() + '

' + __('Download') + '

'; + var downloadDialogue = '
' + this.closeButton() + '

' + __('download') + '

'; downloadDialogue += this.fluidbook.printing.getView('download'); // Reuse print dialogue since they're almost the same @@ -793,6 +793,13 @@ FluidbookMenu.prototype = { }); }); break; + case 'print': + case 'download': + w = 820; + if (ww < w) { + fullscreen = true; + } + break; default: var maxWidth = 10000; if (m.data('maxwidth') !== null) { diff --git a/js/libs/fluidbook/fluidbook.print.js b/js/libs/fluidbook/fluidbook.print.js index 7bac0d64..f52310cb 100644 --- a/js/libs/fluidbook/fluidbook.print.js +++ b/js/libs/fluidbook/fluidbook.print.js @@ -42,9 +42,16 @@ FluidbookPrint.prototype = { default: return false; } + }); + // When there are no bookmarks a click on the bookmarks option will open the bookmarks help modal + $(document).on('click', '.bookmarks-option.disabled', function(event) { + event.preventDefault(); + $this.fluidbook.menu.quickCloseView(); + $this.fluidbook.menu.openView('bookmarkHelp'); }); + }, getView: function (mode) { @@ -59,8 +66,8 @@ FluidbookPrint.prototype = { isLastPage = (this.fluidbook.currentPage == this.fluidbook.datas.pages), isSinglePageMode = (this.fluidbook.resize.orientation == 'portrait'), buttonLabels = { - 'print' : __('Print'), - 'download' : __('Download') + 'print' : __('print'), + 'download' : __('download') }, view = ''; @@ -83,7 +90,7 @@ FluidbookPrint.prototype = { view += ''; // .doubleThumb view += ''; view += ''; - view += ''; + view += ''; view += ''; // .print-option } @@ -101,7 +108,7 @@ FluidbookPrint.prototype = { view += ''; // .doubleThumb view += ''; view += ''; - view += ''; + view += ''; view += ''; // .print-option } @@ -119,7 +126,7 @@ FluidbookPrint.prototype = { view += ''; // .doubleThumb view += ''; view += '' - view += ''; + view += ''; view += ''; // .print-option } @@ -133,23 +140,25 @@ FluidbookPrint.prototype = { view += ''; // .doubleThumb view += ''; view += '' - view += ''; + view += ''; view += ''; // .print-option // Bookmarks var hasBookmarks = this.fluidbook.bookmarks.hasBookmarkedPages(), bookmarksDisabled = hasBookmarks ? '' : 'disabled'; - view += ''; // .print-dialogue // Action buttons diff --git a/style/fluidbook.less b/style/fluidbook.less index 4ae6bc11..37537971 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1363,10 +1363,6 @@ html.ios body.portrait #interface { } } - &[data-menu="print"], &[data-menu="download"] { - max-width: 820px; - } - &[data-menu="bookmarks-help"] { .content { padding: 40px 70px 100px 70px; diff --git a/style/print.less b/style/print.less index 4b020cda..a04e6658 100644 --- a/style/print.less +++ b/style/print.less @@ -3,17 +3,20 @@ display: flex; flex-wrap: wrap; text-align: left; - padding: 1em 2em; + justify-content: space-between; + padding: 1.5em 2em 1em; margin-bottom: -2em; // Offset the margin-bottom on each