Mediafile PDF controls: set 'page-fit' (100%) by default, disabled previous/next buttons

This commit is contained in:
Emanuel Schuetze 2016-02-20 11:29:38 +01:00
parent 4016c1ea4b
commit b0b858a808
2 changed files with 6 additions and 3 deletions

View File

@ -141,7 +141,7 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp.
id: mediafile.id,
numPages: mediafile.mediafile.pages,
page: 1,
scale: 1,
scale: 'page-fit',
rotate: 0,
visible: true
}];

View File

@ -29,10 +29,12 @@
<nav ng-class="getNavStyle(scroll)" class="form-inline">
<div class="btn-group">
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page - 1)"
ng-class="{ 'disabled': (presentedMediafile.page - 1) < 1 }"
title="{{ 'Previous page' | translate }}">
<i class="fa fa-backward"></i>
</button>
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page + 1)"
ng-class="{ 'disabled': (presentedMediafile.page + 1) > presentedMediafile.numPages }"
title="{{ 'Next page' | translate }}">
<i class="fa fa-forward"></i>
</button>
@ -52,7 +54,8 @@
<button class="btn btn-default" ng-click="mediafileZoomOut()" title="{{ 'Zoom out' | translate }}">
<i class="fa fa-search-minus"></i>
</button>
<button class="btn btn-default" ng-click="mediafileFit()" title="{{ 'Reset zoom' | translate }}">
<button class="btn" ng-click="mediafileFit()" title="{{ 'Reset zoom' | translate }}"
ng-class="presentedMediafile.scale=='page-fit' ? 'btn-primary' : 'btn-default'">
100%
</button>
<button class="btn btn-default" ng-click="mediafileZoomIn()" title="{{ 'Zoom in' | translate }}">