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
d6e724d9
Commit
d6e724d9
authored
Aug 01, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved method to compile components from window into diffnotesapp
parent
f65d8eb3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
18 deletions
+25
-18
diff_notes_bundle.js.es6
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
+10
-9
merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-2
notes.js
app/assets/javascripts/notes.js
+4
-4
single_file_diff.js
app/assets/javascripts/single_file_diff.js
+9
-3
No files found.
app/assets/javascripts/diff_notes/diff_notes_bundle.js.es6
View file @
d6e724d9
...
...
@@ -13,6 +13,16 @@ $(() => {
'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');
if ($components.length) {
$components.each(function () {
DiffNotesApp.$compile($(this).get(0));
});
}
}
}
});
...
...
@@ -22,13 +32,4 @@ $(() => {
'resolve-count': ResolveCount
}
});
window.compileVueComponentsForDiffNotes = function () {
const $components = $('resolve-btn, resolve-discussion-btn, jump-to-discussion');
if ($components.length) {
$components.each(function () {
DiffNotesApp.$compile($(this).get(0));
});
}
}
});
app/assets/javascripts/merge_request_tabs.js
View file @
d6e724d9
...
...
@@ -120,8 +120,8 @@
return
function
(
data
)
{
$
(
'#diffs'
).
html
(
data
.
html
);
if
(
compileVueComponentsForDiffNotes
)
{
compileVueComponentsForDiffNote
s
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponent
s
();
}
gl
.
utils
.
localTimeAgo
(
$
(
'.js-timeago'
,
'div#diffs'
));
...
...
app/assets/javascripts/notes.js
View file @
d6e724d9
...
...
@@ -300,8 +300,8 @@
discussionContainer
.
append
(
note_html
);
}
if
(
compileVueComponentsForDiffNotes
)
{
compileVueComponentsForDiffNote
s
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponent
s
();
}
gl
.
utils
.
localTimeAgo
(
$
(
'.js-timeago'
,
note_html
),
false
);
...
...
@@ -429,8 +429,8 @@
$note_li
.
replaceWith
(
$html
);
if
(
compileVueComponentsForDiffNotes
)
{
compileVueComponentsForDiffNote
s
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponent
s
();
}
};
...
...
app/assets/javascripts/single_file_diff.js
View file @
d6e724d9
...
...
@@ -36,11 +36,15 @@
if
(
!
this
.
isOpen
&&
!
this
.
hasError
)
{
this
.
content
.
hide
();
this
.
collapsedContent
.
show
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
if
(
this
.
content
)
{
this
.
collapsedContent
.
hide
();
this
.
content
.
show
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
{
return
this
.
getContentHTML
();
}
...
...
@@ -55,7 +59,9 @@
if
(
data
.
html
)
{
_this
.
content
=
$
(
data
.
html
);
_this
.
content
.
syntaxHighlight
();
compileVueComponentsForDiffNotes
();
if
(
DiffNotesApp
)
{
DiffNotesApp
.
compileComponents
();
}
}
else
{
_this
.
hasError
=
true
;
_this
.
content
=
$
(
ERROR_HTML
);
...
...
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