Merge pull request #2994 from FinnStutzenstein/Improvements

Usability improvements
This commit is contained in:
Emanuel Schütze 2017-02-22 19:03:42 +01:00 committed by GitHub
commit 60ebac9f8b
10 changed files with 181 additions and 55 deletions

View File

@ -78,7 +78,7 @@
<translate>Sort ...</translate> <translate>Sort ...</translate>
</a> </a>
<!-- auto numbering button --> <!-- auto numbering button -->
<button os-perms="core.can_manage_projector" class="btn btn-default btn-sm" <button os-perms="agenda.can_manage" class="btn btn-default btn-sm"
ng-click="autoNumbering()"> ng-click="autoNumbering()">
<i class="fa fa-sort-numeric-asc"></i> <i class="fa fa-sort-numeric-asc"></i>
<translate>Numbering</translate> <translate>Numbering</translate>
@ -325,6 +325,15 @@
</span> </span>
</div> </div>
</div> </div>
<div ng-style="{'visibility': ((item.type == 1) && item.hover) ? 'visible' : 'hidden'}" os-perms="agenda.can_manage">
<div class="popover-wrapper" os-perms="agenda.can_manage">
<i class="fa fa-info-circle"></i>
<span editable-text="item.item_number" onaftersave="save(item)">
<span ng-if="!item.item_number" translate>Set item number ...</span>
<span ng-if="item.item_number"><em translate>Change item number ...</em></span>
</span>
</div>
</div>
</small> </small>
</div> </div>
<div style="width: 40%;" class="pull-right"> <div style="width: 40%;" class="pull-right">

View File

@ -632,18 +632,19 @@ angular.module('OpenSlidesApp.assignments.site', [
.controller('AssignmentCreateCtrl', [ .controller('AssignmentCreateCtrl', [
'$scope', '$scope',
'$state',
'Assignment', 'Assignment',
'AssignmentForm', 'AssignmentForm',
'Agenda', 'Agenda',
'AgendaUpdate', 'AgendaUpdate',
function($scope, Assignment, AssignmentForm, Agenda, AgendaUpdate) { function($scope, $state, Assignment, AssignmentForm, Agenda, AgendaUpdate) {
$scope.model = {}; $scope.model = {};
// set default value for open posts form field // set default value for open posts form field
$scope.model.open_posts = 1; $scope.model.open_posts = 1;
// get all form fields // get all form fields
$scope.formFields = AssignmentForm.getFormFields(true); $scope.formFields = AssignmentForm.getFormFields(true);
// save assignment // save assignment
$scope.save = function(assignment) { $scope.save = function(assignment, gotoDetailView) {
Assignment.create(assignment).then( Assignment.create(assignment).then(
function(success) { function(success) {
// type: Value 1 means a non hidden agenda item, value 2 means a hidden agenda item, // type: Value 1 means a non hidden agenda item, value 2 means a hidden agenda item,
@ -651,6 +652,9 @@ angular.module('OpenSlidesApp.assignments.site', [
var changes = [{key: 'type', value: (assignment.showAsAgendaItem ? 1 : 2)}, var changes = [{key: 'type', value: (assignment.showAsAgendaItem ? 1 : 2)},
{key: 'parent_id', value: assignment.agenda_parent_item_id}]; {key: 'parent_id', value: assignment.agenda_parent_item_id}];
AgendaUpdate.saveChanges(success.agenda_item_id,changes); AgendaUpdate.saveChanges(success.agenda_item_id,changes);
if (gotoDetailView) {
$state.go('assignments.assignment.detail', {id: success.id});
}
$scope.closeThisDialog(); $scope.closeThisDialog();
} }
); );
@ -660,12 +664,13 @@ angular.module('OpenSlidesApp.assignments.site', [
.controller('AssignmentUpdateCtrl', [ .controller('AssignmentUpdateCtrl', [
'$scope', '$scope',
'$state',
'Assignment', 'Assignment',
'AssignmentForm', 'AssignmentForm',
'Agenda', 'Agenda',
'AgendaUpdate', 'AgendaUpdate',
'assignmentId', 'assignmentId',
function($scope, Assignment, AssignmentForm, Agenda, AgendaUpdate, assignmentId) { function($scope, $state, Assignment, AssignmentForm, Agenda, AgendaUpdate, assignmentId) {
var assignment = Assignment.get(assignmentId); var assignment = Assignment.get(assignmentId);
$scope.alert = {}; $scope.alert = {};
// set initial values for form model by create deep copy of assignment object // set initial values for form model by create deep copy of assignment object
@ -684,7 +689,7 @@ angular.module('OpenSlidesApp.assignments.site', [
} }
// save assignment // save assignment
$scope.save = function (assignment) { $scope.save = function (assignment, gotoDetailView) {
// inject the changed assignment (copy) object back into DS store // inject the changed assignment (copy) object back into DS store
Assignment.inject(assignment); Assignment.inject(assignment);
// save change assignment object on server // save change assignment object on server
@ -693,6 +698,9 @@ angular.module('OpenSlidesApp.assignments.site', [
var changes = [{key: 'type', value: (assignment.showAsAgendaItem ? 1 : 2)}, var changes = [{key: 'type', value: (assignment.showAsAgendaItem ? 1 : 2)},
{key: 'parent_id', value: assignment.agenda_parent_item_id}]; {key: 'parent_id', value: assignment.agenda_parent_item_id}];
AgendaUpdate.saveChanges(success.agenda_item_id,changes); AgendaUpdate.saveChanges(success.agenda_item_id,changes);
if (gotoDetailView) {
$state.go('assignments.assignment.detail', {id: success.id});
}
$scope.closeThisDialog(); $scope.closeThisDialog();
}, },
function (error) { function (error) {

View File

@ -5,8 +5,13 @@
{{ alert.msg }} {{ alert.msg }}
</div> </div>
<form name="assignmentForm" ng-submit="save(model)"> <form name="assignmentForm" ng-submit="save(model, gotoDetailView)">
<formly-form model="model" fields="formFields"> <formly-form model="model" fields="formFields">
<hr class="smallhr">
<div class="checkbox pointer" ng-click="$parent.$parent.gotoDetailView = !$parent.$parent.gotoDetailView">
<i class="fa" ng-class="$parent.$parent.gotoDetailView ? 'fa-check-square-o' : 'fa-square-o'"></i>
<translate>Open election detail view after save.</translate>
</div>
<button type="submit" ng-disabled="assignmentForm.$invalid" class="btn btn-primary" translate> <button type="submit" ng-disabled="assignmentForm.$invalid" class="btn btn-primary" translate>
Save Save
</button> </button>

View File

@ -384,9 +384,6 @@ img {
opacity: 1; opacity: 1;
background-color: #eee; background-color: #eee;
} }
.col1 .details .motion-toolbar .toolbar-left .goto-line-number {
max-width: 220px;
}
.col1 .details .inline-editing-activator { .col1 .details .inline-editing-activator {
margin-right: 13px; margin-right: 13px;
@ -1642,6 +1639,10 @@ tr.selected td {
background-color: #ff9999; background-color: #ff9999;
} }
/** Angular formly **/
.checkbox label {
padding-left: 0;
}
/** Colors **/ /** Colors **/

View File

@ -634,6 +634,11 @@ angular.module('OpenSlidesApp.core.site', [
extends: 'input', extends: 'input',
templateUrl: 'static/templates/core/password.html', templateUrl: 'static/templates/core/password.html',
}); });
formlyConfig.setType({
name: 'checkbox',
templateUrl: 'static/templates/core/checkbox.html',
overwriteOk: true,
});
formlyConfig.setType({ formlyConfig.setType({
name: 'select-single', name: 'select-single',
extends: 'select', extends: 'select',

View File

@ -0,0 +1,7 @@
<div class="checkbox">
<label ng-click="model[options.key] = !model[options.key]">
<i class="fa" ng-class="model[options.key] ? 'fa-check-square-o' : 'fa-square-o'"></i>
{{to.label}}
{{to.required ? '*' : ''}}
</label>
</div>

View File

@ -995,6 +995,7 @@ angular.module('OpenSlidesApp.motions.site', [
.controller('MotionDetailCtrl', [ .controller('MotionDetailCtrl', [
'$scope', '$scope',
'$http', '$http',
'$timeout',
'operator', 'operator',
'ngDialog', 'ngDialog',
'MotionForm', 'MotionForm',
@ -1015,16 +1016,18 @@ angular.module('OpenSlidesApp.motions.site', [
'MotionCommentsInlineEditing', 'MotionCommentsInlineEditing',
'Projector', 'Projector',
'ProjectionDefault', 'ProjectionDefault',
function($scope, $http, operator, ngDialog, MotionForm, 'MotionBlock',
function($scope, $http, $timeout, operator, ngDialog, MotionForm,
ChangeRecommmendationCreate, ChangeRecommmendationView, MotionChangeRecommendation, MotionPDFExport, ChangeRecommmendationCreate, ChangeRecommmendationView, MotionChangeRecommendation, MotionPDFExport,
Motion, MotionComment, Category, Mediafile, Tag, User, Workflow, Config, motionId, MotionInlineEditing, Motion, MotionComment, Category, Mediafile, Tag, User, Workflow, Config, motionId, MotionInlineEditing,
MotionCommentsInlineEditing, Projector, ProjectionDefault) { MotionCommentsInlineEditing, Projector, ProjectionDefault, MotionBlock) {
var motion = Motion.get(motionId); var motion = Motion.get(motionId);
Category.bindAll({}, $scope, 'categories'); Category.bindAll({}, $scope, 'categories');
Mediafile.bindAll({}, $scope, 'mediafiles'); Mediafile.bindAll({}, $scope, 'mediafiles');
Tag.bindAll({}, $scope, 'tags'); Tag.bindAll({}, $scope, 'tags');
User.bindAll({}, $scope, 'users'); User.bindAll({}, $scope, 'users');
Workflow.bindAll({}, $scope, 'workflows'); Workflow.bindAll({}, $scope, 'workflows');
MotionBlock.bindAll({}, $scope, 'motionBlocks');
$scope.$watch(function () { $scope.$watch(function () {
return MotionChangeRecommendation.lastModified(); return MotionChangeRecommendation.lastModified();
}, function () { }, function () {
@ -1132,6 +1135,10 @@ angular.module('OpenSlidesApp.motions.site', [
$('html, body').animate({ $('html, body').animate({
'scrollTop': scrollTop - 50 'scrollTop': scrollTop - 50
}, 1000); }, 1000);
// remove the line highlight after 2 seconds.
$timeout(function () {
$scope.highlight = 0;
}, 2000);
} }
// set highlight and scroll on Projector // set highlight and scroll on Projector
setHighlightOnProjector($scope.linesForProjector ? line : 0); setHighlightOnProjector($scope.linesForProjector ? line : 0);
@ -1148,6 +1155,12 @@ angular.module('OpenSlidesApp.motions.site', [
} }
ngDialog.open(MotionForm.getDialog(motion)); ngDialog.open(MotionForm.getDialog(motion));
}; };
$scope.save = function (motion) {
motion.title = motion.getTitle(-1);
motion.text = motion.getText(-1);
motion.reason = motion.getReason(-1);
Motion.save(motion);
};
// support // support
$scope.support = function () { $scope.support = function () {
$http.post('/rest/motions/motion/' + motion.id + '/support/'); $http.post('/rest/motions/motion/' + motion.id + '/support/');
@ -1173,24 +1186,49 @@ angular.module('OpenSlidesApp.motions.site', [
$scope.reset_state = function () { $scope.reset_state = function () {
$http.put('/rest/motions/motion/' + motion.id + '/set_state/', {}); $http.put('/rest/motions/motion/' + motion.id + '/set_state/', {});
}; };
// toggle functions for meta information
$scope.toggleCategory = function (category) {
if ($scope.motion.category_id == category.id) {
$scope.motion.category_id = null;
} else {
$scope.motion.category_id = category.id;
}
$scope.save($scope.motion);
};
$scope.toggleMotionBlock = function (block) {
if ($scope.motion.motion_block_id == block.id) {
$scope.motion.motion_block_id = null;
} else {
$scope.motion.motion_block_id = block.id;
}
$scope.save($scope.motion);
};
$scope.toggleTag = function (tag) {
if (_.indexOf($scope.motion.tags_id, tag.id) > -1) {
// remove
$scope.motion.tags_id = _.filter($scope.motion.tags_id,
function (tag_id){
return tag_id != tag.id;
}
);
} else {
$scope.motion.tags_id.push(tag.id);
}
$scope.save($scope.motion);
};
// save additional state field // save additional state field
$scope.saveAdditionalStateField = function (stateExtension) { $scope.saveAdditionalStateField = function (stateExtension) {
if (stateExtension) { if (stateExtension) {
motion["comment " + $scope.commentFieldForState] = stateExtension; motion["comment " + $scope.commentFieldForState] = stateExtension;
motion.title = motion.getTitle(-1); $scope.save(motion);
motion.text = motion.getText(-1);
motion.reason = motion.getReason(-1);
Motion.save(motion);
} }
}; };
// save additional recommendation field // save additional recommendation field
$scope.saveAdditionalRecommendationField = function (recommendationExtension) { $scope.saveAdditionalRecommendationField = function (recommendationExtension) {
if (recommendationExtension) { if (recommendationExtension) {
motion["comment " + $scope.commentFieldForRecommendation] = recommendationExtension; motion["comment " + $scope.commentFieldForRecommendation] = recommendationExtension;
motion.title = motion.getTitle(-1); $scope.save(motion);
motion.text = motion.getText(-1);
motion.reason = motion.getReason(-1);
Motion.save(motion);
} }
}; };
// update recommendation // update recommendation
@ -1414,7 +1452,7 @@ angular.module('OpenSlidesApp.motions.site', [
$scope.formFields = MotionForm.getFormFields(true); $scope.formFields = MotionForm.getFormFields(true);
// save motion // save motion
$scope.save = function (motion) { $scope.save = function (motion, gotoDetailView) {
Motion.create(motion).then( Motion.create(motion).then(
function(success) { function(success) {
// type: Value 1 means a non hidden agenda item, value 2 means a hidden agenda item, // type: Value 1 means a non hidden agenda item, value 2 means a hidden agenda item,
@ -1422,7 +1460,7 @@ angular.module('OpenSlidesApp.motions.site', [
var changes = [{key: 'type', value: (motion.showAsAgendaItem ? 1 : 2)}, var changes = [{key: 'type', value: (motion.showAsAgendaItem ? 1 : 2)},
{key: 'parent_id', value: motion.agenda_parent_item_id}]; {key: 'parent_id', value: motion.agenda_parent_item_id}];
AgendaUpdate.saveChanges(success.agenda_item_id, changes); AgendaUpdate.saveChanges(success.agenda_item_id, changes);
if (isAmendment) { if (isAmendment || gotoDetailView) {
$state.go('motions.motion.detail', {id: success.id}); $state.go('motions.motion.detail', {id: success.id});
} }
$scope.closeThisDialog(); $scope.closeThisDialog();
@ -1434,6 +1472,7 @@ angular.module('OpenSlidesApp.motions.site', [
.controller('MotionUpdateCtrl', [ .controller('MotionUpdateCtrl', [
'$scope', '$scope',
'$state',
'Motion', 'Motion',
'Category', 'Category',
'Config', 'Config',
@ -1445,7 +1484,8 @@ angular.module('OpenSlidesApp.motions.site', [
'Agenda', 'Agenda',
'AgendaUpdate', 'AgendaUpdate',
'motionId', 'motionId',
function($scope, Motion, Category, Config, Mediafile, MotionForm, Tag, User, Workflow, Agenda, AgendaUpdate, motionId) { function($scope, $state, Motion, Category, Config, Mediafile, MotionForm, Tag,
User, Workflow, Agenda, AgendaUpdate, motionId) {
Category.bindAll({}, $scope, 'categories'); Category.bindAll({}, $scope, 'categories');
Mediafile.bindAll({}, $scope, 'mediafiles'); Mediafile.bindAll({}, $scope, 'mediafiles');
Tag.bindAll({}, $scope, 'tags'); Tag.bindAll({}, $scope, 'tags');
@ -1501,7 +1541,7 @@ angular.module('OpenSlidesApp.motions.site', [
} }
// save motion // save motion
$scope.save = function (motion) { $scope.save = function (motion, gotoDetailView) {
// inject the changed motion (copy) object back into DS store // inject the changed motion (copy) object back into DS store
Motion.inject(motion); Motion.inject(motion);
// save change motion object on server // save change motion object on server
@ -1512,6 +1552,9 @@ angular.module('OpenSlidesApp.motions.site', [
var changes = [{key: 'type', value: (motion.showAsAgendaItem ? 1 : 2)}, var changes = [{key: 'type', value: (motion.showAsAgendaItem ? 1 : 2)},
{key: 'parent_id', value: motion.agenda_parent_item_id}]; {key: 'parent_id', value: motion.agenda_parent_item_id}];
AgendaUpdate.saveChanges(success.agenda_item_id,changes); AgendaUpdate.saveChanges(success.agenda_item_id,changes);
if (gotoDetailView) {
$state.go('motions.motion.detail', {id: success.id});
}
$scope.closeThisDialog(); $scope.closeThisDialog();
}, },
function (error) { function (error) {

View File

@ -132,10 +132,10 @@
<h3 ng-if="!motion.isAllowed('change_state')" class="heading" translate>State</h3> <h3 ng-if="!motion.isAllowed('change_state')" class="heading" translate>State</h3>
<div ng-if="motion.isAllowed('change_state')" class="heading"> <div ng-if="motion.isAllowed('change_state')" class="heading">
<span uib-dropdown> <span uib-dropdown>
<a href id="state-dropdown" class="drop-down-name" uib-dropdown-toggle> <span id="state-dropdown" class="drop-down-name pointer" uib-dropdown-toggle>
<translate>State</translate> <translate>State</translate>
<i class="fa fa-cog"></i> <i class="fa fa-cog"></i>
</a> </span>
<ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="state-dropdown"> <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="state-dropdown">
<li ng-repeat="state in motion.state.getNextStates()"> <li ng-repeat="state in motion.state.getNextStates()">
<a href ng-click="updateState(state.id)">{{ state.action_word | translate }}</a> <a href ng-click="updateState(state.id)">{{ state.action_word | translate }}</a>
@ -171,10 +171,10 @@
</h3> </h3>
<div ng-if="motion.isAllowed('change_recommendation')" class="heading"> <div ng-if="motion.isAllowed('change_recommendation')" class="heading">
<span uib-dropdown> <span uib-dropdown>
<a href id="recommendation-dropdown" class="drop-down-name" uib-dropdown-toggle> <span id="recommendation-dropdown" class="drop-down-name pointer" uib-dropdown-toggle>
{{ config('motions_recommendations_by') }} {{ config('motions_recommendations_by') }}
<i class="fa fa-cog"></i> <i class="fa fa-cog"></i>
</a> </span>
<ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="recommendation-dropdown"> <ul uib-dropdown-menu class="dropdown-menu" aria-labelledby="recommendation-dropdown">
<li ng-repeat="recommendation in motion.state.getRecommendations()"> <li ng-repeat="recommendation in motion.state.getRecommendations()">
<a href ng-click="updateRecommendation(recommendation.id)"> <a href ng-click="updateRecommendation(recommendation.id)">
@ -189,11 +189,11 @@
</ul> </ul>
</span> </span>
</div> </div>
<div class="label" ng-class="'label-'+motion.recommendation.css_class"> <div class="label" ng-if="motion.recommendation" ng-class="'label-'+motion.recommendation.css_class">
{{ motion.getRecommendationName() }} {{ motion.getRecommendationName() }}
</div> </div>
<div class="input-group spacer" <div class="input-group spacer"
ng-show="motion.recommendation.show_recommendation_extension_field"> ng-if="motion.recommendation.show_recommendation_extension_field">
<label class="sr-only" for="recommendationExtensionField">{{ commentFieldForRecommendation }}</label> <label class="sr-only" for="recommendationExtensionField">{{ commentFieldForRecommendation }}</label>
<input type="text" ng-model="recommendationExtension" <input type="text" ng-model="recommendationExtension"
id="recommendationExtensionField" class="form-control input-sm" id="recommendationExtensionField" class="form-control input-sm"
@ -216,17 +216,65 @@
</div> </div>
<!-- Category --> <!-- Category -->
<h3 ng-if="motion.category" translate>Category</h3> <h3 class="heading" os-perms="!motions.can_manage" ng-show="motion.category" translate>Category</h3>
<div class="heading" os-perms="motions.can_manage" ng-show="categories.length > 0">
<span uib-dropdown>
<span id="category-dropdown" class="drop-down-name pointer" uib-dropdown-toggle>
<translate>Category</translate>
<i class="fa fa-cog"></i>
</span>
<ul class="dropdown-menu" aria-labelledby="category-dropdown">
<li ng-repeat="category in categories">
<a href ng-click="toggleCategory(category)">
<i class="fa fa-check" ng-if="category.id == motion.category.id"></i>
{{ category.name }}
</a>
</li>
</ul>
</span>
</div>
{{ motion.category.name }} {{ motion.category.name }}
<!-- Motion block --> <!-- Motion block -->
<h3 ng-if="motion.motionBlock" translate>Motion block</h3> <h3 class="heading" os-perms="!motions.can_manage" ng-show="motion.motionBlock" translate>Motion block</h3>
<div class="heading" os-perms="motions.can_manage" ng-show="motionBlocks.length > 0">
<span uib-dropdown>
<span id="motionBlock-dropdown" class="drop-down-name pointer" uib-dropdown-toggle>
<translate>Motion block</translate>
<i class="fa fa-cog"></i>
</span>
<ul class="dropdown-menu" aria-labelledby="motionBlock-dropdown">
<li ng-repeat="motionBlock in motionBlocks">
<a href ng-click="toggleMotionBlock(motionBlock)">
<i class="fa fa-check" ng-if="motionBlock.id == motion.motionBlock.id"></i>
{{ motionBlock.title }}
</a>
</li>
</ul>
</span>
</div>
<a ui-sref="motions.motionBlock.detail({id: motion.motionBlock.id})" <a ui-sref="motions.motionBlock.detail({id: motion.motionBlock.id})"
os-perms="motions.can_manage">{{ motion.motionBlock.title }}</a> os-perms="motions.can_manage">{{ motion.motionBlock.title }}</a>
<span os-perms="!motions.can_manage">{{ motion.motionBlock.title }}</span> <span os-perms="!motions.can_manage">{{ motion.motionBlock.title }}</span>
<!-- Tags --> <!-- Tags -->
<h3 ng-if="motion.tags.length > 0" translate>Tags</h3> <h3 class="heading" os-perms="!motions.can_manage" ng-show="motion.tags.length" translate>Tags</h3>
<div class="heading" os-perms="motions.can_manage" ng-show="tags.length > 0">
<span uib-dropdown>
<span id="tag-dropdown" class="drop-down-name pointer" uib-dropdown-toggle>
<translate>Tags</translate>
<i class="fa fa-cog"></i>
</span>
<ul class="dropdown-menu" aria-labelledby="tag-dropdown">
<li ng-repeat="tag in tags">
<a href ng-click="toggleTag(tag)">
<i class="fa fa-check" ng-if="inArray(motion.tags_id, tag.id)"></i>
{{ tag.name }}
</a>
</li>
</ul>
</span>
</div>
<span ng-repeat="tag in motion.tags"> <span ng-repeat="tag in motion.tags">
{{ tag.name }}{{$last ? '' : ', '}} {{ tag.name }}{{$last ? '' : ', '}}
</span> </span>

View File

@ -48,28 +48,23 @@
</div> </div>
<!-- go to line number --> <!-- go to line number -->
<div class="goto-line-number"> <div class="popover-wrapper">
<form class="input-group" ng-if="lineNumberMode != 'none'" ng-submit="scrollToAndHighlight(gotoLinenumber)"> <span editable-text="gotoLinenumber" e-form="lineNumberForm"
<input type="number" class="form-control input-sm" ng-model="gotoLinenumber" onaftersave="scrollToAndHighlight(gotoLinenumber)">
placeholder="{{ 'Line' | translate }}"/> </span>
<div class="input-group-btn"> <div class="btn-group" ng-if="lineNumberMode != 'none'">
<button type="button" class="btn btn-sm btn-default btn-slim" ng-show="gotoLinenumber" <button type="button" class="btn btn-sm btn-default" ng-click="lineNumberForm.$show()">
ng-click="gotoLinenumber = ''; scrollToAndHighlight(0);">
<i class="fa fa-times text-danger"></i>
</button>
<button type="submit" class="btn btn-sm btn-default">
<i class="fa fa-share"></i> <i class="fa fa-share"></i>
<translate>go</translate> <translate>go</translate>
</button> </button>
<button type="button" class="btn btn-sm btn-default" os-perms="core.can_manage_projector" <button type="button" class="btn btn-sm btn-default" os-perms="core.can_manage_projector"
ng-show="lineNumberMode != 'none' && motion.isProjected().length" ng-if="lineNumberMode != 'none' && motion.isProjected().length"
ng-click="toggleLinesForProjector()" ng-click="toggleLinesForProjector()"
uib-tooltip="{{ 'Show highlighted line also on projector.' | translate }}"> uib-tooltip="{{ 'Show highlighted line also on projector.' | translate }}">
<i class="fa" ng-class="linesForProjector ? 'fa-check-square-o' : 'fa-square-o'"></i>&nbsp; <i class="fa" ng-class="linesForProjector ? 'fa-check-square-o' : 'fa-square-o'"></i>&nbsp;
<i class="fa fa-video-camera"></i> <i class="fa fa-video-camera"></i>
</button> </button>
</div> </div>
</form>
</div> </div>
</div> </div>
</div> </div>

View File

@ -6,8 +6,13 @@
{{ alert.msg }} {{ alert.msg }}
</div> </div>
<form name="motionForm" ng-submit="save(model)" novalidate> <form name="motionForm" ng-submit="save(model, gotoDetailView)" novalidate>
<formly-form model="model" fields="formFields"> <formly-form model="model" fields="formFields">
<hr class="smallhr">
<div class="checkbox pointer" ng-click="$parent.$parent.gotoDetailView = !$parent.$parent.gotoDetailView">
<i class="fa" ng-class="$parent.$parent.gotoDetailView ? 'fa-check-square-o' : 'fa-square-o'"></i>
<translate>Open motion detail view after save.</translate>
</div>
<button type="submit" ng-disabled="motionForm.$invalid" class="btn btn-primary" translate> <button type="submit" ng-disabled="motionForm.$invalid" class="btn btn-primary" translate>
Save Save
</button> </button>