BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4fba69dc
Commit
4fba69dc
authored
Nov 07, 2016
by
Phil Hughes
Committed by
Fatih Acet
Nov 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed up resolve discussions
parent
1505fc3a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
27 deletions
+43
-27
comment_resolve_btn.js.es6
...ascripts/diff_notes/components/comment_resolve_btn.js.es6
+9
-3
resolve_btn.js.es6
...sets/javascripts/diff_notes/components/resolve_btn.js.es6
+5
-3
resolve_count.js.es6
...ts/javascripts/diff_notes/components/resolve_count.js.es6
+3
-0
resolve_discussion_btn.js.es6
...ripts/diff_notes/components/resolve_discussion_btn.js.es6
+5
-3
diff_notes_bundle.js.es6
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
+8
-7
notes.js
app/assets/javascripts/notes.js
+2
-1
_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+9
-8
_note.html.haml
app/views/projects/notes/_note.html.haml
+2
-2
No files found.
app/assets/javascripts/diff_notes/components/comment_resolve_btn.js.es6
View file @
4fba69dc
/* eslint-disable */
((
w
) => {
w.
CommentAndResolveBtn = Vue.extend({
(() => {
const
CommentAndResolveBtn = Vue.extend({
props: {
discussionId: String,
textareaIsEmpty: Boolean
},
data() {
return {
textareaIsEmpty: true
}
},
computed: {
discussion: function () {
...
...
@@ -47,4 +51,6 @@
$(`#new-discussion-note-form-${this.discussionId} .note-textarea`).off('input.comment-and-resolve-btn');
}
});
Vue.component('comment-and-resolve-btn', CommentAndResolveBtn);
})(window);
app/assets/javascripts/diff_notes/components/resolve_btn.js.es6
View file @
4fba69dc
/* eslint-disable */
((
w
) => {
w.
ResolveBtn = Vue.extend({
(() => {
const
ResolveBtn = Vue.extend({
props: {
noteId: Number,
discussionId: String,
...
...
@@ -101,4 +101,6 @@
CommentsStore.create(this.discussionId, this.noteId, this.canResolve, this.resolved, this.resolvedBy);
}
});
})(window);
Vue.component('resolve-btn', ResolveBtn);
})();
app/assets/javascripts/diff_notes/components/resolve_count.js.es6
View file @
4fba69dc
...
...
@@ -13,6 +13,9 @@
computed: {
allResolved: function () {
return this.resolvedDiscussionCount === this.discussionCount;
},
resolvedCountText() {
return this.discussionCount === 0 ? 'discussion' : 'discussions';
}
}
});
...
...
app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js.es6
View file @
4fba69dc
/* eslint-disable */
((
w
) => {
w.
ResolveDiscussionBtn = Vue.extend({
(() => {
const
ResolveDiscussionBtn = Vue.extend({
props: {
discussionId: String,
mergeRequestId: Number,
...
...
@@ -54,4 +54,6 @@
CommentsStore.createDiscussion(this.discussionId, this.canResolve);
}
});
})(window);
Vue.component('resolve-discussion-btn', ResolveDiscussionBtn);
})();
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
View file @
4fba69dc
...
...
@@ -10,17 +10,18 @@
$(() => {
window.DiffNotesApp = new Vue({
el: '#diff-notes-app',
components: {
'resolve-btn': ResolveBtn,
'resolve-discussion-btn': ResolveDiscussionBtn,
'comment-and-resolve-btn': CommentAndResolveBtn
},
methods: {
compileComponents: function () {
const $components = $('resolve-btn, resolve-discussion-btn, jump-to-discussion');
const $components = $('resolve-btn, resolve-discussion-btn, jump-to-discussion, comment-and-resolve-btn');
if ($components.length) {
$components.each(function () {
DiffNotesApp.$compile($(this).get(0));
const $this = $(this);
const tmp = Vue.extend({
template: $this.get(0).outerHTML,
parent: DiffNotesApp,
});
$this.replaceWith(new tmp().$mount().$el);
});
}
}
...
...
app/assets/javascripts/notes.js
View file @
4fba69dc
...
...
@@ -647,7 +647,8 @@
var
$commentBtn
=
form
.
find
(
'comment-and-resolve-btn'
);
$commentBtn
.
attr
(
':discussion-id'
,
"'"
+
dataHolder
.
data
(
'discussionId'
)
+
"'"
);
DiffNotesApp
.
$compile
(
$commentBtn
.
get
(
0
));
DiffNotesApp
.
compileComponents
();
}
form
.
find
(
".js-note-text"
).
focus
();
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
4fba69dc
...
...
@@ -74,14 +74,15 @@
%span
.badge
=
@merge_request
.
diff_size
%li
#resolve-count-app
.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs
{
"v-cloak"
=>
true
}
%resolve-count
{
"inline-template"
=>
true
,
":logged-out"
=>
"#{current_user.nil?}"
}
.line-resolve-all
{
"v-show"
=>
"discussionCount > 0"
,
":class"
=>
"{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }"
}
%span
.line-resolve-btn.is-disabled
{
type:
"button"
,
":class"
=>
"{ 'is-active': resolvedDiscussionCount === discussionCount }"
}
=
render
"shared/icons/icon_status_success.svg"
%span
.line-resolve-text
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ discussionCount | pluralize 'discussion' }} resolved
=
render
"discussions/jump_to_next"
%div
.line-resolve-all
{
"v-show"
=>
"discussionCount > 0"
,
":class"
=>
"{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }"
}
%span
.line-resolve-btn.is-disabled
{
type:
"button"
,
":class"
=>
"{ 'is-active': resolvedDiscussionCount === discussionCount }"
}
=
render
"shared/icons/icon_status_success.svg"
%span
.line-resolve-text
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
=
render
"discussions/jump_to_next"
.tab-content
#diff-notes-app
#notes
.notes.tab-pane.voting_notes
...
...
app/views/projects/notes/_note.html.haml
View file @
4fba69dc
...
...
@@ -32,7 +32,7 @@
"resolved-by"
=>
"#{note.resolved_by.try(:name)}"
,
"v-show"
=>
"#{can_resolve || note.resolved?}"
,
"inline-template"
=>
true
,
"
v-ref:note_#{note.id}"
=>
true
}
"
ref"
=>
"note_#{note.id}"
}
.note-action-button
=
icon
(
"spin spinner"
,
"v-show"
=>
"loading"
)
...
...
@@ -43,7 +43,7 @@
"@click"
=>
"resolve"
,
":title"
=>
"buttonText"
,
"v-show"
=>
"!loading"
,
"
v-el:button"
=>
true
}
"
:ref"
=>
"'button'"
}
=
render
"shared/icons/icon_status_success.svg"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment