Merge pull request #1966 from emanuelschuetze/mediafile
Use prune_elements for activate mediafile. (Fixed #1910)
This commit is contained in:
commit
ad7653fb76
@ -22,34 +22,45 @@
|
|||||||
title="{{ 'Edit current slide' | translate}}">
|
title="{{ 'Edit current slide' | translate}}">
|
||||||
<i class="fa fa-pencil"></i>
|
<i class="fa fa-pencil"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a ng-click="controlProjector('scale', 'down')"
|
<!-- scale -->
|
||||||
class="btn btn-default btn-sm"
|
<div class="btn-group">
|
||||||
title="{{ 'Smaller' | translate}}">
|
<a ng-click="controlProjector('scale', 'down')"
|
||||||
<i class="fa fa-search-minus"></i>
|
class="btn btn-default btn-sm"
|
||||||
</a>
|
title="{{ 'Smaller' | translate}}">
|
||||||
<a ng-click="controlProjector('scale', 'up')"
|
<i class="fa fa-search-minus"></i>
|
||||||
class="btn btn-default btn-sm"
|
</a>
|
||||||
title="{{ 'Bigger' | translate}}">
|
<a ng-click="controlProjector('scale', 'up')"
|
||||||
<i class="fa fa-search-plus"></i>
|
class="btn btn-default btn-sm"
|
||||||
</a>
|
title="{{ 'Bigger' | translate}}">
|
||||||
|
<i class="fa fa-search-plus"></i>
|
||||||
|
</a>
|
||||||
|
<a ng-click="controlProjector('scale', 'reset')"
|
||||||
|
class="btn btn-default btn-sm"
|
||||||
|
title="{{ 'Reset scaling' | translate}}">
|
||||||
|
<i class="fa fa-undo"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span ng-class="{ 'notNull': scaleLevel != 0 }">{{ scaleLevel }}</span>
|
<span ng-class="{ 'notNull': scaleLevel != 0 }">{{ scaleLevel }}</span>
|
||||||
|
|
||||||
<a ng-click="controlProjector('scroll', 'down')"
|
<!-- scroll -->
|
||||||
class="btn btn-default btn-sm"
|
<div class="btn-group">
|
||||||
title="{{ 'Scroll up' | translate}}">
|
<a ng-click="controlProjector('scroll', 'down')"
|
||||||
<i class="fa fa-arrow-up"></i>
|
class="btn btn-default btn-sm"
|
||||||
</a>
|
title="{{ 'Scroll up' | translate}}">
|
||||||
<a ng-click="controlProjector('scroll', 'up')"
|
<i class="fa fa-arrow-up"></i>
|
||||||
class="btn btn-default btn-sm"
|
</a>
|
||||||
title="{{ 'Scroll down' | translate}}">
|
<a ng-click="controlProjector('scroll', 'up')"
|
||||||
<i class="fa fa-arrow-down"></i>
|
class="btn btn-default btn-sm"
|
||||||
</a>
|
title="{{ 'Scroll down' | translate}}">
|
||||||
<a ng-click="controlProjector('scroll', 'reset')"
|
<i class="fa fa-arrow-down"></i>
|
||||||
class="btn btn-default btn-sm"
|
</a>
|
||||||
title="{{ 'Reset scrolling' | translate}}">
|
<a ng-click="controlProjector('scroll', 'reset')"
|
||||||
<i class="fa fa-undo"></i>
|
class="btn btn-default btn-sm"
|
||||||
</a>
|
title="{{ 'Reset scrolling' | translate}}">
|
||||||
|
<i class="fa fa-undo"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span ng-class="{ 'notNull': scrollLevel != 0 }">{{ scrollLevel }}</span>
|
<span ng-class="{ 'notNull': scrollLevel != 0 }">{{ scrollLevel }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,13 @@
|
|||||||
<div class="searchresults spacer-top-lg">
|
<div class="searchresults spacer-top-lg">
|
||||||
<ol ng-show="results">
|
<ol ng-show="results">
|
||||||
<li ng-repeat="result in results">
|
<li ng-repeat="result in results">
|
||||||
<a ui-sref="{{ result.urlState }}({{ result.urlParam }})">{{ result.getSearchResultName() }}</a><br>
|
<a ng-if="!result.mediafileUrl" ui-sref="{{ result.urlState }}({{ result.urlParam }})">
|
||||||
|
{{ result.getSearchResultName() }}
|
||||||
|
</a>
|
||||||
|
<a ng-if="result.mediafileUrl" href="{{ result.mediafileUrl }}" target="_blank">
|
||||||
|
{{ result.getSearchResultName() }}
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
<span class="grey">{{ result.getSearchResultSubtitle() | translate }}</span>
|
<span class="grey">{{ result.getSearchResultSubtitle() | translate }}</span>
|
||||||
</ol>
|
</ol>
|
||||||
<p ng-show="!results" translate>No results.</p>
|
<p ng-show="!results" translate>No results.</p>
|
||||||
|
@ -15,7 +15,15 @@ angular.module('OpenSlidesApp.mediafiles', [])
|
|||||||
methods: {
|
methods: {
|
||||||
getResourceName: function () {
|
getResourceName: function () {
|
||||||
return name;
|
return name;
|
||||||
}
|
},
|
||||||
|
// link name which is shown in search result
|
||||||
|
getSearchResultName: function () {
|
||||||
|
return this.title;
|
||||||
|
},
|
||||||
|
// subtitle of search result
|
||||||
|
getSearchResultSubtitle: function () {
|
||||||
|
return "File";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
is_presentable: ['filetype', function (filetype) {
|
is_presentable: ['filetype', function (filetype) {
|
||||||
|
@ -135,24 +135,8 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp.
|
|||||||
// ** PDF presentation functions **/
|
// ** PDF presentation functions **/
|
||||||
// show document on projector
|
// show document on projector
|
||||||
$scope.showPdf = function (mediafile) {
|
$scope.showPdf = function (mediafile) {
|
||||||
var postUrl,
|
var postUrl = '/rest/core/projector/1/prune_elements/';
|
||||||
data;
|
var data = [{
|
||||||
if ($scope.presentedMediafiles.length > 0) {
|
|
||||||
// update first mediafile, at the moment there should not be more
|
|
||||||
var uuid = $scope.presentedMediafiles[0].uuid;
|
|
||||||
postUrl = '/rest/core/projector/1/update_elements/';
|
|
||||||
data = {};
|
|
||||||
data[uuid] = {
|
|
||||||
id: mediafile.id,
|
|
||||||
numPages: mediafile.mediafile.pages,
|
|
||||||
page: 1,
|
|
||||||
scale: 1,
|
|
||||||
rotate: 0,
|
|
||||||
visible: true
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
postUrl = '/rest/core/projector/1/prune_elements/';
|
|
||||||
data = [{
|
|
||||||
name: 'mediafiles/mediafile',
|
name: 'mediafiles/mediafile',
|
||||||
id: mediafile.id,
|
id: mediafile.id,
|
||||||
numPages: mediafile.mediafile.pages,
|
numPages: mediafile.mediafile.pages,
|
||||||
@ -160,8 +144,7 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp.
|
|||||||
scale: 1,
|
scale: 1,
|
||||||
rotate: 0,
|
rotate: 0,
|
||||||
visible: true
|
visible: true
|
||||||
}];
|
}];
|
||||||
}
|
|
||||||
$http.post(postUrl, data);
|
$http.post(postUrl, data);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -192,19 +175,27 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp.
|
|||||||
};
|
};
|
||||||
$scope.mediafileZoomIn = function () {
|
$scope.mediafileZoomIn = function () {
|
||||||
var mediafileElement = getCurrentlyPresentedMediafile();
|
var mediafileElement = getCurrentlyPresentedMediafile();
|
||||||
|
var scale = 1;
|
||||||
|
if (parseFloat(mediafileElement.scale)) {
|
||||||
|
scale = mediafileElement.scale;
|
||||||
|
}
|
||||||
sendMediafileCommand({
|
sendMediafileCommand({
|
||||||
scale: parseFloat(mediafileElement.scale) + 0.2
|
scale: scale + 0.2
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$scope.mediafileFit = function () {
|
$scope.mediafileFit = function () {
|
||||||
sendMediafileCommand({
|
sendMediafileCommand({
|
||||||
scale: 1
|
scale: 'page-fit'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$scope.mediafileZoomOut = function () {
|
$scope.mediafileZoomOut = function () {
|
||||||
var mediafileElement = getCurrentlyPresentedMediafile();
|
var mediafileElement = getCurrentlyPresentedMediafile();
|
||||||
|
var scale = 1;
|
||||||
|
if (parseFloat(mediafileElement.scale)) {
|
||||||
|
scale = mediafileElement.scale;
|
||||||
|
}
|
||||||
sendMediafileCommand({
|
sendMediafileCommand({
|
||||||
scale: parseFloat(mediafileElement.scale) - 0.2
|
scale: scale - 0.2
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$scope.mediafileChangePage = function(pageNum) {
|
$scope.mediafileChangePage = function(pageNum) {
|
||||||
|
@ -92,7 +92,7 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
|||||||
resolve: {
|
resolve: {
|
||||||
motion: function() {
|
motion: function() {
|
||||||
return Motion.find($stateParams.id).then(function(motion) {
|
return Motion.find($stateParams.id).then(function(motion) {
|
||||||
Motion.loadRelations(motion, 'agenda_item');
|
return Motion.loadRelations(motion, 'agenda_item');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user