Mediafile PDF controls: set 'page-fit' (100%) by default, disabled previous/next buttons
This commit is contained in:
parent
4016c1ea4b
commit
b0b858a808
@ -141,7 +141,7 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp.
|
|||||||
id: mediafile.id,
|
id: mediafile.id,
|
||||||
numPages: mediafile.mediafile.pages,
|
numPages: mediafile.mediafile.pages,
|
||||||
page: 1,
|
page: 1,
|
||||||
scale: 1,
|
scale: 'page-fit',
|
||||||
rotate: 0,
|
rotate: 0,
|
||||||
visible: true
|
visible: true
|
||||||
}];
|
}];
|
||||||
|
@ -29,10 +29,12 @@
|
|||||||
<nav ng-class="getNavStyle(scroll)" class="form-inline">
|
<nav ng-class="getNavStyle(scroll)" class="form-inline">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page - 1)"
|
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page - 1)"
|
||||||
|
ng-class="{ 'disabled': (presentedMediafile.page - 1) < 1 }"
|
||||||
title="{{ 'Previous page' | translate }}">
|
title="{{ 'Previous page' | translate }}">
|
||||||
<i class="fa fa-backward"></i>
|
<i class="fa fa-backward"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page + 1)"
|
<button class="btn btn-default" ng-click="mediafileGoToPage(presentedMediafile.page + 1)"
|
||||||
|
ng-class="{ 'disabled': (presentedMediafile.page + 1) > presentedMediafile.numPages }"
|
||||||
title="{{ 'Next page' | translate }}">
|
title="{{ 'Next page' | translate }}">
|
||||||
<i class="fa fa-forward"></i>
|
<i class="fa fa-forward"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -52,8 +54,9 @@
|
|||||||
<button class="btn btn-default" ng-click="mediafileZoomOut()" title="{{ 'Zoom out' | translate }}">
|
<button class="btn btn-default" ng-click="mediafileZoomOut()" title="{{ 'Zoom out' | translate }}">
|
||||||
<i class="fa fa-search-minus"></i>
|
<i class="fa fa-search-minus"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-default" ng-click="mediafileFit()" title="{{ 'Reset zoom' | translate }}">
|
<button class="btn" ng-click="mediafileFit()" title="{{ 'Reset zoom' | translate }}"
|
||||||
100%
|
ng-class="presentedMediafile.scale=='page-fit' ? 'btn-primary' : 'btn-default'">
|
||||||
|
100%
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-default" ng-click="mediafileZoomIn()" title="{{ 'Zoom in' | translate }}">
|
<button class="btn btn-default" ng-click="mediafileZoomIn()" title="{{ 'Zoom in' | translate }}">
|
||||||
<i class="fa fa-search-plus"></i>
|
<i class="fa fa-search-plus"></i>
|
||||||
|
Loading…
Reference in New Issue
Block a user