Merge pull request #2680 from FinnStutzenstein/MultiprojectorThings

Some improvements for Multiprojector
This commit is contained in:
Emanuel Schütze 2016-11-25 15:45:40 +01:00 committed by GitHub
commit fb646df1fd
5 changed files with 19 additions and 11 deletions

View File

@ -26,7 +26,8 @@
</ul>
</div>
<!-- Identity -->
<button class="btn" ng-click="identifyProjectors()" ng-class="identifyPromise ? 'btn-primary' : 'btn-default'">
<button class="btn" ng-click="identifyProjectors()" ng-class="identifyPromise ? 'btn-primary' : 'btn-default'"
uib-tooltip="{{ 'Display an identifier message on all projectors with the id and the name.' | translate }}">
<i class="fa fa-binoculars"></i>
<translate>Identify</translate>
</button>
@ -184,7 +185,8 @@
<div class="btn-group">
<button class="btn btn-sm" ng-class="broadcast == projector.id ? 'btn-primary' : 'btn-default'"
ng-click="projector.toggleBroadcast(projector)"
ng-disabled="broadcast > 0 && broadcast != projector.id">
ng-disabled="broadcast > 0 && broadcast != projector.id"
uib-tooltip="{{ 'Broadcast the content of this projector to all other projectors.' | translate }}">
<i class="fa" ng-class="broadcast == projector.id ? 'fa-star' : 'fa-star-o'"></i>
<translate>Broadcast</translate>
</button>

View File

@ -288,7 +288,7 @@
</div>
<!-- projector column -->
<div class="col-xs-1 centered projector" os-perms="core.can_manage_projector">
<projector-button model="motion", default-projector-id="defaultProjectorId">
<projector-button model="motion" default-projector-id="defaultProjectorId">
</projector-button>
</div>
<!-- main content column -->

View File

@ -685,9 +685,19 @@ angular.module('OpenSlidesApp.users.site', [
'User',
'user',
'Group',
function($scope, ngDialog, UserForm, User, user, Group) {
'Projector',
'ProjectionDefault',
function($scope, ngDialog, UserForm, User, user, Group, Projector, ProjectionDefault) {
User.bindOne(user.id, $scope, 'user');
Group.bindAll({where: {id: {'>': 1}}}, $scope, 'groups');
$scope.$watch(function () {
return Projector.lastModified();
}, function () {
var projectiondefault = ProjectionDefault.filter({name: 'users'})[0];
if (projectiondefault) {
$scope.defaultProjectorId = projectiondefault.projector_id;
}
});
// open edit dialog
$scope.openDialog = function (user) {

View File

@ -6,12 +6,8 @@
<translate>Back to overview</translate>
</a>
<!-- project -->
<a os-perms="core.can_manage_projector" class="btn btn-default btn-sm"
ng-class="{ 'btn-primary': user.isProjected() }"
ng-click="user.project()"
title="{{ 'Project user' | translate }}">
<i class="fa fa-video-camera"></i>
</a>
<projector-button model="user" default-projector-id="defaultProjectorId">
</projector-button>
<!-- edit -->
<a os-perms="users.can_manage" ng-click="openDialog(user)"
class="btn btn-default btn-sm"

View File

@ -318,7 +318,7 @@
</div>
<!-- projector column -->
<div class="col-xs-1 centered projector" os-perms="core.can_manage_projector">
<projector-button model="user", default-projector-id="defaultProjectorId">
<projector-button model="user" default-projector-id="defaultProjectorId">
</projector-button>
</div>
<!-- main content column -->