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> </ul>
</div> </div>
<!-- Identity --> <!-- 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> <i class="fa fa-binoculars"></i>
<translate>Identify</translate> <translate>Identify</translate>
</button> </button>
@ -184,7 +185,8 @@
<div class="btn-group"> <div class="btn-group">
<button class="btn btn-sm" ng-class="broadcast == projector.id ? 'btn-primary' : 'btn-default'" <button class="btn btn-sm" ng-class="broadcast == projector.id ? 'btn-primary' : 'btn-default'"
ng-click="projector.toggleBroadcast(projector)" 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> <i class="fa" ng-class="broadcast == projector.id ? 'fa-star' : 'fa-star-o'"></i>
<translate>Broadcast</translate> <translate>Broadcast</translate>
</button> </button>

View File

@ -288,7 +288,7 @@
</div> </div>
<!-- projector column --> <!-- projector column -->
<div class="col-xs-1 centered projector" os-perms="core.can_manage_projector"> <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> </projector-button>
</div> </div>
<!-- main content column --> <!-- main content column -->

View File

@ -685,9 +685,19 @@ angular.module('OpenSlidesApp.users.site', [
'User', 'User',
'user', 'user',
'Group', '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'); User.bindOne(user.id, $scope, 'user');
Group.bindAll({where: {id: {'>': 1}}}, $scope, 'groups'); 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 // open edit dialog
$scope.openDialog = function (user) { $scope.openDialog = function (user) {

View File

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

View File

@ -318,7 +318,7 @@
</div> </div>
<!-- projector column --> <!-- projector column -->
<div class="col-xs-1 centered projector" os-perms="core.can_manage_projector"> <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> </projector-button>
</div> </div>
<!-- main content column --> <!-- main content column -->