From 6f2a509ebfc9ffd23a15afb72d871290bc6ceda4 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Fri, 30 Sep 2016 19:57:23 +0200 Subject: [PATCH] Fix mediafile control buttons for fullscreen and play. --- openslides/core/static/js/core/projector.js | 2 +- .../mediafiles/static/js/mediafiles/site.js | 28 +++++--------- .../templates/mediafiles/mediafile-list.html | 38 +++++++++++-------- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/openslides/core/static/js/core/projector.js b/openslides/core/static/js/core/projector.js index dbaaed9a3..4dc3d90ba 100644 --- a/openslides/core/static/js/core/projector.js +++ b/openslides/core/static/js/core/projector.js @@ -74,7 +74,7 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core']) $scope.$watch(function () { return Projector.lastModified($scope.projector_id); }, function () { - var projector = Projector.get($scope.projector_id) + var projector = Projector.get($scope.projector_id); if (projector) { $scope.error = ''; $scope.projectorWidth = projector.width; diff --git a/openslides/mediafiles/static/js/mediafiles/site.js b/openslides/mediafiles/static/js/mediafiles/site.js index b2d90fad2..883f49809 100644 --- a/openslides/mediafiles/static/js/mediafiles/site.js +++ b/openslides/mediafiles/static/js/mediafiles/site.js @@ -252,25 +252,17 @@ angular.module('OpenSlidesApp.mediafiles.site', ['ngFileUpload', 'OpenSlidesApp. {rotate: rotation} ); }; - $scope.mediafileScroll = function(scroll) { - var mediafileElement = getCurrentlyPresentedMediafile(); - sendMediafileCommand({ - scroll: scroll - }); + $scope.mediafileToggleFullscreen = function(mediafile) { + sendMediafileCommand( + mediafile, + {fullscreen: !mediafile.fullscreen} + ); }; - var setFullscreen = function(fullscreen) { - sendMediafileCommand({ - fullscreen: fullscreen - }); - }; - $scope.mediafileToggleFullscreen = function() { - var mediafileElement = getCurrentlyPresentedMediafile(); - setFullscreen(!mediafileElement.fullscreen); - }; - $scope.setPlaying = function(playing) { - sendMediafileCommand({ - playing: playing - }); + $scope.mediafileTogglePlaying = function(mediafile) { + sendMediafileCommand( + mediafile, + {playing: !mediafile.playing} + ); }; } ]) diff --git a/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html b/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html index b3850dff5..5381b8e85 100644 --- a/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html +++ b/openslides/mediafiles/static/templates/mediafiles/mediafile-list.html @@ -26,6 +26,7 @@

{{ getTitle(presentedMediafile) }}

+ + + + +