Merge pull request #2513 from FinnStutzenstein/Issue2471

use check icon and no post request on deselect (fixes #2471)
This commit is contained in:
Emanuel Schütze 2016-10-21 10:06:39 +02:00 committed by GitHub
commit f8be521bf5
3 changed files with 6 additions and 5 deletions

View File

@ -164,7 +164,7 @@
ng-class="{ 'activeline': item.isProjected(), 'selected': item.selected, 'hiddenrow': item.is_hidden}"> ng-class="{ 'activeline': item.isProjected(), 'selected': item.selected, 'hiddenrow': item.is_hidden}">
<!-- projector column --> <!-- projector column -->
<td ng-show="!isDeleteMode" os-perms="core.can_manage_projector"> <td ng-show="!isDeleteMode" os-perms="core.can_manage_projector">
<div class="btn-group" style="min-width:{{ projectors.length > 1 ? '54' : '34' }}px;" uib-dropdown <div class="btn-group" style="min-width:{{ (item.hasSubitems(items) || projectors.length > 1) ? '54' : '34' }}px;" uib-dropdown
uib-tooltip="{{ 'Projector' | translate }} {{ item.isProjected(item.tree) }}" uib-tooltip="{{ 'Projector' | translate }} {{ item.isProjected(item.tree) }}"
tooltip-enable="item.isProjected(item.tree) > 0"> tooltip-enable="item.isProjected(item.tree) > 0">
<button class="btn btn-default btn-sm" <button class="btn btn-default btn-sm"

View File

@ -1130,8 +1130,10 @@ angular.module('OpenSlidesApp.core.site', [
}; };
// Projector functions // Projector functions
$scope.setProjectionDefault = function (projector, def) { $scope.setProjectionDefault = function (projector, projectiondefault) {
$http.post('/rest/core/projector/' + projector.id + '/set_projectiondefault/', def.id); if (projectiondefault.projector_id !== projector.id) {
$http.post('/rest/core/projector/' + projector.id + '/set_projectiondefault/', projectiondefault.id);
}
}; };
$scope.createProjector = function (name) { $scope.createProjector = function (name) {
var projector = { var projector = {

View File

@ -34,7 +34,6 @@
<div class="dropdown" ng-show="projectors.length > 1"> <div class="dropdown" ng-show="projectors.length > 1">
<button class="btn btn-default btn-sm dropdown-toggle" id="menuProjector" data-toggle="dropdown" <button class="btn btn-default btn-sm dropdown-toggle" id="menuProjector" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true"> aria-haspopup="true" aria-expanded="true">
<i class="fa fa-video-camera"></i>
{{ active_projector.name }} {{ active_projector.name }}
<span class="caret"></span> <span class="caret"></span>
</button> </button>
@ -42,7 +41,7 @@
<li ng-repeat="projector in projectors" <li ng-repeat="projector in projectors"
ng-class="{'projected': projector === active_projector}" ng-class="{'projected': projector === active_projector}"
ng-click="changeProjector(projector)"> ng-click="changeProjector(projector)">
<i ng-show="projector === active_projector" class="fa fa-video-camera"></i> <i ng-show="projector === active_projector" class="fa fa-check"></i>
{{ projector.name }} {{ projector.name }}
<i ng-show="projector.id == broadcast" class="fa fa-star-o spacer-left"></i> <i ng-show="projector.id == broadcast" class="fa fa-star-o spacer-left"></i>
</li> </li>