[IMP] website_slides : hide the navigation buttons (of the PDF Viewer) if the document has only one page

This commit is contained in:
rsi-odoo
2015-04-22 09:32:10 +02:00
committed by Jérome Maes
parent 581c2f1aa1
commit 8de4ca04eb
2 changed files with 5 additions and 2 deletions
@@ -35,6 +35,9 @@ $(document).ready(function () {
this.$('canvas').show();
this.$('#page_count').text(this.pdf_viewer.pdf_page_total);
this.$('#PDFViewerLoader').hide();
if (this.pdf_viewer.pdf_page_total > 1) {
this.$('.o_slide_navigation_buttons').removeClass('hide');
}
// init first page to display
var initpage = this.defaultpage;
var pageNum = (initpage > 0 && initpage <= this.pdf_viewer.pdf_page_total)? initpage : 1;
@@ -110,7 +110,7 @@
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 text-left">
<input type="number" class="text-center slide-img-border" style="width: 45px;" id="page_number"></input> / <span id="page_count"></span>
</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8 hide o_slide_navigation_buttons">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center"></div>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1 text-center">
<span id="first" title="First slide">
@@ -134,7 +134,7 @@
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center"></div>
</div>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 text-right">
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 pull-right text-right">
<a t-if="slide.download_security and not is_embedded" t-attf-href="/slides/slide/#{slide.id}/download" title="Download" id="download">
<i class="fa fa-download fa-2x"></i>
</a>