Use tinymce editor for motion comment fields.

This commit is contained in:
Emanuel Schütze 2016-11-01 17:35:09 +01:00
parent 4d48f2d8a5
commit 41a4e35592
2 changed files with 13 additions and 8 deletions

View File

@ -444,7 +444,8 @@ angular.module('OpenSlidesApp.motions', [
.factory('MotionComment', [
'Config',
'operator',
function (Config, operator) {
'Editor',
function (Config, operator, Editor) {
return {
getFormFields: function () {
var fields = Config.get('motions_comments').value;
@ -453,10 +454,13 @@ angular.module('OpenSlidesApp.motions', [
function (field) {
return {
key: 'comment ' + field.name,
type: 'input',
type: 'editor',
templateOptions: {
label: field.name,
},
data: {
tinymceOption: Editor.getOptions()
},
hide: !operator.hasPerms("motions.can_see_and_manage_comments")
};
}

View File

@ -407,11 +407,12 @@
<div class="details" ng-if="isAllowedToSeeCommentField()">
<h3>Motion Comments</h3>
<div ng-repeat="field in commentsFields">
<p ng-if="field.public || operator.hasPerms('motions.can_see_and_manage_comments')">
<b>{{ field.name }}:</b>
<div ng-if="field.public || operator.hasPerms('motions.can_see_and_manage_comments')">
<h4>
{{ field.name }}
<span ng-if="!field.public" class="label label-warning" translate>internal</span>
<br>
{{ motion.comments[$index] }}
</p>
</h4>
<div ng-bind-html="motion.comments[$index]"></div>
</div>
</div>
</div>