summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-08-04 09:52:17 +0100
committerPhil Hughes <me@iamphill.com>2016-08-04 09:52:17 +0100
commit433f1c42c3958381a6af539e9a9ab206c749d9f4 (patch)
treed7cbefc34a9f7feed30786a068b4eb242104a70a /app/assets/javascripts/notes.js
parent538e66d71c0f7125cc62ea51480668ba8b342544 (diff)
downloadgitlab-ce-433f1c42c3958381a6af539e9a9ab206c749d9f4.tar.gz
Comment & resolve button no longer looks for can-resolve attribute
Fixed some bugs when removing notes
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r--app/assets/javascripts/notes.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index fd5163bdd5b..3fc4697cd33 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -577,7 +577,6 @@
*/
Notes.prototype.setupDiscussionNoteForm = function(dataHolder, form) {
- var canResolve = dataHolder.attr('data-can-resolve');
form.attr('id', "new-discussion-note-form-" + (dataHolder.data("discussionId")));
form.attr("data-line-code", dataHolder.data("lineCode"));
form.find("#note_type").val(dataHolder.data("noteType"));
@@ -591,9 +590,7 @@
form.find('.js-note-target-close').remove();
this.setupNoteForm(form);
- if (canResolve === 'false' || !form.closest('.notes_content').find('.note:not(.system-note)').length) {
- form.find('comment-and-resolve-btn').remove();
- } else if (typeof DiffNotesApp !== 'undefined') {
+ if (typeof DiffNotesApp !== 'undefined') {
var $commentBtn = form.find('comment-and-resolve-btn');
$commentBtn
.attr(':discussion-id', "'" + dataHolder.data('discussionId') + "'");