Hot fix for broadcast (will improved later).
This commit is contained in:
parent
6f2a509ebf
commit
720c7e76a5
@ -163,9 +163,10 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
|
|||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
return Config.lastModified('projector_broadcast');
|
return Config.lastModified('projector_broadcast');
|
||||||
}, function () {
|
}, function () {
|
||||||
var bc = Config.get('projector_broadcast').value;
|
var bc = Config.get('projector_broadcast');
|
||||||
if ($scope.broadcast != bc) {
|
if (bc) {
|
||||||
$scope.broadcast = bc;
|
if ($scope.broadcast != bc.value) {
|
||||||
|
$scope.broadcast = bc.value;
|
||||||
if ($scope.broadcastDeregister) {
|
if ($scope.broadcastDeregister) {
|
||||||
// revert to original $scope.projector
|
// revert to original $scope.projector
|
||||||
$scope.broadcastDeregister();
|
$scope.broadcastDeregister();
|
||||||
@ -180,14 +181,15 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
|
|||||||
return Projector.lastModified($scope.broadcast);
|
return Projector.lastModified($scope.broadcast);
|
||||||
}, function () {
|
}, function () {
|
||||||
if ($scope.broadcast > 0) {
|
if ($scope.broadcast > 0) {
|
||||||
// var broadcast_projector = Projector.get($scope.broadcast);
|
var broadcast_projector = Projector.get($scope.broadcast);
|
||||||
Projector.find($scope.broadcast).then(function (broadcast_projector) {
|
if (broadcast_projector) {
|
||||||
setElements(broadcast_projector);
|
setElements(broadcast_projector);
|
||||||
$scope.blank = broadcast_projector.blank;
|
$scope.blank = broadcast_projector.blank;
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on('$destroy', function() {
|
$scope.$on('$destroy', function() {
|
||||||
|
@ -143,6 +143,8 @@ def send_data(message):
|
|||||||
projectors = Projector.objects.all() # Also the broadcasted projector should get his data
|
projectors = Projector.objects.all() # Also the broadcasted projector should get his data
|
||||||
send_all = True
|
send_all = True
|
||||||
broadcast_projector_data = get_projector_element_data(Projector.objects.get(pk=broadcast_id))
|
broadcast_projector_data = get_projector_element_data(Projector.objects.get(pk=broadcast_id))
|
||||||
|
broadcast_projector_data.append(CollectionElement.from_values(
|
||||||
|
collection_string=Projector.get_collection_string(), id=broadcast_id).as_autoupdate_for_projector())
|
||||||
else:
|
else:
|
||||||
broadcast_projector_data = None
|
broadcast_projector_data = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user