WIP styling comments buttons but broken quoting.

pull/1680/head
Richard 10 years ago
parent 50519eccdc
commit 5532907a12
  1. 6
      app/assets/javascripts/angular/directives/components/activity-comment-directive.js
  2. 10
      public/templates/components/activity_comment.html
  3. 27
      public/templates/work_packages/tabs/_user_activity.html

@ -52,7 +52,11 @@ angular.module('openproject.uiComponents')
scope.$emit('workPackageRefreshRequired', '');
return response;
});
}
};
scope.clearComment = function() {
scope.activity.comment = '';
};
}
};
}]);

@ -3,12 +3,18 @@
<label>
<h3>{{ title }}</h3>
<textarea id="add-comment-text"
class="add-comment-text"
name="add_comment_text"
ng-model="activity.comment"
required></textarea>
required
placeholder="Add your comments here">
</textarea>
<button class="button"
ng-click="createComment()"
ng-disabled="commentForm.$invalid">{{ buttonTitle }}</button>
ng-disabled="commentForm.$invalid"><i class="icon-yes icon-left"></i>{{ buttonTitle }}
</button>
<button class="button" ng-disabled="commentForm.$invalid" ng-click="clearComment()">
<i class="icon-close icon-left"></i>Cancel</button>
</label>
</form>
</div>

@ -15,15 +15,24 @@
<span class="date">{{ I18n.t('js.label_commented_on') }} <date-time date-time-value="activity.props.createdAt"/></date-time>
<span class="comment wiki">
<div ng-if="inEdit">
<div>
<textarea id="edit-comment-text"
ng-bind-html="activity.props.rawComment"
rows="5"></textarea>
</div>
<div>
<button class="button" ng-click="updateComment()">{{ I18n.t('js.button_update') }}</button>
<span><a href="" ng-click="cancelEdit()">cancel</a></span>
</div>
<form name="editCommentForm">
<div>
<textarea id="edit-comment-text"
name="edit_comment_text"
class="add-comment-text"
ng-model="activity.props.rawComment"
ng-bind-html="activity.props.rawComment"
rows="4"
required></textarea>
</div>
<div>
<button class="button"
ng-click="updateComment()"
ng-disabled="editCommentForm.$invalid"><i class="icon-yes icon-left"></i>{{ I18n.t('js.button_update') }}
</button>
<button class="button" ng-disabled="commentForm.$invalid" ng-click="cancelEdit()"><i class="icon-close icon-left"></i>Cancel</button>
</div>
</form>
</div>
<span ng-if="!inEdit"
class="message"

Loading…
Cancel
Save