Merge pull request #2562 from emanuelschuetze/comments-editor

Use tinymce editor for motion comment fields.
This commit is contained in:
Norman Jäckel 2016-11-01 22:54:58 +01:00 committed by GitHub
commit 378fb46fb2
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>
<span ng-if="!field.public" class="label label-warning" translate>internal</span>
<br>
{{ motion.comments[$index] }}
</p>
<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>
</h4>
<div ng-bind-html="motion.comments[$index]"></div>
</div>
</div>
</div>